ASM to Sega Genesis Platform

Would you like to react to this message? Create an account in a few clicks or log in to continue.
ASM to Sega Genesis Platform

All about assembly programming in the Sega Genesis console.


3 posters

    How to Fix the Frame Counter Bug

    avatar
    OuricoDoido
    Admin


    Mensagens : 46
    Data de inscrição : 2011-01-09
    Current Project : Sonic Open Source Project

    How to Fix the Frame Counter Bug Empty How to Fix the Frame Counter Bug

    Post  OuricoDoido Thu Jun 02, 2011 12:51 pm

    If you noticed, the frame counter start before than level start. The frame counter start, pass 4 frames, stop to load pallet, and after continue again. These 4 frames are 4 lost frames in counter, and can change the final time of the act.

    To fix the Frame Counter Bug, first open the sonic1.asm.

    Go to loc_39E8 subroutine, find and delete or comment this line:
    Code:
          move.b   #1,($FFFFFE1E).w ; update time counter

    Now go to Level_StartGame subroutine, and add this line:
    Code:
          move.b   #1,($FFFFFE1E).w   ; update time counter


    To have not problems when start from a lamppost, go to LevSz_ChkLamp and between these lines:
    Code:
          move.w   ($FFFFD00C).w,d0
          bra.s   loc_60D0
    Add this code:
    Code:
    ;---------------------
    ; Fix the Frame Counter Bug  //  when start by a Lamppost not have this bug,
                      ; but after correct the main bug, you see zeros in place of the numbers
          movem.l  d0-a6,-(sp)
          move.l  #$5E400003,d0
          moveq  #0,d1
          move.b  ($FFFFFE23).w,d1 ; load  minutes
          jsr  Hud_Mins
          move.l  #$5EC00003,d0
          moveq  #0,d1
          move.b  ($FFFFFE24).w,d1 ; load  seconds
          jsr  Hud_Secs
          movem.l  (sp)+,d0-a6
    ;---------------------


    Last edited by OuricoDoido on Tue Jun 07, 2011 6:06 pm; edited 1 time in total
    avatar
    OuricoDoido
    Admin


    Mensagens : 46
    Data de inscrição : 2011-01-09
    Current Project : Sonic Open Source Project

    How to Fix the Frame Counter Bug Empty Re: How to Fix the Frame Counter Bug

    Post  OuricoDoido Mon Jun 06, 2011 9:55 pm

    Added the code to FIX the lamppost bug after apply this guide.

    When start by a lamppost not have this bug, but after correct the main bug, you see zeros in place of the time.
    avatar
    OuricoDoido
    Admin


    Mensagens : 46
    Data de inscrição : 2011-01-09
    Current Project : Sonic Open Source Project

    How to Fix the Frame Counter Bug Empty Re: How to Fix the Frame Counter Bug

    Post  OuricoDoido Tue Jun 07, 2011 6:53 pm

    This tutorial is now fixed, changed the place to put the code about the lamppost.
    Green Snake
    Green Snake


    Mensagens : 2185
    Data de inscrição : 2012-04-07
    Localização : I do not even know
    Current Project : nope

    How to Fix the Frame Counter Bug Empty Re: How to Fix the Frame Counter Bug

    Post  Green Snake Sun May 19, 2013 11:49 am

    avatar
    JoshDP


    Mensagens : 1682
    Data de inscrição : 2014-10-05

    How to Fix the Frame Counter Bug Empty Re: How to Fix the Frame Counter Bug

    Post  JoshDP Thu Dec 27, 2018 10:47 am

    Just an annual year bump! Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy bounce bounce bounce bounce bounce affraid Basketball cheers bom drunken Basketball cheers bom drunken cherry sunny Sleep

    Sponsored content


    How to Fix the Frame Counter Bug Empty Re: How to Fix the Frame Counter Bug

    Post  Sponsored content


      Current date/time is Fri Apr 19, 2024 4:06 am