zeroone wrote:
Well, from what I can make out here, R:$01 provides a 4-bit inner register value and R:$81 provides a 6-bit outer register value. From the G value, I can combine the 4-bit and 6-bit values together using an OR-of-ANDs. I'm not clear on what to do with the combined value.
The OR of ANDs is a 16 KiB bank number, which means it's output on PRG ROM A18-A14 (PowerPak, up to 512 KiB), A20-A14 (iNES, up to 2 MiB), or A22-A14 (NES 2.0, up to 8 MiB). In software, this means ANDing the address with $3FFF and ORing it with (bank << 14).
Quote:
Also, R:$01 appears 3 times: once as a 32K block register and twice as a 16K block register. How is the LSB used in both cases?
In 32K mode, the register actually counts 32 KiB blocks, like on BNROM (#34) and AOROM (#7). In 16K modes, it counts 16 KiB blocks, like on UNROM (#2) and UNROM (Crazy Climber version) (#180). In neither case is the LSB of register $01 ignored, unlike on MMC1 where the LSB is ignored in 32K mode.
The Python and 6502 versions of the bank select function are authoritative. If the Disch-style docs contradict them, then I screwed up the Disch-style docs, and they should be fixed or removed.
Quote:
One more thing. It also mentions, "These represent the first and second half of the outer bank". Does that mean the 2 >R:$81<* that appear in the table are actually values separated by 16K?
The notation for that was kind of messy. I didn't have Disch to consult. What I meant is that the 16K bank number when P=1, S=0, and address in $8000-$BFFF, is reg $81 * 2, and the 16K bank number when P=1, S=1, and address in $C000-$FFFF, is reg $81 * 2 + 1.
Again, give me sample values, and I will work them through the formulas for you.