Need help Dumping VRC4 games

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderators: B00daW, Moderators

Post Reply
User avatar
Danexmurder
Posts: 10
Joined: Sun Dec 27, 2020 9:42 pm

Need help Dumping VRC4 games

Post by Danexmurder » Tue Feb 23, 2021 10:34 pm

I recently grabbed a CopyNES and have had a lot of fun ripping my games. I even ripped and translated Lagrange Point and have been having fun playing through that.

I have hit a brick wall though with a lot of my Konami games. I haven't had any luck dumping Wai Wai World 2 or Crisis Force. I've tried using the VRC2 mapper and the only real luck I've had is using a generic MMC3 and then converting it to mapper 21 using the Mesen header editor. I did download the VRC4 plug in but it fails every time I try to use it.

I tried messing with Bank Watch but I don't really know where to begin with it. Any help would be much appreciated. Thanks!

*edit*

For what it is worth I can get a game that will actually run. The music works. I just have scrambled graphics.

User avatar
Quietust
Posts: 1718
Joined: Sun Sep 19, 2004 10:59 pm
Contact:

Re: Need help Dumping VRC4 games

Post by Quietust » Wed Feb 24, 2021 6:25 am

The CopyNES VRC4 plugin is only compatible with the "VRC4f" setup which matches iNES mapper 23 - Wai Wai World 2 uses mapper 21 and thus isn't compatible, and I'm not sure what Crisis Force uses.

In order to dump Wai Wai World 2, you'll need to edit and recompile the VRC4 plugin to use $B000/$B002/$B004/$B006 instead of $B000/$B001/$B002/$B003 and to use $9004 instead of $9002. If you're not sure how to do that, you can instead hex-edit the VRC4.BIN file as follows (but keep a backup of the original one):
  • 013D : 01 -> 02 ($B001 -> $B002)
  • 01F7 : 01 -> 02 ($B001 -> $B002)
  • 01FC : 02 -> 04 ($B002 -> $B004)
  • 0203 : 03 -> 06 ($B003 -> $B006)
  • 0083 : 02 -> 04 ($9002 -> $9004)
  • 0163 : 02 -> 04 ($9002 -> $9004)
  • 0196 : 02 -> 04 ($9002 -> $9004)
If you want to support multiple VRC4 versions at once, you can save extra copies of the file with different changes and then add them to "mappers.dat" (the file is meant to be generated by the "MAKEBASE.BAS" QBasic program, but as long as you don't touch the first 2 lines and don't change any of the column widths then CopyNESW should still be able to read it).

Edit: fixed one of the patch points to have the correct address
Last edited by Quietust on Wed Feb 24, 2021 3:57 pm, edited 1 time in total.
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.

User avatar
Danexmurder
Posts: 10
Joined: Sun Dec 27, 2020 9:42 pm

Re: Need help Dumping VRC4 games

Post by Danexmurder » Wed Feb 24, 2021 9:14 am

Thanks so much for the response! I had come to the conclusion that I needed to hex edit the VRC4 plug in and had looked up the mapper info on the wiki but I was at a loss for what to actually change. I've never done any hex editing before. Thanks for spelling it out for me. I'll give that a go tonight.

User avatar
Danexmurder
Posts: 10
Joined: Sun Dec 27, 2020 9:42 pm

Re: Need help Dumping VRC4 games

Post by Danexmurder » Wed Feb 24, 2021 3:26 pm

Quietust wrote:
Wed Feb 24, 2021 6:25 am
The CopyNES VRC4 plugin is only compatible with the "VRC4f" setup which matches iNES mapper 23 - Wai Wai World 2 uses mapper 21 and thus isn't compatible, and I'm not sure what Crisis Force uses.

In order to dump Wai Wai World 2, you'll need to edit and recompile the VRC4 plugin to use $B000/$B002/$B004/$B006 instead of $B000/$B001/$B002/$B003 and to use $9004 instead of $9002. If you're not sure how to do that, you can instead hex-edit the VRC4.BIN file as follows (but keep a backup of the original one):
  • 013D : 01 -> 02 ($B001 -> $B002)
  • 01F7 : 01 -> 02 ($B001 -> $B002)
  • 01F7 : 02 -> 04 ($B002 -> $B004)
  • 0203 : 03 -> 06 ($B003 -> $B006)
  • 0083 : 02 -> 04 ($9002 -> $9004)
  • 0163 : 02 -> 04 ($9002 -> $9004)
  • 0196 : 02 -> 04 ($9002 -> $9004)
If you want to support multiple VRC4 versions at once, you can save extra copies of the file with different changes and then add them to "mappers.dat" (the file is meant to be generated by the "MAKEBASE.BAS" QBasic program, but as long as you don't touch the first 2 lines and don't change any of the column widths then CopyNESW should still be able to read it).
I just wanted to report back that this worked! I used HxD to edit the VRC4.bin and just saved it out as a new VRC4A1.bin and loaded that. Worked on the first shot. I do have a couple of questions though.

Above you listed

[*] 01F7 : 01 -> 02 ($B001 -> $B002)
[*] 01F7 : 02 -> 04 ($B002 -> $B004)

I was only able to see 01 at this location. Is there something I'm missing about changing 02 to 04? is it at another location?

I'm also curious how you determined the various points in the hex editor that need to be changed. I'm going to edit this further so I can dump Crisis Force which uses a VRC4E by the look of it. PCB 352396.

On the wiki this is listed as using $x000, $x004, $x008, $x00C

So I'm assuming my edit should look something like this?

[*] 013D : 02 -> 04
[*] 01F7 : 04 -> 08
[*] 0203 : 06 -> 0C

User avatar
Quietust
Posts: 1718
Joined: Sun Sep 19, 2004 10:59 pm
Contact:

Re: Need help Dumping VRC4 games

Post by Quietust » Wed Feb 24, 2021 3:53 pm

Danexmurder wrote:
Wed Feb 24, 2021 3:26 pm
Above you listed

[*] 01F7 : 01 -> 02 ($B001 -> $B002)
[*] 01F7 : 02 -> 04 ($B002 -> $B004)

I was only able to see 01 at this location. Is there something I'm missing about changing 02 to 04? is it at another location?
That was a copy/paste error - the second one was supposed to be at 01FC.
Danexmurder wrote:
Wed Feb 24, 2021 3:26 pm
I'm also curious how you determined the various points in the hex editor that need to be changed. I'm going to edit this further so I can dump Crisis Force which uses a VRC4E by the look of it. PCB 352396.

On the wiki this is listed as using $x000, $x004, $x008, $x00C

So I'm assuming my edit should look something like this?

[*] 013D : 02 -> 04
[*] 01F7 : 04 -> 08
[*] 0203 : 06 -> 0C
Almost - 01F7 should become 04 while 01FC should become 08. Also, you'll need to fix the $9002 writes as well, though I'm not exactly sure what the 2nd one is trying to do (it thinks that writing #$01 will enable SRAM, but the wiki says that doesn't do anything at all).

The way I got those addresses was by reading plugins/done/vrc4.asm and searching for mapper writes (i.e. to $8000-$FFFF). For reference, the relevant code is as follows:

Code: Select all

send_plp3:   lda temp3_hi
             sta 0b000h
             lsr a
             lsr a
             lsr a
             lsr a
             sta 0b001h      ;current bank
and

Code: Select all

cc_loop:     lda temp3_lo
             sta 0b000h
             lsr a
             lsr a
             lsr a
             lsr a
             sta 0b001h
             lda temp3_hi
             sta 0b002h      ;write in current banks
             lsr a
             lsr a
             lsr a
             lsr a
             sta 0b003h
             ldx #004h
             lda #000h
             sta curr_bank   ;reset current bank
Also:

Code: Select all

             .fill 0400h-*,00h    ;all plugins must reside at 400h

             lda #000h
             sta 09002h
...
;check for save-game RAM and back it up if it exists             

no_chr:      lda #001h
             sta 09002h
...
             lda #000h
             sta 09002h

no_ram2: ...
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.

Post Reply