It is currently Mon Oct 16, 2017 5:45 pm

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: SPC7110 decompression
PostPosted: Fri May 18, 2012 8:52 am 
Offline

Joined: Mon Mar 27, 2006 5:23 pm
Posts: 1338
So, here's the deal. neviksti cracked this a long time ago:
http://nesdev.com/bbs/viewtopic.php?t=4106

And while it's enough to play all of the games, we missed a very important detail of the chip that is going to matter greatly for any English fan translation that recompresses graphics, or any hobbyist work that uses the SPC7110 compression algorithms (which neviksti has codecs for, so this is quite trivial to do. And it has been done with the S-DD1 already.)

Basically, it's possible to "crash" the decompression engine. When fed certain sequences of data, the chip seems to go haywire. It'll usually spit out a few bad bytes, and then start repeating the same bad byte forever more. As it stands, for the Far East of Eden Zero translation, I basically can't modify compressed graphics without the risk that the results won't run on hardware.

Now it's easy to recover from this: just start a new decompression. It's also repeatable. The chip crashes in the same spots every time, so there's no randomness here to worry about.

So ... what I'd like is assistance in attempting to emulate the chip glitch / crash / whatever you want to call it.

To make it interesting, I'll pay anyone who figures it out $100 USD. For those out of the loop, the SPC7110 decompression algorithm is a integer-based arithmetic coder with a 53-state prediction table. Simpler than JPEG (once you know the algorithm, anyway), but more complex than huffman or LZ.

Here are the sample files:
http://bsnes.googlecode.com/files/spc71 ... ion.tar.xz

You need GCC 4.6 or later to compile. This will build on Windows or Linux. Should be easy enough to understand. It's pre-setup to fail on the mode1.bin test case included. The .bin files are output from real hardware.

I can run any tests anyone wants on hardware, with the one exception that I can only use the data ROMs from commercial SPC7110 carts. We can't give it our own custom data sequences I am afraid.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: AWJ, Google [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group