142

Preserving arcade games

Embed Size (px)

Citation preview

Page 1: Preserving arcade games
Page 2: Preserving arcade games
Page 3: Preserving arcade games
Page 4: Preserving arcade games

...but I don't think that bullet point & memesis the best way to talk about arcade games

Page 5: Preserving arcade games

not everyone understands hardware

Page 6: Preserving arcade games

not everyone understands software

Page 7: Preserving arcade games

but everyone understand that it's a game!

Page 8: Preserving arcade games

that's the cool part of emulation:it brings games to everyone !(games that might be lost forever)

Page 9: Preserving arcade games

This talk is about arcade games,the games where you put money to play.That money would go in the operator's pocket,no share to the arcade manufacturer.To be successfull, they had to be awesome."Dedicated" (hardware, controls...) is the key to their success.

Page 10: Preserving arcade games

some arcade hardware graphics were cut into tiles:the CPU can't draw directly: it just gives a listof tile, then a dedicated chip draws the complete screen.Smoother animation, but can't draw anything else.

Page 11: Preserving arcade games

some arcade hardware were powered-up consoles,but there were many more arcade hardwares.

Page 12: Preserving arcade games

Let's go back in time:This is Night Driver (Atari 1976)...

Page 13: Preserving arcade games

It's based on the first racing game,Nürburgring (1975) made of 30 PCBs.

Page 14: Preserving arcade games

Berzerk was one of the first game with digitized speech.It cost 1000 USD / word to be digitized(it contained 16 words!)...

Page 15: Preserving arcade games

...they also made a german version !same price per word ? ;)

Page 16: Preserving arcade games

Battlezone, the first FPS, in 1980...

Page 17: Preserving arcade games

...was initially designed as a military trainer.

Page 18: Preserving arcade games

I, Robot (1984) a 3d action game with filled polygons

Page 19: Preserving arcade games

... is considered to be 'too advanced for its time'.

Page 20: Preserving arcade games

Dragon's Lair, an ‘interactive’ cartoon in 1983,at a time where HDs were 10 Mb and graphics in 16 colors.

Page 21: Preserving arcade games

...was using the very recent Laser Disc technology (from 1981).But LD drives were quickly worn out, because of frequent scene skipping.

Page 22: Preserving arcade games

Outrun (Sega 1986), awesome racing game!

Page 23: Preserving arcade games

...uses 2 main CPUs at 10 Mhz (an Amiga 500 runs at 7 Mhz)the 2nd CPU's only task is to display the roads.(they're drawn at 30 FPS *only*, the rest of the game at 60)

Page 24: Preserving arcade games

Hard Drivin (1989), a 3d simulation way before modern GPUs existed...

Page 25: Preserving arcade games

...used 3 PCBs.They made a triple screen version of the sequel:6 PCBs, 4 CPUs, 9 DSPs !!!!It’s emulated since last month (November 14) !

Page 26: Preserving arcade games

Sometimes, it was the arcade cabinet that was awesome.Hang gliding, bike, car... ass poking ?!?

Page 27: Preserving arcade games

Sega's R360 rotates the player on all axis, even upside down !

Page 28: Preserving arcade games

Sometimes, the screen was the awesome part: half sphere, 3x screen...

Page 29: Preserving arcade games

...and with awesome games came awesome piracy!

Page 30: Preserving arcade games

the first bootleg in Mame is from 1977!

Page 31: Preserving arcade games

As long as a game was good enough and its hardware not too extreme,bootlegs would be made. A few of them were 'creative'.

Page 32: Preserving arcade games

Space Invaders (text) <> Darth Vader (gfx)Metal Slug 3 <> Metal Slug 6 (!!)

Page 33: Preserving arcade games

They went further and were taking a good game,then hacking gfx & sound to create a 'new' game

Page 34: Preserving arcade games

or sometimes they just ripped off graphics,to make a (crappy) game,like a shooter with StarCraft's GFX :(

Page 35: Preserving arcade games

With awesome piracy came awesome protections.once again, dedicated stuff, sometimestightly integrated with the game internals

Page 36: Preserving arcade games

In Bee Storm, if the protected CPU is missing,the game works, but the enemies don't shoot anymore.

Page 37: Preserving arcade games

In Hang-on, if the 2nd CPU (sometimes encrypted)is missing, then roads are straight.

Page 38: Preserving arcade games

in S.P.Y., collisions are handled by a custom chip:without it, you can't hurt and cannot be hurt.

Page 39: Preserving arcade games

So, in general, the only solution to correctly emulatethem is to decap the protection chip and read the internal ROM.Bubble Bobble was only correctly preserved in 2005 !

Page 40: Preserving arcade games

to store protected data, they went further:store data on battery-powered RAM.the battery dies, the game dies.the manual doesn't even mention it!the warranty is void if you open the game's case!

Page 41: Preserving arcade games

some manufacturers were using 'commercial' protection chip,but most were custom.

Page 42: Preserving arcade games

so you're not supposed to open the game,yet all games will eventually die once all batteries are empty.Hacking these games is the only way to preserve them.

Page 43: Preserving arcade games

it also enables the IP to be re-used commercially later.

Page 44: Preserving arcade games

modern practices also brought DLC rip-offs :(

Page 45: Preserving arcade games

Arcade games had to be awesome. They were often using dedicated parts.they were heavily pirated. they were heavily protected.So protected that it makes them vulnerable (to time)!Hacking is the only way to preserve them.

Page 46: Preserving arcade games

Let's look at the Capcom Play System, known as CPS1.

Page 47: Preserving arcade games

known mostly for Street Fighter II

Page 48: Preserving arcade games

and many other good games

Page 49: Preserving arcade games

the complete list...

Page 50: Preserving arcade games

including the least known,only emulated in June 2014.It's SF2-based, but it's a mole hitting game !!

Page 51: Preserving arcade games

CPS1 was increasingly protected:Yet it was completely hacked.SF2 bootlegs were common.

Page 52: Preserving arcade games

a final fight bootleg, adding extra characters to control.

Page 53: Preserving arcade games

an original CPS1… (3 PCBs)

Page 54: Preserving arcade games

and a CPS1 bootleg (nothing in common)

Page 55: Preserving arcade games

the latest CPS1 generation had custom chip+suicide battery,..

Page 56: Preserving arcade games

...but it was defeated nonetheless:weak encryption+encrypted data made plaintext attack easy.

Page 57: Preserving arcade games

CPS1 was great.It was protected.It was completely hacked.

Page 58: Preserving arcade games

Capcom released its evolution, the CPS2

Page 59: Preserving arcade games

it started with this...

Page 60: Preserving arcade games

from Super SF2 (1993)to Hyper SF2 (2003)(how original !)

Page 61: Preserving arcade games

CPS2 was awesome...

Page 62: Preserving arcade games

...really awesome!

Page 63: Preserving arcade games

...plenty of great games...

Page 64: Preserving arcade games

the real successor to the CPS1the last successful hardware from Capcom.

Page 65: Preserving arcade games

here is the complete list of bootlegs, hacks, swaps...(absolutely NOTHING)

Page 66: Preserving arcade games

they were so desperate that they couldn't hack that...

Page 67: Preserving arcade games

that they hacked a console version into an arcade game (with typo)

Page 68: Preserving arcade games

A CPS2 is a sandwich of 2 PCBs(sometimes only 1, sometimes 3)

Page 69: Preserving arcade games

the game PCB contains code+data+protection

Page 70: Preserving arcade games

what's in green is in clear,in red is encrypted.Code and Data are together.Code is crypted, data isn't.

Page 71: Preserving arcade games

decryption is made on the fly,during memory fetch.read standard memory? as is.read for execution? decrypt.

Page 72: Preserving arcade games

patch an opcode (unknown encryption)→ black screen. game over. retry ?

Page 73: Preserving arcade games

CPS2 was really awesome.it was well protected.it was absolutely unscathed for 6 years.

Page 74: Preserving arcade games

Capcom had a major competitor.

Page 75: Preserving arcade games

the Neo-Geo is knownfor many games...

Page 76: Preserving arcade games

an exceptional success and longevity !

Page 77: Preserving arcade games

a success in arcade AND as an expensive console

Page 78: Preserving arcade games

Capcom created somethingthat made the NeoGeo look small and cheap.It was a commercial failure...

Page 79: Preserving arcade games

as a last effort, they backported a recent CPS2 game.the first decrypted CPS2 port !!!

Page 80: Preserving arcade games

but nothing happened. the dragon was still alive.

Page 81: Preserving arcade games

to defeat a dragon, you need adventurers:Razoola, Charles MacDonald, Andreas Naive, Nicola Salmoria, David Haywood, and many others.(I worked with Razoola, and helped him on the PC side)

Page 82: Preserving arcade games

In November 1999, Razoola re-enabled SFZ’s internal debugger (first working CPS2 patch !)→ not blind anymore !

Page 83: Preserving arcade games

in spring 2000, he found that some specific memory ranges were not using encryption!why ? no reason - just a big facepalm !→ shellcode execution for a split second.

Page 84: Preserving arcade games

when reading relatively to code (PC),memory fetches are actually decrypted !Sega prevented that, but Capcom failed.→ first CPS2 decryption, word by word

Page 85: Preserving arcade games

so, in Summer 2000, I visited Raz, hoping we'd break the algo.but no success...

Page 86: Preserving arcade games

in the meantime, we worked on other stuff(it's good to keep the faith, and your brain fresh !)

Page 87: Preserving arcade games

in December 2000, Raz noticed that Capcom leaked the key to keep decryption alive.→ automated dump is now possible !

Page 88: Preserving arcade games

we dumped by connecting the CPS2 to the joystick port of the PC.ugly, clumsy, slow, but worked !

Page 89: Preserving arcade games

Jan 2001: first cps2 emulation

Page 90: Preserving arcade games

the news didn't get it right, as usual...

Page 91: Preserving arcade games

but now emulation was a reality.each game needed to be sent to Raz in a working state.

Page 92: Preserving arcade games

game over for CPS2 ?not fully. encryption still unknown, no possible restoration yet.

Page 93: Preserving arcade games

in the meantime, more side projects, to keep the faith ;)

Page 94: Preserving arcade games

recent NeoGeo games also featured better protection

Page 95: Preserving arcade games

but with 'joystick dumping', that was defeated quickly :p(decryption done by Nicola Salmoria)

Page 96: Preserving arcade games

what about dead CPS2 boards ?

Page 97: Preserving arcade games

if you put back decrypted code on a dead CPS2,it still doesn't work.

Page 98: Preserving arcade games

Razoola was donated a working PCB to sacrifice,then found out why.

Page 99: Preserving arcade games

video and sound registers had a different address on dead games.patching these addresses makes them work again !

Page 100: Preserving arcade games

workflow: decrypt code, merge with data, patch addresses...

Page 101: Preserving arcade games

Razoola made a universal test ROM,and 'no more battery' Phoenix versions.

Page 102: Preserving arcade games

this also made bootlegs possible.no more battery...from MegaMan to Gigaman :(

Page 103: Preserving arcade games

and also some cool all-in-one:play all games with just one board.

Page 104: Preserving arcade games

PC, 1999

CPS2, 1994

these 2 games look different...

Page 105: Preserving arcade games

however, the IP was the same.Some nice lawyer wrote us a letter...You see who your friends really are,in these cases ;)

Page 106: Preserving arcade games

so now even the most obscure CPS2 games were preserved,but the encryption was still unknown.and it would take us 200 years to dump all possible values for one game...

Page 107: Preserving arcade games

so we needed someone else to continue...

Page 108: Preserving arcade games

if you can't defeat the ennemy, bring your friends.In 2005, Charles MacDonald started to work on the CPS2.

Page 109: Preserving arcade games

Charles MacDonald is an awesome hacker, with special weapons.Here, his PAL blackboxer.So, he took the CPS2 PAL, determine their internal configurationby blackboxing them, replace them with GALs.He now had controls over memory mapping !

Page 110: Preserving arcade games

then he designed his own dedicated device...

Page 111: Preserving arcade games

to dump CPS2 directly via its expansion port, to USB !!!He could dump the 8 Gb set in 17h.He did that for several games. but that wasn't enough to understand the algorithm......

Page 112: Preserving arcade games

so someone else needed to continue to break the algo...

Page 113: Preserving arcade games

that's where Nicola Salmoria and Andreas Naive helped.they're awesome to determine encryption algorithm.the algo was feistel based, and the key was 64 bits.

Page 114: Preserving arcade games

so, from one european decrypted dump of a game,the key could be determined,which could then decrypt the rare japanese version of the game.

Page 115: Preserving arcade games

Higenekodo even designed a patch to improve the controls of that game :Ddedication FTW !

Page 116: Preserving arcade games

Last, Dave Haywood designed an attack to determinethe key just from the ENCRYPTED dump of the game.So even the rarest CPS2 game was preserved !

Page 117: Preserving arcade games

Conclusion

Page 118: Preserving arcade games

Capcom's mistakes

Page 119: Preserving arcade games

many people contributed, in various ways

Page 120: Preserving arcade games

and overall, an awesome victory !

Page 121: Preserving arcade games

the original hardware to resurrect CPS2s appeared only a few years ago...

Page 122: Preserving arcade games

CPS2's protection is seen as related to Sega Naomi's

Page 123: Preserving arcade games

Andreas Naive later defeated CPS3 encryptionThen recently, Darksoft resurrected them and made an all-in-one CPS3 CD !

Page 124: Preserving arcade games

Razoola also went deeper in Neo-Geo enhancing,with his Universal Bios.

Page 125: Preserving arcade games

this is the Bubble Memory system.it’s very fragile.

Page 126: Preserving arcade games

to work, it needs to warm up to a certain temperature.to me, this big countdown says:'all these games are going to disappear if no one hacks or contribute for them'

Page 128: Preserving arcade games

yes, this is a CPS2 timeline :p

Page 129: Preserving arcade games

some bonus ?

Page 130: Preserving arcade games

SFA3 has a time lock: if you let it run long enough,some special modes are unlocked.the title background tells how many modes are unlocked.

Page 131: Preserving arcade games

extra characters, extra playing modes

Page 132: Preserving arcade games

Hidden in the operator menu,Razoola found the crazy cheat codes in the disassembly to turn on this extras without waiting weeks.

Page 133: Preserving arcade games

Charles MacDonald also worked on Sega hardware and created his own device for it...

Page 134: Preserving arcade games

Dumping from a Sega System24’s FD1094 to USB

Page 135: Preserving arcade games

to preserve games fromSystem 16, 24 & System X

Page 136: Preserving arcade games

Last Survivor, a System X game from 1989, was thought to be lost forever.Someone still had one in working conditions:it was preserved, 20 years later !

Page 137: Preserving arcade games

it's a split-screen multiplayer FPS

Page 138: Preserving arcade games

modern tools show how fighting games engine actually work.damage areas change from one version to the other.

Page 139: Preserving arcade games

there are bugs in the official releases !

Page 140: Preserving arcade games

attack behind you, or be hit for no reason...

Page 141: Preserving arcade games

tools assisted speedruns abuse games via standard controls.

Page 142: Preserving arcade games