NOTE: I fixed the problem - thanks to everyone's help on this thread!
Solution may be found towards the end of the thread
I have done quite a few strides with my MMC5 mapper implementation, and in the process rewrote the mirroring mode to allow the generality required by MMC5, and also a mechanism for reading nametables 2 and 3 externally from the PPU (that is the MMC5 mapper in this case). The $5120-$5512B CHR bank switching range seems to be working well both for 8x8 and 8x16 sprite modes. Fill mode also seems to be working well, although the only test in this regard (Castlevania III), fill mode is only used as a temporary blank screen transition, from what I gather. The Intro of the game is also working well (the moving reel bit), except for a tiny glitch at the top 8 pixels, which I suspect could be due to a problem with the scanline irq counter.
Now I am struggling with trying to get the first floor of the castle within Castlevania III to look right. The game's code up to this point seems to only set Extanded Ram mode zero, and to be honest, I'm not quite sure how to apply the Expanded Ram mode rules, for instance if at the point of reading/writing to the range $5C00-$5FFF, or when the PPU reads nametable C, or for both cases. I'm referring to the following:
From what I understand Mode zero simply allows a name table C to be read from Extended Ram (both tiles and attributes). From what I gather, Castlevania is trying to build the castle's first floor from this. Am I correct?
I'm attaching a screenshot for reference in the hope that it might help lead to the cause of the problem:
Castle First Floor:
The garbled screen is directly above the castle ground floor:
Solution may be found towards the end of the thread
I have done quite a few strides with my MMC5 mapper implementation, and in the process rewrote the mirroring mode to allow the generality required by MMC5, and also a mechanism for reading nametables 2 and 3 externally from the PPU (that is the MMC5 mapper in this case). The $5120-$5512B CHR bank switching range seems to be working well both for 8x8 and 8x16 sprite modes. Fill mode also seems to be working well, although the only test in this regard (Castlevania III), fill mode is only used as a temporary blank screen transition, from what I gather. The Intro of the game is also working well (the moving reel bit), except for a tiny glitch at the top 8 pixels, which I suspect could be due to a problem with the scanline irq counter.
Now I am struggling with trying to get the first floor of the castle within Castlevania III to look right. The game's code up to this point seems to only set Extanded Ram mode zero, and to be honest, I'm not quite sure how to apply the Expanded Ram mode rules, for instance if at the point of reading/writing to the range $5C00-$5FFF, or when the PPU reads nametable C, or for both cases. I'm referring to the following:
Code:
Extended RAM mode ($5104)
7 bit 0
---- ----
xxxx xxXX
||
++- Specify extended RAM usage
0 - Use as extra nametable (possibly for split mode)
1 - Use as extended attribute data (can also be used as extended nametable)
2 - Use as ordinary RAM
3 - Use as ordinary RAM, write protected
7 bit 0
---- ----
xxxx xxXX
||
++- Specify extended RAM usage
0 - Use as extra nametable (possibly for split mode)
1 - Use as extended attribute data (can also be used as extended nametable)
2 - Use as ordinary RAM
3 - Use as ordinary RAM, write protected
From what I understand Mode zero simply allows a name table C to be read from Extended Ram (both tiles and attributes). From what I gather, Castlevania is trying to build the castle's first floor from this. Am I correct?
I'm attaching a screenshot for reference in the hope that it might help lead to the cause of the problem:
Castle First Floor:
The garbled screen is directly above the castle ground floor: