Dynamically Loading Ring Animation Frames into VRAM in Sonic 1

Discussion in 'Tutorials' started by Devon, Jul 18, 2023.

  1. Devon

    Devon Please do not contact me, overwhelmed with stuff Member

    Joined:
    Aug 26, 2013
    Messages:
    1,470
    Location:
    your mom
    Can you show me a VRAM dump where the rings graphics are?
     
  2. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    913
    Location:
    Orono, Maine
    I noticed that the rings continue to animate when you die, which isn't supposed to happen in Sonic 1. I was able to solve this by inserting this after the LoadRingFrame label:
    Code:
            cmpi.b    #6,(v_player+obRoutine).w     ; has Sonic just died?
            bhs.s    .noringloss            ; if so, don't animate rings
    Otherwise, this is a fantastic tutorial.
     
    Dark Shamil Khan likes this.
  3. BenjaminTheRaccoon

    BenjaminTheRaccoon Sonic and Pokemon, two things I like! Member

    Joined:
    Jun 20, 2020
    Messages:
    25
    Location:
    Somewhere in Australia
    I can, actually, and I'm very baffled by this. (Look down at the bottom.)
    What the hell is it doing.png
     
  4. Devon

    Devon Please do not contact me, overwhelmed with stuff Member

    Joined:
    Aug 26, 2013
    Messages:
    1,470
    Location:
    your mom
    Turns out that they applied the tile ID change of 27B2 to 27B6 to the wrong object. It was meant for RingLoss, not Rings.

    The result of the error is that the regular rings are displaying the lost ring frame and the regular ring sparkles' tile ID gets shifted alongside that and ends up displaying crap from the sprite table, and the lost rings are displaying the regular ring frame.
     
    Last edited: Sep 21, 2023
  5. Thiago REzEnDe

    Thiago REzEnDe Newcomer Prospect

    Joined:
    Sep 17, 2022
    Messages:
    10
    Location:
    Hill Valey, California
    Heyo so, I'm having a similar problem as B.T.H was having, but instead, the rings look like this when i lose them..
     

    Attached Files:

  6. Devon

    Devon Please do not contact me, overwhelmed with stuff Member

    Joined:
    Aug 26, 2013
    Messages:
    1,470
    Location:
    your mom
    Looks like it's reading invalid mappings data. Did you follow this step?
     
  7. Thiago REzEnDe

    Thiago REzEnDe Newcomer Prospect

    Joined:
    Sep 17, 2022
    Messages:
    10
    Location:
    Hill Valey, California
    yes i did remove the lines, i also forgot to tell l'm using hivebrain 2005
     
  8. Devon

    Devon Please do not contact me, overwhelmed with stuff Member

    Joined:
    Aug 26, 2013
    Messages:
    1,470
    Location:
    your mom
    You didn't remove the second line.
     
  9. PeanutNoceda

    PeanutNoceda Well-Known member. Also known as CupcakeLove67 Member

    Joined:
    Sep 26, 2024
    Messages:
    184
    Location:
    the basement
    Im having an error in this part, i want to build to see if i got an error, but this error appears:
    upload_2025-4-14_10-14-3.png
     
  10. AleDrawer2008

    AleDrawer2008 Active Member Member

    Joined:
    Jun 14, 2021
    Messages:
    40
    Location:
    Somewhere in South America
    No. Thats not how you do it at old disasms

    It should be $7BC which multiplied by $20 gives you $F780
     
  11. PeanutNoceda

    PeanutNoceda Well-Known member. Also known as CupcakeLove67 Member

    Joined:
    Sep 26, 2024
    Messages:
    184
    Location:
    the basement
    So... i got a funny error lol.
    If you lose for example 3 rings, only appears 1.
    blastem_20250414_113852.png
     
  12. AleDrawer2008

    AleDrawer2008 Active Member Member

    Joined:
    Jun 14, 2021
    Messages:
    40
    Location:
    Somewhere in South America
    I dont think thats related to this