I am having difficulty getting the mapper controlled nametables to work. For the unlicensed Super Mario World port (mapper 090), it appears to set the nametable registers to { 0, 1, 2, 3 }. That seems to suggest 4-screen VRAM. But, the wiki mentions that:
Code: Select all
If the bits match, then NES internal NT RAM is used instead (either NTA or NTB, depending on bit 0 of the NT reg)
Since it seems to be configured to use internal NT RAM, why would it set the nametable registers to anything other than 0 and 1?
During testing, I put in a hack where I set the nametable registers to { 0, 0, 2, 2 } (a vertical arrangement / horizontal mirroring). That at least got the title screen displaying correctly. But, screens of the game still appeared glitched.
Edit: I noticed it says, "mapper 090 behaves as though N were always clear (0)". Meaning, advanced NT control is disabled. It is still unclear why it sets the NT registers at all since they should have no effect in that mode. Debugging reveals that it switches between horizontal and vertical mirroring. I'm still having difficulty getting the backgrounds to display correctly.
Edit 2: I think I solved all my issues. It was mainly problems related to the interrupts.