Contra J repro on Batman 2?

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Contra J repro on Batman 2?
by on (#129951)
This is a Batman 2 (VRC4d) pirate cartridge :

Cartridge :
Image

Front :
Image

Back :
Image

Front Scan :
Image

Back Scan :
Image

Schematic :
Image

Dump :
Image

Patch the IPS file of the dump to the original version of the game (Dynamite Batman (J).nes)

I want to run Contra (J).nes (VRC2b) on this cartridge

I swapped A2/A3 with A1/A0 on the AX5208C according to this info :

Batman 2 :
VRC4d, PCB 352400, mapper 25 submapper 3
(fr) CPU A2 -> |03 38| -> PRG A15 (r)
(fr) CPU A3 -> |04 37| <- CPU A12 (f)

Contra :
Contra VRC2 LROG009-00 23 2b B27B8CF4
VRC2b, PCBs 350603, 350636, 350926, and 351179, mapper 23 submapper 15
(fr) CPU A1 -> |03 38| -> PRG A15 (r)
(fr) CPU A0 -> |04 37| <- CPU A12 (f)

But it seems this is not enough!

If someone provide me a high quality picture of Contra (J).nes cartridge PCB, I will try to trace the lines and find out about it

Oh by the way in this page this is wrong :
(f) PPU A13 -> |11

It must be :
(f) PPU /A13 -> |11

Some useful info about VRC and AX5208C :
Konami Vrc I Pochodne
AX5208C Pinout
VRC2 pinout
VRC2
VRC4
Talk:VRC4
Konami VRC2 - $6000
VRC IV pinout
Gradius II (J) with AX5208P
Suikan Pipe (Gimmick Bootleg) WIP.
VRC2 to VRC4 conversion
Re: Contra J repro on Batman 2?
by on (#129962)
Contra is one of the VRC2 games that relies on the nonfunctional MicroWire interface that the VRC2 provides. As a result, there's a single bit of RAM mirrored across all of $6xxx in the least significant bit of the byte.

You'll either need to add RAM, or find/make a patch to remove the place where it reads and writes from $6xxx.
Re: Contra J repro on Batman 2?
by on (#130085)
Quote:
Contra is one of the VRC2 games that relies on the nonfunctional MicroWire interface that the VRC2 provides. As a result, there's a single bit of RAM mirrored across all of $6xxx in the least significant bit of the byte.

Thanks for the info

***************************************
Quote:
You'll either need to add RAM

Batman 2 cartridge has WRAM (RPG-RAM), can I use it instead of MicroWire EEPROM?
If so, should I change anything?

***************************************

Quote:
find/make a patch to remove the place where it reads and writes from $6xxx

According to this topic : Konami VRC2 - $6000
There is a some kind of protection code inside of Contra J :

Code:
 07:F863:A0 03     LDY #$03
 07:F865:98        TYA
 07:F866:29 01     AND #$01
 07:F868:8D E9 07  STA $07E9
 07:F86B:8D 00 60  STA $6000
 07:F86E:AD 00 60  LDA $6000
 07:F871:29 01     AND #$01
 07:F873:CD E9 07  CMP $07E9
 07:F876:D0 05     BNE $F87D
 07:F878:88        DEY
 07:F879:10 EA     BPL $F865
 07:F87B:30 03     BMI $F880
 07:F87D:4C 00 00  JMP $0000


On first attempt I changed STA $6000 / LDA $6000 to STA $00BF / LDA $00BF ($00BF seems to be unused) :
Code:
 07:F863:A0 03     LDY #$03
 07:F865:98        TYA
 07:F866:29 01     AND #$01
 07:F868:8D E9 07  STA $07E9
 07:F86B:8D BF 00  STA $00BF
 07:F86E:AD BF 00  LDA $00BF
 07:F871:29 01     AND #$01
 07:F873:CD E9 07  CMP $07E9
 07:F876:D0 05     BNE $F87D
 07:F878:88        DEY
 07:F879:10 EA     BPL $F865
 07:F87B:30 03     BMI $F880
 07:F87D:4C 00 00  JMP $0000


On second attempt I changed CMP $07E9 / BNE $F87D / JMP $0000 to NOP (EA) :
Code:
 07:F863:A0 03     LDY #$03
 07:F865:98        TYA
 07:F866:29 01     AND #$01
 07:F868:8D E9 07  STA $07E9
 07:F86B:8D 00 60  STA $6000
 07:F86E:AD 00 60  LDA $6000
 07:F871:29 01     AND #$01
 07:F873:EA        NOP
 07:F874:EA        NOP
 07:F875:EA        NOP
 07:F876:EA        NOP
 07:F877:EA        NOP
 07:F878:88        DEY
 07:F879:10 EA     BPL $F865
 07:F87B:30 03     BMI $F880
 07:F87D:EA        NOP
 07:F87E:EA        NOP
 07:F87F:EA        NOP


But none of them work, where is my mistake?

***************************************

Does anyone know if AX5208C have that MicroWire EEPROM too?
If it doesn't have it, then is it possible to add an external one (93C66)?

Thanks in advance
Re: Contra J repro on Batman 2?
by on (#130102)
Try this maybe?

Code:
 07:F868:8D E9 07  STA $07E9
 07:F86B:8D E9 07  STA $07E9
 07:F86E:AD E9 07  LDA $07E9
Re: Contra J repro on Batman 2?
by on (#130104)
Evidently the bit of RAM wasn't what was wrong after all :/

Nothing else obvious comes to mind... Contra does work when emulated as a VRC4 game in (e.g.) FCEUX.

If you've made an account on NesCartDB, you can click on the medium-sized (600-ish pixel wide) image to get to a higher resolution version of the same (1200-ish pixel wide). It'll still be that epoxy version, though.
Re: Contra J repro on Batman 2?
by on (#130122)
@ MottZilla
Still black screen

@ lidnariq
I have an account there but I don't see any option for "click on the medium-sized" where is that?
Re: Contra J repro on Batman 2?
by on (#130131)
I've been playing Contra on a VRCIV board (352400) for hours now. All it took was patch the eeprom check code and change the write addresses for the mapper registers so they matched the board type I am using. I even sent him two versions of the patched rom but they didn't work for him apparently.


To disable the protection, all I did was NOP all 5 copies of this code (one copy per rom bank):

Code:
07:F876:D0 05     BNE $F87D
Re: Contra J repro on Batman 2?
by on (#130135)
Game Compatibility with AX5208C

*****************************************************
VRC4a : OK
Wai Wai World 2 - SOS!! Paseri Jou (J) [!].nes (PCB 352398)
(fr) CPU A2 -> |03 38| -> PRG A15 (r)
(fr) CPU A1 -> |04 37| <- CPU A12 (f)

*****************************************************
VRC4b : OK
Gradius II (J) [!].nes (PCB 351406)
Bio Miracle Bokutte Upa (J).nes (PCB 351406)
Racer Mini Yonku - Japan Cup (J) [!].nes (PCB 351406)
(fr) CPU A0 -> |03 38| -> PRG A15 (r)
(fr) CPU A1 -> |04 37| <- CPU A12 (f)

*****************************************************
VRC4c : OK
Ganbare Goemon Gaiden 2 - Tenka no Zaihou (J) [!].nes (PCB 352889)
(fr) CPU A7 -> |03 38| -> PRG A15 (r)
(fr) CPU A6 -> |04 37| <- CPU A12 (f)

*****************************************************
VRC4d : OK
Batman 2 (Dump)
Teenage Mutant Ninja Turtles (J) [!].nes (PCB 352400)
Teenage Mutant Ninja Turtles 2 - The Manhattan Project (J).nes (PCB 352400)
(fr) CPU A2 -> |03 38| -> PRG A15 (r)
(fr) CPU A3 -> |04 37| <- CPU A12 (f)

*****************************************************
VRC4e : OK
Akumajou Special - Boku Dracula-kun (J) [!].nes (PCB 352396)
Crisis Force (J) [!].nes (PCB 352396)
Parodius da! (J) [!].nes (PCB 352396)
Tiny Toon Adventures (J) [!].nes (PCB 352396)
(fr) CPU A3 -> |03 38| -> PRG A15 (r)
(fr) CPU A2 -> |04 37| <- CPU A12 (f)

*****************************************************
VRC2a : Not Working
Ganbare Pennant Race! (J) [!].nes (PCB 351618)
TwinBee 3 - Poko Poko Dai Maou (J) [!].nes (PCB 351618)
(fr) CPU A0 -> |03 38| -> PRG A15 (r)
(fr) CPU A1 -> |04 37| <- CPU A12 (f)
⋮ ⋮
(f) PPU A10 -> |13 28| -> CHR A16 (r)
(f) /ROMSEL -> |14 27| -> CHR A14 (r)
(f) M2 -> |15 26| -> CHR A11 (r)
VRC2 µWire DO -> |16 25| -> CHR A13 (r)
VRC2 µWire DI <- |17 24| -> CHR A12 (r)
VRC2 µWire SK <- |18 23| -> CHR A10 (r)
VRC2 µWire CS <- |19 22| -> CHR A15 (r)
GND -- |20 21| -> n/c

*****************************************************
VRC2b : Not Working
Dragon Scroll - Yomigaerishi Maryuu (J) [!].nes (PCB 350603)
Getsufuu Maden (J) [!].nes (PCB 350636)
Jarinko Chie - Bakudan Musume no Shiawase Sagashi (J) [!].nes (PCB 351179)
(fr) CPU A1 -> |03 38| -> PRG A15 (r)
(fr) CPU A0 -> |04 37| <- CPU A12 (f)

Ganbare Goemon 2 (J) [!].nes (PCB 350926)
Wai Wai World (J) [!].nes (PCB 350926)
Contra (J).nes (PCB LROG009-00)

*****************************************************
VRC2c : Not Working
Ganbare Goemon Gaiden - Kieta Ougon Kiseru (J).nes (PCB 351948)
(fr) CPU A0 -> |03 38| -> PRG A15 (r)
(fr) CPU A1 -> |04 37| <- CPU A12 (f)
Re: Contra J repro on Batman 2?
by on (#130139)
Now, I have:

ContraJ
Parodius DA!
Akumajou Special Boku Dracula kun
Bio Miracle Bokutte Upa

Working on my 352400 Konami board, without any mods being needed in the board. Thanks for giving me the idea Farid ! :D

Akumajou Special was "particularly fun" to mod because it used indirect indexed writes at the mapper CHR banking registers.
Re: Contra J repro on Batman 2?
by on (#130148)
So the result is very interesting and the problem is not just Contra J.
AX5208C is fully compatible with VRC4 which is a perfect clone of it.
But I couldn't run any VRC2 game with it!
Any explanation for this?
Re: Contra J repro on Batman 2?
by on (#130149)
FARID wrote:
I have an account there but I don't see any option for "click on the medium-sized" where is that?
Hopefully the attached image explains ?
Re: Contra J repro on Batman 2?
by on (#130151)
@ lidnariq
Thanks, but Nothing happens by clicking on the image!
Can you please download Front and Back of the PCB and upload them for me?
Re: Contra J repro on Batman 2?
by on (#130188)
With this, Batman hack works with legitmate VRC4:

Image
Image

74LS138 connected like this:
A = A13
B = A14
C = /ROMSEL

/CS1 + /CS2 = GND
CS1 = Phi2

Outputs WRAM /CE at pin Y7. Konami board had a delay circuit with 1n4148, 1K resistor and 82nf ceramic capacitor, which I kept.

Old onboard 6116 is temporarily disabled with wires to +5v.

With this, result it's safe to assume that the original VRC4 chip does not decode full 8KB address space for it's WRAM /CE logic.
Re: Contra J repro on Batman 2?
by on (#130209)
FARID wrote:
@ lidnariq
Thanks, but Nothing happens by clicking on the image!
Can you please download Front and Back of the PCB and upload them for me?


Something must be bugged on my end, if your logged in and click on an image, it's supposed to download the image in original source dimensions. In the mean time, here are the 2 you request. Not super hi-res, but a little better than what's there anyways:

Image
Image
Re: Contra J repro on Batman 2?
by on (#130214)
@ BootGod
Thank you very much
But it seems the problem is not just Contra J I couldn't run any VRC2 game with AX5208C!
For example VRC4b and VRC2a are the same on PRG side and registers
I can run VRC4b games but VRC2a games don't work at all! (which I expect to run with bad graphic because of difference in CHR wiring)
Someone should explain it first :

VRC4b : OK
Bio Miracle Bokutte Upa (J).nes (PCB 351406)
Racer Mini Yonku - Japan Cup (J) [!].nes (PCB 351406)
(fr) CPU A0 -> |03 38| -> PRG A15 (r)
(fr) CPU A1 -> |04 37| <- CPU A12 (f)

VRC2a : Not Working
Ganbare Pennant Race! (J) [!].nes (PCB 351618)
TwinBee 3 - Poko Poko Dai Maou (J) [!].nes (PCB 351618)
(fr) CPU A0 -> |03 38| -> PRG A15 (r)
(fr) CPU A1 -> |04 37| <- CPU A12 (f)
⋮ ⋮
(f) PPU A10 -> |13 28| -> CHR A16 (r)
(f) /ROMSEL -> |14 27| -> CHR A14 (r)
(f) M2 -> |15 26| -> CHR A11 (r)
VRC2 µWire DO -> |16 25| -> CHR A13 (r)
VRC2 µWire DI <- |17 24| -> CHR A12 (r)
VRC2 µWire SK <- |18 23| -> CHR A10 (r)
VRC2 µWire CS <- |19 22| -> CHR A15 (r)
GND -- |20 21| -> n/c
Re: Contra J repro on Batman 2?
by on (#130215)
FARID wrote:
@ BootGod
Thank you very much
But it seems the problem is not just Contra J I couldn't run any VRC2 game with AX5208C!
For example VRC4b and VRC2a are the same on PRG side and registers
I can run VRC4b games but VRC2a games don't work at all! (which I expect to run with bad graphic because of difference in CHR wiring)
Someone should explain it first :

VRC2a : Not Working
Ganbare Pennant Race! (J) [!].nes (PCB 351618)
TwinBee 3 - Poko Poko Dai Maou (J) [!].nes (PCB 351618)
(fr) CPU A0 -> |03 38| -> PRG A15 (r)
(fr) CPU A1 -> |04 37| <- CPU A12 (f)
⋮ ⋮
(f) PPU A10 -> |13 28| -> CHR A16 (r)
(f) /ROMSEL -> |14 27| -> CHR A14 (r)
(f) M2 -> |15 26| -> CHR A11 (r)
VRC2 µWire DO -> |16 25| -> CHR A13 (r)
VRC2 µWire DI <- |17 24| -> CHR A12 (r)
VRC2 µWire SK <- |18 23| -> CHR A10 (r)
VRC2 µWire CS <- |19 22| -> CHR A15 (r)
GND -- |20 21| -> n/c


Code which write CHR mapper registers in Twinbee 3:
Code:
F82F:E6 D2     INC $00D2 = #$01
F831:AD F0 07  LDA $07F0 = #$60
F834:0A        ASL    <-   Arithmetic Shift Left
F835:8D 00 B0  STA $B000 = #$B9
F838:4A        LSR
F839:4A        LSR
F83A:4A        LSR
F83B:4A        LSR
F83C:8D 02 B0  STA $B002 = #$04
F83F:AD F1 07  LDA $07F1 = #$01
F842:0A        ASL    <-   Arithmetic Shift Left
F843:8D 01 B0  STA $B001 = #$75
F846:4A        LSR
F847:4A        LSR
F848:4A        LSR
F849:4A        LSR
F84A:8D 03 B0  STA $B003 = #$FD
F84D:AD F2 07  LDA $07F2 = #$02
F850:0A        ASL    <-   Arithmetic Shift Left
F851:8D 00 C0  STA $C000 = #$55
F854:4A        LSR
F855:4A        LSR
F856:4A        LSR
F857:4A        LSR
F858:8D 02 C0  STA $C002 = #$55
F85B:AD F3 07  LDA $07F3 = #$03
F85E:0A        ASL    <-   Arithmetic Shift Left
F85F:8D 01 C0  STA $C001 = #$55
F862:4A        LSR
F863:4A        LSR
F864:4A        LSR
F865:4A        LSR
F866:8D 03 C0  STA $C003 = #$95
F869:A9 00     LDA #$00
F86B:85 D2     STA $00D2 = #$01
F86D:60        RTS



ASL instruction changes the data to be written so any value set on the register skips the bit which toggles pin 21 of mapper chip.Ganbare Pennant Race does the same thing.

I got both working on my VRCIV board:

Image
Image

Image
Re: Contra J repro on Batman 2?
by on (#130222)
BootGod wrote:
Something must be bugged on my end, if your logged in and click on an image, it's supposed to download the image in original source dimensions.

I've had the same problem for a long while. I dunno why it only affects some people? I remember I could get to the big images if I could deduce the URL, but otherwise there is no way to navigate to them.
Re: Contra J repro on Batman 2?
by on (#130226)
Re: BootGod and rainwarrior's convo about the site and image linking / clicking / etc.:

I just registered, logged in, and followed these steps:

1. Opened new tab for this URL: http://bootgod.dyndns.org:7777/profile.php?id=3986
2. Page was rendered correctly
3. Clicked left PCB image ("PCB Front")
4. That took me here: http://bootgod.dyndns.org:7777/image.php?ImageID=10301
5. Image on this page *is not* clickable. The raw HTML returned:
Code:
<div class="content"><center><img src="imagegen.php?ImageID=10301&width=600" alt="PCB Front" title="PCB Front" border="0"></center></div>

Clearly there is no <a href="..."></a> around any of this, so that's why it's not clickable.

Also, the src URL in that code is not doing URL encoding correctly; & should be &amp; (really, trust me). Other parts of the site are doing it correctly, example from step #2 above (look at the <img> line):

Code:
<a class="myimg" href="image.php?ImageID=10301" onMouseover="ddrivetip('PCB Front&lt;br&gt;LROG009-00&lt;br&gt;Submitted by: bootgod&lt;br&gt;Linked from profile 3986')" onMouseout="hideddrivetip()">
<img align="middle" border="0" alt="" src="imagegen.php?ImageID=10301&amp;width=175">
</a>


So yes, this is purely a server-side issue of some sort.
Re: Contra J repro on Batman 2?
by on (#130241)
It was checking a user permission to see if they were allowed to download source images, but the setting of this permission got botched at some point. So I've just removed the check for the time being, so it should work for anyone logged in now. I fixed the & encoding too :P Honestly, the source for the currently live site is a disaster. The new one is much leaner and cleaner, but hell I just don't have the free time I used too and have kinda lost the motivation to work on it :/ So for now, the clunky old one lives on...
Re: Contra J repro on Batman 2?
by on (#130242)
Confirmed it works. Folks should be happy. :)

And I know exactly what you mean about old crusty code needing to be replaced but not having the time + motivation.
Re: Contra J repro on Batman 2?
by on (#130246)
@ BootGod
Thank you, it works here too!
Re: Contra J repro on Batman 2?
by on (#130406)
For anyone willing to play this game in a MMC3:

http://www.bwass.org/bucket/Contra%20(J)%20MMC3%20hack%20patch.zip

Patch with byuu's beat (.bps) patcher.
Re: Contra J repro on Batman 2?
by on (#130410)
Thank you oliveira, this is great!
Re: Contra J repro on Batman 2?
by on (#131479)
l_oliveira wrote:
For anyone willing to play this game in a MMC3:

http://www.bwass.org/bucket/Contra%20(J)%20MMC3%20hack%20patch.zip

Patch with byuu's beat (.bps) patcher.


Works perfect on AX5202P, thanks

Oh by the way there is another MMC3 patch for this game which is translated to english :

魂斗羅 -> Gryzor -> Contra [NESDEV]

魂斗羅 -> Gryzor -> Contra [Romhakcing]
Re: Contra J repro on Batman 2?
by on (#149040)
Sorry to necro this post a bit, but I've been looking into the actual differences between VRC2 and VRC4, and it's led me to an attempt to "port" a VRC2 game to VRC4 (Dragon Scroll, since that's the first VRC2 game I found in my pile of Famicom games).

l_oliveira, you mentioned you had Twinbee 3 and Ganbare Pennant Race running on VRC4, but it wasn't clear how you did it. My testing makes it seem more complicated than just rewiring the board or changing the addresses of the register writes, and Farid's tests agree.

What all did you have to do to get the games working?
Re: Contra J repro on Batman 2?
by on (#149042)
kuroiryu wrote:
Sorry to necro this post a bit, but I've been looking into the actual differences between VRC2 and VRC4, and it's led me to an attempt to "port" a VRC2 game to VRC4 (Dragon Scroll, since that's the first VRC2 game I found in my pile of Famicom games).

l_oliveira, you mentioned you had Twinbee 3 and Ganbare Pennant Race running on VRC4, but it wasn't clear how you did it. My testing makes it seem more complicated than just rewiring the board or changing the addresses of the register writes, and Farid's tests agree.

What all did you have to do to get the games working?


Firstly before anything else, VRC2 and VRC4 are basically the same, exact thing. VRC4 uses a VRC2 as basis and add more memory control bits, a 6116 SRAM interface (2KB only. nope it can't use 6264s) and CPU cycle counting IRQ.

To make these two games run on VRC4, I firstly read the documentation on the mapper they use. Because only now the people writing emulators and related documentation are caring about hardware details it was quite cryptic to understand that the SOLE DIFFERENCE these games board wiring had to regular games was that it leaves one address line of the CHR bus disconnected, skipping it.

So, I disassembled the routines which control the graphics side of the mapper. I found out that to make up for the disconnected bit on the mapper routine they were simply rotating the mapper page data using the ASL instruction before writing. I just NOP'ed the ASL instructions. Also I changed all the mapper writes to match the wiring for the board I was using at the time:

Image

Image
That board is the one used by the two TMNT games which use the VRC4 mapper.

The reason I modded the board was to make it work with 8KB SRAM (you need to decode the SRAM address space yourself because the VRC4 does it only for 2KB of address space) so I could run the Batman Return of the Joker pirate hack.

In the end, I was able to hack the game so I did not need to do any modifications on my board.
Re: Contra J repro on Batman 2?
by on (#149044)
l_oliveira wrote:
a 6116 SRAM interface (2KB only. nope it can't use 6264s)
To briefly be super-pedantic: 4 KiB; CPU A11isn't connected.
Re: Contra J repro on Batman 2?
by on (#149045)
Basically this is what I did to Pennant race:

Original:
00000000 4E 45 53 1A 08 10 60 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:
0001F7F0 4C 2F F8 AD F4 07 E6 D2 EA 8D 00 D0 4A 4A 4A 4A
0001F800 8D 08 D0 4C 69 F8 AD F5 07 E6 D2 EA 8D 04 D0 4A
0001F810 4A 4A 4A 8D 0C D0 4C 69 F8 AD F6 07 E6 D2 EA 8D
0001F820 00 E0 4A 4A 4A 4A 8D 08 E0 4C 69 F8 AD F7 07 E6
0001F830 D2 EA 8D 04 E0 4A 4A 4A 4A 8D 0C E0 4C 69 F8 E6
0001F840 D2 AD F0 07 EA 8D 00 B0 4A 4A 4A 4A 8D 08 B0 AD
0001F850 F1 07 EA 8D 04 B0 4A 4A 4A 4A 8D 0C B0 AD F2 07
0001F860 EA 8D 00 C0 4A 4A 4A 4A 8D 08 C0 AD F3 07 EA 8D
0001F870 04 C0 4A 4A 4A 4A 8D 0C C0 A9 00 85 D2 60 00 00

Patched:
0001F7F0 4C 2F F8 AD F4 07 E6 D2 EA 8D 00 D0 4A 4A 4A 4A
0001F800 8D 08 D0 4C 69 F8 AD F5 07 E6 D2 EA 8D 04 D0 4A
0001F810 4A 4A 4A 8D 0C D0 4C 69 F8 AD F6 07 E6 D2 EA 8D
0001F820 00 E0 4A 4A 4A 4A 8D 08 E0 4C 69 F8 AD F7 07 E6
0001F830 D2 EA 8D 04 E0 4A 4A 4A 4A 8D 0C E0 4C 69 F8 E6
0001F840 D2 AD F0 07 EA 8D 00 B0 4A 4A 4A 4A 8D 08 B0 AD
0001F850 F1 07 EA 8D 04 B0 4A 4A 4A 4A 8D 0C B0 AD F2 07
0001F860 EA 8D 00 C0 4A 4A 4A 4A 8D 08 C0 AD F3 07 EA 8D
0001F870 04 C0 4A 4A 4A 4A 8D 0C C0 A9 00 85 D2 60 00 00
Re: Contra J repro on Batman 2?
by on (#149047)
lidnariq wrote:
l_oliveira wrote:
a 6116 SRAM interface (2KB only. nope it can't use 6264s)
To briefly be super-pedantic: 4 KiB; CPU A11isn't connected.


I don't think you can buy 4KB SRAM parts anywhere. Toshiba tried to sell a 4KB part some time in the early 80s and it didn't "stick".

I dunno if that matters anyway. ;)
Re: Contra J repro on Batman 2?
by on (#149049)
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.
Re: Contra J repro on Batman 2?
by on (#149050)
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.
Re: Contra J repro on Batman 2?
by on (#149055)
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).
Re: Contra J repro on Batman 2?
by on (#149059)
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.
Re: Contra J repro on Batman 2?
by on (#149061)
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
Re: Contra J repro on Batman 2?
by on (#149066)
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.
Re: Contra J repro on Batman 2?
by on (#149067)
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).
Re: Contra J repro on Batman 2?
by on (#149068)
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.
Re: Contra J repro on Batman 2?
by on (#149069)
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.
Re: Contra J repro on Batman 2?
by on (#149070)
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)
Re: Contra J repro on Batman 2?
by on (#149080)
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
Re: Contra J repro on Batman 2?
by on (#149081)
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.
Re: Contra J repro on Batman 2?
by on (#149082)
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 ?
Re: Contra J repro on Batman 2?
by on (#149083)
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.
Re: Contra J repro on Batman 2?
by on (#155852)
try this rom for batman 2 pcb
Re: Contra J repro on Batman 2?
by on (#155873)
zxbdragon wrote:
try this rom for batman 2 pcb


Thank you
But unfortunately I don't have this cartridge anymore.
Re: Contra J repro on Batman 2?
by on (#158639)
viewtopic.php?f=9&t=3480&start=75#p120092

l_oliveira wrote:
aodinets wrote:
There is not additional sound, I don't understand why.


You're using HACKED copy of Gimmick game (Suikan Pipe). That will NEVER work because Suikan Pipe has music program code disabled (music writes disrupt VRC chip operation).


Maybe somebody can advise? how to enable music code on my hardware without VRC conflict?
Re: Contra J repro on Batman 2?
by on (#158643)
aodinets wrote:
http://forums.nesdev.com/viewtopic.php?f=9&t=3480&start=75#p120092

Maybe somebody can advise? how to enable music code on my hardware without VRC conflict?


Not using a VRC chip is the easiest solution.

Unfortunately anything you write on the ROM region will end writting to VRC registers. Gimmick! uses a area which on FME7 and Sunsoft 5a are empty so no conflicts happen.

And anyway Suikan Pipe is a horrible hack because it has bad music anyway (VRC can't bank the DPCM region so you get bad DPCM sound).

Find a FME7, 5a or even 5b cart without sound (Some Gremilins catridges had 5b inside without using the sound part) cart to make your Gimmick! cartridge.