don't click here

ЭIИO2: Rebirth

Discussion in 'Engineering & Reverse Engineering' started by doc eggfan, Jul 29, 2008.

Thread Status:
Not open for further replies.
  1. doc eggfan

    doc eggfan

    Are you pondering what I'm pondering? Wiki Sysop
    9,682
    232
    43
    ACT
    GreatMegaLD, GreatSC3k, Great SG1k
    [​IMG]
    This may not look like much, but this is the moment, after weeks of experimentation, when I was finally succeeded in editing the compressed art in the game. It might be a bit premature, but I think I've just busted the game wide open for an extensive art edit.
     
  2. SGR

    SGR

    Give me the gams. Member
    Epic. Can't wait to see some genuine Sonic 2 GG/SMS hacks.

    Good job! :thumbsup:
     
  3. Tweaker

    Tweaker

    Banned
    12,387
    2
    0
    Oh wow, excellent work!

    So wait, I'm confused—did you crack the compression, write a compressor... what? Please, share the details! :D
     
  4. Mad Echidna

    Mad Echidna

    Gone Oldbie
    5,219
    0
    0
    NICE JOB

    I can't wait to see what you can do with this. I've always favored the Sonic 2 8 bit engine, it seems so smooth and gives a great sense of speed.
     
  5. doc eggfan

    doc eggfan

    Are you pondering what I'm pondering? Wiki Sysop
    9,682
    232
    43
    ACT
    GreatMegaLD, GreatSC3k, Great SG1k
    I cheated a bit. If you recognise the art, you'll know that it's the moving platform from scrambled egg zone, which is stored as compressed art in the game but it's actually 0% compressed. I copied that data to an unused spot and changed the dropped ring compressed art pointer. Sounds really simple, but there were lots of little things I had to figure out and mistakes to correct to make it work. All the info has already been discovered here, it just took me a while to get my head around it. The master system environment is a lot more hostile to hacking than the mega drive environment. One of the mistakes I learnt is that you can't have data overlapping between two different $4000 segments
     
  6. Hivebrain

    Hivebrain

    Administrator
    3,049
    161
    43
    53.4N, 1.5W
    Github
    Art compression in Sonic 2 is fairly simple. The basic idea is that transparent pixels are stored in bitfields (which is why tiles with no transparent pixels appear to be uncompressed).
     
  7. doc eggfan

    doc eggfan

    Are you pondering what I'm pondering? Wiki Sysop
    9,682
    232
    43
    ACT
    GreatMegaLD, GreatSC3k, Great SG1k
    Yeah, that's not really what I had problems with, it was more the pointer editing and rejigging the headers and the footers of the compressed art. I didn't discover anything new, I just understand it now. I plan to just store new art uncompressed though, because I couldn't be arsed compressing it, and it allows me to just edit it directly if I want to change anything.
     
  8. doc eggfan

    doc eggfan

    Are you pondering what I'm pondering? Wiki Sysop
    9,682
    232
    43
    ACT
    GreatMegaLD, GreatSC3k, Great SG1k
    [​IMG]
    You see that! That's the smiley face of victory! You're my bitch now, devil rom! Cower before your master! Mwahahahahaha!
     
  9. Jayextee

    Jayextee

    Unpopular Opinions™ Member
    3,253
    62
    28
    Atro City
    I DONE MAKED GAMES.
    Now, when there's a utility to edit the art and layout (Both of which now seem to be on their way to destruction. Awesome) I'm totally on this motherfucker.

    You have no chance to survive make your time.
     
  10. ICEknight

    ICEknight

    Researcher Researcher
  11. doc eggfan

    doc eggfan

    Are you pondering what I'm pondering? Wiki Sysop
    9,682
    232
    43
    ACT
    GreatMegaLD, GreatSC3k, Great SG1k
  12. muteKi

    muteKi

    Fuck it Member
    7,851
    131
    43
    At least the ones by Aspect. Sonic 1 was an Ancient [I.e., Koshiro] title, and hence wouldn't use the same engine.
     
  13. doc eggfan

    doc eggfan

    Are you pondering what I'm pondering? Wiki Sysop
    9,682
    232
    43
    ACT
    GreatMegaLD, GreatSC3k, Great SG1k
    For those of you playing along at home

    Compressed Art Template

    01 00 NN NN PP PP [Art Data] [Compression definition]

    01 00: This is the start. You need to change the pointer for the art you're inserting to the address of 01 byte
    NN NN: This is the number of 8x8 tiles in your [Art Data] (in hexadecimal, of course). It is little endian, so the second byte is typically 00
    PP PP: This is the relative pointer to the [Compression definition]. It is relative to the address of start and also in little endian
    [Art Data]: This is the 8x8 tiles of your art. You can extract these uncompressed from a save state if you wish to edit the original art.
    [Compression definition]: This defines what kind of compression is used for each tile. Each tile is defined by two bits. Uncompressed tiles are defined as 01. If all your tiles are uncompressed, the complete compression definition will be

    (NN / 4) x '55'

    e.g. 8 tiles will be followed by a compression definition of 08/4 = 2 bytes of 55 ie 55 55
     
  14. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    19,239
    972
    93
    Long-term happiness
    Really top class work, Eggfan, keep it up!
     
  15. doc eggfan

    doc eggfan

    Are you pondering what I'm pondering? Wiki Sysop
    9,682
    232
    43
    ACT
    GreatMegaLD, GreatSC3k, Great SG1k
    BEFORE:
    [​IMG]

    AFTER:
    [​IMG]

    Hehe! Mappings are easy to edit too.

    Special Thanks to Hive Brain, Rolken, and Ambil. All the work they have done is making this exceedingly easy for me. Why hasn't anybody tried it before?
     
  16. Ollie

    Ollie

    DIGGY DIGGY HOLE Member
    Wow, this is impressive, so we should see even more 8-Bit Sonic 2 hacks in the future then. ;)
     
  17. Shibunoa

    Shibunoa

    Banned
    329
    0
    0
    Italy
    Awesome. Sonic 2 8-bit megamix anyone? =P
     
  18. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    19,239
    972
    93
    Long-term happiness
  19. P.P.A.

    P.P.A.

    SONIC 2 SUCKS, SONIC CD FOREVER Member
    644
    0
    0
    Germany
    Sonic MD (Currently: Art for Zone 3)
    Which is a shame. Sonic Chaos and especially Sonic Triple Trouble easily rival the 16-bit games.

    EDIT: Oh, this might be a good time to bring this up. A while ago I bought a Master System Converter II, the one compatible with the MDII. Worked flawlessly, I was happy. However not that I have a 32X, it refuses to do its job, in either 50hz or 60hz mode. Is there a way to overcome that, or would a MSC1 work with that setup? (Otherwise I'll just have to overcome my laziness and simply disconnect the 32X, but if there's an even more comfortable way...)
     
  20. muteKi

    muteKi

    Fuck it Member
    7,851
    131
    43
    I think that you'll have to remove the 32X since it doesn't connect to all the pins -- I.e., the ones that are used only for SMS backward-compatibility.
     
Thread Status:
Not open for further replies.