Hopefully you already downloaded and played the latest beta release of the ultimate NES hack: Zelda - The Legend of Link:http://acmlm.kafuka.org/board/thread.php?id=7308&page=1
I have been looking into why 'Zelda - The Legend of Link' does NOT run properly on the DS emulator nesDS. It seems as if it fit the profile of what is described by the author:
"There is a fast way to learn if my rom will play perfectly on an emulator you use.
Watch the intro after the title screen fades away. I have a golden scroll moving up the screen.
If that scroll & text comes up garbage, then you should stop playing unfortunately.
This is because the emulator you are using, is not utilizing the MMC5 register $5130 correctly.
I perform chr swaps for 3 specific things, the intro, a mini game, and the Ganon fight.
If you continue to play the game with the garbaged gfx, it will obviously look bad, and it might even crash."
Since the emulator FCEUX does handle the register in question correctly, I did a comparison of the source-code between the two.
Here is a screen-shot of the file mmc5.cpp from the source of FCEUX (http://sourceforge.net/p/fceultra/code/HEAD/tree/fceu/trunk/src/boards/mmc5.cpp
And here is the corresponding code of map5.s from the source of nesDS (http://sourceforge.net/p/nesds/code/ci/master/tree/arm9/source/mappers/map5.s
So, if I understand it correctly, it is a matter of translating the C-code below into Assembler, in a way that fit the rest of the Assembler code for nesDS:
CHRBanksA[A & 7] = V | ((MMC50x5130 & 0x3) << 8);
Is anybody skilled enough in Assembler to 'fix' nesDS?
This is what I've tried - so far:
1. Adding another variable, called mmc50x5130:
mmc50x5130 = mapperdata+25
2. Storing the value of address x5130:
3. Modifying the sprite section:
_20: @ For sprites.
4. Modifying the background section:
_28: @ For background.
Nedless to say - that didn't work...at all.
In fact - I made it worse, since now I get the 'red screen of death'.
At least another MMC5 game, Castlevania 3, seemed unaffected by my feeble attempts...