Capcom 1942 sneaky rom check

cmonkey

Active member
vacBacker
Feedback
2 (100%)
Credits
1,633CR
Capcom's excellent shooter 1942 is high profile at the moment, thanks to the excellent work done by minwah on replacing the God awful main in-game music with something much more pleasing to the aural cavity.

In the new music thread RGP begged and grovelled for me to do a proper free-play with attract mode for the game, as the built in one merely loads the game with 2 credits and sits on the menu screen. Not exactly good for avoiding screen burn then Capcom.
smiley3.gif


So today I've been having a scan through the code and stumbled across a very sneaky little rom check which happens about 18 minutes and 12 seconds after cold booting the board (to be precise 65543 frames after cold booting, assuming MAME's emulation of 1942 is frame accurate).

Rom in the region $0000-$bfff is checked and a single 8-bit XOR accumulator is maintained in register A. This is then compared with the byte @ $001c and if they disagree the rom(s) are assumed to be bad (i.e. tampered with).

What's even stranger is that if the rom check fails the game continues running for about another minute before finally halting the CPU at frame 69407 (roughly 19 mins 17 secs after cold boot) with the following message :-

1942_rom_error.png


IMO it's a strange decision by Capcom to include this sneaky rom check in the attract mode code but NOT include a rom check in the service mode, where arguably it's needed more. To me this proves this was anti-bootlegging protection rather than anything else. The roms are NOT checked if free play mode is enabled.

For those that are interested the rom checking code starts at $711c. If you put a breakpoint at that address in MAME and run the game from a fresh launch it will hit the breakpoint at frame 65543.

Now that I've broken their flimsy protection I can continue with the rest of my day!
smiley36.gif
 

Hurray Banana

Moderator
Staff member
vacBacker
Feedback
8 (100%)
Credits
2,703CR
That is a funny error message "check again" sounds like someone saying "this is the winning ticket, you are mistaken. check again"

what you gonna crack next
 

joe34

Active member
Credits
448CR
nice 1 cmonkey, so erm do u take requests hehheh?
smiley1.gif


if so... commando.. could you consider hacking it so u can hold down the fire button to spray bullets (ie. auto fire style) as opposed to having to keep tapping the button.
it's funny because even in something like mameuifx where u have an autofire patch which can be used on all games, it doesn't actually work for commando (did capcom put in some sort of protection to prevent autofire or something? seems odd that autofire in mameuifx works on pretty much anything but commando!)
 

cmonkey

Active member
vacBacker
Feedback
2 (100%)
Credits
1,633CR
If you're only playing Commando in MAME then there's already a cheat for rapid/semi-auto fire. It wouldn't be too hard to put that cheat onto the real hardware as it's merely setting the value in ram @ $e00c to zero every frame.
 

RGP

Meeter & Greeter
Feedback
5 (100%)
Credits
2,039CR
CRACKED BY CMONKEY........
smiley4.gif


I didn't beg and grovel for a free-play mode in 1942 .......

..... I beg and grovel for free play with attract modes in lots of games!

1942

Power Drift

Rally X / New Rally X
 

cmonkey

Active member
vacBacker
Feedback
2 (100%)
Credits
1,633CR
1942 - it'll probably happen now that I've defeated Capcom's amazing protection
Power Drift - it's on the radar (God that sounds SOOO corporate speak!)

Rally X - now this one will be CHARANGING!
smiley36.gif
 

cmonkey

Active member
vacBacker
Feedback
2 (100%)
Credits
1,633CR
So, it turns out that the extra lives bug IS fixed in the rev B rom set. (MAME set '1942')

https://tcrf.net/1942_(Arcade)

I wish I'd seen that BEFORE I spent 3 hours today pouring over the rev B code, wondering why I couldn't replicate this stooopid bug!!!!
smiley7.gif


My advice to you guys who are playing this on real hardware is to check your roms and update to rev B to squash the bug.
 

cmonkey

Active member
vacBacker
Feedback
2 (100%)
Credits
1,633CR
Just download the rev A roms (MAME set '1942a') and managed to replicate the bug at the first attempt. A quick scan through the code shows where Capcom fixed the bug. D'oh indeed!!
 

cmonkey

Active member
vacBacker
Feedback
2 (100%)
Credits
1,633CR
Well then update the roms on the board from rev A (which they're likely to be) to rev B and you're good to go. If you don't have access to an EPROM programmer then ask RGP really nicely if he'll burn a set of rev B program roms for you (4 x 27128 + 1 x 2764 required).
 
Top