Basic Questions and Answers Thread

Discussion in 'Discussion & Q&A' started by Malevolence, Jul 7, 2009.

  1. Giovanni

    Giovanni Please be patient I use ReadySonic Member

    Joined:
    Apr 16, 2015
    Messages:
    153
    Location:
    Italy
    No. I do not use SonLVL to edit levels directly in ReadySonic. Besides, no changes were made to LZ's layout or to the demo data. I tried actually changing Sonic's spawn position in the start location array, but that did not work. I tried swapping LZ3 and SYZ3's demos in the demo order, and the only piece of information I can give you is that no matter what level it is, the 4th demo will always spawn me at 0 x 0, regardless of what level it is or what coordinates are placed in the start location array. I even checked the assembled ROM, and the start location array is there and it is what it should be, so why it wouldn't read the 4th level's coordinates is beyond me.
     
    Last edited: Jul 16, 2020
  2. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,857
    There we go, just the information we need~

    The 4th demo in the credits sequence is special as you start from a lamppost in SLZ, while you may have changed the demo order, you have not removed the lamppost check/apply. It's setup in "EndingDemoLoad", there is a special array containing predefined lamppost data.

    Remember, always supply as much information as possible.
     
  3. Giovanni

    Giovanni Please be patient I use ReadySonic Member

    Joined:
    Apr 16, 2015
    Messages:
    153
    Location:
    Italy
    OH. MY. GOD. Now I see where I went wrong!
    I was not aware that the 4th demo's information was loaded from a checkpoint. My hack changed how lampposts worked so that they never save or load information stored in checkpoints. Since I did not know or expect the 4th demo to work this specific way, I didn't see reason to keep the loading function. However, with no way to load checkpoint information, it would be only natural that I'd be spawned at 0 x 0! Thank you for all the help, Markey. You've provided me with a lot of extra knowledge, and now I can finally end my project.
     
  4. rafit_000

    rafit_000 Newcomer In Limbo

    Joined:
    Jul 10, 2018
    Messages:
    10
    Location:
    Brazil
    Well, I'm working on my ROM Hack "Sonic 1 Revolution" to celebrate (late) 29th from the first game ever, but, it's unfinished. And, i'm porting to 32X CD, but I have a problem. Labyrinth Zone have black water, you can hardly see anything! If you do not belive in Me: See The Photos: SONIC THE HEDGEHOG_000.png SONIC THE HEDGEHOG_001.png
    I don't know how did it happen, But I think it was a problem with RAM adress, i don't know, but when I build my ROM, LZ water was normal,
    but when I Improved Fade In and Fade Out, Fixed Scattered Rings Underwater physics, and Add Collide with water after being hurt, before build,
    that happend after built.
     
  5. KZG4

    KZG4 Back Pain the Person Member

    Joined:
    Jul 30, 2016
    Messages:
    73
    Location:
    Ikea office chair
    Maybe you corrupted the underwater palette for labyrinth zone? Try changing the underwater palette to one from a clean disassembly.

    Also, how exactly do you plan to port this hack to the 32x CD? AFAIK no one has actually done this successfully in a Sonic rom hack, so I’d like to know what your process will be.
     
  6. ralakimus

    ralakimus pretty much a dead account Member

    Joined:
    Aug 26, 2013
    Messages:
    1,069
    They mentioned using the old Sonic 1 for Sega CD port source as a base for their project in another thread. In that case, they changed all instances of $FFFFFE10 to $FFFF8E10, so that needs to be reflected in the improved palette fading routines.

    Gonna be really honest here, judging from your post, you may wanna slow down before attempting to do CD 32X stuff. The 32X by itself is a pain in the ass to deal with, and even then the 32X doesn't magically give you the ability to render polygons and sprites with scaling and rotation capabilities. 32X only gives you a framebuffer, a palette, and a pair of CPUs (and also a PWM sampling chip), so everything is software rendered, still. You'll still need to provide code to do that. The only 32X examples I've really seen around these parts either render a static image in the background, play PWM samples, or do something like decompression. Hell, I would say that the CD isn't exactly beginner friendly, either, but from experience, it's not as bad as the 32X.
     
    Last edited: Jul 17, 2020
    KZG4, AURORA☆FIELDS and ProjectFM like this.
  7. rafit_000

    rafit_000 Newcomer In Limbo

    Joined:
    Jul 10, 2018
    Messages:
    10
    Location:
    Brazil
    I had the idea to port 32 bit to my Sega CD ROM Hack because I just wanted to make better graphics and add elements from Knuckles' Chaotix. But I got it! Labyrinth Zone water returns to green! Thank You!
     
  8. rafit_000

    rafit_000 Newcomer In Limbo

    Joined:
    Jul 10, 2018
    Messages:
    10
    Location:
    Brazil
    I have a problem! When I was adding Spindash on Sonic 1 Sega CD, and when the ROM was being built,
    this damn warning appeared:

    Code:
    The instruction at 00401dd2 referenced memory at 02167904
    The memory could not be written
    How I can solve this problem?
     
  9. AURORA☆FIELDS

    AURORA☆FIELDS the cute one here Member

    Joined:
    Oct 7, 2011
    Messages:
    726
    Location:
    Nat's lap
    This seems to be a bug with ASM68K, and in my experience happens when you screw with macros too much and something goes terribly wrong internally. This is a rare occurrence, but I am unsure how it happens and can't really offer much advice on how to fix it, other than reverting changes you did until that error no longer occurs. The easiest option usually is to revert to a previous back up and redoing the tutorial carefully, seeing when the problem starts happening. good luck!
     
    MarkeyJester likes this.
  10. John Belotti

    John Belotti Newcomer Member

    Joined:
    Mar 14, 2017
    Messages:
    14
    Location:
    Rochester Hills, MI
    I have myself an idea for a hack I wanna make, and it basically just ports the gameplay mechanics from the Genesis Ghostbusters game to Sonic 1. y̶a̶y̶ ̶a̶n̶o̶t̶h̶e̶r̶ ̶s̶o̶n̶i̶c̶ ̶1̶ ̶g̶i̶m̶m̶i̶c̶k̶ ̶h̶a̶c̶k̶ I've thought of including Act 2 bosses ala SonicMT.bin as well, plus they'll maybe include new music (a different boss track for each one).

    The music thing might be already answered long ago, but the Act 2 bosses and specific mechanic porting might need help.
     
  11. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    850
    Location:
    Portland, Maine
    This is a good place to start.
    Then, you can use your knowledge of 68k Assembly to figure out how to edit parts of the game to work how you want it to. While you're doing this, you should be able to get a good idea of how the game works and how the code is structured. Keep challenging yourself, gain experience with fixing bugs, and, like any skill, keep working at it, and you'll have full control over the game.

    That's not to say you can't get other people to sit he work you're not capable of, but managing others is a separate skill set in itself and you need to be capable of doing the majority of the work. If you have nothing to show to get people interested and believe that an end product is possible, it's unlikely that anyone will be willing to work on your hack.
     
    TheInvisibleSun likes this.
  12. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    394
    Location:
    Town Creek, AL
    https://youtu.be/v4-QQAG0ZXs
    As the description says, before I deleted anything the animations before flag values worked. Since I couldn't go above $FD this excludes super running. When I deleted unneeded and corrupted sprites, it wound up doing this.
    In the video I show values in SonMapEd, the animations, and the gameplay to show off it flickers between super walk and run animations
     
  13. Inferno

    Inferno Rom Hacker Member

    Joined:
    Oct 27, 2015
    Messages:
    35
    Location:
    Hidden Palace Zone, Westside Island
    Time to look like an idiot.

    Aight, I've actually been trying to port the S3 level layout format to S1, and I've hit a roadblock:
    [​IMG]Yeeeeeeaaaaaaa.
    I've traced the issue down to what is called "GetBlockData" in S1 Github, which is one of the things that need modified when changing the level layout format.
    I have tried referencing how S3&K's "GetFloorPosition_FG" references chunks in order to get this issue to not exist.
    The issue is that I've tried it far too many times with this method and the issue persists.
    FindNearestTile, and therefore collision, work as expected, it's the graphics which are getting disrupted.
    Provided is the current attempted adjustment of GetBlockData (or at least the important bit) and an example of how a4 for this routine is being set up.

    NOTE: My computer lacks internet access ATM, and I'm writing this on phone. Expect code to have syntax issues.
    Code:
          move.w d4,d3
          lsr.w #5,d3
          and.w (Layout_row_index_mask),d3 ; Set to $7C at all times.
          move.w 8(a4,d3.w),d3
          lsr.w #3,d5
          move.w d5,d0
          lsr.w #4,d0
          add.w d0,d3
          moveq #-1,d0
          clr.w d0
          movea.w d3,d4
          move.b (a4),d0
          add.w d0,d0
          move.w ChunkAddrArray2(pc,d0.w),d0 ; Identical to GetFloorPosition's ChunkAddrArray
          andi.w #$70,d4
          andi.w #$E,d5
          add.w d4,d3
          add.w d5,d3
          movea.l d3,a0
          move.w (a0),d3
    Code:
          lea (Level_layout_main).w,a4
          move.w #$4000,d2
          bsr.s DrawChunks
          lea (v_bgscreenposx).w,a3
          addq.w #2,a4
          move.w #$6000,d2

    I referenced S3&K for the A4 intizilation, but I couldn't find an equalivent to GetBlockData in S3&K.

    This will probably be something obvious, but this is new material for me, so time to learn.

    EDIT: Turns out RandomName was right this whole time and I had simply forgotten to change some A4 initializations from a movea.l to a lea. I'm a fool. It's fully working now.
     
    Last edited: Aug 6, 2020 at 5:41 PM
  14. RandomName

    RandomName Newcomer Trialist

    Joined:
    Jun 3, 2020
    Messages:
    3
    Location:
    Russia
    GetBlockData must return a1 as address of 16x16 block metadata, so insert at the end of GetBlockData this lines of code:
    Code:
            lea    (v_16x16).w,a1    ; MJ: load Block's location
            ; Turn block ID into address
            andi.w    #$3FF,d3
            lsl.w    #3,d3
            adda.w    d3,a1
    Also,S3K Split GetBlockData Function to Get_LevelChunkColumn,Get_LevelAddrChunkRow,Get_ChunkRow Functions.
     
  15. Inferno

    Inferno Rom Hacker Member

    Joined:
    Oct 27, 2015
    Messages:
    35
    Location:
    Hidden Palace Zone, Westside Island
    Uhhhh, I kinda said this in my question:
    "or at least the important bit"
    I showed the part which I have changed. After and before are vanilla to S1 GitHub. Your answer at this point is useless, tbh.
    I know that v_16x16 needed to be loaded in. It always has been loaded in.

    EDIT: My apologies if this seemed overly aggressive. Probably should have cut it off when I said I included only a piece of the routine.
     
    Last edited: Aug 6, 2020 at 5:41 PM
  16. RandomName

    RandomName Newcomer Trialist

    Joined:
    Jun 3, 2020
    Messages:
    3
    Location:
    Russia
    Then, the only problem that I found is that "GetBlockData:" overwrites a4.
    If this not help, then you can analyze code, that I was using:
    Code:
        GetBlockData:
            if Revision=0
            add.w    4(a3),d4    ; MJ: load Y position to d4
            add.w    (a3),d5        ; MJ: load X position to d5
            else
                add.w    (a3),d5        ; MJ: load X position to d5
        GetBlockData_2:
                add.w    4(a3),d4    ; MJ: load Y position to d4
            endc
            ; Set Y coordinate in level layout
            move.w    d4,d0
            lsr.w    #5,d0
            and.w    (Layout_row_index_mask).w,d0 ; Limits Y pos
            movea.w    8(a4,d0.w),a1
            ; Set X coordinate in level layout
            lsr.w    #3,d5
            move.w    d5,d0
            lsr.w    #4,d0
            andi.w    #$7F,d0  ; Limits X pos
            moveq    #-1,d3
            clr.w    d3
            ; Get Chunk ID from level layout
            move.b    (a1,d0.w),d3
            lsl.w    #7,d3    ; multiply by 80
            ; Turn Y coordinate into index into chunk
            andi.w    #$70,d4
            ; Turn X coordinate into index into chunk
            andi.w    #$E,d5
          
            ; Get Chunk Metadata
            add.w    d4,d3
            add.w    d5,d3
            movea.l    d3,a0        ; MJ: set address (Chunk to read)
            move.w    (a0),d3
            lea    (v_16x16).w,a1    ; MJ: load Block's location
            ; Turn block ID into address
            andi.w    #$3FF,d3
            lsl.w    #3,d3
            adda.w    d3,a1
            rts
    I hope this anwser will be useful. Offtop: Also what is alert? It's just notification or something like report?
    P. S: If you are using Level_layout_main instead of Level_layout_header change movea.w 8(a4,d0.w),a1 to
    movea.w (a4,d0.w),a1
     
    Last edited: Jul 24, 2020
  17. CreepyMystery

    CreepyMystery Reminiscence and Semblance Member

    Joined:
    Oct 20, 2017
    Messages:
    36
    I've tried porting Knuckles into Sonic 1 using MainMemory's Sonic 2 guide, but I hit a roadblock.
    Whenever Knuckles loads into the game, the art corrupts, and he disappears, causing him to lose a life.
    knuckles.png
    Here's the code that I think may be responsible:
    Knuckles_DoLevelCollision: ; ...
    move.l #$FFFFD600,($FFFFF796).w
    cmp.b #$C,$3E(a0)
    beq.s loc_316AF8
    move.l #$FFFFD900,($FFFFF796).w
    loc_316AF8: ; ...
    move.b $3F(a0),d5
    move.w $10(a0),d1
    move.w $12(a0),d2
    jsr CalcAngle
    sub.b #$20,d0
    and.b #$C0,d0
    cmp.b #$40,d0
    beq.w Knuckles_HitLeftWall
    cmp.b #$80,d0
    beq.w Knuckles_HitCeilingAndWalls
    cmp.b #$C0,d0
    beq.w Knuckles_HitRightWall
    bsr.w Sonic_HitWall
    tst.w d1
    bpl.s loc_316B3C
    sub.w d1,8(a0)
    move.w #0,$10(a0)
    loc_316B3C: ; ...
    bsr.w ObjHitWallRight
    tst.w d1
    bpl.s loc_316B4E
    add.w d1,8(a0)
    move.w #0,$10(a0)
    loc_316B4E: ; ...
    bsr.w ObjHitFloor
    tst.w d1
    bpl.s return_316BC0
    move.b $12(a0),d2
    addq.b #8,d2
    neg.b d2
    cmp.b d2,d1
    bge.s loc_316B66
    cmp.b d2,d0
    blt.s return_316BC0
    loc_316B66: ; ...
    add.w d1,$C(a0)
    move.b d3,$26(a0)
    bsr.w Knuckles_ResetOnFloor
    move.b d3,d0
    add.b #$20,d0
    and.b #$40,d0
    bne.s loc_316B9E
    move.b d3,d0
    add.b #$10,d0
    and.b #$20,d0
    beq.s loc_316B90
    asr $12(a0)
    bra.s loc_316BB2
    ; ---------------------------------------------------------------------------
    loc_316B90: ; ...
    move.w #0,$12(a0)
    move.w $10(a0),$14(a0)
    rts
    ; ---------------------------------------------------------------------------
    loc_316B9E: ; ...
    move.w #0,$10(a0)
    cmp.w #$FC0,$12(a0)
    ble.s loc_316BB2
    move.w #$FC0,$12(a0)
    loc_316BB2: ; ...
    move.w $12(a0),$14(a0)
    tst.b d3
    bpl.s return_316BC0
    neg.w $14(a0)
    return_316BC0: ; ...
    rts
    ; ---------------------------------------------------------------------------
    Knuckles_HitLeftWall: ; ...
    bsr.w Sonic_HitWall
    tst.w d1
    bpl.s Knuckles_HitCeiling
    sub.w d1,8(a0)
    move.w #0,$10(a0)
    move.w $12(a0),$14(a0)
    rts
    ; ---------------------------------------------------------------------------
    Knuckles_HitCeiling: ; ...
    bsr.w Sonic_DontRunOnWalls
    tst.w d1
    bpl.s Knuckles_HitFloor_0
    sub.w d1,$C(a0)
    tst.w $12(a0)
    bpl.s return_316BF4
    move.w #0,$12(a0)
    return_316BF4: ; ...
    rts
    ; ---------------------------------------------------------------------------
    Knuckles_HitFloor_0: ; ...
    tst.w $12(a0)
    bmi.s return_316C1C
    bsr.w ObjHitFloor
    tst.w d1
    bpl.s return_316C1C
    add.w d1,$C(a0)
    move.b d3,$26(a0)
    bsr.w Knuckles_ResetOnFloor
    move.w #0,$12(a0)
    move.w $10(a0),$14(a0)
    return_316C1C: ; ...
    rts
    ; ---------------------------------------------------------------------------
    Knuckles_HitCeilingAndWalls: ; ...
    bsr.w Sonic_HitWall
    tst.w d1
    bpl.s loc_316C30
    sub.w d1,8(a0)
    move.w #0,$10(a0)
    loc_316C30: ; ...
    bsr.w ObjHitWallRight
    tst.w d1
    bpl.s loc_316C42
    add.w d1,8(a0)
    move.w #0,$10(a0)
    loc_316C42: ; ...
    bsr.w Sonic_DontRunOnWalls
    tst.w d1
    bpl.s return_316C78
    sub.w d1,$C(a0)
    move.b d3,d0
    add.b #$20,d0
    and.b #$40,d0
    bne.s loc_316C62
    move.w #0,$12(a0)
    rts
    ; ---------------------------------------------------------------------------
    loc_316C62: ; ...
    move.b d3,$26(a0)
    bsr.w Knuckles_ResetOnFloor
    move.w $12(a0),$14(a0)
    tst.b d3
    bpl.s return_316C78
    neg.w $14(a0)
    return_316C78: ; ...
    rts
    ; ---------------------------------------------------------------------------
    Knuckles_HitRightWall: ; ...
    bsr.w ObjHitWallRight
    tst.w d1
    bpl.s Knuckles_HitCeiling2
    add.w d1,8(a0)
    move.w #0,$10(a0)
    move.w $12(a0),$14(a0)
    rts
    ; ---------------------------------------------------------------------------
    Knuckles_HitCeiling2: ; ...
    bsr.w Sonic_DontRunOnWalls
    tst.w d1
    bpl.s Knuckles_HitFloor2
    sub.w d1,$C(a0)
    tst.w $12(a0)
    bpl.s return_316CAC
    move.w #0,$12(a0)
    return_316CAC: ; ...
    rts
    ; ---------------------------------------------------------------------------
    Knuckles_HitFloor2: ; ...
    tst.w $12(a0)
    bmi.s return_316CD4
    bsr.w ObjHitFloor
    tst.w d1
    bpl.s return_316CD4
    add.w d1,$C(a0)
    move.b d3,$26(a0)
    bsr.w Knuckles_ResetOnFloor
    move.w #0,$12(a0)
    move.w $10(a0),$14(a0)
    return_316CD4: ; ...
    rts
    ; End of function Knuckles_DoLevelCollision
    ; =============== S U B R O U T I N E =======================================
    Knuckles_ResetOnFloor: ; ...
    tst.b $39(a0)
    bne.s Knuckles_ResetOnFloor_Part3
    move.b #0,$1C(a0)
    ; End of function Knuckles_ResetOnFloor
    ; =============== S U B R O U T I N E =======================================
    Knuckles_ResetOnFloor_Part2: ; ...
    move.b $16(a0),d0
    move.b #$13,$16(a0)
    move.b #9,$17(a0)
    btst #2,$22(a0)
    beq.s Knuckles_ResetOnFloor_Part3
    bclr #2,$22(a0)
    move.b #0,$1C(a0)
    sub.b #$13,d0
    ext.w d0
    add.w d0,$C(a0)
    Knuckles_ResetOnFloor_Part3: ; ...
    bclr #1,$22(a0)
    bclr #5,$22(a0)
    bclr #4,$22(a0)
    move.b #0,$3C(a0)
    move.w #0,($FFFFF7D0).w
    move.b #0,$27(a0)
    move.b #0,$29(a0)
    move.b #0,$2C(a0)
    move.w #0,($FFFFF66C).w
    move.b #0,$21(a0)
    cmp.b #$20,$1C(a0)
    bcc.s loc_316D5C
    cmp.b #$14,$1C(a0)
    bne.s return_316D62
    loc_316D5C: ; ...
    move.b #0,$1C(a0)
    return_316D62: ; ...
    rts
    ; End of function Knuckles_ResetOnFloor_Part2
    ; =============== S U B R O U T I N E =======================================
    Obj03_Hurt: ; ...
    ; FUNCTION CHUNK AT 00316E14 SIZE 0000001C BYTES
    tst.w ($FFFFFFDA).w
    beq.s Obj03_Hurt_Normal
    btst #4,($FFFFF605).w
    beq.s Obj03_Hurt_Normal
    move.w #1,($FFFFFE08).w
    clr.b ($FFFFF7CC).w
    rts
    ; ---------------------------------------------------------------------------
    Obj03_Hurt_Normal: ; ...
    tst.b $25(a0)
    bmi.w Knuckles_HurtInstantRecover
    jsr SpeedToPos ; AKA SpeedToPos in Sonic 1
    add.w #$30,$12(a0)
    btst #6,$22(a0)
    beq.s loc_316DA0
    sub.w #$20,$12(a0)
    loc_316DA0: ; ...
    cmp.w #$FF00,($FFFFF664).w
    bne.s loc_316DAE
    and.w #$7FF,$C(a0)
    loc_316DAE: ; ...
    bsr.w Knuckles_HurtStop
    bsr.w Knuckles_LevelBoundaries
    bsr.w Knuckles_RecordPositions
    bsr.w Knuckles_Animate
    bsr.w LoadKnucklesDynPLC
    jmp DisplaySprite
    ; End of function Obj03_Hurt
    ; =============== S U B R O U T I N E =======================================
    Knuckles_HurtStop: ; ...
    move.w ($FFFFF72E).w,d0
    add.w #$E0,d0
    cmp.w $C(a0),d0
    blt.w JmpTo_KillCharacter
    bsr.w Knuckles_DoLevelCollision
    btst #1,$22(a0)
    bne.s return_316E0C
    moveq #0,d0
    move.w d0,$12(a0)
    move.w d0,$10(a0)
    move.w d0,$14(a0)
    move.b d0,$2A(a0)
    move.b #0,$1C(a0)
    subq.b #2,$24(a0)
    move.w #$78,$30(a0)
    move.b #0,$39(a0)
    return_316E0C: ; ...
    rts
    ; ---------------------------------------------------------------------------
    JmpTo_KillCharacter: ; ...
    jmp KillSonic
    ; End of function Knuckles_HurtStop
    ; ---------------------------------------------------------------------------
    ; START OF FUNCTION CHUNK FOR Obj03_Hurt
    Knuckles_HurtInstantRecover: ; ...
    subq.b #2,$24(a0)
    move.b #0,$25(a0)
    bsr.w Knuckles_RecordPositions
    bsr.w Knuckles_Animate
    bsr.w LoadKnucklesDynPLC
    jmp DisplaySprite
    ; END OF FUNCTION CHUNK FOR Obj03_Hurt
    ; =============== S U B R O U T I N E =======================================
    Obj03_Dead: ; ...
    tst.w ($FFFFFFDA).w
    beq.s loc_316E4A
    btst #4,($FFFFF605).w
    beq.s loc_316E4A
    move.w #1,($FFFFFE08).w
    clr.b ($FFFFF7CC).w
    rts
    ; ---------------------------------------------------------------------------
    loc_316E4A: ; ...
    bsr.w CheckGameOver
    jsr ObjectFall
    bsr.w Knuckles_RecordPositions
    bsr.w Knuckles_Animate
    bsr.w LoadKnucklesDynPLC
    jmp DisplaySprite
    ; End of function Obj03_Dead
    ; =============== S U B R O U T I N E =======================================
    CheckGameOver: ; ...
    move.b #1,($FFFFEEBE).w
    move.b #0,$39(a0)
    move.w ($FFFFEECE).w,d0
    add.w #$100,d0
    cmp.w $C(a0),d0
    bge.w return_316F64
    move.b #8,$24(a0)
    move.w #$3C,$3A(a0)
    addq.b #1,($FFFFFE1C).w
    subq.b #1,($FFFFFE12).w
    bne.s Obj03_ResetLevel
    move.w #0,$3A(a0)
    move.b #$39,($FFFFD080).w
    move.b #$39,($FFFFD0C0).w
    move.b #1,($FFFFD0DA).w
    move.w a0,($FFFFD0BE).w
    clr.b ($FFFFFE1A).w
    Obj03_Finished: ; ...
    clr.b ($FFFFFE1E).w
    clr.b ($FFFFFECA).w
    move.b #8,$24(a0)
    move.w #$27,d0
    jsr PlaySound
    moveq #3,d0
    jmp LoadPLC
    ; ---------------------------------------------------------------------------
    Obj03_ResetLevel: ; ...
    tst.b ($FFFFFE1A).w
    beq.s Obj03_ResetLevel_Part2
    move.w #0,$3A(a0)
    move.b #$39,($FFFFD080).w
    move.b #$39,($FFFFD0C0).w
    move.b #2,($FFFFD09A).w
    move.b #3,($FFFFD0DA).w
    bra.s Obj03_Finished
    ; ---------------------------------------------------------------------------
    Obj03_ResetLevel_Part2: ; ...
    tst.w ($FFFFFFDC).w
    beq.s return_316F64
    move.b #0,($FFFFEEBE).w
    move.b #$A,$24(a0)
    move.w ($FFFFFE32).w,8(a0)
    move.w ($FFFFFE34).w,$C(a0)
    move.w ($FFFFFE3C).w,2(a0)
    move.w ($FFFFFE3E).w,$3E(a0)
    clr.w ($FFFFFE20).w
    clr.b ($FFFFFE1B).w
    move.b #0,$2A(a0)
    move.b #5,$1C(a0)
    move.w #0,$10(a0)
    move.w #0,$12(a0)
    move.w #0,$14(a0)
    move.b #2,$22(a0)
    move.w #0,$2E(a0)
    move.w #0,$3A(a0)
    return_316F64: ; ...
    rts
    ; End of function CheckGameOver
    ; =============== S U B R O U T I N E =======================================
    Obj03_Gone: ; ...
    tst.w $3A(a0)
    beq.s return_316F78
    subq.w #1,$3A(a0)
    bne.s return_316F78
    move.w #1,($FFFFFE02).w
    return_316F78: ; ...
    rts
    ; End of function Obj03_Gone
    ; ---------------------------------------------------------------------------
    Obj03_Respawning: ; ...
    tst.w ($FFFFEEB0).w
    bne.s loc_316F8C
    tst.w ($FFFFEEB2).w
    bne.s loc_316F8C
    move.b #2,$24(a0)
    loc_316F8C: ; ...
    bsr.w Knuckles_Animate
    bsr.w LoadKnucklesDynPLC
    jmp DisplaySprite
     

    Attached Files:

  18. Inferno

    Inferno Rom Hacker Member

    Joined:
    Oct 27, 2015
    Messages:
    35
    Location:
    Hidden Palace Zone, Westside Island
    First of all, yes, alerts are notifications.
    Second of all, you do realize that the vanilla S1 code for this area also "overwrites" a4, right?
    This is the equivalent to your "A4 overwrite fix" line in the vanilla code:
    Code:
    move.b    (a4,d0.w),d3
    Thank you for trying to help, I'm glad you want to help, but I have analyzed the code thoroughly and I came here as a last resort, not as my first.
    Unless you've changed how collision works, I can already tell the issue: this code relies on some S2-exclusive stuff still. The very first line is of note. May I suggest comparing between the routines of Knuckles_DoLevelCollision and S1's Sonic_Floor (can't check the Hivebrain label rn)?
    This PROBABLY won't fix the current issue but it's a issue I noticed regardless.
     
  19. Elijah Rosado

    Elijah Rosado Newcomer Trialist

    Joined:
    Feb 8, 2019
    Messages:
    4
    Hello! Is there a way I can port a new version of Sonic 2's title screen menu to Sonic 1, one with absolutely no stolen code?
     
    Last edited: Aug 1, 2020
  20. Giovanni

    Giovanni Please be patient I use ReadySonic Member

    Joined:
    Apr 16, 2015
    Messages:
    153
    Location:
    Italy
    I'm trying to compose an SMPS song. I know that some FM channels will be overridden by sound effects, but if I should ever need to use one of these channels, which channel should I prioritize? (If it can help you formulate your answer, I'm composing for Sonic 1).