don't click here

AspectEdit with Sonic Chaos?

Discussion in 'Engineering & Reverse Engineering' started by Bobblen, Aug 18, 2022.

  1. Bobblen

    Bobblen

    Member
    380
    192
    43
    After getting my head around object placement in a previous thread, I've been fiddling with AspectEdit trying to modify a Sonic Chaos level (no real mod plans, just to see what can be done really). It's harder than Sonic 2 as at least to my knowledge, there's no disassembly so you just have to just use offsets in the ROM. I'm using @Hivebrain's list here.
    https://forums.sonicretro.org/index.php?threads/sonic-chaos-hacking.24311/#post-557304

    So Turquois Hill Act 1
    Palette at 0x3B6AD

    Tileset at 0x40F9E

    32x32 mappings at 0x44000 (not 100% sure about this one!)

    Level layout at 0x48000

    Then a bit of trial and error with width/height/tile offset gave me
    width 128
    height 32
    tile offset 192

    And that gets me... this! So near and yet so far. Only the palette is incorrect. Does anyone know any other sources for the location of palettes in the rom? Someone made those pretty maps in the map section, so presumably at least one person knows! :D Admittedly I haven't actually tried changing something and saving back to the ROM yet, but one problem at a time and all that...
    upload_2022-8-18_13-46-21.png
     
  2. Bobblen

    Bobblen

    Member
    380
    192
    43
    It seems that offset is correct for the foreground objects (apparently just the rings and monitors) but not background. But I tried the palette labelled 'THZ - Sonic' in Hivebrain's list and we're looking good.
    upload_2022-8-18_14-14-24.png

    Success! 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, behold 4 new ring monitors at the start of THZ1
    upload_2022-8-18_14-25-45.png
     

    Attached Files:

    Last edited: Aug 18, 2022
  3. Bobblen

    Bobblen

    Member
    380
    192
    43
    If anyone else is interested in trying it out, here are the various offset's I'm using. So far I've only tested it on THZ1, THZ3 and APZ2.

    EDIT - now tested all acts up to AP3 and added a couple of special stages

    EDIT 2 - fixed GPZ3 layout typo, it's 4B897 (not 4B987, ugh...)

    EDIT 3 - added EEZ 32x32 mapping offset, width, height

    Code (Text):
    1. -level layout offset
    2. 48000 - THZ1 layout
    3. 48BA9 - THZ2 layout
    4. 49815 - THZ3 layout
    5. 49C25 - GPZ1 layout
    6. 4AA00 - GPZ2 layout
    7. 4B897 - GPZ3 layout
    8. 54000 - SEZ1 layout
    9. 54CC8 - SEZ2 layout
    10. 53460 - SEZ3 layout
    11. 559D4 - MGHZ1 layout
    12. 566B8 - MGHZ2 layout
    13. 572FB - MGHZ3 layout
    14. 5C000 - APZ1 layout
    15. 5C7C1 - APZ2 layout
    16. 57AF3 - APZ3 layout
    17. 5CF3A - EEZ1 layout
    18. 5DB73 - EEZ2 layout
    19. 5E853 - EEZ3 layout
    20. 68000 - SS1 layout
    21. 685A8 - SS2 layout
    22. 68848 - SS3 layout
    23. 68C1E - SS4 layout
    24. 69258 - SS5 layout
    25.  
    26. -mappings offset
    27. 44000 Mappings THZ1
    28. 45640 Mappings GPZ
    29. 46A40 Mappings SEZ
    30. 50000 Mappings MGHZ
    31. 51320 Mappings APZ
    32. 524E0 Mappings EEZ
    33. 6C000 Mappings SS1/2/4
    34. 6CF60 Mappings SS3/5
    35.  
    36. -tileset offset
    37. 40F9E tileset THZ
    38. 42478 tileset GPZ
    39. 60000 tileset SEZ
    40. 619F0 tileset MGHZ
    41. 58000 tileset APZ
    42. 59800 tileset EEZ
    43. 64000 tileset SS1/2/4
    44. 65590 tileset SS3/5
    45.  
    46. -foreground palette offset
    47. 3B6AD - THZ
    48. 3B6BD - GPZ
    49. 3B6CD - SEZ
    50. 3B6DD - MGHZ
    51. 3B6ED - APZ
    52. 3B6FD - EEZ
    53. 3B76D - SS1/2/4
    54. 3B77D - SS3
    55. 3B78D - SS5
    56.  
    57. -background palette offset
    58. 3B79D - THZ
    59. 3B7AD - GPZ
    60. 3B7BD - SEZ
    61. 3B7CD - MGHZ
    62. 3B7DD - APZ
    63. 3B7ED - EEZ
    64. 3B8AD - SS1/2/4
    65. 3B8BD - SS3/5
    66.  
    67. -tile offset
    68. 192 for all levels
    69.  
    70. -width/height
    71. THZ1 width 128 height 32
    72. THZ2 width 128 height 32
    73. THZ3 width 80 height 16
    74. GPZ1 width 160 height 24
    75. GPZ2 width 128 height 32
    76. GPZ3 width 80 height 16
    77. SEZ1 width 128 height 32
    78. SEZ2 width 128 height 32
    79. SEZ3 width 128 height 32
    80. MGHZ1 width 128 height 32
    81. MGHZ2 width 128 height 32
    82. MGHZ3 width 120 height 24
    83. APZ1 width 168 height 24
    84. APZ2 width 128 height 32
    85. APZ3 width 80 height 16
    86. EEZ1 width 128 height 32
    87. EEZ2 width 128 height 32
    88. EEZ3 width 112 height 32
    89. SS1 Width 512 Height 8
    90. SS2 Width 24 Height 64
    91. SS3 Width 128 Height 24
    92. SS4 Width 256 Height 16
    93. SS5 Width 48 Height 32
    94.  
    95.  
     
    Last edited: Jan 5, 2023
  4. Ravenfreak

    Ravenfreak

    2 Edgy 4 U Tech Member
    3,091
    187
    43
    O'Fallon Mo
    Sonic 1 Game Gear Disassembly
    So.. this was my mistake. I accidentally got the palettes mixed up and I guess I never realized it until now. :V Be sure to add this to the hacking page if you haven't yet. Also just a warning, I could never get Gigalopolis' Act 1 level layout to open in Aspect Edit and I still don't know why it's the only level that won't work in the program. Both the Game Gear and SMS versions have this problem.
     
    Last edited: Aug 19, 2022
  5. Bobblen

    Bobblen

    Member
    380
    192
    43
    No worries @Ravenfreak, I didn't really think that no one had tried this before, just that it wasn't necessarily all written down! GPZ1 (on SMS at least) does work for me using the offsets above, but it's got an unusual width of 160 (which I had to add manually, it's not one of the standard selections).
    upload_2022-8-19_6-35-53.png


    Another daft thing I did was add a floor to special stage 1 then run along the bottom of the screen to the emerald! My vague plan at the moment is to do a little mod where I make some small layout changes and hide a single extra life in each act for people to try and find. Just as a way to show off the editor.

    In your notes do you have an offset for Electric Egg's 32x32 mappings? Hivebrain's list doesn't have those which means I can't currently open any electric egg layouts properly!

    EDIT - oh and the mysterious floating green wall block in Special Stage 1/2/5 acts like an aqua planet underwater tunnel door (where you push it open and the current sucks you through).
     
    Last edited: Aug 19, 2022
  6. Bobblen

    Bobblen

    Member
    380
    192
    43
    I've opened all the acts except Electric Egg zone and the only one I'm having a problem with is GPZ3, which fits width 80 height 16, but is missing the top row of the level, which probably means the offset for the layout itself is wrong for that one.

    I've also updated my post above with all the width/height values that I've found to work so far. Hopefully I can work out Electric Egg mappings and complete the set! I also can't get special stage 2 to display properly. It's unusually narrow and AspectEdit doesn't like a width smaller than 16. Always possible that it isn't actually stored in the ROM like that anyway, I'm new to all this so not sure.

    EDIT - Dumb mistake, for smaller widths, you have to shrink the window containing the image down to the right size or it doesn't wrap correctly. So Special Stage 2 is width 24, height 64
     
    Last edited: Aug 19, 2022
  7. Bobblen

    Bobblen

    Member
    380
    192
    43
    Finally figured out why GPZ3 was dodgy, it was a silly typo. Correct offset is 0x4b897, I've updated the code snippet above. Still need to figure out the Electric Egg 32x32 mapping offset to complete the set.

    Also, a long shot, but Aspect Edit supports Triple Trouble as well. @Glitch documented the various offsets required to edit MJZ1 in another thread but I couldn't find a full list anywhere. Has anyone ever attempted such a list?
     
  8. Glitch

    Glitch

    Tech Member
    175
    12
    18
  9. Bobblen

    Bobblen

    Member
    380
    192
    43
    Thanks @Glitch, applying your notes to Sonic Chaos meant I finally figured out where I was going wrong trying to calculate the offset for the EEZ 32x32 mappings

    The magic offset is 0x524E0, hooray! Looking forward to mucking about with Triple Trouble when I've got a bit more time.
    upload_2023-1-5_10-13-29.png
     
  10. Bobblen

    Bobblen

    Member
    380
    192
    43
    Last edited: Jan 5, 2023
  11. Bobblen

    Bobblen

    Member
    380
    192
    43
    I've been documenting the Sonic Chaos 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 10 in Chaos, and the object format is the same as Sonic 2, 9 bytes per object starting at 0x705ae for THZ1.

    00 = blank/static (not used)
    01 = 10 rings
    02 = Extra life
    03 = speed shoes
    04 = rocket shoes
    05 = clock monitor (does nothing in normal game)
    06 = invincibility

    The object graphics then repeat but have no effect when collected (except for speed shoes giving you rockets for some reason, clearly these values were not intended for use in game!)

    07 = 10 rings (not used - does nothing if collected)
    08 = Tails extra life (not used - does nothing if collected)
    09 = speed shoes (not used - gives rocket shoes if collected?)
    0a = rocket shoes (not used - does nothing collected)
    0b = clock item (not used - does nothing if collected)
    0c = invincible (not used - does nothing if collected)

    0d, 0e, 0f = garbled graphics, does nothing if collected.