Jump to content

CPS3 encryption is broken


Recommended Posts

yeah plus some people just have to have everything (and im the same way with some things, not MAME because i pretty much gave up after mame.dk died....which was a really long time ago...man i miss mame)

MAME.dk was king back in its hayday, but nowadays several sites have taken its place.

 

However, whoever tore MAME.dk down deserves a good spanking.

Link to comment
Share on other sites

  • Replies 32
  • Created
  • Last Reply

Top Posters In This Topic

yeah plus some people just have to have everything (and im the same way with some things, not MAME because i pretty much gave up after mame.dk died....which was a really long time ago...man i miss mame)

MAME.dk was king back in its hayday, but nowadays several sites have taken its place.

 

However, whoever tore MAME.dk down deserves a good spanking.

 

good old days back then....to download 15mb...with a 56k connection :P

Link to comment
Share on other sites

I love Mame.dk, it was a good place. I remember people saying that it'll take 10yrs to emulate cps3. Has it been 10yrs already?

 

YEAH ! Mame.dk was the BEST mame roms download site I ve ever seen :P

I remember too .... :pimp:

Link to comment
Share on other sites

I love Mame.dk, it was a good place. I remember people saying that it'll take 10yrs to emulate cps3. Has it been 10yrs already?

Maybe not yet 10, but I don't think it's not too far from that.

 

A long time no matter how you look at it.

Link to comment
Share on other sites

I love Mame.dk, it was a good place. I remember people saying that it'll take 10yrs to emulate cps3. Has it been 10yrs already?

Maybe not yet 10, but I don't think it's not too far from that.

 

A long time no matter how you look at it.

True, a long time indeed. I'm sure all of us are willing to wait. I'm patient

Link to comment
Share on other sites

June 18th, 2007

 

CPS3 Tile / Sprite Data Compression

 

CPS3 uses compressed data for it’s BG tiles and Sprite Data. The system has a ‘DMA’ list in Video RAM, and when given the command the video hardware will process this list, and copy + decompress graphic data from the FlashROMs into Video RAM for use by the game.

 

The compression initially looked rather complex, but actually turns out to be much more simple than first thought (although emulation still isn’t perfect)

 

The basics of it are simple. The first command in the DMA list is a special command, telling the chip to upload a 256 byte table to its internal memory. The Compressed data contains 8 bit values from 00 - FF. Byte with 0×80 set (0×80 - 0xFF) are treated as a lookup into the table it uploaded, replacing one byte, with one word from the table. This allows them to compress the 128 most common words to a single byte instead of a word, thus saving 50%.

 

After that there is an RLE stage, bytes with 0×40 set are command bytes, telling the chip to repeat the next byte a certain number of tiles. What you’re left with is a series of values between 0×00 and 0×3f, giving 6bpp (64 colour) sprite / bg tiles.

 

What isn’t quite understood is what happens if there is an RLE command byte followed by an RLE command byte, or if RLE is applied to a 0×80 byte, does it just affect the first value in the table, or do both get repeated etc.

 

Here are some screenshots, they’re not quite as good as ElSemi’s, probably due to a bug in the code I’m using right now. Also I’ve had to disable the text layer palette for now because MAME can’t handle over 0×10000 colours in a palette without custom drawing functions.

 

JoJo

 

jojo_bg_1.png

 

jojo_bg_2.png

 

jojo_bg_3.png

 

jojo_bg_4.png

 

jojo_bg_5.png

 

JoJo Bizzare Adventure

 

jojoba_1.png

 

jojoba_2.png

 

jojoba_3.png

 

jojoba_4.png

 

jojoba_5.png

 

jojoba_6.png

 

SF III

 

sfiii_bg_1.png

 

sfiii_bg_2.png

 

sfiii_bg_3.png

 

sfiii_bg_4.png

 

sfiii_bg_5.png

 

SF III 2

 

sfiii2_bg_1.png

 

sfiii2_bg_2.png

 

sfiii2_bg_3.png

 

sfiii2_bg_4.png

 

sfiii2_bg_5.png

 

SF III 3

 

sfiii3_bg_1.png

 

sfiii3_bg_2.png

 

sfiii3_bg_3.png

 

sfiii3_bg_4.png

 

sfiii3_bg_5.png

 

http://haze.mameworld.info/2007/06/18/cps3...ta-compression/

Link to comment
Share on other sites

Sprites..

 

This is the first shot of some sprites with meaningful tiles. Everything is in the wrong place and upside down at the moment, but you can see where this is heading.

 

upside_down_sprites.png

 

 

Tile Compression Part 2

 

Dox made a suggestion, I implemented it, and now the tile DMA is fixed.

 

Basically the RLE byte should affect the last normal byte before it, NOT the byte after it. This simplifies the code, and produces much better results.

 

 

sfiii_new_bg_1.png

 

sfiii_new_bg_2.png

 

sfiii_new_bg_3.png

 

 

sfiii_new_bg_4.png

 

 

sfiii_new_bg_5.png

 

 

sfiii_new_bg_6.png

 

 

sfiii2_new_bg_1.png

 

 

sfiii2_new_bg_2.png

 

 

jojo_new_bg_2.png

 

http://haze.mameworld.info/

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...