don't click here

ASM Spinball disassembly

Discussion in 'Engineering & Reverse Engineering' started by Andlabs, Oct 1, 2010.

  1. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    19,484
    1,091
    93
    Long-term happiness
    Wonderful, thank you very much for that!
     
  2. Chimpo

    Chimpo

    Happiest Retro Poster Member
    9,411
    2,264
    93
    Los Angeles, 2029
    Banana
    60fps Spinball. That's nuts. God's work.
     
  3. Cooljerk

    Cooljerk

    Professional Electromancer Oldbie
    4,828
    484
    63
    I've played Spinball on an overclocked Genesis before that can reach an acceptable framerate, and I have to say it transforms the game. I *HATED* spinball when it released, it was by far my least favorite Sonic game for many, many, maaaaany years. Even compared to Labyrinth, Blast (not 3D blast), and such. I thought Spinball just outright felt bad to play. At full framerate, the game is actually not that bad, and feels a lot more like how a sonic pinball game should feel. Great updates!
     
  4. Scrambled Eggman

    Scrambled Eggman

    Worm Bagged Tech Member
    20
    87
    13
    Picking at Sonic Spinball Disassembly
    I think it's fair to say that anyone who did persevere through the jank that Spinball undoubtedly has, can see that it is a bit of a diamond in the rough. I've never played any other games like it before its release or since. I do wonder if it was a little less jank in the PAL version, given that was a later version with numerous bug fixes.

    This does remind me, I'd love to look at applying the knowledge I've gained to also disassembling/decompiling the PAL version and Beta versions in the future. Would be nice to essentially diff the bug fixes and improvements that were made in the PAL version, and perhaps find cut features/content in the beta versions. It all depends on how radically different the C compilation is between them, but I'd anticipate that a lot of the signatures would be similar, just in different locations.
     
  5. Hez

    Hez

    Oldbie
    I am admittedly waiting patiently to see if anyone finds anything interesting in the level art themselves. I feel like this game was never properly dug through.
     
  6. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,796
    383
    63
    SonLVL
    I hope that someday we're able to decompile the game to C, and port it to PC like they planned to originally.
     
  7. Blastfrog

    Blastfrog

    See ya starside. Member
    J2ME version seems to have the OST in MIDI format, possibly the very same tracks that were fed through GEMS? Could use that in a Windows 9X port. :)
     
  8. Scrambled Eggman

    Scrambled Eggman

    Worm Bagged Tech Member
    20
    87
    13
    Picking at Sonic Spinball Disassembly
    Sadly those are poorly done renditions of the GEMS tracks. Compositionally they are very different i.e. severely lacking. :(
     
    • Informative Informative x 1
    • List
  9. Kilo

    Kilo

    Deathly afraid of the YM2612 Tech Member
    1,073
    1,060
    93
    Canada
    Sonic 1 Source Code Recreation + Source Code Wiki Page
    Unfortunately J2ME's OST is incomplete. It only includes the stage themes, the title theme, and a game over jingle. No boss theme, no bonus stage theme, and most importantly, no options music.
     
  10. BenoitRen

    BenoitRen

    Tech Member
    807
    398
    63
    I'd like to hear more about the effect being compiled to C had on the assembly.
     
  11. rata

    rata

    Member
    704
    80
    28
    Argentina
    Trying to be useful somehow.
    You don't hate Sonic Spinball even half of how Sonic Spinball hates you for playing it. In my home, we loved it precisely for that., you could never know what was coming next. We even got to somewhat reliably glitch to go to the upper part of toxic caves without busting the pipe covers (as kids), despite needing to open them to drain the crap surrounding the emerald anyways.
    Also pressing Down after going upwards after busting the barrels on Toxic Caves just so Sonic ends up floating in the air with the floor simply not closing after he arrives just for the sake of it.
     
  12. Scrambled Eggman

    Scrambled Eggman

    Worm Bagged Tech Member
    20
    87
    13
    Picking at Sonic Spinball Disassembly
    Today I've been able to uncover a lion's share of the Flipper behaviour and code. I've been able to redirect the table used by toxic caves, to successfully instantiate additional flippers.



    A general note on all of the level data that I've started to uncover, is that the per-level tables are all interlaced i.e. Instead of 4 clean blocks of data; each type of data is separated instead and has indices to each level

    e.g.

    Convenient level data:
    Code (Text):
    1.  
    2. - Toxic Caves
    3.   - Tiles
    4.   - Flippers
    5.   - etc
    6. - Lava Powerhouse
    7.   - Tiles
    8.   - Flippers
    9. - The Machine
    10.   - ...
    11. - Showdown
    12.   - ...
    13.  
    Interlaced data:
    Code (Text):
    1.  
    2. - Tiles
    3.   - Toxic Caves
    4.   - Lava Powerhouse
    5.   - The Machine
    6.   - Showdown
    7. - Flippers
    8.   - Toxic Caves
    9.   - Lava Powerhouse
    10.   - The Machine
    11.   - Showdown
    12. - etc
    13.  
    P.S. Can we get a Community Hacking Guide wiki page for Spinball so I can collate all this info, pretty please?
     
  13. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,796
    383
    63
    SonLVL
    You should be able to create such a page on your own. Just copy the format of an existing page.
     
  14. Scrambled Eggman

    Scrambled Eggman

    Worm Bagged Tech Member
    20
    87
    13
    Picking at Sonic Spinball Disassembly
    Ohh I thought there was a permissions issue or something. I didn't realise that the forum and wiki logins were separate so I was trying to use my forum credentials. Resetting the password worked, so it probably had an ancient password from 2005 that I was never going to be able to remember, haha. All seems well now though, so I will look to get a page going over the coming days. Thanks~
     
  15. Scrambled Eggman

    Scrambled Eggman

    Worm Bagged Tech Member
    20
    87
    13
    Picking at Sonic Spinball Disassembly
    A smaller update tonight, but I have been able to arbtrarily load the Bonus Stages from the main menu. I was able to achieve this without the weird visual ""corruption"" you see, but the screen remained black with gameplay running in the background. So currently I load a normal level and then the bonus stage to work around the issues of things not being initialised properly.

    It's possible that I will just need to locate how to fade up the black screen and everything may be there (I would hear gameplay in the background), but this acts as further confirmation that I'm on the right path. The game also correctly re-loads back to the main menu with no obvious corruption or issues and I can play multiple times. This narrows the window significantly for locating the procedures for loading tile data and sprite assets.

     
    Last edited: Oct 25, 2024
  16. Hez

    Hez

    Oldbie
    It's kind of interesting that the Crawl badnik has is older design before he was redrawn (as in redrawn from the American art, not the redesign to face forward). His pincer thing is gray, and not yellow.
     
  17. Scrambled Eggman

    Scrambled Eggman

    Worm Bagged Tech Member
    20
    87
    13
    Picking at Sonic Spinball Disassembly
    Been making some significant ground on understanding the game objects used. There is a lot of commonality between the objects, such as always having an AnimatedSprite object at the head of the struct, same X/Y position locations etc. But some parts appear to be flexible bits of memory for some classes, such as additional ptrs for explosion effects (on worms for example), and even things like horizontal velocity for objects like the Toxic Caves Serpent.

    I was also able to uncover a good chunk of how the state machines are driven, including starting to uncover tables of data that specify different animated objects for each "state id" for different game objects.

    I quickly recorded a little clip showing some of these things with a bit of live memory editing. (the volume is low because I don't want to be deafened by Toxic Caves playing on loop all night. :D)

     
    • Like Like x 7
    • Informative Informative x 3
    • List
  18. rata

    rata

    Member
    704
    80
    28
    Argentina
    Trying to be useful somehow.
    Right Flipper in Sonic the Hedgehog when?:eng101:
     
  19. Blastfrog

    Blastfrog

    See ya starside. Member
    I’m more concerned with porting Spinball’s jank player mechanics to the mainline games! :P
     
  20. Chimes

    Chimes

    The One SSG-EG Maniac Member
    935
    644
    93
    Have you found a way to alter patches in the game's data yet? It'd be interesting to see if the TL value in the infamous "tesla coil" patch can be altered to be quieter, because the last time I was checked it was literally set to 0 (aka the maximum value).