Ran into a problem with VRC2 that wasn't documented in the Wiki or Disch's docs, so I added it to the Wiki. Posting here to explain the change.
So, since VRC4 is basically (VRC2++)++, it seems most emulators probably just use VRC4 on it, and thus the VRC2 games have 8KB of PRG RAM mapped from $6000-7fff. However, VRC2 lacks any PRG RAM, as you can see from this board screenshot:
http://bootgod.dyndns.org:7777/profile.php?id=1568
And yet, VRC2 games seem to expect to be able to write to $6000.d0, and read back the result. If this fails, the games crash before showing any graphics. This is true for at least Contra (J) and Ganbare Goemon 2 (J). I didn't test any others.
I've verified that neither 0x00 nor CPU MDR (open bus) allow the games to work. Here's a disassembly from Contra (J):
I have no idea what $6000.d0 is or does: it may be a chip enable, it may just be a one-bit storage latch. Who knows. Anything can be returned in d1-d7, and nothing needs to happen for $6001-7fff for the games to work.
I've added the info to the Wiki here:
http://wiki.nesdev.com/w/index.php/VRC2 ... .246000.29
Feel free to make any changes/corrections.
So, since VRC4 is basically (VRC2++)++, it seems most emulators probably just use VRC4 on it, and thus the VRC2 games have 8KB of PRG RAM mapped from $6000-7fff. However, VRC2 lacks any PRG RAM, as you can see from this board screenshot:
http://bootgod.dyndns.org:7777/profile.php?id=1568
And yet, VRC2 games seem to expect to be able to write to $6000.d0, and read back the result. If this fails, the games crash before showing any graphics. This is true for at least Contra (J) and Ganbare Goemon 2 (J). I didn't test any others.
I've verified that neither 0x00 nor CPU MDR (open bus) allow the games to work. Here's a disassembly from Contra (J):
Code:
f863 ldy #$03 A:05 X:00 Y:ff S:ff nvdIzC
f865 tya A:05 X:00 Y:03 S:ff nvdIzC
f866 and #$01 A:03 X:00 Y:03 S:ff nvdIzC
f868 sta $07e9 A:01 X:00 Y:03 S:ff nvdIzC
f86b sta $6000 A:01 X:00 Y:03 S:ff nvdIzC
f86e lda $6000 A:01 X:00 Y:03 S:ff nvdIzC //returns open bus here
f871 and #$01 A:60 X:00 Y:03 S:ff nvdIzC
f873 cmp $07e9 A:00 X:00 Y:03 S:ff nvdIZC
f876 bne $f87d A:00 X:00 Y:03 S:ff NvdIzc
f87d jmp $0000 A:00 X:00 Y:03 S:ff NvdIzc
0000 brk #$01 A:00 X:00 Y:03 S:ff NvdIzc
f8e1 rti A:00 X:00 Y:03 S:fc NvdIzc
...
f865 tya A:05 X:00 Y:03 S:ff nvdIzC
f866 and #$01 A:03 X:00 Y:03 S:ff nvdIzC
f868 sta $07e9 A:01 X:00 Y:03 S:ff nvdIzC
f86b sta $6000 A:01 X:00 Y:03 S:ff nvdIzC
f86e lda $6000 A:01 X:00 Y:03 S:ff nvdIzC //returns open bus here
f871 and #$01 A:60 X:00 Y:03 S:ff nvdIzC
f873 cmp $07e9 A:00 X:00 Y:03 S:ff nvdIZC
f876 bne $f87d A:00 X:00 Y:03 S:ff NvdIzc
f87d jmp $0000 A:00 X:00 Y:03 S:ff NvdIzc
0000 brk #$01 A:00 X:00 Y:03 S:ff NvdIzc
f8e1 rti A:00 X:00 Y:03 S:fc NvdIzc
...
I have no idea what $6000.d0 is or does: it may be a chip enable, it may just be a one-bit storage latch. Who knows. Anything can be returned in d1-d7, and nothing needs to happen for $6001-7fff for the games to work.
I've added the info to the Wiki here:
http://wiki.nesdev.com/w/index.php/VRC2 ... .246000.29
Feel free to make any changes/corrections.