Bug in my Hack

Discussion in 'Engineering & Reverse Engineering' started by Quickman, Jun 1, 2004.

Thread Status:
Not open for further replies.
  1. Quickman

    Quickman

    be attitude for gains Tech Member
    5,595
    18
    18
    :x
    omg porjcet
    I've made the counter count down rather than up (thanks to Fuzzbuzz for helping me with that and enduring my idiocy at moving large chunks of the game over by 2 bytes accidentally then wondering why the game didn't work). It's got a bug.

    [​IMG]

    It starts off at nine minutes zero. It SHOULD start off at nine fifty-nine.

    [​IMG]

    Then it goes to random-crap five and counts down slowly as normal, with more random crap loaded for the new digit.

    Something's resetting the seconds digit of the display and I need to know what. I have a suspicion, which I'll investigate. Stay tuned.

    EDIT: Nope, not that. Though that did solve a subsidiary problem I had.
     
  2. fuzzbuzz

    fuzzbuzz

    Tech Member
    625
    0
    0
    Here
    Many Many Programming/hacking tools...
    I told you I could fix the problem for you. I just needed to get back from work. ;)

    Code (Text):
    1. loc_1C6F8:   ; CODE XREF: sub_1C6B8+24j
    2.   tst.b    ($FFFFFE1E).w
    3.   beq.s    loc_1C754
    4.   tst.w    ($FFFFF63A).w
    5.   bne.s    loc_1C754
    6.   lea  ($FFFFFE22).w,a1
    7.   cmpi.l   #0,(a1)+
    8.   beq.s    loc_1C78C
    9.   subq.b   #1,-(a1)
    10.   cmpi.b   #$0,(a1)
    11.   bne.s    loc_1C754
    12.   move.b   #$3B,(a1)
    13.   subq.b   #1,-(a1)
    14.   cmpi.b   #$0,(a1)
    15.   bne.s    loc_1C734
    16.   move.b   #$3B,(a1)
    17.   subq.b   #1,-(a1)
    18.   cmpi.b   #0,(a1)
    19.   bne.s    loc_1C734
    20.   move.b   #0,(a1)
    one thing is that once you hit zero, it won't make the jump to the Time Over function. You need to fix that yourself. Also it won't blink red, and you won't get points on the end of level screen.

    But I've already done so much work for you already. XD
     
  3. Quickman

    Quickman

    be attitude for gains Tech Member
    5,595
    18
    18
    :x
    omg porjcet
    Okay, it still starts at 0:00 but I can fix that. Thanks again.

    *writes a note to himself to add Fuzzbuzz to the credits*
     
  4. ICEknight

    ICEknight

    Researcher Researcher
    Wouldn't it be easier for you to try to import the backwards clock object from Sonic 1 MegaPlay?
     
  5. Quickman

    Quickman

    be attitude for gains Tech Member
    5,595
    18
    18
    :x
    omg porjcet
    I don't have a disassembly for that which makes looking at it that much more difficult.
     
  6. ICEknight

    ICEknight

    Researcher Researcher
    Hmmm... Tell me where in the ROM is the code for the counter located, and I'll see if I can do something.
     
  7. Quickman

    Quickman

    be attitude for gains Tech Member
    5,595
    18
    18
    :x
    omg porjcet
    It's $1C704. The timer is handled as one big variable. But the resetting to 0:00 is graphical, and I don't know about that.
     
  8. ICEknight

    ICEknight

    Researcher Researcher
    ...Could it be the code at 1CBC2, in the MegaPlay ROM?
     
  9. fuzzbuzz

    fuzzbuzz

    Tech Member
    625
    0
    0
    Here
    Many Many Programming/hacking tools...
    Importing the clock from Mega Play is going to be just as much work as doing it from the normal ROM at this point. But I guess it saves you time debuging it. ;)
     
  10. Quickman

    Quickman

    be attitude for gains Tech Member
    5,595
    18
    18
    :x
    omg porjcet
    No, that's the score. I can easily compare a given section to the original ROM and find a corollary.
     
Thread Status:
Not open for further replies.