Basic Questions and Answers Thread

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

  1. JGamer2151

    JGamer2151 Well-Known Member/Lurker Member

    Joined:
    Dec 1, 2020
    Messages:
    96
    If only we have an updated guide on porting the Spindash to Sonic 1 for GitHub disassmblies…

    TBH, I’ve actually ported the Spindash into Sonic 1 using the GitHub disassembly as a test years ago, and it worked as it is, just by interpreting the 2005 Hivebrain disassembly guides and translating it into the GitHub disassembly though a trial-and-error process.
     
  2. FeroTheInugami

    FeroTheInugami It's in the Blockchain Member

    Joined:
    Jul 10, 2023
    Messages:
    35
    DeltaWooloo likes this.
  3. Dapperblook

    Dapperblook Newcomer Trialist

    Joined:
    Feb 20, 2023
    Messages:
    5
    IGNORE THIS FOUND THE PROBLEM
    So bassicaly today is the day i found out that the @ on da github dissasembly ARENT for asthetic porpuses, below SoundEffects_Common: you gotta delete all of the @ on da code (labels and code reffering to them (also dony do it for all of the code if you think of that just do it inside Sound_PlaySFX)) and change the code refering to the old @ versions to refer to the new.
    even tough i should probably have know and its probably important ims till kinda mad and think its stupid so yeah. if you are having the same issues do that


    At first I tried following the guide step by step only translating the label names to github, but I got stuck here.
    Code:
    PlaySoundID:
            moveq    #0,d7
            move.b    v_sound_id(a6),d7
            beq.w    StopAllSound
            bpl.s    @locret            ; If >= 0, return (not a valid sound, bgm or command)
            move.b    #$80,v_sound_id(a6)    ; reset    music flag
            ; DANGER! Music ends at $93, yet this checks until $9F; attempting to
            ; play sounds $94-$9F will cause a crash! Remove the '+$C' to fix this.
            ; See LevSel_NoCheat for more.
            cmpi.b    #bgm__Last,d7    ; Is this music ($81-$9F)?
            bls.w    Sound_PlayBGM        ; Branch if yes
            cmpi.b    #sfx__First,d7        ; Is this after music but before sfx? (redundant check)
            blo.w    @locret            ; Return if yes
            cmpi.b    #sfx__Last,d7        ; Is this sfx ($A0-$CF)?
            bls.w    Sound_PlaySFX        ; Branch if yes
            cmpi.b    #spec__First,d7        ; Is this after sfx but before special sfx? (redundant check)
            blo.w    @locret            ; Return if yes
            ; DANGER! Special SFXes end at $D0, yet this checks until $DF; attempting to
            ; play sounds $D1-$DF will cause a crash! Remove the '+$10' and change the 'blo' to a 'bls'
            ; and uncomment the two lines below to fix this.
            cmpi.b    #spec__Last,d7    ; Is this special sfx ($D0)?
            bls.w    Sound_PlaySpecial    ; Branch if yes
            cmpi.b    #spec__Last+1,d7    ; this da spindash sound ($D1)?
            bls.w    Sound_Spindash    ; Branch if yes
            cmpi.b    #flg__First,d7        ; Is this after special sfx but before $E0?
            blo.w    @locret            ; Return if yes
            cmpi.b    #flg__Last,d7        ; Is this $E0-$E4?
            bls.s    Sound_E0toE4        ; Branch if yes
    ; locret_71F8C:
    @locret:
            rts 
            ...
    Code:
    ; ---------------------------------------------------------------------------
    ; Play spindash sound effect
    ; ---------------------------------------------------------------------------
    ; Sound_D1toDF:
    Sound_Spindash:
            tst.b    f_1up_playing(a6)    ; Is 1-up playing?
            bne.w    @clear_sndprio        ; Exit is it is
            tst.b    v_fadeout_counter(a6)    ; Is music being faded out?
            bne.w    @clear_sndprio        ; Exit if it is
            tst.b    f_fadein_flag(a6)    ; Is music being faded in?
            bne.w    @clear_sndprio        ; Exit if it is
            movea.l    (Go_SoundIndex).l,a0
            subi.b    #sfx__First+1,d7        ; Make it 0-based
            bra.w   @sfx_Common
    
    ; ---------------------------------------------------------------------------
    ; Play normal sound effect
    ; ---------------------------------------------------------------------------
    ; Sound_A0toCF:
    Sound_PlaySFX:
            tst.b    f_1up_playing(a6)    ; Is 1-up playing?
            bne.w    @clear_sndprio        ; Exit is it is
            tst.b    v_fadeout_counter(a6)    ; Is music being faded out?
            bne.w    @clear_sndprio        ; Exit if it is
            tst.b    f_fadein_flag(a6)    ; Is music being faded in?
            bne.w    @clear_sndprio        ; Exit if it is
            cmpi.b    #sfx_Ring,d7        ; is ring sound    effect played?
            bne.s    @sfx_notRing        ; if not, branch
            tst.b    v_ring_speaker(a6)    ; Is the ring sound playing on right speaker?
            bne.s    @gotringspeaker        ; Branch if not
            move.b    #sfx_RingLeft,d7    ; play ring sound in left speaker
    ; loc_721EE:
    @gotringspeaker:
            bchg    #0,v_ring_speaker(a6)    ; change speaker
    ; Sound_notB5:
    @sfx_notRing:
            cmpi.b    #sfx_Push,d7        ; is "pushing" sound played?
            bne.s    @sfx_notPush        ; if not, branch
            tst.b    f_push_playing(a6)    ; Is pushing sound already playing?
            bne.w    @locret            ; Return if not
            move.b    #$80,f_push_playing(a6)    ; Mark it as playing
    ; Sound_notA7:
    @sfx_notPush:
            movea.l    (Go_SoundIndex).l,a0
            subi.b    #sfx__First,d7        ; Make it 0-based
    ; SoundEffects_Common:
    @sfx_Common:
            lsl.w    #2,d7            ; Convert sfx ID into index
            movea.l    (a0,d7.w),a3        ; SFX data pointer
            movea.l    a3,a1
            moveq    #0,d1
            move.w    (a1)+,d1        ; Voice pointer
            add.l    a3,d1            ; Relative pointer
            move.b    (a1)+,d5        ; Dividing timing
            ; DANGER! there is a missing 'moveq    #0,d7' here, without which SFXes whose
            ; index entry is above $3F will cause a crash. This is actually the same way that
            ; this bug is fixed in Ristar's driver.
            moveq    #0,d7
            move.b    (a1)+,d7    ; Number of tracks (FM + PSG)
            subq.b    #1,d7
            moveq    #TrackSz,d6
            ...
    (dont know if code jumpscare 1 is necesary to include but its here anyways for context)

    When I try to build the game with this code, it says that @clear_sndprio and @sfx_Common aren't defined symbols on the lines inside Sound_Spindash, so thats also why I tried doing the weird thing from my last post.

    (should probably have started with this. im a very smart person)

    Also regarding the latest post by FeroTheInugami, im using the ProjectSonic1TwoEight branch so I don't want to go back to using the features of the normal one, and I have looked into just following what they did in the code to implement the spindash, but because of the new memory addresses (the v_spindashsfx1 thingies) being called to do things related to the sound effect and my great and rad 68k knowledge I have no clue how to translate those to normal github. I thank everyone trying to help dumb me do this though, you guys are awesome.
     
    Last edited: Jul 18, 2023
  4. FeroTheInugami

    FeroTheInugami It's in the Blockchain Member

    Joined:
    Jul 10, 2023
    Messages:
    35
    I have problems with my Sonic 2 Level Select in Sonic 1. When Entering GHZ at it, it looks very glitched:
    ReadySonic009.jpg

    Also, like the original Level Select, entering fast on it, makes it looks like this:
    ReadySonic003.jpg

    And "finally", the LS works fine on Kega Fusion, in Gens, it looks like this:
    ReadySonic007.png
    And in other older emulators, it crashes the game, giving Illegal Instruction error. Mine gives the Vladikcomper Debugger error.

    I don't think this is related to the Level Select itself, but for some reason, Labyrinth and Scrap Brain Zones' title cards are bugged, only appearing "AB", instead of "LABYRINTH ZONE ACT X" and "C A B A" instead of "SCRAP BRAIN ZONE ACT 3". For some reason, it only happens on Labyrinth based levels. What the heck is happening!?
    ReadySonic010.jpg
    ReadySonic011.jpg
    Can someone explain that!?
     
  5. vladikcomper

    vladikcomper Well-Known Member Member

    Joined:
    Dec 2, 2009
    Messages:
    415
    Did you by chance use an old guide by Esrael? I haven't seen it, but I know many people had problems with it, it even crashed on real hardware and accurate emulators.

    The difference between Kega and Gens you can be attributed to Address error that these emulators ignore... in totally different ways. Kega just allows breaking CPU limitations and reading words from odd addresses, while Gens auto-aligns every word read to the nearest even address (which is worse). Try out any accurate emulator, like Blastem, to see if you're really getting Address Error there. If you do, fix it before going on.

    This is a redraw bug which happens in the original Sonic 1's level select as well. It's triggered if you enter level select at the very same frame background redraw is about to occur. It's less noticeable in Sonic 1, because the background is mostly dark.

    Maybe this guide can help: https://info.sonicretro.org/SCHG_How-to:Fix_the_Level_Select_graphics_bug

    Level select seem to corrupt the beginning VRAM (if I'm right). It's hard to tell without proper debugging. Open any emulator with VRAM viewer - you'll easily see the unwanted tiles and where they are located. Locate and debug code that loads them (if you know the exact label of these tiles/art, it should be straightforward).

    Sounds like memory corruption, but it could be anything, really. You already have VRAM corruption in GHZ and likely an Address Error elsewhere, this means the level select implementation can have memory conflicts with the base game or other hidden bugs.

    It's really impossible to tell what's going on without proper debugging. But debugging is a form of art that takes some time to learn.

    It's extremely hard to make sense out of it blind-folded, so you need to upgrade your toolset and take advantage of good emulators that show you what's going on under the hood. Invest some time in studying built-in debuggers in Blastem, Regen or BizHawk (whatever works better for you). If you use my latest debugger, you can take advantage of it as well (I wrote a ton of documentation and a guide on how to debug efficiently). If you get any real crashes - you're in luck! Take any opportunity to investigate code labels related to these crashes, the answer is usually on the surface.
     
  6. Grosy

    Grosy Romhacker + owns a mega drive 2 Member

    Joined:
    Dec 30, 2021
    Messages:
    38
    How can i add other enemies from for example lz to ghz (load the art correctly)
     
  7. Devon

    Devon I'm a loser, baby, so why don't you kill me? Member

    Joined:
    Aug 26, 2013
    Messages:
    1,377
    Location:
    your mom
    You have to add the entries for their art in the zone's respective PLC (Pattern Load Cue) list, and make sure that the enemy object references the correct VRAM location you specified. Do note that GHZ's VRAM is quite full, so you're probably not going to get great results immediately, and will need to work to save enough space to properly add it (or you could just remove a badnik and use its VRAM space).
     
  8. peachy

    peachy Newcomer Trialist

    Joined:
    May 31, 2023
    Messages:
    6
    Location:
    Australia
    [deleted]
     
    Last edited: Nov 16, 2023
  9. FeroTheInugami

    FeroTheInugami It's in the Blockchain Member

    Joined:
    Jul 10, 2023
    Messages:
    35
    I still have problems with 8 frames (extended frames) rings. I don't know what happened. I changed SyncroAnimate routine, mappings and PLCs and I still get the frames of the edge and the sparkles of the rings glitched. Is there a VRAM problem or something I forgot to do? Can someone explain how I can fix this with the codes?

    ReadySonic009.jpg ReadySonic010.jpg
     
  10. Devon

    Devon I'm a loser, baby, so why don't you kill me? Member

    Joined:
    Aug 26, 2013
    Messages:
    1,377
    Location:
    your mom
    There isn't enough VRAM for the extra ring frames where they are stored. They are loaded directly behind where the game puts its sprite table:
    [​IMG]

    You'll need to find another spot to put them, but that might involve finding ways to open up that space.

    You could also implement a system where only 1 frame at a time is loaded into VRAM at once (like with Sonic's graphics), though you would need to do it for both the regular rings and lost rings, since those aren't synced up with each other.

    EDIT: Made this guide. Should help you out.
     
    Last edited: Jul 18, 2023
  11. Dapperblook

    Dapperblook Newcomer Trialist

    Joined:
    Feb 20, 2023
    Messages:
    5
    EDIT: So I just did the whole thing over again and apparently I did a blunder somewhere that caused the weird sound corruptions, whoops! But im still figuring out the weird spindash waterfall. Found out that when playing D0 the D1 sound plays and idk why (its probably something dumb tho) ALSO I suggest ignoring the below as its kind of bad

    Ok I tought this was just me being silly but now this is really weird. Even tough im sure I translated all of the sound part of the spindash guide correctly to github for some reason the weird sound corruptions and the spindash waterfall still persist.
    Code:
    ; Sound_ChkValue:
    PlaySoundID:
            moveq    #0,d7
            move.b    v_sound_id(a6),d7
            beq.w    StopAllSound
            bpl.s    @locret            ; If >= 0, return (not a valid sound, bgm or command)
            move.b    #$80,v_sound_id(a6)    ; reset    music flag
            ; DANGER! Music ends at $93, yet this checks until $9F; attempting to
            ; play sounds $94-$9F will cause a crash! Remove the '+$C' to fix this.
            ; See LevSel_NoCheat for more.
            cmpi.b    #bgm__Last+$C,d7    ; Is this music ($81-$9F)?
            bls.w    Sound_PlayBGM        ; Branch if yes
            cmpi.b    #sfx__First,d7        ; Is this after music but before sfx? (redundant check)
            blo.w    @locret            ; Return if yes
            cmpi.b    #sfx__Last,d7        ; Is this sfx ($A0-$CF)?
            bls.w    Sound_PlaySFX        ; Branch if yes
            cmpi.b    #spec__First,d7        ; Is this after sfx but before special sfx? (redundant check)
            blo.w    @locret            ; Return if yes
            ; DANGER! Special SFXes end at $D0, yet this checks until $DF; attempting to
            ; play sounds $D1-$DF will cause a crash! Remove the '+$10' and change the 'blo' to a 'bls'
            ; and uncomment the two lines below to fix this.
            cmpi.b    #spec__First+1,d7    ; Is this special sfx ($D1)?
            bcs.w    Sound_PlaySpecial    ; Branch if yes
            cmpi.b    #$DF,d7    ; $D1-$DF
            blo.w    Sound_Spindash    ; Branch if yes
    ;        cmpi.b    #flg__First,d7        ; Is this after special sfx but before $E0?
    ;        blo.w    @locret            ; Return if yes
            cmpi.b    #flg__Last,d7        ; Is this $E0-$E4?
            bls.s    Sound_E0toE4        ; Branch if yes
    ; locret_71F8C:
    @locret:
            rts    
    Code:
    ; ---------------------------------------------------------------------------
    ; Play spindash sound effect
    ; ---------------------------------------------------------------------------
    ; Sound_D1toDF:
    Sound_Spindash:
            tst.b    f_1up_playing(a6)    ; Is 1-up playing?
            bne.w    clear_sndprio        ; Exit is it is
            tst.b    v_fadeout_counter(a6)    ; Is music being faded out?
            bne.w    clear_sndprio        ; Exit if it is
            tst.b    f_fadein_flag(a6)    ; Is music being faded in?
            bne.w    clear_sndprio        ; Exit if it is
            movea.l    (Go_SoundIndex).l,a0
            subi.b    #sfx__First+1,d7        ; Make it 0-based
            bra.w   sfx_Common
    
    ; ---------------------------------------------------------------------------
    ; Play normal sound effect
    ; ---------------------------------------------------------------------------
    ; Sound_A0toCF:
    Sound_PlaySFX:
            tst.b    f_1up_playing(a6)    ; Is 1-up playing?
            bne.w    clear_sndprio        ; Exit is it is
            tst.b    v_fadeout_counter(a6)    ; Is music being faded out?
            bne.w    clear_sndprio        ; Exit if it is
            tst.b    f_fadein_flag(a6)    ; Is music being faded in?
            bne.w    clear_sndprio        ; Exit if it is
            cmpi.b    #sfx_Ring,d7        ; is ring sound    effect played?
            bne.s    @sfx_notRing        ; if not, branch
            tst.b    v_ring_speaker(a6)    ; Is the ring sound playing on right speaker?
            bne.s    @gotringspeaker        ; Branch if not
            move.b    #sfx_RingLeft,d7    ; play ring sound in left speaker
    ; loc_721EE:
    @gotringspeaker:
            bchg    #0,v_ring_speaker(a6)    ; change speaker
    ; Sound_notB5:
    @sfx_notRing:
            cmpi.b    #sfx_Push,d7        ; is "pushing" sound played?
            bne.s    @sfx_notPush        ; if not, branch
            tst.b    f_push_playing(a6)    ; Is pushing sound already playing?
            bne.w    locret            ; Return if not
            move.b    #$80,f_push_playing(a6)    ; Mark it as playing
    ; Sound_notA7:
    @sfx_notPush:
            movea.l    (Go_SoundIndex).l,a0
            subi.b    #sfx__First,d7        ; Make it 0-based
    ; SoundEffects_Common:
    sfx_Common:
            lsl.w    #2,d7            ; Convert sfx ID into index
            movea.l    (a0,d7.w),a3        ; SFX data pointer
            movea.l    a3,a1
            moveq    #0,d1
            move.w    (a1)+,d1        ; Voice pointer
            add.l    a3,d1            ; Relative pointer
            move.b    (a1)+,d5        ; Dividing timing
            ; DANGER! there is a missing 'moveq    #0,d7' here, without which SFXes whose
            ; index entry is above $3F will cause a crash. This is actually the same way that
            ; this bug is fixed in Ristar's driver.
    ;        moveq    #0,d7
            move.b    (a1)+,d7    ; Number of tracks (FM + PSG)
            subq.b    #1,d7
            moveq    #TrackSz,d6
    ; loc_72228:
    sfx_loadloop:
            moveq    #0,d3
            move.b    1(a1),d3    ; Channel assignment bits
            move.b    d3,d4
            bmi.s    sfxinitpsg    ; Branch if PSG
            subq.w    #2,d3        ; SFX can only have FM3, FM4 or FM5
            lsl.w    #2,d3
            lea    SFX_BGMChannelRAM(pc),a5
            movea.l    (a5,d3.w),a5
            bset    #2,(a5)        ; Mark music track as being overridden (TrackPlaybackControl)
            bra.s    sfxoverridedone
    ; ===========================================================================
    ; loc_72244:
    sfxinitpsg:
            lsr.w    #3,d3
            lea    SFX_BGMChannelRAM(pc),a5
            movea.l    (a5,d3.w),a5
            bset    #2,(a5)            ; Mark music track as being overridden (TrackPlaybackControl)
            cmpi.b    #$C0,d4            ; Is this PSG 3?
            bne.s    sfxoverridedone    ; Branch if not
            move.b    d4,d0
            ori.b    #$1F,d0            ; Command to silence PSG 3
            move.b    d0,(psg_input).l
            bchg    #5,d0            ; Command to silence noise channel
            move.b    d0,(psg_input).l
    ; loc_7226E:
    sfxoverridedone:
            movea.l    SFX_SFXChannelRAM(pc,d3.w),a5
            movea.l    a5,a2
            moveq    #(TrackSz/4)-1,d0    ; $30 bytes
    ; loc_72276:
    clearsfxtrackram:
            clr.l    (a2)+
            dbf    d0,clearsfxtrackram
    
            move.w    (a1)+,(a5)            ; Initial playback control bits (TrackPlaybackControl)
            move.b    d5,TrackTempoDivider(a5)    ; Initial voice control bits
            moveq    #0,d0
            move.w    (a1)+,d0            ; Track data pointer
            add.l    a3,d0                ; Relative pointer
            move.l    d0,TrackDataPointer(a5)    ; Store track pointer
            move.w    (a1)+,TrackTranspose(a5)    ; load FM/PSG channel modifier
            move.b    #1,TrackDurationTimeout(a5)    ; Set duration of first "note"
            move.b    d6,TrackStackPointer(a5)    ; set "gosub" (coord flag $F8) stack init value
            tst.b    d4                ; Is this a PSG channel?
            bmi.s    sfxpsginitdone            ; Branch if yes
            move.b    #$C0,TrackAMSFMSPan(a5)    ; AMS/FMS/Panning
            move.l    d1,TrackVoicePtr(a5)        ; Voice pointer
    ; loc_722A8:
    sfxpsginitdone:
            dbf    d7,sfx_loadloop
    
            tst.b    v_sfx_fm4_track+TrackPlaybackControl(a6)    ; Is special SFX being played?
            bpl.s    doneoverride                    ; Branch if not
            bset    #2,v_spcsfx_fm4_track+TrackPlaybackControl(a6)    ; Set 'SFX is overriding' bit
    ; loc_722B8:
    doneoverride:
            tst.b    v_sfx_psg3_track+TrackPlaybackControl(a6)    ; Is SFX being played?
            bpl.s    locret                        ; Branch if not
            bset    #2,v_spcsfx_psg3_track+TrackPlaybackControl(a6)    ; Set 'SFX is overriding' bit
    ; locret_722C4:
    locret:
            rts
    ; ===========================================================================
    ; loc_722C6:
    clear_sndprio:
            clr.b    v_sndprio(a6)    ; Clear priority
            rts    
    Code:
    ; ---------------------------------------------------------------------------
    ; Play GHZ waterfall sound
    ; ---------------------------------------------------------------------------
    ; Sound_D0toDF:
    Sound_PlaySpecial:
            tst.b    f_1up_playing(a6)    ; Is 1-up playing?
            bne.w    @locret            ; Return if so
            tst.b    v_fadeout_counter(a6)    ; Is music being faded out?
            bne.w    @locret            ; Exit if it is
            tst.b    f_fadein_flag(a6)    ; Is music being faded in?
            bne.w    @locret            ; Exit if it is
            movea.l    (Go_SpecSoundIndex).l,a0
            subi.b    #spec__First,d7        ; Make it 0-based
            lsl.w    #2,d7
            movea.l    (a0,d7.w),a3
            movea.l    a3,a1
            moveq    #0,d0
            move.w    (a1)+,d0            ; Voice pointer
            add.l    a3,d0                ; Relative pointer
            move.l    d0,v_special_voice_ptr(a6)    ; Store voice pointer
            move.b    (a1)+,d5            ; Dividing timing
            ; DANGER! there is a missing 'moveq    #0,d7' here, without which special SFXes whose
            ; index entry is above $3F will cause a crash. This instance was not fixed in Ristar's driver.
    ;        moveq    #0,d7
            move.b    (a1)+,d7            ; Number of tracks (FM + PSG)
            subq.b    #1,d7
            moveq    #TrackSz,d6
    ; loc_72348:
    @sfxloadloop:
            move.b    1(a1),d4                    ; Voice control bits
            bmi.s    @sfxoverridepsg                    ; Branch if PSG
            bset    #2,v_music_fm4_track+TrackPlaybackControl(a6)    ; Set 'SFX is overriding' bit
            lea    v_spcsfx_fm4_track(a6),a5
            bra.s    @sfxinitpsg
    ; ===========================================================================
    ; loc_7235A:
    @sfxoverridepsg:
            bset    #2,v_music_psg3_track+TrackPlaybackControl(a6)    ; Set 'SFX is overriding' bit
            lea    v_spcsfx_psg3_track(a6),a5
    ; loc_72364:
    @sfxinitpsg:
            movea.l    a5,a2
            moveq    #(TrackSz/4)-1,d0    ; $30 bytes
    ; loc_72368:
    @clearsfxtrackram:
            clr.l    (a2)+
            dbf    d0,@clearsfxtrackram
    
            move.w    (a1)+,(a5)            ; Initial playback control bits & voice control bits (TrackPlaybackControl)
            move.b    d5,TrackTempoDivider(a5)
            moveq    #0,d0
            move.w    (a1)+,d0            ; Track data pointer
            add.l    a3,d0                ; Relative pointer
            move.l    d0,TrackDataPointer(a5)    ; Store track pointer
            move.w    (a1)+,TrackTranspose(a5)    ; load FM/PSG channel modifier
            move.b    #1,TrackDurationTimeout(a5)    ; Set duration of first "note"
            move.b    d6,TrackStackPointer(a5)    ; set "gosub" (coord flag $F8) stack init value
            tst.b    d4                ; Is this a PSG channel?
            bmi.s    @sfxpsginitdone            ; Branch if yes
            move.b    #$C0,TrackAMSFMSPan(a5)    ; AMS/FMS/Panning
    ; loc_72396:
    @sfxpsginitdone:
            dbf    d7,@sfxloadloop
    
            tst.b    v_sfx_fm4_track+TrackPlaybackControl(a6)    ; Is track playing?
            bpl.s    @doneoverride                    ; Branch if not
            bset    #2,v_spcsfx_fm4_track+TrackPlaybackControl(a6)    ; Set 'SFX is overriding' bit
    ; loc_723A6:
    @doneoverride:
            tst.b    v_sfx_psg3_track+TrackPlaybackControl(a6)    ; Is track playing?
            bpl.s    @locret                        ; Branch if not
            bset    #2,v_spcsfx_psg3_track+TrackPlaybackControl(a6)    ; Set 'SFX is overriding' bit
            ori.b    #$1F,d4                        ; Command to silence channel
            move.b    d4,(psg_input).l
            bchg    #5,d4            ; Command to silence noise channel
            move.b    d4,(psg_input).l
    ; locret_723C6:
    @locret:
            rts    
    Included Sound_PlaySpecial: because I have a feeling it might have something to do with it. Im sure this will end up being something dumb so extra thanks in advance! like actually thanks, i have no idea how to fix this.
     
    Last edited: Jul 25, 2023
  12. FeroTheInugami

    FeroTheInugami It's in the Blockchain Member

    Joined:
    Jul 10, 2023
    Messages:
    35
    Ok, for some reason, while editing levels on SonLVL, the title screen got like this
    ReadySonic011.jpg
    How I can solve this problem?
     
  13. Devon

    Devon I'm a loser, baby, so why don't you kill me? Member

    Joined:
    Aug 26, 2013
    Messages:
    1,377
    Location:
    your mom
    This is due to an oversight with the camera system in Sonic 1. The title screen uses GHZ1's camera boundaries and events, which affects the foreground plane (which the emblem is displayed on).

    For a quick and dirty fix, go to DeformLayers and under this line:
    Code:
           move.w   (v_bgscreenposy).w,(v_bgscrposy_vdp).w
    add
    Code:
            cmpi.b    #id_Title,(v_gamemode).w
            bne.s    @NotTitle
            clr.w    (v_scrposy_vdp).w
    
    @NotTitle:
    This will force the camera to remain in place vertically if in the title screen.
     
    TheInvisibleSun likes this.
  14. Tarekboushi

    Tarekboushi Newcomer Trialist

    Joined:
    Jan 24, 2021
    Messages:
    19
    Hello,
    How do i make the lamppost object fall offscreen when it becomes red in Sonic 1?
     
  15. FeroTheInugami

    FeroTheInugami It's in the Blockchain Member

    Joined:
    Jul 10, 2023
    Messages:
    35
    Some time ago, JustMe discovered the title card of Sonic 3D Blast beta. I've never ported a new title card to every Sonic 1 ROM Hack of my own. How I can port a new title card in Sonic 1?
    EDIT: TRASH THIS
     
    Last edited: Jul 27, 2023
  16. FeroTheInugami

    FeroTheInugami It's in the Blockchain Member

    Joined:
    Jul 10, 2023
    Messages:
    35
    I don't know if this can count as a double post, no one replied to my question and I took days to ask, but I need help. While porting the MSU-MD to Sonic 3 (Note: I activated Sonic 3 Complete deleting the lines with "If Sonic3_Complete", just to the game initialize, and the sprites now (with the Sega CD booted), the sprites are totally glitched. This happened with the players, several enemies and other uncompressed and nemesis sprites bugged (I didn't saw everything but I saw enough). Can someone help?
    Fusion_Unknown000.jpg
     
  17. Devon

    Devon I'm a loser, baby, so why don't you kill me? Member

    Joined:
    Aug 26, 2013
    Messages:
    1,377
    Location:
    your mom
    If you are using Kega Fusion, there is a bug in that emulator in which when performing VDP DMA from 68000 memory (like it does for the player graphics), it accidentally treats memory as if it were in Sega CD mode 2 (boot from disc, Sega CD memory comes before cartridge memory) at all times, instead of accounting for Sega CD mode 1 (boot from cartridge, cartridge memory comes before Sega CD memory), which I believe MSU-MD is making use of.

    As a result, even if you are in mode 1, if you try to DMA from cartridge space, it will DMA from the Sega CD's memory space. Unfortunately, even with this in mind, it doesn't seem Kega Fusion will actually map the cartridge space after the Sega CD's memory space when performing a DMA transfer, so it's not possible to DMA from cartridge space when in mode 1 in Kega Fusion.

    What you could do is if you can get the Main CPU to have access to Word RAM, you can have the graphics be loaded into there, and DMA from there. Do note that due to a timing issue, you will need to add 2 to the source address of the DMA when DMAing from Word RAM, and then manually load the first couple word or longword. You'll also need to DMA from the $200000-$23FFFF (mode 2 range of Word RAM) range instead of $600000-$63FFFF (mode 1 range of Word RAM) if on Kega Fusion, which you'll need to detect somehow by checking Kega Fusion specific inaccuracies/behaviors.

    However, Genesis Plus GX supports mode 1 and doesn't suffer from that bug. BlastEm has been adding support for the Sega CD, so I'd imagine sometime in the future, it will support Sega CD mode 1 if it doesn't already.
     
    Last edited: Jul 28, 2023
  18. JGamer2151

    JGamer2151 Well-Known Member/Lurker Member

    Joined:
    Dec 1, 2020
    Messages:
    96
    I remember this was pointed out in another thread, and tried it myself with Sonic 2 (and Sonic 1 with the Spindash ported), and yes, it produces the exact same thing. Here’s the quotation from that aforementioned thread:
     
    Last edited: Aug 1, 2023
  19. FeroTheInugami

    FeroTheInugami It's in the Blockchain Member

    Joined:
    Jul 10, 2023
    Messages:
    35
    Recently, I added the per-act music esque in Sonic 1, but I had a few problems, like the shoes doesn't play song (I extended music slot), instead it plays the checkpoint SFX, and the Invincibility and Drowning themes don't stop playing when invincibility times out or I get out of the water. Also, I added new bosses themes, and from the second boss until SLZ boss, they doesn't play,
     
  20. Grosy

    Grosy Romhacker + owns a mega drive 2 Member

    Joined:
    Dec 30, 2021
    Messages:
    38
    Okay so I once tried to port the tutorial from sonic retro of how to add a new zone to github. Did everything and translated into git but when building there were these weird "zonewarning" things that i had to comment out if i wanted it to build and when i tried to get into the zone got these errors (I was going to use lz art and i have no idea why it says plc_lz even though in the code its plc_RZ)
    [​IMG]
    And yes I did install the error handler and have seen these errors (Are they anything related to the zonewarning thingys i commented out?)
    And why is it loading the LZ plc when i did make it load everything seperate from lz its only loading the copy of the lz art.

    And yes I know not a basic question but help would be appreciated.


    PS. I just noticed this right before posting for some odd reason now sonic rolls by himself in GHZ.
    If this is needed I am using REV 00.