kirjavascript / TetrisGYM

nes tetris training rom
Other
197 stars 18 forks source link

MMC3 Init Adjustment #42

Closed zohassadar closed 1 year ago

zohassadar commented 1 year ago

Looked into the Kryzsio fix again and learned that the PRG init code that already existed in "changePrgBank" would have worked except for the fact that it existed in PRG address space that had yet to be initialized properly (0x8000-0xbfff). Instead of duplicating this code in the reset function, it's been moved it to a separate function still defined in reset.asm to gurantee it's in the fixed bank. The code in "changePrgBank" specific to mmc3 has been removed as it's redundant, and the initialization code has been tightened up and also modified to allow the onboard ram to work. Tested on Mesen, Everdrive & Kryzsio.

Side note, if there's a desire to keep reset.asm clean, then core.asm could be moved to PRG_chunk2, or the MMC functions can be defined in a separate asm and placed in PRG_chunk2. This would keep the init code in the fixed 16k of PRG.

kirjavascript commented 1 year ago

sick