EDIT: Disregard this, the problem is that QuickNES initializes cartRAM with FF instead of 00 and a read I'd forgotten about for another feature I was working on was skipping the header entirely.
I am working on a hack of SMB1 that ads an option menu, so that I can create challenges for an internet gameshow. As such, I need the hack to work in Bizhawk's QuickNES core. Problem is, it's not!
I've converted the ROM to MMC3 and expanded it to allow for the menu. And earlier version of this worked fine in QuickNES, but a recent change I made moved the level data to another bank, and to avoid having to bank switch during gameplay (mostly because it was acting funny and I couldn't figure out the problem) I move the entire level and enemy data chunks to cart ram. This is where it seems to be having a problem.
When the routine to read the level headers runs, it seems to be losing the data somehow, and getting all zeros. Mario starts falling from the sky auto-walking with no time, there's no floor, no background, all stuff from the level header. In every other emulator I've tried it in, the game works as intended.
Does anyone have any idea why this would be behaving differently in QuickNES? Is there an implementation of Libretro cores that has a working debugger so that I can see myself where it's going wrong?