Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- These are the conclusions from Eke-Eke when he got another dump from another guy by when he implemented support to Legend of Wukong into GenPlusGX:
- "1) your dump is actually overdumped and should only be 2228224 bytes
- (range is $000000-$21FFFF, just as indicated in ROM header), the game
- uses a custom checksum routine that covers this area, which means the
- data you dumped is correct since the test passes in any emu.
- 2) 8K of SRAM is mapped between $3C0001 and $3C3FFF (odd address only)
- and is tested on startup (the game writes data in this area and expect
- same data to be read)
- 3) Bytes written to low ROM area (the game writes address $E01 but maybe
- other addresses work) goes to cartridge custom bank-switching hardware:
- - when bit 7 is set (0x80 for example), $200000-$21FFFF (last 128k ROM
- bank) is remapped to $000000- $01FFFF (first 128k ROM bank).
- - when bit 7 is cleared (0x00 for example), $200000-$21FFFF is mapped
- normally.
- I've yet to figure a patched ROM that could work in any emulator and
- flashcarts as they are actually two things to fix:
- (1) many emulators (like Kega I think) and flashcarts only support SRAM
- mapped at $200000-$20FFFF. I don't think this is fixable since it would
- require too many modifications to the code to change the SRAM access
- routines so the only solution would be to use flashcarts or emulators
- that properly use info from the ROM header and support SRAM mapped to
- any address (Regen apparently does since it does not give me a SRAM
- error with this ROM), will try Everdrive when I have the time
- (2) once $E01 has been written to trigger bank-switching, all memory
- access, jump, etc... to $200000-$21FFFF should be patched to use
- $000000- $01FFFF instead. The problem is that it can be complicated to
- find all locations in code where absolute addresses need to be patched.
- And here are the patches to the game work in any emulator:
- 000414:4E71
- 000416:4E71 ; bypass SRAM check on startup (only needed for emulators, like Fusion, or flashcarts that do not support SRAM to be mapped in unusual region like $3c000-$3c3fff)
- 20777A:4E71 ; bypass checksum routine
- 007730:000F
- 0FE17E:0000
- 0FFF20:000F
- 0FFF2E:000F
- 01C5BC:0010
- 007596:0010
- 0FFF8C:0010 ; bypass ROM bank-switching (maybe there are more ?)"
Add Comment
Please, Sign In to add comment