Contra J repro on Batman 2?

A place that you can discuss reproduction of classic titles or "licensed-for-reproduction" homebrew for personal use.

Moderators: B00daW, Moderators

Forum rules
1. NO BLATANT PIRACY. This includes reproducing homebrew less than 10 years old, with the exception of free software.
2. No advertising your reproductions, with the exception of free software.
3. Be nice. See RFC 1855 if you aren't sure what this means.
User avatar
l_oliveira
Posts: 404
Joined: Wed Jul 13, 2011 6:51 am
Location: Brasilia, Brazil

Re: Contra J repro on Batman 2?

Post by l_oliveira » Wed Jun 10, 2015 7:10 pm

lidnariq wrote:Totally doesn't matter! :)

But you could drop a 6264 on there, and then be very confused why you were only getting access to 4 KiB of it.
That happened. When I was trying to run the Batman RotJ.

kuroiryu
Posts: 8
Joined: Tue Jun 09, 2015 5:34 pm

Re: Contra J repro on Batman 2?

Post by kuroiryu » Wed Jun 10, 2015 8:11 pm

Those changes would be enough to convert from VRC2a to VRC2b... okay, I just looked at Twinbee 3, and its reset vector is $F0D0. So it looks like that's the sticking point for Dragon Scroll. Its reset vector is $C001, which is outside the VRC2 "last bank" range. I thought initializing VRC4's PRG swap mode register would be enough to get Dragon Scroll working on its own board with a VRC4 in place of VRC2, but it's not.

SRAM is obviously of no concern, since VRC2 had no SRAM support (and its Microwire interface is supposedly broken, which is why it was never actually used).

User avatar
l_oliveira
Posts: 404
Joined: Wed Jul 13, 2011 6:51 am
Location: Brasilia, Brazil

Re: Contra J repro on Batman 2?

Post by l_oliveira » Wed Jun 10, 2015 8:30 pm

To make Dragon scroll work on my VRC4 board it was even more "ridiculously simple" (trivial) than other games:

Original:
00000000 4E 45 53 1A 08 10 70 10 00 00 00 00 00 00 00 00

Patched:
00000000 4E 45 53 1A 08 10 90 10 00 00 00 00 00 00 00 00

Original:
0001C1D0 60 0A A8 B9 4B C2 AA 4A 4A 4A 4A 8D 01 B0 8E 00
0001C1E0 B0 E8 8D 03 B0 8E 02 B0 E8 8D 01 C0 8E 00 C0 E8
0001C1F0 8D 03 C0 8E 02 C0 B9 4C C2 AA 4A 4A 4A 4A 8D 01
0001C200 D0 8E 00 D0 E8 8D 03 D0 8E 02 D0 E8 8D 01 E0 8E
0001C210 00 E0 E8 8D 03 E0 8E 02 E0 A9 00 8D 00 90 60 1B

Patched:
0001C1D0 60 0A A8 B9 4B C2 AA 4A 4A 4A 4A 8D 08 B0 8E 00
0001C1E0 B0 E8 8D 0C B0 8E 04 B0 E8 8D 08 C0 8E 00 C0 E8
0001C1F0 8D 0C C0 8E 04 C0 B9 4C C2 AA 4A 4A 4A 4A 8D 08
0001C200 D0 8E 00 D0 E8 8D 0C D0 8E 04 D0 E8 8D 08 E0 8E
0001C210 00 E0 E8 8D 0C E0 8E 04 E0 A9 00 8D 00 90 60 1B


Being very honest here, the only games which I had some difficulty to convert was Boku Dracula Kun and Bokutte Upa (those are already VRC4 games but I wanted to change their board type to the board type I have here) because they use indexed indirect writes (X,Y) to update the mapper registers and I had to find where it loaded the base value for the indexing pointer.

kuroiryu
Posts: 8
Joined: Tue Jun 09, 2015 5:34 pm

Re: Contra J repro on Batman 2?

Post by kuroiryu » Wed Jun 10, 2015 9:02 pm

Yep, I can confirm that Dragon Scroll works on "VRC4f" wiring (A1, A0) as long as it's able to clear the PRG swap mode register and fix the next to last PRG bank to $C000. I was able to get it working myself thanks to lidnariq's guidance on where said register actually was ($9002 instead of $9004 due to the address line differences).

Only the VRC2a games need anything extra because of the shifted 7-bit register writes you've pointed out.

I imagine it would be tricky to find all the appropriate register writes if they weren't direct. Luckily, I wasn't trying to convert to a different board; I just wanted to see Dragon Scroll running on its own board with a VRC4 swapped in, and I've now done so. :D
Last edited by kuroiryu on Fri Jun 12, 2015 7:13 am, edited 1 time in total.

User avatar
l_oliveira
Posts: 404
Joined: Wed Jul 13, 2011 6:51 am
Location: Brasilia, Brazil

Re: Contra J repro on Batman 2?

Post by l_oliveira » Thu Jun 11, 2015 5:52 am

Funny though, I did not mod anything besides the write addresses (as you can tell). And I tested the roms on the board I shown you the picture of. So I believe the real VRC4 chip powers on in a configuration it's compatible with VRC2.

kuroiryu
Posts: 8
Joined: Tue Jun 09, 2015 5:34 pm

Re: Contra J repro on Batman 2?

Post by kuroiryu » Thu Jun 11, 2015 6:20 am

Interesting... I'd chalk it up to a difference between devices from different batches, or some other factor that makes them behave a little differently. I'd assume Konami's standard practice was to initialize the chip, so its power-on state wouldn't be relevant. The date code on the VRC4 I used is 8923KP (so 23rd week of 1989, not sure if the KP part means anything important).

User avatar
l_oliveira
Posts: 404
Joined: Wed Jul 13, 2011 6:51 am
Location: Brasilia, Brazil

Re: Contra J repro on Batman 2?

Post by l_oliveira » Thu Jun 11, 2015 6:40 am

I can also confirm that putting a VRC4 IC on a VRC2 board could work but logical thinking (considering my results) suggest that no modification would be needed if the exactly same board as the original board for the game is used.

Now the opposite, I find hard because VRC4 has a extra addressing/banking mode for the PRG mapper and the VRC4 games sure use it to make sure they won't work with the VRC2.

Quoting the wiki:

"The Konami VRC4 is almost identical to the VRC2, but with a bit more capabilities, such as the option to swap PRG at $C000 instead of $8000 and an IRQ counter. " This statement neglects to mention the fact that VRC4 has one more address line for the CHR mapper therefore it can use 512KB of CHR ROM but one can easily notice it by reading the whole page.
http://wiki.nesdev.com/w/index.php/VRC4

On a manufacturing standpoint it makes sense make new stuff only work with the new chips but keep older software stuff from working with the newer chip is not productive. The opposite is interesting on a copy protection sense, though. So I believe the banking swap feature VRC4 has is there simply to prevent native VRC4 software from working with the VRC2.

tepples
Posts: 22052
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Contra J repro on Batman 2?

Post by tepples » Thu Jun 11, 2015 6:49 am

l_oliveira wrote:So I believe the banking swap feature VRC4 has is there simply to prevent native VRC4 software from working with the VRC2.
That or it was added because they wanted to swap DPCM samples. Notice how Blades of Steel (UNROM) freezes whenever the announcer says "Blades of Steel", "face-off", "fight", or "penalty shot". It freezes because those samples are being decoded in software from a bank other than the last one.

User avatar
l_oliveira
Posts: 404
Joined: Wed Jul 13, 2011 6:51 am
Location: Brasilia, Brazil

Re: Contra J repro on Batman 2?

Post by l_oliveira » Thu Jun 11, 2015 6:53 am

tepples wrote:
l_oliveira wrote:So I believe the banking swap feature VRC4 has is there simply to prevent native VRC4 software from working with the VRC2.
That or it was added because they wanted to swap DPCM samples. Notice how Blades of Steel (UNROM) freezes whenever the announcer says "Blades of Steel", "face-off", "fight", or "penalty shot". It freezes because those samples are being decoded in software from a bank other than the last one.
Now that you mention it, maybe Gimmick! could be made to work on the VRC4 without much effort, eh ? (lol)

User avatar
FARID
Posts: 499
Joined: Wed Apr 07, 2010 1:14 am
Location: Iran
Contact:

Re: Contra J repro on Batman 2?

Post by FARID » Thu Jun 11, 2015 12:34 pm

l_oliveira wrote: Now that you mention it, maybe Gimmick! could be made to work on the VRC4 without much effort, eh ? (lol)
How much effort?! :roll:
Maybe you want to see these :

Gimmick! VRC4 hack (1x LS161 & 2xLS157 add PRG A17 to VRC4)

Suikan Pipe (Gimmick Bootleg) WIP.

INES Mapper 183

Shui Guan Pipe (Unl) [!].nes = Suikan Pipe (Gimmick Bootleg) (As) [!].nes

User avatar
l_oliveira
Posts: 404
Joined: Wed Jul 13, 2011 6:51 am
Location: Brasilia, Brazil

Re: Contra J repro on Batman 2?

Post by l_oliveira » Thu Jun 11, 2015 12:52 pm

FARID wrote:
l_oliveira wrote: Now that you mention it, maybe Gimmick! could be made to work on the VRC4 without much effort, eh ? (lol)
How much effort?! :roll:
Maybe you want to see these :

Gimmick! VRC4 hack (1x LS161 & 2xLS157 add PRG A17 to VRC4)

Suikan Pipe (Gimmick Bootleg) WIP.

INES Mapper 183

Shui Guan Pipe (Unl) [!].nes = Suikan Pipe (Gimmick Bootleg) (As) [!].nes
I know that HORRIBLE HACK. I meant do it properly with the original sound.

Also you don't need to add A17 to VRC4. It has A17. Need to add A17 because the pirate mapper used on Suikan Pipe is a VRC2.

lidnariq
Posts: 9681
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Contra J repro on Batman 2?

Post by lidnariq » Thu Jun 11, 2015 1:21 pm

But the SS5B has three (well, four) different PRG banking registers, and the VRC4 only has two...? I thought that's what the 74'161+2x74'157 was fixing ?

User avatar
l_oliveira
Posts: 404
Joined: Wed Jul 13, 2011 6:51 am
Location: Brasilia, Brazil

Re: Contra J repro on Batman 2?

Post by l_oliveira » Thu Jun 11, 2015 1:27 pm

lidnariq wrote:But the SS5B has three (well, four) different PRG banking registers, and the VRC4 only has two...? I thought that's what the 74'161+2x74'157 was fixing ?
If they were doing that, the DPCM would work correctly, right ? It doesn't on that hack.

zxbdragon
Posts: 488
Joined: Mon Dec 12, 2011 8:15 pm

Re: Contra J repro on Batman 2?

Post by zxbdragon » Mon Sep 21, 2015 8:03 pm

try this rom for batman 2 pcb
Last edited by zxbdragon on Tue Oct 06, 2015 11:13 pm, edited 1 time in total.

User avatar
FARID
Posts: 499
Joined: Wed Apr 07, 2010 1:14 am
Location: Iran
Contact:

Re: Contra J repro on Batman 2?

Post by FARID » Tue Sep 22, 2015 5:15 am

zxbdragon wrote:try this rom for batman 2 pcb
Thank you
But unfortunately I don't have this cartridge anymore.

Post Reply