don't click here

Sonic Jam Hacking

Discussion in 'Engineering & Reverse Engineering' started by Starman, Feb 18, 2021.

  1. This would still have a few effects in edge cases, where the level’s camera bottom edge is right on the boundary of physical level chunks, a phenomenon that, if I remember correctly, actually happens in Death Egg 2 - the collision for the top row would load right on the edge of the screen, allowing the player to walk across bottomless pits.
     
  2. Bo102010

    Bo102010

    Member
    59
    41
    18
    This will be posted on Sega Xtreme soon, but here is some information on how to get playable Tails without the graphical corruption. It looks really cool! Here is a video.

    We patch a handful of memory locations in MUSEUM.MUS.

    $0000ca92 normally reads the character selector ($00 for Sonic; $01 for Tails).
    We hardcode it to $01 for Tails.

    $0000f0f8 alters an animation. The game uses Sonic's $04 animation (running) to trigger his running model. That doesn't work for Tails, so we set it to $03 (jogging) to allow Tails to run.

    $0000e1e2, $0000e306, $0000e410, and $0000e6fa normally set Sonic's animation number to $06 (jumping). The game uses that animation to trigger the "spin ball" model, which doesn't work for Tails. We set it instead to $09 (flipping over) and $1D (flying) to allow Tails to jump.

    $0000e44c has the "running jump" height. We set it to make Tails jump higher when running. This, coupled with the $1D animation, simulates flying.

    The file is loaded into memory at 0604000. These patches can thus be translated
    into Action Replay codes:
    * 1604ca92 e001
    * 1604e1e2 e009
    * 1604e306 e009
    * 1604e410 e01d
    * 1604e44c ffe0
    * 1604e68c e01d
    * 1604e6fa e009
    * 1604f0f8 e003
     
    Last edited: Nov 17, 2023
    • Like Like x 4
    • Informative Informative x 2
    • Agree Agree x 1
    • List
  3. Bo102010

    Bo102010

    Member
    59
    41
    18
  4. Neatly

    Neatly

    Member
    2
    0
    1
    Sorry if this question has been answered elsewhere, but recently I've been interested in the Sonic World portion of the game as a grounds for ROMhacking inspired by the SM64 community. I know there is only limited experimentation going on right now, and I am starting from basically zero, but are there any tools out there that would allow such a thing? Would it be easier to just take the assets and start from scratch in another engine?

    Sorry if this is long, I just didn't wanna come off as rude. But TLDR; What should I do to go from zero to making custom Sonic World zones?

    EDIT: Also if there's some forum other than here or the Xtreme forums, or a discord that I'm unaware of, I'd love to lurk on any more information that I can until I can do something with it.
     
  5. Glitch

    Glitch

    Tech Member
    175
    12
    18
    As far as I'm aware, there aren't any publically available tools to automate the process. Importing models, level data & textures is technically possible at the moment but it's going to be a lot of manual effort.

    The disassembly has a bunch of rough scripts that I've been using to extract various assets but you'd have to write your own tools to bring data back into the engine. Also, the level format itself is extremely basic: it's a fixed-size 7x8 cell grid and that's it.

    TL;DR; you can do some limited things but you're pretty mcuh on your own.
     
  6. Shoemanbundy

    Shoemanbundy

    Researcher
    1,094
    30
    28
    Chicago, Illinois
    selling shoes
    I just happened to notice Starman, the OP of this topic, made a neat discovery regarding the balloons in Sonic World a few days ago.

     
    • Informative Informative x 6
    • List
  7. Chimes

    Chimes

    The One SSG-EG Maniac Member
    633
    487
    63
    Turns out jiggle physics date back to the Saturn.

    Sorry. I had to.
     
    • Like Like x 2
    • Informative Informative x 2
    • List
  8. Bo102010

    Bo102010

    Member
    59
    41
    18
    Love the balloons!

    Here's something: the Sega Flash Vol. 5 has a prerelease demo of Sonic Jam. Normally you just play the 1:00 challenge, so you can't do much. But if you intercept the write to 060FFC37 and keep it at 0, you'll get the normal mission-based gameplay (the panel is over by the waterfall).

    If you set 060FFC31 to FF (or just finish all the missions) you can see different locations for the objects like balloons. The giant ring doesn't show by default, but you can enable it by setting 0605E384 to 0009. I put some of this on TCRF, but surely there's more to be compared with the final.

    Two more things:
    (1) I wrote up the details of how the Tails-in-Jam-World patch works here
    (2) I got Sonic and Tails together working! See the video here. The patches were more involved; I'll write them up soon.
     
    • Informative Informative x 5
    • Like Like x 1
    • Agree Agree x 1
    • List
  9. saxman

    saxman

    Oldbie Tech Member
    I have read some of what you've posted about this. It's very interesting, but here's what I'm not sure of and am hoping you have some indication of: is any of this evidence that, with the code at play here, it was in fact setup to allow Tails to be playable, or that two players were written into the game? Obviously it's be said that this was based on early Sonic Adventure stuff, but I'm curious how much of this is simply tweaking the code to make it do something that otherwise wasn't actually supported by the code, versus tweaking it to "expose" things that were supported by the code that were simply hidden away.
     
  10. Bo102010

    Bo102010

    Member
    59
    41
    18
    I don't think Tails was meant to be playable. It's more that he's got a model with all the same parts as Sonic. That means that anything that Sonic's model can do, Tails's can do as well.

    The converse is true also: you can swap Sonic for Tails, and he'll do the flying animation with his little tail spinning.

    Most of the crashes from doing a simple "character index" change are because the game expects Sonic to be able to a bunch of stuff that Tails can't do. Preventing the crashes is basically telling the game you're still Sonic at every check except for the one that actually renders the 3D model.

    I'll eventually have an article up about importing the Knuckles model from Sonic 3D Blast into Sonic Jam. The game of course has no concept of Knuckles, but he can still do all of the things that playable Tails can do because his model is compatible.

    Contrast this with NiGHTS and Burning Rangers: BR has a totally removed cooperative multiplayer feature that we know about from prototypes, but can easily restore access to in the final game. NiGHTS has a very weak multiplayer mode in the final game, but from the code it's clear they had more in mind. I'll have articles about this soon too!
     
    • Like Like x 3
    • Informative Informative x 1
    • List
  11. Bo102010

    Bo102010

    Member
    59
    41
    18
    • Informative Informative x 5
    • List
  12. pardon the noob question, but on the topic of ROMHacking: how possible would modifications of jam's included mega drive titles be?

    i'm also getting into saturn dev at the moment, and hope to get deep into the code of SONICTEAM's saturn games to find inspiration for my own projects. (& by the by, thanks for all work that you and the other folks do on these games :))
     
  13. Bo102010

    Bo102010

    Member
    59
    41
    18
    I think it would make more sense to learn how the Mega Drive versions work first, because they're extensively documented and lots of people know how to hack on them. That would definitely help in examining the Jam versions.
     
  14. oh that’s the plan; i’m also just starting work on getting builds of the mega drive trilogy to run on PC-98 (for…reasons, …somehow)
     
  15. Starman

    Starman

    Member
    9
    31
    13
    Long time no see!

    Finally figured out for the most part how the game handles sound, and in doing so I found an unused jingle that, to my knowledge, hasn't been documented anywhere! It's MIDI track 41 in the SFX tracks in SWORLD.SND. Here's a video of me hacking it in and playing it.

     
    • Like Like x 6
    • Informative Informative x 1
    • List