Sonic 1 - Robotnik art bug in SBz2 sequence

Discussion in 'Discussion and Q&A Archive' started by Psycho RFG, Nov 21, 2012.

Thread Status:
Not open for further replies.
  1. Psycho RFG

    Psycho RFG Well-Known Member Member

    Joined:
    Feb 22, 2011
    Messages:
    234
    Hi,


    The bug happen in the Robotnik sequence of Scrap Brain Zone Act 2 where Robotnik press the switch and broke the blocks to make Sonic fall to the next level. Toons of times you can notice weird graphics, specially in Robotnik's legs...


    What I'm refering to is some kind of bug that makes the art stop to load or something like that, is not related with the time that takes to decompress and load the art (I already changed the code to load that art before).


    Anyone has an idea of what is causing that and any possible fix?


    Here you can see some shots of the bug, to the left the bug showing garbage and to the right there is no Robotnik legs:

    [​IMG]



    Thanks!
     
    Last edited by a moderator: Nov 21, 2012
  2. DanielHall

    DanielHall Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    860
    Location:
    North Wales
    You ought to become a beta tester of sorts. I don't know how you come across some of this stuff.
     
  3. SuperEgg

    SuperEgg I'm a guy that knows that you know that I know Member

    Joined:
    Oct 17, 2009
    Messages:
    Location:
    THE BEST GOD DAMN STATE OF TEXAS
    The best way is to use the VRAM debugger in Regen and see what art is overlapping Eggman's legs.
     
  4. SpirituInsanum

    SpirituInsanum Well-Known Member Member

    Joined:
    Feb 11, 2010
    Messages:
    642
    Damn, you're right, what a stupid error xD


    So, to make it short, it's the smoke pattern of SB 1's background that's being reloaded there. That's why it isn't always the same pattern (a detail I had never noticed before).


    This is my fix, added at the beginning of AniArt_SBZ. My 4th SB level needs the reloading smoke art, so I did it this way:




    AniArt_SBZ: ; XREF: AniArt_Index


    moveq #0,d0


    move.b ($FFFFFE11).w,d0


    add.w d0,d0


    move.w AniArt_SBZ_Index(pc,d0.w),d0


    jmp AniArt_SBZ_Index(pc,d0.w)


    AniArt_SBZ_Index:


    dc.w AniArt_SBZOut-AniArt_SBZ_Index


    dc.w AniArt_SBZIn-AniArt_SBZ_Index


    dc.w AniArt_SBZIn-AniArt_SBZ_Index


    dc.w AniArt_SBZOut-AniArt_SBZ_Index ; this if you have a 4th SB act using outside bg


    AniArt_SBZIn:


    rts


    AniArt_SBZOut:



    If you're using only three acts in SB or your SB acts after the first aren't using the outside bg, you can also make it much simpler with a tst.b ($FFFFFE11).w, then branching to the rts if it isn't 0.
     
  5. Psycho RFG

    Psycho RFG Well-Known Member Member

    Joined:
    Feb 22, 2011
    Messages:
    234
    Very well done! I don't use the outside bg more than the first act so I did the simpler way and it works. Thanks a lot for this fix an thanks for all the replies.
     
Thread Status:
Not open for further replies.