don't click here

AspectEdit with Sonic Triple Trouble

Discussion in 'Engineering & Reverse Engineering' started by Bobblen, Jan 5, 2023.

  1. Bobblen

    Bobblen

    Member
    377
    192
    43
    In this thread
    AspectEdit with Sonic Chaos? | Sonic and Sega Retro Forums (sonicretro.org)
    I started dabbling with editing Sonic Triple Trouble levels using Aspect Edit and like with Chaos, offsets to the ROM are required in order to load up a level. They didn't appear to be documented anywhere particularly obvious, so I've been working out what they all are based on the info/notes in Glitch's disassembly and Rolken's map generation thread. I thought it might be helpful to others to have these in one place so that it's easier to get started

    EDIT - Got all the normal levels done now, would be nice to do the special stages as well!

    EDIT 2 - Added the special stages

    EDIT 3 - added time attack stage

    Code (Text):
    1. -level layout
    2. 480C0 - GTZ1
    3. 489B4 - GTZ2
    4. 6B049 - GTZ3
    5. 4925A - SPZ1
    6. 49C15 - SPZ2 / SPZ3
    7. 4A5AA - MJZ1
    8. 4AF45 - MJZ2
    9. 53280 - MJZ3
    10. 535A5 - RWZ1
    11. 54000 - RWZ2
    12. 4B923 - RWZ3
    13. 54666 - TPZ1
    14. 55034 - TPZ2
    15. 55A0B - TPZ3
    16. 55B10 - ADZ1
    17. 5657A - ADZ2
    18. 56FE3 - ADZ3
    19. 57568 - SSZ1
    20. 5793B - SSZ3
    21. 6B2AB - SSZ5
    22. 5B12A - Time Attack
    23.  
    24. -mappings
    25. 44000 GTZ
    26. 45B80 SPZ
    27. 6C000 MJZ
    28. 50000 RWZ
    29. 519E0 TPZ
    30. 6DC00 ADZ
    31. 64340 SSZ1/3/5
    32.  
    33. -tileset
    34. 404C4 tileset GTZ
    35. 4174A tileset SPZ
    36. 4C000 tileset MJZ
    37. 4D05A tileset RWZ
    38. 4E718 tileset TPZ
    39. 71C94 tileset ADZ
    40. 58000 tileset SSZ1/3/5
    41.  
    42. -foreground palette
    43. 3B8DC - GTZ
    44. 3B8FC - SPZ
    45. 3B91C - MJZ
    46. 3B93C - RWZ
    47. 3B95C - TPZ
    48. 3B97C - ADZ
    49. 3BA9C - SSZ1/3/5
    50.  
    51. -background palette
    52. 3BABC - GTZ
    53. 3BADC - SPZ
    54. 3BAFC - MJZ
    55. 3BB1C - RWZ
    56. 3BB3C - TPZ
    57. 3BC1C - TPZ Underwater
    58. 3BB5C - ADZ
    59. 3BBBC - SSZ1
    60. 3BD9C - SSZ3
    61. 3BDBC - SSZ5
    62.  
    63. tile offset
    64. 192 for all levels
    65.  
    66. width/height
    67. GTZ1 width 168 height 24
    68. GTZ2 width 168 height 24
    69. GTZ3 width 64 height 24
    70. SPZ1 width 168 height 24
    71. SPZ2/3 width 128 height 32
    72. MJZ1 width 128 height 32
    73. MJZ2 width 128 height 32
    74. MJZ2 width 64 height 32
    75. RWZ1 width 128 height 32
    76. RWZ2 width 128 height 32
    77. RWZ2 width 96 height 40
    78. TPZ1 width 128 height 32
    79. TPZ2 width 48 height 80
    80. TPZ3 width 64 height 16
    81. ADZ1 width 128 height 32
    82. ADZ2 width 96 height 40
    83. ADZ3 width 168 height 24
    84. SSZ1 width 168 height 24
    85. SSZ3 width 48 height 80
    86. SSZ5 width 128 height 32
    87. Time Attack width 168 height 24
    88.  
     
    Last edited: Jan 8, 2023
  2. GT Koopa

    GT Koopa

    Member
    2,021
    18
    18
    Elgin, IL
    Flicky Turncoat DX, T.L.W.S. Vs M.G.W.
    Holy Cow! I was able to get rid of all the rings and ring monitors in GTZ act 1! Well almost. Just the ones that were a part of the level tiles. For example, at the start of the game there is an extra ring that is an actual object (since behind it is a tree art tile) so how should I look into editing objects? Even if it is manually via a hex editor. What offset am I looking for and how much in hex numbers does a single object contain? I assume it should at least have the number of what object it is as seen with this map:
    https://info.sonicretro.org/images/f/fd/STT_gtz1_map.png
    Followed by X and Y coordinates. Subtype? Mappings?

    I am just going to quote you from the other thread in case others miss it:
    "The level layout is saved out as a separate bin file, you need to paste the bytes back in at the appropriate offset to add it into the game" -Bobblen
    This fact helped me out a lot. And having a hex editor that can overwrite hex via paste. The very idea of having Sonic Chaos hacks and Sonic Triple Trouble hacks is like a dream come true!
     

    Attached Files:

  3. Bobblen

    Bobblen

    Member
    377
    192
    43
    The objects follow the same format as Sonic 2 SMS so check this page out.
    SCHG:Sonic the Hedgehog 2 (Master System)/Object Editing - Sonic Retro

    The object list for GTZ1 starts at 0x705a4, each object is 9 bytes just like Sonic 2, and the list is terminated by an FF byte, then the next act/zone's list immediately follows. The offset for Sonic Chaos SMS THZ1 is 0x705ae.

    Credit for finding that offset goes to Rolken and his map generator script. Or probably others, but that's where I got it from!

    As an aside, I've been documenting the STT monitor subtypes to see if there's anything interesting in there as part of my endless mission to find all the 1 ups in all the classic Sonics. Monitor ID is 06 in STT.

    00 = nothing rendered
    01 = special stage
    02 = pogo stick
    03 = check point
    04 = extra life (not used in game, it's always 0b)
    05 = invincible
    06 = blank/static (not used in game)
    07 = blank/static (not used in game)
    08 = 10 rings
    09 = rocket shoes / fast flight for Tails
    0a = underwater propeller shoes / submarine
    0b = extra life
    0c = surf board / fast flight for Tails
    0d = speed shoes
    0e = reset timer to 0130 in special stage (also works in a normal level, although less helpful if you break it when the timer hasn't reach 0130 yet! :D )
    0f = rocket shoes (not used in game, it's always 09)
     
  4. GT Koopa

    GT Koopa

    Member
    2,021
    18
    18
    Elgin, IL
    Flicky Turncoat DX, T.L.W.S. Vs M.G.W.

    Just wanted to show what can be done. Made it in an hour or so.
     
  5. Bobblen

    Bobblen

    Member
    377
    192
    43
    That's nice to see, glad my toiling with offsets wasn't in vain! One thing to watch out for (which is always a problem when working from a ROM instead of a disassembly) is that the layouts are probably compressed, which means that you have to make sure your new layout compresses at least as well as what you're replacing, otherwise you're gonna run into other data. So don't make it too interesting! :D
     
  6. Bobblen

    Bobblen

    Member
    377
    192
    43
    @GT Koopa I did have a quick look at removing objects, you can just set the Object ID (first byte) to 00 and it won't show up in the level. Ring objects first byte is 1D so they're easy to find. Of course when making a proper level you'll probably want to make use of every object slot you've got, but good to know you can easily switch them off for testing!