Sonic and Sega Retro Message Board: Brett Kosinski format - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 3 Pages +
  • 1
  • 2
  • 3
    Locked
    Locked Forum

Brett Kosinski format How things works.

#16 User is offline Hayate 

Posted 12 November 2004 - 12:28 PM

  • Posts: 2379
  • Joined: 01-February 04
  • Gender:Male
  • Location:Torquay, England
  • Wiki edits:70
Argh! Don't quote a two-page-long post to write three frikkin lines! >_<

#17 User is offline Quickman 

Posted 12 November 2004 - 01:12 PM

  • Posts: 5584
  • Joined: 03-December 03
  • Gender:Male
  • Location::x
  • Project:omg porjcet
  • Wiki edits:10
That wasn't that long. Don't bitch.

#18 User is offline Hayate 

Posted 12 November 2004 - 02:04 PM

  • Posts: 2379
  • Joined: 01-February 04
  • Gender:Male
  • Location:Torquay, England
  • Wiki edits:70
Yes it was.

Even on 1280x1024 resolution.

#19 User is offline Quickman 

Posted 12 November 2004 - 03:17 PM

  • Posts: 5584
  • Joined: 03-December 03
  • Gender:Male
  • Location::x
  • Project:omg porjcet
  • Wiki edits:10
I'm on 1024x768 and I can scroll past it in two or three mousewheel swathes. Now if it took enough time for the human race to become extinct to scroll past it, THAT would be too long.

#20 User is offline Kles 

Posted 12 November 2004 - 04:03 PM

  • Posts: 2460
  • Joined: 14-March 04
  • Gender:Male
  • Location:Ontario
  • Wiki edits:5
While overblown by Bob, I really don't think the whole thing needed to be quoted. Didn't bother me but hey.

#21 User is offline Hayate 

Posted 13 November 2004 - 03:36 PM

  • Posts: 2379
  • Joined: 01-February 04
  • Gender:Male
  • Location:Torquay, England
  • Wiki edits:70
>_<

I keep getting you mixed up with Fiz... damn avatars...

#22 User is offline Kles 

Posted 14 November 2004 - 03:07 AM

  • Posts: 2460
  • Joined: 14-March 04
  • Gender:Male
  • Location:Ontario
  • Wiki edits:5
Me?

#23 User is offline Sonic Hachelle-Bee 

Posted 26 November 2004 - 04:33 AM

  • Lost in Wood zone
  • Posts: 724
  • Joined: 03-March 04
  • Gender:Male
  • Location:Paris, France
  • Project:Sonic 2 Long Version
Update about the Separate compression.
There is something to add under the Separate compression. It's the DDDDD value.
The first post has been edited as well.

Separate compression:

This is when there is 01 under the bitfield.
The separate compression uses at least 2 bytes, and sometimes 3 (the last is optional). In a binary form:

NN DC (CC) = NNNN NNNN DDDD DCCC (CCCC CCCC)

NN is another negative value. Unlike IC, this one will tell the game where to read/copy the (uncompressed) data from. Writing FF for NN will read/copy the previous byte only. Writing another value will read/copy the previous bytes this value refers to, until you have CC of them.

DD is again a negative value on 5 bits. This is an addon to NN. Take NN and substract 256 (100 in hex) * |DD+1|. Take the result as your new NN value.

DD = 11111 = -1 --> NN = NN - (256 * |-1+1|) = NN (Do nothing)
DD = 11110 = -2 --> NN = NN - (256 * |-2+1|) = NN - 256
DD = 11101 = -3 --> NN = NN - (256 * |-3+1|) = NN - 256 * 2 = NN - 512
DD = 11100 = -4 --> NN = NN - (256 * |-4+1|) = NN - 256 * 3 = NN - 768
...
DD = 00000 = -32 --> NN = NN - (256 * |-32+1|) = NN - 256 * 31 = NN - 7936

Example:
66 67 FF F8 0D --> NN = -1 and DD = 11111 --> NN = -1, we are starting at 67.
66 67 FE F8 0D --> NN = -2 and DD = 11111 --> NN = -2, we are starting at 66.
...
66 67 FF F0 0D --> NN = -1 and DD = 11110 --> NN = -257, we are starting 257 bytes before.
66 67 FD E7 --> NN = -3 and DD = 11100 --> NN = -771, we are starting 771 bytes before.

CC: Count.
If you have no more than 9 bytes to read/copy, then the last CC byte is useless.

F0 --> Like F8, be careful of the DD value.
F1 --> Copy the read data for 3 bytes, be careful of the DD value.
F2 --> Copy the read data for 4 bytes, be careful of the DD value.
F3 --> Copy the read data for 5 bytes, be careful of the DD value.
F4 --> Copy the read data for 6 bytes, be careful of the DD value.
F5 --> Copy the read data for 7 bytes, be careful of the DD value.
F6 --> Copy the read data for 8 bytes, be careful of the DD value.
F7 --> Copy the read data for 9 bytes, be careful of the DD value.
F8 --> Read next.
F9 --> Copy the read data for 3 bytes.
FA --> Copy the read data for 4 bytes.
FB --> Copy the read data for 5 bytes.
FC --> Copy the read data for 6 bytes.
FD --> Copy the read data for 7 bytes.
FE --> Copy the read data for 8 bytes.
FF --> Copy the read data for 9 bytes.

Else, write F8 = 1111 1000 (CCC = 000) for the first count, and use the last byte to actually write your count (-1):
F8 09 --> Copy the read data for 10 bytes.
F8 0A --> Copy the read data for 11 bytes.
...

Writing 00 F8 00 (NN = 00 and both counts are 00's) will end the compressed data.

In our example:
53 FB 01 23 FE 67 FF F8 0D 98 FF FD 65 98 75 FB B2 00 15...
We have 2 SC: FF F8 0D and FF FD.

67 FF F8 0D = 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 (67 + 0Ex67)
98 FF FD = 98 98 98 98 98 98 98 98 (98 + 07x98)
Another: 12 34 56 78 9A BC DE 10 FA F9 = 12 34 56 78 9A BC DE 10 56 78 9A

#24 User is offline nineko 

  Posted 28 October 2007 - 10:01 PM

  • I am the Holy Cat
  • Posts: 5525
  • Joined: 17-August 06
  • Gender:Male
  • Location:italy
  • Project:I... don't even know anymore :U
  • Wiki edits:5,251
This is useful. :yes:

#25 User is offline Dark Sonic 

Posted 28 October 2007 - 10:34 PM

  • Posts: 10073
  • Joined: 21-April 06
  • Gender:Male
  • Project:Sonic Lost World: Nonexistent Six/Fixed Edition; Sonic Genesis Adventure (Let's see how long this lasts :V)
  • Wiki edits:10

View Postkame, on Oct 28 2007, 07:01 PM, said:

This is useful. :yes:

But your not D: I think we have a winner! 3 year bump!

#26 User is offline Ritz 

Posted 30 October 2007 - 04:46 PM

  • Subhedgehog
  • Posts: 3833
  • Joined: 01-January 06
  • Gender:Not Telling
  • Location:Glimmering Cornhole Zone
  • Wiki edits:2
Oh god oh god a bump in a dead forum this disrupts the sanctity of the entire board

#27 User is offline SMTP 

Posted 30 October 2007 - 05:24 PM

  • Posts: 2145
  • Joined: 27-April 04
  • Gender:Male
  • Location:Ohio
  • Wiki edits:59
I wouldnt even consider it a bump in the archives anyway.

#28 User is offline Dark Sonic 

Posted 31 October 2007 - 04:34 PM

  • Posts: 10073
  • Joined: 21-April 06
  • Gender:Male
  • Project:Sonic Lost World: Nonexistent Six/Fixed Edition; Sonic Genesis Adventure (Let's see how long this lasts :V)
  • Wiki edits:10

View PostRitz, on Oct 30 2007, 01:46 PM, said:

Oh god oh god a bump in a dead forum this disrupts the sanctity of the entire board

I know but still... such a huge bump.

#29 User is offline Sik 

Posted 03 November 2007 - 02:50 PM

  • Sik is pronounced as "seek", not as "sick".
  • Posts: 6719
  • Joined: 17-March 06
  • Gender:Male
  • Project:being an asshole =P
  • Wiki edits:11
Taking advantage of the bump: would you like to keep calling it Kosinski or not? Seriously. After examining Allegro's packfiles, Kosinski format turned out to be just a somewhat improved version of LZSS (improved by the fact that small offsets require less bytes). I'm not kidding. Go and check the LZSS file in Allegro sources and read the start comment. It describes how does the packfile compression works. It's way similar.

#30 User is offline drx 

Posted 03 November 2007 - 04:38 PM

  • <Shade> fuck MJ
  • Posts: 2156
  • Joined: 02-March 04
  • Gender:Male
  • Project::rolleyes:
  • Wiki edits:8

View PostSik, on Nov 3 2007, 08:50 PM, said:

Taking advantage of the bump: would you like to keep calling it Kosinski or not? Seriously. After examining Allegro's packfiles, Kosinski format turned out to be just a somewhat improved version of LZSS (improved by the fact that small offsets require less bytes). I'm not kidding. Go and check the LZSS file in Allegro sources and read the start comment. It describes how does the packfile compression works. It's way similar.


It doesn't matter who invented the compression format. If we followed your line of reasoning, all compression formats we don't know the origins of we would have to name '???1', '???2' etc.

The point in naming a compression format after the person who cracked it is that by doing this, you show your gratitude towards the cracker for doing it. I, for one, am very grateful to Kosinski and Nemesis for cracking their formats. If it wasn't for them, we probably wouldn't be where we are as a community. Surely someone else would have cracked the formats later (say, I), but they made it possible first.

We already know what these compressions are really called, anyway.

  • 3 Pages +
  • 1
  • 2
  • 3
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users