[Sonic 1 - Sonic 3 & Knuckles] List of potentially unused RAM addresses that get cleared

Discussion in 'Tutorials' started by Giovanni, Dec 23, 2022.

  1. Giovanni

    Giovanni It's Joe-vanni, not Geo-vanni. Member

    Joined:
    Apr 16, 2015
    Messages:
    286
    Location:
    Italy
    Picking an unused RAM address to use for your programming purposes? You should know that some RAM areas will reset themselves upon booting into specific gamemodes. Here's a list of RAM areas that reset themselves and contain unused RAM addresses. Depending on what function you want to achieve, you may or may not want to use these, so I've put them here in a simple, easy to browse list.
    RAM areas that are (or may be) fully used (like the RAM area allocated to objects) are not included.

    Feel free to expand upon the table with anything you feel may be of relevance or noteworthy! If any portion of the information provided below is incorrect, please let me know!

    Sonic 1 (Main level, ending sequence)

    $F628-$F67F (partially unused)
    $F700-$F7FF (partially unused)
    $FE60-$FF7F (partially unused)

    Sonic 1 (Special Stage)

    $F700-$F7FF (partially unused)
    $FE60-$FEFF (partially unused)

    Sonic 2 (Title Screen, ending sequence)

    $F700-$F7FF (partiallly unused)

    Sonic 2 (Main level)

    $E740-$E7FF (fully unused)
    $EE00-$EEFF (partially unused)
    $F628-$F67F (partially unused)
    $F700-$F7FF (partially unused)
    $FEA9-$FEAF (fully unused)

    Sonic 3 & Knuckles (Title Screen)

    $F700-$F7FF (partially unused)

    Sonic 3 & Knuckles (Main level)


    $F628-$F67F (partially unused)
    $F700-$F7FF (partially unused)
    $FA80-$FAFF (partially unused)

    EDIT: Marked whether the RAM areas are either fully unused or partially unused. Additionally, trimmed down some RAM areas, as some of them appear to be split into one used part and one unused part.

    For the areas of RAM that are not clearly split into a used part and an unused part, it is recommended that you check a combination of the Sonic Retro RAM tables and your own disassembly's constant chart, if in possession.
     
    Last edited: Dec 26, 2022
  2. Dark Shamil Khan

    Dark Shamil Khan TASer lol Member

    Joined:
    Nov 7, 2021
    Messages:
    67
    Location:
    Pakistan
    Hi there Giovanni, I wanted to inform that in S2 $FE60-$FEAF is used by Oscillating Numbers and $F6xx - $F7xx region is used by a ton of things with only some sections of it free, the full range $E7xx, is free but in Sonic 2 Casino Night Zone, the first $40 bytes is used.
    In Sonic 3K, $FE6E-$FEB9 is used by Oscillating Numbers that is free.
    And Just like in Sonic 2, $F6xx - $F7xx region is used by a ton of things with only some sections of it free.
    S1 has Oscillating Numbers at FE60-FEA0.
    I think you should try consulting the Real Time RAM viewer as well as The Disassemblies as well on this.
    Pictures provided by Djohe:

    image.png
    image.png
    image.png
    Try looking at this and consulting to the Real Time RAM viewer as well as the constants as well as a future note.
    Credit: Djohe for the screenshots and the Sonic 2 and 1 RAM addresses for the Oscillating Numbers.
     
  3. Giovanni

    Giovanni It's Joe-vanni, not Geo-vanni. Member

    Joined:
    Apr 16, 2015
    Messages:
    286
    Location:
    Italy
    I'm aware that portions of the RAM areas I specified are used. In fact, the beginning of the thread specifies the following:

    At no point do I mention that the entirety of the RAM areas in question are fully unused. However, I can understand that the post may be misleading. I will edit the main post to include information regarding how much of the RAM areas in question are, in fact, unused.

    Additionally, I may need to make a correction on $FE6E-$FEB9, since none of the values in the area are marked as unused in Sonic Retro's S3K RAM map chart, with some only being marked as "Unknown".
     
    Last edited: Dec 26, 2022
    ProjectFM and Dark Shamil Khan like this.
  4. Dark Shamil Khan

    Dark Shamil Khan TASer lol Member

    Joined:
    Nov 7, 2021
    Messages:
    67
    Location:
    Pakistan
    Alright. Thanks for correcting! (And for correcting me as well =p). But yeah