don't click here

Sonic Advance 2 Hacking

Discussion in 'Engineering & Reverse Engineering' started by Ravenfreak, Jun 13, 2010.

Thread Status:
Not open for further replies.
  1. Ravenfreak

    Ravenfreak

    2 Edgy 4 U Tech Member
    3,100
    196
    43
    O'Fallon Mo
    Sonic 1 Game Gear Disassembly
    So I decided to "crack" open Sonic Advance 2 and see what I could find. Or in other words, I wanted to hack Sonic Advance 2, and since there are no
    hacking notes listed on the wiki for the game, I decided to do research and possibly write decent hacking notes. So far this is what I have found.
    Copy/Paste from my own notes I've been writing for the past few days. First some ROM offsets:

    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>The third, fourth, fifth,sixth, seventh, and eighth bytes handles the BIOS of the ROM, changing each
    byte to any value will cause the "white screen of death", the game will never boot. Or more
    specificly, address $EA00002E in RAM is the header of the rom. DON'T FUCK WITH THIS ADDRESS!
    You'll never get a working ROM duh. xP

    At address $E05E4, ASCII text can be found. This is the text used in the unlockable Sound Test.
    Text can be found at $E05E4-$E0A24.</div>

    Now for the RAM Addresses:

    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>$4000000 stores the data for each Object, BG objects, frames, and character mappings
    $4000004 stores the values for Horizontal and Vertical Interrupts. Also stores data for
    VCOUNT setting (8 bits)(Volume count storage for new data set allocations)
    $4000006 stores the volume count data
    $4000008-$400000E stores the Background Count data (three separate Backgrounds)
    each consist of a Screen Base Block which consist of 5 bits of data. The size,
    color value, character base, and priority is all stored here.
    $4000010-$400001E stores the horizontal and vertical offsets for each Background.
    Each are 9 bits, the data are stored in word format.
    $4000020-$4000026 stores the data for each part of BG 2.Each are stored in 16 bit word data.
    $4000028-$400002E stores the data for the high and low planes. Each consist of
    12 bits and are stored in word format.
    $4000030-$4000036 store the data for each part of BG 3. Same as BG 2.
    $4000038-$400003E stores the data for the high and low planes in BG3. They are stored
    in the same format as BG2.
    $4000060 Stores the Sweep Time of the sounddriver. This consist of 3 bits. The next value configures
    the sweep addition/decrease. And the final few values control the sweep shifts and consist of
    3 bits.
    $4000064 stores the sounddriver data it seems. The first value data initializes the sounddriver.
    The value that controls the looping of the songs is the second value. The frequency is the next
    value and is stored in 11 bits. (Word format)
    $4000068 stores the envelope data of the sounddriver. The first value initializes the envelope
    the next value amplifies the envelope. The next value stores the value type and consists of
    2 bits. And finally the sound length is the next value that is stored in 6 bits in word format.
    In general it seems that $4000060-$400007C stores the looping, frequency, and length of each
    channel.
    $4000080 controls which speaker the sound channel will play in. Also controls the volume
    of each channel. The left and right volumes are stored in 3 bits. These channels are the
    ones the original GB uses.
    $4000082 stores the Direct Master Audio sound. The first 4 values are associated with channel
    B. The first one stores the data to reset the channel, the second stores the timer, and the last
    two store data for each speaker. First left speaker and then right. The next four values
    are associated with channel A. Same as channel B. The next two values store the volume for channels
    B and A, and the last value stores the volume for the GB sound channels. Stored in two bits.
    $4000084 sets the master sound.
    $4000088 first value controls the sampling rate of each sound and is stored in 2 bits. The next
    value stores the bias level and consists of 10 bits. </div>
     
  2. Aquaslash

    Aquaslash

    <The Has-been Legend> Moderator
    Visual Boy Advance can be a great help when looking into the inner workings of these games.

    Also FWIW, all of the art is uncompressed, and can be edited with something like Tile Layer pro
     
  3. Azookara

    Azookara

    yup Member
    I'm glad somebody finally got into hacking Sadv2. If somebody hacks the game to where the level design isn't so hold-right-ish, then I'll love them forever. :3
     
  4. Techokami

    Techokami

    For use only on NTSC Genesis systems Researcher
    1,373
    81
    28
    HoleNet!
    Sonic Worlds Next
    sadv2_addr.txt (last modified 7/5/2009)
    Code (Text):
    1. -------------------------
    2. Sonic Advance 2 Addresses
    3. -------------------------
    4.  
    5. These are a bunch of addresses in the ROM I have
    6. identified while making a script that extracts the
    7. 96x96 mapping data from the ROM.
    8.  
    9. LEAF FOREST ZONE 1
    10. Pallete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x6E9E08
    11. 8x8 Tiles&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x6EA008
    12. 96x96 Mappings&nbsp;&nbsp;&nbsp;&nbsp;0x6F33D0
    13.  
    14. LEAF FOREST ZONE 2
    15. Pallete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x71459C
    16. 8x8 Tiles&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x71479C
    17. 96x96 Mappings&nbsp;&nbsp;&nbsp;&nbsp;0x71D474
    18.  
    19. LEAF FOREST ZONE 3
    20. Pallete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x73A438
    21. 8x8 Tiles&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x73A638
    22. 96x96 Mappings&nbsp;&nbsp;&nbsp;&nbsp;0x73B844
    23.  
    24. HOT CRATER ZONE 1
    25. Pallete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x73CCB0
    26. 8x8 Tiles&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x73CEB0
    27. 96x96 Mappings&nbsp;&nbsp;&nbsp;&nbsp;0x74541C
    28.  
    29. HOT CRATER ZONE 2
    30. Pallete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x763AA0
    31. 8x8 Tiles&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x763CA0
    32. 96x96 Mappings&nbsp;&nbsp;&nbsp;&nbsp;0x76C690
    33.  
    34. HOT CRATER ZONE 3
    35. Pallete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x78FEBC
    36. 8x8 Tiles&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x7900BC
    37. 96x96 Mappings&nbsp;&nbsp;&nbsp;&nbsp;0x7913EC
    38.  
    39. MUSIC PLANT ZONE 1
    40. Pallete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x79279C
    41. 8x8 Tiles&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x79299C
    42. 96x96 Mappings&nbsp;&nbsp;&nbsp;&nbsp;0x79BEFC
    43.  
    44. MUSIC PLANT ZONE 2
    45. Pallete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x7B8E80
    46. 8x8 Tiles&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x7B9080
    47. 96x96 Mappings&nbsp;&nbsp;&nbsp;&nbsp;0x7C20E0
    48.  
    49. MUSIC PLANT ZONE 3
    50. Pallete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x7DB79C
    51. 8x8 Tiles&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x7DB99C
    52. 96x96 Mappings&nbsp;&nbsp;&nbsp;&nbsp;0x7DC5DC
    53.  
    54. ICE PARADISE ZONE 1
    55. Pallete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x7DCB88
    56. 8x8 Tiles&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x7DCD88
    57. 96x96 Mappings&nbsp;&nbsp;&nbsp;&nbsp;0x7E5E90
    58.  
    59. ICE PARADISE ZONE 2
    60. Pallete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x80C594
    61. 8x8 Tiles&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x80C794
    62. 96x96 Mappings&nbsp;&nbsp;&nbsp;&nbsp;0x8152A4
    63.  
    64. ICE PARADISE ZONE 3
    65. Pallete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x834450
    66. 8x8 Tiles&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x834650
    67. 96x96 Mappings&nbsp;&nbsp;&nbsp;&nbsp;0x835218
    68.  
    69. SKY CANYON ZONE 1
    70. Pallete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x835DDC
    71. 8x8 Tiles&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x835FDC
    72. 96x96 Mappings&nbsp;&nbsp;&nbsp;&nbsp;0x83CCF8
    73.  
    74. SKY CANYON ZONE 2
    75. Pallete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x85DB74
    76. 8x8 Tiles&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x85DD74
    77. 96x96 Mappings&nbsp;&nbsp;&nbsp;&nbsp;0x864CA8
    78.  
    79. SKY CANYON ZONE 3
    80. Pallete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x885AB4
    81. 8x8 Tiles&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x885CB4
    82. 96x96 Mappings&nbsp;&nbsp;&nbsp;&nbsp;0x88675C
    83.  
    84. TECHNO BASE ZONE 1
    85. Pallete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x8876F8
    86. 8x8 Tiles&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x8878F8
    87. 96x96 Mappings&nbsp;&nbsp;&nbsp;&nbsp;0x88CF30
    88.  
    89. TECHNO BASE ZONE 2
    90. Pallete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x8A9194
    91. 8x8 Tiles&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x8A9394
    92. 96x96 Mappings&nbsp;&nbsp;&nbsp;&nbsp;0x8AE210
    93.  
    94. TECHNO BASE ZONE 3
    95. Pallete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x8C269C
    96. 8x8 Tiles&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x8C289C
    97. 96x96 Mappings&nbsp;&nbsp;&nbsp;&nbsp;0x8C4860
    98.  
    99. EGG UTOPIA ZONE 1
    100. Pallete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x8C5724
    101. 8x8 Tiles&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x8C5924
    102. 96x96 Mappings&nbsp;&nbsp;&nbsp;&nbsp;0x8CD8C4
    103.  
    104. EGG UTOPIA ZONE 2
    105. Pallete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x8F7DD0
    106. 8x8 Tiles&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x8F7FD0
    107. 96x96 Mappings&nbsp;&nbsp;&nbsp;&nbsp;0x900090
    108.  
    109. EGG UTOPIA ZONE 3
    110. Pallete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x924E80
    111. 8x8 Tiles&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x925080
    112. 96x96 Mappings&nbsp;&nbsp;&nbsp;&nbsp;0x9256CC
    113.  
    114. XX ZONE
    115. Pallete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x925CF0
    116. 8x8 Tiles&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x925EF0
    117. 96x96 Mappings&nbsp;&nbsp;&nbsp;&nbsp;0x9290E8
    Said script can be downloaded from here.
     
  5. Ravenfreak

    Ravenfreak

    2 Edgy 4 U Tech Member
    3,100
    196
    43
    O'Fallon Mo
    Sonic 1 Game Gear Disassembly
    I've been writing some RAM addresses from the Memory Viewer down too, though I only have a few notes as of now...
    Edit: Long post ahead. I have spent the last few hours jotting down more RAM addresses and I believe I have found where the sound driver is located
    in RAM.
    Edited OP with RAM addresses.

    Also Techokami, if I created a wiki page do you mind if I use your notes too? Of course I'll credit you.
     
  6. Fwiss

    Fwiss

    Member
    21
    0
    0
    Wow. All this hacking progress already? Truly a dedicated person you are! Keep up the good work, and your wording is nice and simple for the whole part. Delicious tile editing seeming very close. I sure hope there won't be TOO many crappy palette hacks. (runs off to make crappy palette hack of HCZ boss.)
     
  7. Ravenfreak

    Ravenfreak

    2 Edgy 4 U Tech Member
    3,100
    196
    43
    O'Fallon Mo
    Sonic 1 Game Gear Disassembly
    xD Why thank you. I'll continue in the future, though I'm focusing more on my hack.
     
Thread Status:
Not open for further replies.