It is currently Thu Sep 19, 2019 6:37 pm

All times are UTC - 7 hours



Forum rules





Post new topic Reply to topic  [ 315 posts ]  Go to page Previous  1 ... 17, 18, 19, 20, 21
Author Message
 Post subject:
PostPosted: Sat Jul 19, 2008 2:08 am 
Offline

Joined: Thu Jun 22, 2006 11:39 pm
Posts: 205
byuu wrote:
You're using Visual C++ 6.0? Why? >_<

Yeah, I know, I know...

I'm not a programmer and this is what I got used to. They give it out like free napkins at every school I've been in, and since my memory is aweful I find the built in MSDN stuff a nice time saver.

Everytime I have to compile a large project of someone else's though... I'm reminded why I should eventually get around to choosing another setup.

byuu wrote:
Neither C99 nor C++98 specify either __int64 or long long, but all modern compilers support the latter. It's likely long long will be in C++0X. Of course, char/short/int/long/long long do not guarantee size.

It would be nice if they add in size specific types in the next one. I, and probably others, rarely need them, but when you do it would be nice.

Anyway, I'll just use two 32bit ints for now. It's no real trouble. I was just curious.

byuu wrote:
So close, so close ...

Yes. So very, very close.

I had to rerun the input file and didn't get around to it until now.
http://neviksti.com/SPC7110/output2_7030_an1.dat2

format: $11 bytes per pixel
- first 9 bytes show the pixel values it passes on the way to finding the prob value (I realize this isn't enough to reconstruct the color order table, but I'm hoping it works the same way and changing that at the moment will be very annoying so I left it as is)
then 8 bytes
prob value and lps.shift flags as before, for all four symbols

Now that I have more data, it looks like the "at least 8 contexts" is actually 12. And the last bit has 16 contexts.

Strange.
I'll start playing with it and see what comes out.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 19, 2008 3:18 am 
Offline

Joined: Mon Nov 26, 2007 2:06 am
Posts: 104
Location: Madrid, Spain
Quote:
"at least 8 contexts" is actually 12. And the last bit has 16 contexts.


Well, they still sum 31. So i will still suppose they are get as 2*5+(4-2)=12 and 2*5+(8-2)=16. Sadly, i cannot work on this today.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 19, 2008 3:29 am 
Offline

Joined: Thu Jun 22, 2006 11:39 pm
Posts: 205
Okay, the rest fell like cards.

reference pixels: 1st, 8th, 9th previous pixels
color frequency table updated as before

There is a stupid little error in my code for outputting the converted bitplane data instead of the raw pixel data that doesn't handle non 32 byte boundaries at the end of the decompression quite right. I'll upload the code once I get that silly little error fixed.

EDIT:
Andreas Naive wrote:
Well, they still sum 31. So i will still suppose they are get as 2*5+(4-2)=12 and 2*5+(8-2)=16. Sadly, i cannot work on this today.

Yep, that's what the context table ended up looking like.


Last edited by neviksti on Sat Jul 19, 2008 4:04 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 19, 2008 4:03 am 
Offline

Joined: Thu Jun 22, 2006 11:39 pm
Posts: 205
Alright. Here it is:
http://neviksti.com/SPC7110/DecompTest2.c

And we're done.
MDH passes fine (except the usual overdumps). FEOEZ has a few strange failures, but they are probably just bad parts of the graphics pack.

Considering the amount of work we put into reverse engineering this, I'm kind of glad that people who continue to use the graphics packs now will know that there are some, albeit rare, data glitches while they play... Mwhahahaha... :)

EDIT:
There's never been a more appropriate time to abuse the text tags, so I might as well enjoy it
YES! WE DID IT!

Okay, I clearly need more sleep as I've become slaphappy. Congratulations everyone.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 19, 2008 6:23 am 
Offline

Joined: Mon Mar 27, 2006 5:23 pm
Posts: 1524
IT WORKS :D
YAY!!


Pictures and binary coming very soon.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 19, 2008 7:58 am 
Offline

Joined: Fri Jun 16, 2006 11:24 pm
Posts: 14
Congratulations on cracking one of the last great mysteries of the Super Nintendo :)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 19, 2008 8:07 am 
Offline

Joined: Mon Mar 27, 2006 5:23 pm
Posts: 1524
Alright, I've posted a new version of bsnes with "full" SPC7110 emulation on my website. Hopefully Nach will post an SVN ZSNES build, so that more than three people can enjoy your hard work.

Also, I've put up lots more screenshots, which you can access directly here:
http://byuu.cinnamonpirate.com/images/bs_283.png - http://byuu.cinnamonpirate.com/images/bs_300.png

Just change the numbers by hand. Go back earlier to see what just modes 1 and 0 looked like.

Thank you again, neviksti. So, do you want us to recognize neviksti day on July 19th, or would you prefer every third Saturday of the month instead? :)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 19, 2008 11:09 am 
Offline

Joined: Sun Jul 13, 2008 3:49 pm
Posts: 4
Well done. Extremly well done!


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 19, 2008 11:18 am 
Offline

Joined: Mon Nov 26, 2007 2:06 am
Posts: 104
Location: Madrid, Spain
Quote:
Considering the amount of work we put into reverse engineering this, I'm kind of glad that people who continue to use the graphics packs now will know that there are some, albeit rare, data glitches while they play... Mwhahahaha...


xD xD xD


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 19, 2008 11:53 am 
Offline
User avatar

Joined: Wed Dec 06, 2006 8:18 pm
Posts: 2832
Very impressive. I was following the topic since it was first posted as I love the SFC and it's great to see another special chip understood.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 19, 2008 12:11 pm 
Offline

Joined: Mon May 26, 2008 11:41 pm
Posts: 74
Neviksti: I think you were referring to underdumps. Anyhow, I have just completed testing on the full raw untrimmed gfx packs I have on hand, and the I declare all 3 modes to be absolutely BIT PERFECT in respect to real hardware.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 19, 2008 2:34 pm 
Offline

Joined: Wed Jul 09, 2008 8:46 pm
Posts: 259
Congratulations! I think SNES9X and ZSNES could really use this stuff!

Out of the three games using the set, I have a partial SPC set dump of Super Power League 4. All others are done for SPC sets, and can be viewed on SNESMusic.org.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 19, 2008 8:57 pm 
Offline

Joined: Wed Apr 05, 2006 10:12 am
Posts: 129
Location: PA, USA
Excellent work everyone! :)

LN

_________________
"When life gives you zombies... *CHA-CHIK!* ...you make zombie-ade!"


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 20, 2008 6:23 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 21594
Location: NE Indiana, USA (NTSC)
byuu wrote:
You're using Visual C++ 6.0? Why? >_<

Probably because it came on someone's computer. It came on mine when I got my laptop from Rose-Hulman Institute of Technology in fall 1999.

Quote:
Neither C99 nor C++98 specify either __int64 or long long

Citation needed. As far as I can tell, C99 specifies (unsigned) long long and (u)int64_t. C++98 does not, but as you point out, compilers tend to provide a <cstdint> corresponding to C99's <stdint.h> as an extension.

Quote:
Hoorah!! neviksti, you are a hero! :D

Thank gosh he's not "an hero" :-) Because the complexity of especially mode 2 might end up driving someone to that point.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 22, 2008 10:55 pm 
Offline

Joined: Thu Jun 22, 2006 11:39 pm
Posts: 205
Some code / program tidbits will be discussed and showing up in this thread:
http://board.zsnes.com/phpBB2/viewtopic ... 127#173127

The thing of most direct relevance here is that I made the "end of compressed data" calculation much more precise (I believe it is exact now) in the decompression code. So some of those underdumps from before may not be.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 315 posts ]  Go to page Previous  1 ... 17, 18, 19, 20, 21

All times are UTC - 7 hours


Who is online

Users browsing this forum: Google [Bot], Google Adsense [Bot] and 4 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