CPS2 B boards, original roms, no battery.... no problem!

The place for all discussion on gaming hardware
User avatar
cr4zymanz0r
Posts: 356
Joined: Sat Oct 19, 2013 6:36 am

CPS2 B boards, original roms, no battery.... no problem!

Post by cr4zymanz0r »

So a few weeks ago I saw a post on Twitter where a Japanese user had what appeared to be some type of PIC microcontroller connected to a CPS2 B board, giving the impression it was loading the decryption key at every boot so there is no battery needed. Unfortunately it seems impossible to re-find random things on Twitter, and it was all in Japanese anyway.

However, it got me thinking about trying to implement that same concept using an Arduino Nano since they're fairly small, clones are extremely cheap, and basically just need a mini USB cable to program them. I forked the ArcadeHacker CPS2 Arduino key writer (https://github.com/ArcadeHacker/ArcadeHacker_CPS2) and modified it to work on (assumingly) any Arduino without an LCD shield. You would just put the key on it for the game you install it in, then you could just boot the game battery-less forever with no altered/phoenixed roms, in theory.

https://github.com/cr4zymanz0r/No-Battery-CPS2
I used the serial monitor in the Arduino IDE to verify it's outputting the key correctly, but I haven't had time to solder it into a B board to test on actual hardware yet.

One drawback I noticed is that writing the key exactly how the ArcadeHacker program does, it takes roughly 9 seconds for it to write the key. This means basically each time you power on the game it'd take an additional 9 seconds to boot. I assume this can probably be shortened since there are multiple delays in the code, but I don't know if the CPS2 hardware gets fickle if the key is written too quickly. I know the Darksoft CPS2 multikits just rewrite the key at power-on for the last game you loaded, and I was thinking it was nearly instant, but I'd need to go back and check.
Last edited by cr4zymanz0r on Thu Oct 11, 2018 3:56 am, edited 2 times in total.
User avatar
cr4zymanz0r
Posts: 356
Joined: Sat Oct 19, 2013 6:36 am

Re: CPS2 B boards, original roms, no battery.... no problem?

Post by cr4zymanz0r »

Ok, I got a chance to hook this up today and test it out and it works. I also was able to drastically reduce the key write time so that booting is barely any longer than on battery. I'm uncertain if the much faster key writing might cause issues or not on some B board revisions, but it worked fine on the 93646B-6 revision that I tried.

Here's just a couple of quick basic pics I took of the install: https://imgur.com/a/ZO8hIGM . The Arduino Nano is just mounted with a double sided 3M adhesive pad
No more worrying about battery corrosion, changing batteries, or reflashing keys manually :)
Last edited by cr4zymanz0r on Thu Oct 11, 2018 3:56 am, edited 1 time in total.
User avatar
NoAffinity
Posts: 1018
Joined: Mon May 07, 2018 5:27 pm
Location: Escondido, CA, USA

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by NoAffinity »

Brilliant, man, just brilliant! Game changer, for sure. :)

Sent from my SM-G955U using Tapatalk
User avatar
Artemio
Posts: 648
Joined: Tue Jun 09, 2009 12:55 am
Location: Mexico
Contact:

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by Artemio »

The price of the nano makes it a very reasonable solution, in some cases even cheaper than a battery change (in my country for instance), which I find unbelievable.

Thank you, it is great to have a variety of options.
User avatar
NoAffinity
Posts: 1018
Joined: Mon May 07, 2018 5:27 pm
Location: Escondido, CA, USA

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by NoAffinity »

So, one negative thought on this. Is it possible that doing repeated writes to the encryption controller will cause it to become unwritable at some point? I mean effectively, they were designed to be re-written to maybe once, twice at the most. I don't think capcom predicted that the games would have a lifespan much beyond probably 1 battery failure.

it's probably a low likelihood, but just a thought.

I suppose the new revision Darksoft kit users who are using the encryption key writing feature would be the case study on this. I've got a nano on order, definitely want to give this a try. :)
User avatar
cr4zymanz0r
Posts: 356
Joined: Sat Oct 19, 2013 6:36 am

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by cr4zymanz0r »

NoAffinity wrote:So, one negative thought on this. Is it possible that doing repeated writes to the encryption controller will cause it to become unwritable at some point? I mean effectively, they were designed to be re-written to maybe once, twice at the most. I don't think capcom predicted that the games would have a lifespan much beyond probably 1 battery failure.

it's probably a low likelihood, but just a thought.

I suppose the new revision Darksoft kit users who are using the encryption key writing feature would be the case study on this. I've got a nano on order, definitely want to give this a try. :)
My guess is since it has to be battery backed normally that it's some type of RAM/SRAM, which wouldn't really have a limited amount of writes to my knowledge. That's just educated guessing on my part though. I bet Artemio would know more.
User avatar
NoAffinity
Posts: 1018
Joined: Mon May 07, 2018 5:27 pm
Location: Escondido, CA, USA

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by NoAffinity »

Would also be interesting to see if this is a potential solution for the folks that have had so much difficulty with rev -4 boards (myself included). Going to use my ST board as a guinea pig, which I had trouble desuiciding at one point.
User avatar
cr4zymanz0r
Posts: 356
Joined: Sat Oct 19, 2013 6:36 am

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by cr4zymanz0r »

NoAffinity wrote:Would also be interesting to see if this is a potential solution for the folks that have had so much difficulty with rev -4 boards (myself included). Going to use my ST board as a guinea pig, which I had trouble desuiciding at one point.
If you've had trouble with the regular ArcadeHacker CPS2 Arduino key writer, you'll probably be in the same boat with this. Mine is basically doing the exact same key writing process (just no menu selection part), with the only real difference being I lowered the delays in the code so it wouldn't add 9 seconds to boot time. I've got 2 other B boards on battery that I intend to mod as well soon, but I don't know what revisions they are until I open them up.
User avatar
llaoyllakcuf
Posts: 326
Joined: Wed Jan 26, 2005 11:15 am
Location: NJ USA

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by llaoyllakcuf »

cr4zymanz0r wrote:So a few weeks ago I saw a post on Twitter where a Japanese user had what appeared to be some type of PIC microcontroller connected to a CPS2 B board, giving the impression it was loading the decryption key at every boot so there is no battery needed. Unfortunately it seems impossible to re-find random things on Twitter, and it was all in Japanese anyway.
This came up recently on my timeline: https://twitter.com/konosuke/status/1050062876617129984

The same user posted several tweets showing their work on the project.


Btw, would this modification also work on a dead/suicided B board?

Sorry I am not really up to speed on the latest CPS2 developments...
User avatar
cr4zymanz0r
Posts: 356
Joined: Sat Oct 19, 2013 6:36 am

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by cr4zymanz0r »

llaoyllakcuf wrote: Btw, would this modification also work on a dead/suicided B board?
Yes, it will work on a suicided board. It's just reloading the decryption key at every boot that the battery normally retains in memory. You just need to make sure it's one you know the only issue it has is the suicide battery dying, not some mystery condition non-working one on ebay ;)
fluxcore
Posts: 29
Joined: Fri Aug 01, 2014 10:11 pm

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by fluxcore »

NoAffinity wrote:So, one negative thought on this. Is it possible that doing repeated writes to the encryption controller will cause it to become unwritable at some point? I mean effectively, they were designed to be re-written to maybe once, twice at the most. I don't think capcom predicted that the games would have a lifespan much beyond probably 1 battery failure.

it's probably a low likelihood, but just a thought.

I suppose the new revision Darksoft kit users who are using the encryption key writing feature would be the case study on this. I've got a nano on order, definitely want to give this a try. :)
According to Leo, the key is stored in RAM and "SRAM and DRAM have absolutely no limits on how many times it can be written or read."

( from https://www.arcade-projects.com/forums/ ... #post76341 )

So should be a non-issue.
User avatar
llaoyllakcuf
Posts: 326
Joined: Wed Jan 26, 2005 11:15 am
Location: NJ USA

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by llaoyllakcuf »

@cr4zymanz0r

Nice, thanks for the clarification.

I've got a handful of legit B boards that were in storage for years and it's cool to hear about an alternative to the Phoenix roms. :)
User avatar
NoAffinity
Posts: 1018
Joined: Mon May 07, 2018 5:27 pm
Location: Escondido, CA, USA

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by NoAffinity »

Thanks for digging up the confirmation, fluxcore. I was willing to try it either way but that's good space of mind.

Sent from my SM-G955U using Tapatalk
User avatar
cr4zymanz0r
Posts: 356
Joined: Sat Oct 19, 2013 6:36 am

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by cr4zymanz0r »

I updated the album with some basic pics of a couple more installs: https://imgur.com/a/ZO8hIGM
* Another 93646B-6 revision
* 93646B-3 revision (has a resistor connecting DATA (A32 on CN2) to ground)

I don't have anymore original rom B boards left now. Maybe I'll get some more in the future.
User avatar
IronGiant
Posts: 294
Joined: Wed Nov 19, 2008 3:30 pm
Location: UK

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by IronGiant »

This is a very imaginative solution for those who don't want to use a battery yet who still want to play the original, unmodified code. Very nice work. :D

Because of the lack of the CN9 header on B board revisions 93646B-3 and 93646B-4 I guess it won't be possible to easily connect up the Nano (wires will need to be soldered to suitable points instead), although the the header is of course present on B board revisions revisions 93646B-5, 93646B-6, 93646B-7, 97691A-3, 97691A-4 so that's nice and easy. :)

http://arcadehacker.blogspot.com/2016/0 ... guide.html
Formerly known here as R-Typer

Arcade game board repairer (known as 'Irongiant' and 'Vectorglow' on other arcade forums)
User avatar
NoAffinity
Posts: 1018
Joined: Mon May 07, 2018 5:27 pm
Location: Escondido, CA, USA

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by NoAffinity »

For boards without CN9, you can simply solder to the solder side of these pins, and i'm guessing there's another pin on that connector to grab 5V power from as well.
Spoiler
Image
User avatar
cr4zymanz0r
Posts: 356
Joined: Sat Oct 19, 2013 6:36 am

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by cr4zymanz0r »

In my zoomed in picture you can see where I grabbed 5V from (it's the orange wire) https://i.imgur.com/GBXhCCm.jpg

There's many places you can grab ground a 5V from. You can just hook the B board to the A board and (with everything off) use a multimeter to probe one of the 5V pins on the JAMMA edge then start probing around on the B board to find easy 5V solder points.
User avatar
IronGiant
Posts: 294
Joined: Wed Nov 19, 2008 3:30 pm
Location: UK

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by IronGiant »

I see that there's now another new method that does the same thing, the Infinikey:

https://www.arcade-projects.com/forums/ ... /&pageNo=1

And the PIC chip already mentioned of course.

It's great to have all of these alternatives, they account for all preferences. :D
Formerly known here as R-Typer

Arcade game board repairer (known as 'Irongiant' and 'Vectorglow' on other arcade forums)
User avatar
NoAffinity
Posts: 1018
Joined: Mon May 07, 2018 5:27 pm
Location: Escondido, CA, USA

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by NoAffinity »

Just gave this a try for the first time, helping a fellow collector resurrect his Marvel vs. Capcom (Brazil 980123). Worked like a charm on the first attempt. Thanks you for this great solution, cr4zymanz0r. And of course, ArcadeHacker always deserves a thank you.

On the non-CN9 boards, the nano fits perfectly where the battery once was. :D

Image
Image
Image
Image
User avatar
Ed Oscuro
Posts: 18654
Joined: Thu Dec 08, 2005 4:13 pm
Location: uoıʇɐɹnƃıɟuoɔ ɯǝʇsʎs

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by Ed Oscuro »

I hope it will fit as nicely on a Darkstalkers - I have had one for years and I really ought to look at / desolder the old battery :D
User avatar
NoAffinity
Posts: 1018
Joined: Mon May 07, 2018 5:27 pm
Location: Escondido, CA, USA

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by NoAffinity »

Ed Oscuro wrote:I hope it will fit as nicely on a Darkstalkers - I have had one for years and I really ought to look at / desolder the old battery :D
The fitment should be identical across all boards. As you can see, that's the edge at the fan end of the board. I believe the battery location and components in that area are always the same.

Sent from my SM-G955U using Tapatalk
Classicgamer
Posts: 873
Joined: Thu Sep 11, 2014 3:37 pm

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by Classicgamer »

Out of curiosity, what is the advantage of this method vs those that simply replace the encrypted rom with (the now freely available) unencrypted rom?

I know that a lot of the guys who use those Darksoft CPS2 carts use unencrypted roms. It makes no difference to games.
User avatar
NoAffinity
Posts: 1018
Joined: Mon May 07, 2018 5:27 pm
Location: Escondido, CA, USA

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by NoAffinity »

Personal preference. To use an analogy, its akin to restoring your 69 Camaro with a new replacement part vs nos or original.

Many are now using original code and encryption on the darskoft kit, as key writing was implemented on it some time ago.

To give it some context, check out that thread at arcade projects that iron giant linked. Tons of interest for the next evolution of this concept, which is a preprogrammed board that solders directly onto the appropriate pins.

Sent from my SM-G955U using Tapatalk
User avatar
Ed Oscuro
Posts: 18654
Joined: Thu Dec 08, 2005 4:13 pm
Location: uoıʇɐɹnƃıɟuoɔ ɯǝʇsʎs

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by Ed Oscuro »

I totally get this project :mrgreen: That is a great analogy. For me it is just a matter of time and funds.
Classicgamer
Posts: 873
Joined: Thu Sep 11, 2014 3:37 pm

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by Classicgamer »

NoAffinity wrote:Personal preference. To use an analogy, its akin to restoring your 69 Camaro with a new replacement part vs nos or original.

Many are now using original code and encryption on the darskoft kit, as key writing was implemented on it some time ago.

To give it some context, check out that thread at arcade projects that iron giant linked. Tons of interest for the next evolution of this concept, which is a preprogrammed board that solders directly onto the appropriate pins.

Sent from my SM-G955U using Tapatalk
I guess perception is reality. I am more a gamer than a collector.

An analogy of how I see it is having a choice between two identical 69 Camaros. One has an alarm that causes problems. The other has had the problematic alarm removed.

I get it for collectors though.
User avatar
NoAffinity
Posts: 1018
Joined: Mon May 07, 2018 5:27 pm
Location: Escondido, CA, USA

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by NoAffinity »

I'm not sure how running encrypted code...with a battery, or with a nano, or with a infinikey, or with a dark soft kit, is causing a problem. Sure if you want to run on battery then a good maintenance schedule is in order. But at the same time, theres boards still running on original batteries. This could turn into a lengthy discussion with little value offered. No point arguing one is better than other, but also no point arguing that running original code and encryption is a problem or an issue. :)

At the very least, if your battery has failed, you dont have to remove the original stickers and wipe/reprogram roms, if you dont want to.

Sent from my SM-G955U using Tapatalk
User avatar
donluca
Posts: 852
Joined: Sat Feb 28, 2015 8:51 pm
Location: Italy
Contact:

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by donluca »

What happens if you try to write the keys on a board that hasn't suicided, for example if you want to put a different game on the board? Does the arduino first wipes clean the board's key (if there's any) and then flashes the new one over?

Or what happens if the keys are still there? Do they get overwritten or does it mess it up?
User avatar
NoAffinity
Posts: 1018
Joined: Mon May 07, 2018 5:27 pm
Location: Escondido, CA, USA

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by NoAffinity »

donluca wrote:What happens if you try to write the keys on a board that hasn't suicided, for example if you want to put a different game on the board? Does the arduino first wipes clean the board's key (if there's any) and then flashes the new one over?

Or what happens if the keys are still there? Do they get overwritten or does it mess it up?
It will simply overwrite what's there.
User avatar
donluca
Posts: 852
Joined: Sat Feb 28, 2015 8:51 pm
Location: Italy
Contact:

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by donluca »

Thanks for the reply! I'm still fairly new to this and trying to study a bit before investing into CPS2 hardware.
User avatar
donluca
Posts: 852
Joined: Sat Feb 28, 2015 8:51 pm
Location: Italy
Contact:

Re: CPS2 B boards, original roms, no battery.... no problem!

Post by donluca »

Alright, done everything, just one note:

The 2, 3, 11 and 12 pins were chosen for the original Arduino Uno because they were close to each other. On the Arduino Nano they are pretty far apart so I changed the pin configuration to the following:

Code: Select all

//  CPS2 Board CN9 interface pins
#define DATA        9   //CN9 #2 or CN2 A32
#define CLOCK       10  //CN9 #4 or CN2 A31
#define SETUP1      11   //CN9 #3 or CN2 A30
#define SETUP2      12  //CN9 #5 or CN2 A29
This way all the pins are close to each other.

On boards without CN9 you can grab GND from CN2 C32 and 5V from the capacitor near the battery, this way you have everything close.

Also, since we're using 5V from an arcade board I'd strongly suggest to bypass the regulator and use the 5V pin on the Arduino. It has a tolerance of up to 5,5V and maximum rating of 6V
Post Reply