don't click here

Sonic 2 LD

Discussion in 'Engineering & Reverse Engineering' started by doc eggfan, Aug 22, 2008.

Thread Status:
Not open for further replies.
  1. Ayatollah Mildred

    Ayatollah Mildred

    Member
    8
    0
    0
    Tried this a couple of days ago and it is nothing short of glory rainbow effect through sprinkle-hose in summertime. Or... something to that effect.

    Good luck with Chemical Plant and the rest. :)
     
  2. doc eggfan

    doc eggfan

    Are you pondering what I'm pondering? Wiki Sysop
    9,681
    232
    43
    ACT
    GreatMegaLD, GreatSC3k, Great SG1k
    1. 402700 D.A. Garden (I see what you did there)
    2. 198700 Doc Eggfan
    3. 104500 Rob Nukem
    4. 64000 Alex G.
    5. 52100 Milly B.
    6. 50400 Selbi
    7. 48200 Gold Lightning
    8. 45600 NoNameAtAll
    9. 45500 NHY
    10. 45100 Jaseman (sorry =P)

    Sorry to everyone who submitted smsplus or freezesms savestates, I can't get the emulators to work on tinyxp, and I can't figure out the save state binary to extract the high score, especially freezesms which is impressively compressed. I might just focus on Kega compatibility for the time being, and eventually branch out to other emulators (or enlist some helpers).
     
  3. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    Aww no top 10 for me? D=

    It worked perfectly fine for me in Regen. I hope future episodes do too. :)
     
  4. doc eggfan

    doc eggfan

    Are you pondering what I'm pondering? Wiki Sysop
    9,681
    232
    43
    ACT
    GreatMegaLD, GreatSC3k, Great SG1k
    The episodes will work fine stand alone, but carrying over lives, score and emeralds collected between episodes using savestates maybe a Kega only feature for a while, mainly because the kega save state format is the only one I've identified all the key parameters.
     
  5. nineko

    nineko

    I am the Holy Cat Tech Member
    6,308
    486
    63
    italy
    I used Dega, but I forgot to take a savestate. If you need one I can do so now.

    edit: done. Though I didn't write down the mail address so I'll just PM you here :v:
     
  6. doc eggfan

    doc eggfan

    Are you pondering what I'm pondering? Wiki Sysop
    9,681
    232
    43
    ACT
    GreatMegaLD, GreatSC3k, Great SG1k
    Nah, it's alright. I've got other priorities I'm focusing on. I'm currently trying to fix the masher object logic so it explodes.

    Maybe other community members would like to pick up my slack and figure out the other savestate formats. I need to know the addresses of the score, lives, emeralds collected, and current zone and act numbers.
     
  7. nineko

    nineko

    I am the Holy Cat Tech Member
    6,308
    486
    63
    italy
    Sorry man, I sent you a PM right before you posted that :|
    This is bad timing at its best.
     
  8. doc eggfan

    doc eggfan

    Are you pondering what I'm pondering? Wiki Sysop
    9,681
    232
    43
    ACT
    GreatMegaLD, GreatSC3k, Great SG1k
    It's ok, thanks anyway. I had a look and dega looks like it uses compressed save states too. It makes in harder to edit when they're compressed.
     
  9. I think I'm missing something, because I don't understand why the save state format is important... I though that all the code and data used in the "Matrix Zone" would be present in all ROMs at the same locations, so that you could load a state saved from a previous ROM without crashing the program. If that was the case, the emulator used shouldn't matter, because all the data validation would be done by the game itself, and in the emulated environment the save state format is irrelevant... So what am I missing?

    BTW, can Master System games have battery-backed RAM? Wouldn't it be easier to enable the save RAM for these games and use that to carry information over to future ROMs? That way the game would just have to periodically save the data to be carried over to the next episode, and when the player finishes an episode he just renames the save file and fires up the next ROM, which will validate and load the data. Wouldn't that work?
     
  10. doc eggfan

    doc eggfan

    Are you pondering what I'm pondering? Wiki Sysop
    9,681
    232
    43
    ACT
    GreatMegaLD, GreatSC3k, Great SG1k
    There's two identical matrix zones, act 0 and act 4. When you create a savestate of act 4 episode 1, you need to hack the level id in the savestate so that when you load it in episode 2, you start in act 0, otherwise you'd start at the end of episode 2. It's crude, but it works, but requires some savestate hacking and knowledge of the savestate format, which is unique to each emulator.

    Yes, there are more elegant solutions, like this one, but I'm not a very elegant hacker.
     
  11. Ah, I see, the level ID has to be forced back to act 0... got it.

    To be honest, I made the suggestion thinking it would actually be simpler to implement, if it is more elegant then that's just a nice side effect. I mean, copying a few bytes from one location in RAM to another (the battery-backed RAM) at the end of every level sounds much easier than creating special Zones and making sure they won't crash under any circumstance, something that might get harder and harder to pull off in future episodes if the hacks become more extensive (as you gain more experience). The decision is up to you of course, I just wanted to give you another option in case you hadn't though of it yet.
     
  12. doc eggfan

    doc eggfan

    Are you pondering what I'm pondering? Wiki Sysop
    9,681
    232
    43
    ACT
    GreatMegaLD, GreatSC3k, Great SG1k
    YES! I've fixed the masher/UGZ fireball so that it is now destructible! A new revision will be out soon.
     
  13. doc eggfan

    doc eggfan

    Are you pondering what I'm pondering? Wiki Sysop
    9,681
    232
    43
    ACT
    GreatMegaLD, GreatSC3k, Great SG1k
    Sonic 2 LD Episode 01 - EHZ v0.92.zip - 0.19MB

    Revision 0.92
    - Fixed Masher, it's no longer invincible
    - Fixed vertical spring width
    - Fixed skyline in Act 2
    - Restored underground spike height to match collision
    - Removed speed shoes stars
    - Amended BGM for Act 0 to match Act 4
    - Includes Cinossu's first EHZ BGM (Note to Cinossu, can you add the new version and boss music please + - and super mario theme?   )

    I guess the high score table resets now. If you want to participate, send your kega savestate to the sonic2ld email address. At this stage I can only analyse the data in kega savestates, but most of you used that anyway. This time I'll be awarding bonuses based on more information than just the score.
     
  14. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    19,234
    969
    93
    Long-term happiness
    Sent a savestate. =P EHZ is much nicer to play with destructible Mashers and the right music.
     
  15. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    The link doesn't seem to be working for me. Anyone else having this problem?
     
  16. nineko

    nineko

    I am the Holy Cat Tech Member
    6,308
    486
    63
    italy
    There, I uploaded it on the wiki: File:Sonic_2_LD_Episode_01_-_EHZ.zip
     
  17. Jaseman

    Jaseman

    The programmer has a nap! Hold out! Programmer! Member
    954
    1
    18
    [​IMG]

    first to find this?
     
  18. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    Thanx, yeah that works fine.

    Not bad at all, love the Emerald Hill 8 bit track.

    Critique:

    * Strange oddity, the invincibility stars in the first act disappear if you jump offscreen.
    * I noticed all the original tunes seem to be pitched down slightly (par elements of Underground Zone). Since most of these will likely be replaced I guess this isn't that big a problem, just thought it was worth noting.
    * The already stated absent loops, some of the ramp replacements also seem a bit awkward, but I don't know how much these can be refined for 8 bit.
     
  19. nineko

    nineko

    I am the Holy Cat Tech Member
    6,308
    486
    63
    italy
     
  20. doc eggfan

    doc eggfan

    Are you pondering what I'm pondering? Wiki Sysop
    9,681
    232
    43
    ACT
    GreatMegaLD, GreatSC3k, Great SG1k
    <!--QuoteBegin-Stan423321+ via email--><div class='quotetop'>QUOTE (Stan423321 @ via email)</div><div class='quotemain'><!--QuoteEBegin-->
    Why isn't it possible to hack level ids in ROMs instead?
    I mean, like this:
    1) EHZ works like it does.
    2) In CPZ, the level order is switched to:
    A4 > A1 > A2 > A3 > A0 > (whatever fancy stuff you decide to put here)
    3) ARZ works like EHZ does.
    4) CNZ works like CPZ does.
    (...)

    What's more, it would be fancy to add a variable keeping up which episodes
    you already played and which not. So skipping Metropolis would result
    in "snooping as usual I see". (Not talking about unlockables.)

    Once again, thanks for your hack,
    Stan423321[/QUOTE]

    Unfortunately, the Rom doesn't have a level order array or pointer system that allows the levels to be reshuffled, so when you load the ep1 Act4 savestate, the next level can't be reassigned back to Act 1, it must go on to Act 5. Now, I could shuffle everything along and have episode 2 end at Act 8, but that requires further work, and I'd eventually run out of acts. It's easier just to hack the savestate. Of course, I know this is all a very crude method of achieving the desired outcome. Eventually, in the distant future, we might get everything packed into a nice simple rom.

    Unfortunately, I'm not clever enough to start creating variables from scratch. It's a nice idea though, but I guess you can't really skip ahead until the episode is released, at which point I can't really stop people from skipping older episodes if they want to.
     
Thread Status:
Not open for further replies.