After wrestling with 6502 and NES PPU for a month, I finally have a text-mode engine that allows me to write a bank-switching test ROM, hoped for finding the smoking gun of unimplemented 256 K mode in the mapper that crashes the game I wanted to play. Unfortunately, the tests passed with flying colors on real hardware. So it was not bank switching. Just after I ordered a 2A03-based NES motherboard clone, planning to debug this "hardware compatibility problem" further, I decided to actually read the "src" directory that comes with the
Touhou NES demake. I found the game copies executable code to cartridge WRAM at startup, because it's self-modifying. WRAM is physically omitted by the cartridge design I am using, so of course it crashes...

Half a month completely wasted.

Lesson learned: how NOT to make a NES cartridge. Surprisingly, the game's author, in true NES hacker's fashion, has
their personal CPLD-based MMC3 cartridge implementation, which was where the game was tested on. I just need to replicate the board, and the game will hopefully run.
#retrocomputing #retrogaming #NES #NESdev #小霸王学习机