Have any of you guys been able to do 1k chr bank switching for both the characters and sprites (PPU $0000 - $1fff) using the MMC3 $8000, and $8001?
From my experiments it seems that commands 2-5 seem to treat the address select bit (XOR w/ $1000) as always enabled so that I can only change the banks at $0000, $0400, $0800, $0c00.
However, commands 0, and 1 (2k bank switching) seems to respect the address select bit (XOR w/ $1000).
I'm seeing the same behavior in nestopia and nintendulator.
Any clues as to why this is? Are my docs wrong? Does CHR bank switching need to be done in vblank?
From my experiments it seems that commands 2-5 seem to treat the address select bit (XOR w/ $1000) as always enabled so that I can only change the banks at $0000, $0400, $0800, $0c00.
However, commands 0, and 1 (2k bank switching) seems to respect the address select bit (XOR w/ $1000).
I'm seeing the same behavior in nestopia and nintendulator.
Any clues as to why this is? Are my docs wrong? Does CHR bank switching need to be done in vblank?
Code:
+-------+ +------------------------------------------------------+
¦ $8000 +---¦ CPxxxNNN ¦
+-------+ ¦ ¦¦ +-+ ¦
¦ ¦¦ +--- Command Number ¦
¦ ¦¦ 0 - Select 2 1K VROM pages at PPU $0000 ¦
¦ ¦¦ 1 - Select 2 1K VROM pages at PPU $0800 ¦
¦ ¦¦ 2 - Select 1K VROM page at PPU $1000 ¦
¦ ¦¦ 3 - Select 1K VROM page at PPU $1400 ¦
¦ ¦¦ 4 - Select 1K VROM page at PPU $1800 ¦
¦ ¦¦ 5 - Select 1K VROM page at PPU $1C00 ¦
¦ ¦¦ 6 - Select first switchable ROM page ¦
¦ ¦¦ 7 - Select second switchable ROM page ¦
¦ ¦¦ ¦
¦ ¦+-------- PRG Address Select ¦
¦ ¦ 0 - Enable swapping for $8000 and $A000 ¦
¦ ¦ 1 - Enable swapping for $A000 and $C000 ¦
¦ ¦ ¦
¦ +--------- CHR Address Select ¦
¦ 0 - Use normal address for commands 0-5 ¦
¦ 1 - XOR command 0-5 address with $1000 ¦
+------------------------------------------------------+
+-------+ +----------------------------------------------+
¦ $8001 +---¦ PPPPPPPP ¦
+-------+ ¦ +------+ ¦
¦ ¦ ¦
¦ ¦ ¦
¦ +------- Page Number for Command ¦
¦ Activates the command number ¦
¦ written to bits 0-2 of $8000 ¦
+----------------------------------------------+
¦ $8000 +---¦ CPxxxNNN ¦
+-------+ ¦ ¦¦ +-+ ¦
¦ ¦¦ +--- Command Number ¦
¦ ¦¦ 0 - Select 2 1K VROM pages at PPU $0000 ¦
¦ ¦¦ 1 - Select 2 1K VROM pages at PPU $0800 ¦
¦ ¦¦ 2 - Select 1K VROM page at PPU $1000 ¦
¦ ¦¦ 3 - Select 1K VROM page at PPU $1400 ¦
¦ ¦¦ 4 - Select 1K VROM page at PPU $1800 ¦
¦ ¦¦ 5 - Select 1K VROM page at PPU $1C00 ¦
¦ ¦¦ 6 - Select first switchable ROM page ¦
¦ ¦¦ 7 - Select second switchable ROM page ¦
¦ ¦¦ ¦
¦ ¦+-------- PRG Address Select ¦
¦ ¦ 0 - Enable swapping for $8000 and $A000 ¦
¦ ¦ 1 - Enable swapping for $A000 and $C000 ¦
¦ ¦ ¦
¦ +--------- CHR Address Select ¦
¦ 0 - Use normal address for commands 0-5 ¦
¦ 1 - XOR command 0-5 address with $1000 ¦
+------------------------------------------------------+
+-------+ +----------------------------------------------+
¦ $8001 +---¦ PPPPPPPP ¦
+-------+ ¦ +------+ ¦
¦ ¦ ¦
¦ ¦ ¦
¦ +------- Page Number for Command ¦
¦ Activates the command number ¦
¦ written to bits 0-2 of $8000 ¦
+----------------------------------------------+