Mini-tutorials Thread

Discussion in 'Tutorials' started by DeltaWooloo, Feb 16, 2021.

Tags:
  1. Apple Boy

    Apple Boy Newcomer Trialist

    Joined:
    Jan 12, 2021
    Messages:
    2
    What address would I go to for the GitHub Disassembly?
     
  2. DeltaWooloo

    DeltaWooloo *waving hello and goodbye* Member

    Joined:
    Aug 7, 2019
    Messages:
    337
    Dunno what you mean by address. If you want to find the label, might I suggest this handy label comparison that compares Hivebrain's disassembly with SVN/GitHub's disassembly.

    In this case, you need to look for Got_Config
     
    Giovanni and TheInvisibleSun like this.
  3. SuperSayian Zrise

    SuperSayian Zrise Well-Known Member Member

    Joined:
    May 10, 2021
    Messages:
    60
    Using selbi's text code generator for Sonic 1. Anyways, with the text code generator you only have to worry about modding the blue oval, the act number and the bonuses. But most likely you are editing the SONIC HAS PASSED message. If so, use the Sonic 1 text code generator by selbi.
     
  4. DeltaWooloo

    DeltaWooloo *waving hello and goodbye* Member

    Joined:
    Aug 7, 2019
    Messages:
    337
    Well yeah... but the mini tutorial I wrote tells you about the structure of the results card, not the text.
     
    SuperSayian Zrise likes this.
  5. Scrap Sorra

    Scrap Sorra Well-Known Member Member

    Joined:
    Sep 18, 2020
    Messages:
    87
    Location:
    Sonic the Hedgehog for the Sega Genesis
    Play Animated Level GFX when the game is paused.

    Sonic CD does this kinda strange thing where if the game is paused animated level GFX doesn't stop playing, so let's add it to Sonic 1!

    In sonic1.asm, go to "AniArt_Load" and comment out or delete these two lines:

    Code:
    tst.w    ($FFFFF63A).w    ; is the game paused?
            bne.s    AniArt_Pause    ; if yes, branch
    That's it.


    In inc\AnimateLevelGfx.asm, comment out or delete these two lines at the start of AnimateLevelGfx:

    Code:
    tst.w    (f_pause).w    ; is the game paused?
            bne.s    @ispaused    ; if yes, branch
    That's it.

    Now animated level graphics will continue to play even when the game is paused.
     
  6. Painto

    Painto Arthurus Paintus Erinaceus Member

    Joined:
    Mar 24, 2014
    Messages:
    318
    Location:
    Lublin, Poland
    Fixing the swinging wrecking ball object in GHZ
    As you probably know, there's an unused subtype of the swinging platform which uses wrecking ball at its end instead of a platform. However if you intend to use it in your level design, you may notice a little error in it - while invincible (either after hurt or from powerup) you can stand on it like it's a normal platform.
    [​IMG]
    The fix to this is easy. This object ($15) is also used in Scrap Brain Zone for spikeballs on a chain and in that setup it works as intended (that is, you can't stand on it). Comparing both setups reveals that there is one difference: spikeball variant changes the object's routine to a simpler one, while wrecking ball one still uses the regular platform routines. This means the fix is as simple as setting the correct routine. Here's how to do that:

    Open sonic1.asm and search for loc_7AD4:. Just above it, you should see the following code:
    Code:
    		btst	#4,d1		; is object type $8X ?
    		beq.s	loc_7AD4	; if not, branch
    		move.l	#Map_obj48,4(a0) ; use GHZ ball	mappings
    		move.w	#$43AA,2(a0)
    		move.b	#1,$1A(a0)
    		move.b	#2,$18(a0)
    		move.b	#$81,$20(a0)	; make object hurt when	touched
    
    Under it add the following lines:
    Code:
    		move.b	#$C,$24(a0)	; set routine to Obj15_Action
    		bra.s	Obj15_Action	; skip solidity routines
    
    Save and build.
    Open _incObj/15 Swinging Platforms (part 1).asm and search for @not1X:. Just above it, you should see the following code:
    Code:
    		btst	#4,d1		; is object type $1X ?
    		beq.s	@not1X	; if not, branch
    		move.l	#Map_GBall,obMap(a0) ; use GHZ ball mappings
    		move.w	#$43AA,obGfx(a0)
    		move.b	#1,obFrame(a0)
    		move.b	#2,obPriority(a0)
    		move.b	#$81,obColType(a0) ; make object hurt when touched
    
    Under it add the following lines:
    Code:
    		move.b	#$C,obRoutine(a0)	; set routine to Swing_Action
    		bra.s	Swing_Action	; skip solidity routines
    
    Save and build.
     
    Last edited: Nov 14, 2021