Dynamically Loading Ring Animation Frames into VRAM in Sonic 1

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

  1. Devon

    Devon Do not contact me. Member

    Joined:
    Aug 26, 2013
    Messages:
    1,482
    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 Do not contact me. Member

    Joined:
    Aug 26, 2013
    Messages:
    1,482
    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 Do not contact me. Member

    Joined:
    Aug 26, 2013
    Messages:
    1,482
    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 Do not contact me. Member

    Joined:
    Aug 26, 2013
    Messages:
    1,482
    You didn't remove the second line.
     
  9. PeanutNoceda

    PeanutNoceda Peanut butter Member

    Joined:
    Sep 26, 2024
    Messages:
    317
    Location:
    Somewhere in Peru
    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:
    44
    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 Peanut butter Member

    Joined:
    Sep 26, 2024
    Messages:
    317
    Location:
    Somewhere in Peru
    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:
    44
    Location:
    Somewhere in South America
    I dont think thats related to this