Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Adding more explicit addressing modes
This regex came in handy:

jsr [^(][^)\r]*\r
jmp [^(][^)\r]*\r
  • Loading branch information
Clownacy committed Sep 22, 2015
1 parent ee516f1 commit 7ffb9be
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion _inc/LevelSizeLoad & BgScrollSpeed (JP1).asm
Expand Up @@ -54,7 +54,7 @@ LevSz_ChkLamp:
tst.b (v_lastlamp).w ; have any lampposts been hit?
beq.s LevSz_StartLoc ; if not, branch

jsr Lamp_LoadInfo
jsr (Lamp_LoadInfo).l
move.w (v_player+obX).w,d1
move.w (v_player+obY).w,d0
bra.s LevSz_SkipStartPos
Expand Down
2 changes: 1 addition & 1 deletion _inc/LevelSizeLoad & BgScrollSpeed.asm
Expand Up @@ -54,7 +54,7 @@ LevSz_ChkLamp:
tst.b (v_lastlamp).w ; have any lampposts been hit?
beq.s LevSz_StartLoc ; if not, branch

jsr Lamp_LoadInfo
jsr (Lamp_LoadInfo).l
move.w (v_player+obX).w,d1
move.w (v_player+obY).w,d0
bra.s LevSz_SkipStartPos
Expand Down
4 changes: 2 additions & 2 deletions _incObj/87 Ending Sequence Sonic.asm
Expand Up @@ -7,7 +7,7 @@ EndSonic:
move.b ob2ndRout(a0),d0
move.w ESon_Index(pc,d0.w),d1
jsr ESon_Index(pc,d1.w)
jmp DisplaySprite
jmp (DisplaySprite).l
; ===========================================================================
ESon_Index: dc.w ESon_Main-ESon_Index, ESon_MakeEmeralds-ESon_Index
dc.w Obj87_Animate-ESon_Index, Obj87_LookUp-ESon_Index
Expand Down Expand Up @@ -92,7 +92,7 @@ ESon_Wait3:

Obj87_Animate: ; Rountine 4, $A, $E, $12
lea (AniScript_ESon).l,a1
jmp AnimateSprite
jmp (AnimateSprite).l
; ===========================================================================

Obj87_Leap: ; Routine $10
Expand Down
2 changes: 1 addition & 1 deletion _incObj/88 Ending Sequence Emeralds.asm
Expand Up @@ -7,7 +7,7 @@ EndChaos:
move.b obRoutine(a0),d0
move.w ECha_Index(pc,d0.w),d1
jsr ECha_Index(pc,d1.w)
jmp DisplaySprite
jmp (DisplaySprite).l
; ===========================================================================
ECha_Index: dc.w ECha_Main-ECha_Index
dc.w ECha_Move-ECha_Index
Expand Down
2 changes: 1 addition & 1 deletion _incObj/89 Ending Sequence STH.asm
Expand Up @@ -10,7 +10,7 @@ EndSTH:
jmp ESth_Index(pc,d1.w)
else
jsr ESth_Index(pc,d1.w)
jmp DisplaySprite
jmp (DisplaySprite).l
endc
; ===========================================================================
ESth_Index: dc.w ESth_Main-ESth_Index
Expand Down
4 changes: 2 additions & 2 deletions _incObj/8B Try Again & End Eggman.asm
Expand Up @@ -7,7 +7,7 @@ EndEggman:
move.b obRoutine(a0),d0
move.w EEgg_Index(pc,d0.w),d1
jsr EEgg_Index(pc,d1.w)
jmp DisplaySprite
jmp (DisplaySprite).l
; ===========================================================================
EEgg_Index: dc.w EEgg_Main-EEgg_Index
dc.w EEgg_Animate-EEgg_Index
Expand Down Expand Up @@ -36,7 +36,7 @@ EEgg_Main: ; Routine 0

EEgg_Animate: ; Routine 2
lea (Ani_EEgg).l,a1
jmp AnimateSprite
jmp (AnimateSprite).l
; ===========================================================================

EEgg_Juggle: ; Routine 4
Expand Down
2 changes: 1 addition & 1 deletion _incObj/8C Try Again Emeralds.asm
Expand Up @@ -7,7 +7,7 @@ TryChaos:
move.b obRoutine(a0),d0
move.w TCha_Index(pc,d0.w),d1
jsr TCha_Index(pc,d1.w)
jmp DisplaySprite
jmp (DisplaySprite).l
; ===========================================================================
TCha_Index: dc.w TCha_Main-TCha_Index
dc.w TCha_Move-TCha_Index
Expand Down
34 changes: 17 additions & 17 deletions sonic.asm
Expand Up @@ -503,7 +503,7 @@ VBlank:
jsr VBla_Index(pc,d0.w)

VBla_Music:
jsr UpdateMusic
jsr (UpdateMusic).l

VBla_Exit:
addq.l #1,(v_vbla_count).w
Expand Down Expand Up @@ -634,8 +634,8 @@ VBla_08:

Demo_Time:
bsr.w LoadTilesAsYouMove
jsr AnimateLevelGfx
jsr HUD_Update
jsr (AnimateLevelGfx).l
jsr (HUD_Update).l
bsr.w sub_165E
tst.w (v_demolength).w ; is there time left on the demo?
beq.w @end ; if not, branch
Expand Down Expand Up @@ -700,8 +700,8 @@ VBla_0C:
movem.l (v_bgscroll1).w,d0-d1
movem.l d0-d1,($FFFFFF30).w
bsr.w LoadTilesAsYouMove
jsr AnimateLevelGfx
jsr HUD_Update
jsr (AnimateLevelGfx).l
jsr (HUD_Update).l
bsr.w sub_1642
rts
; ===========================================================================
Expand Down Expand Up @@ -823,7 +823,7 @@ loc_119E:
clr.b ($FFFFF64F).w
movem.l d0-a6,-(sp)
bsr.w Demo_Time
jsr UpdateMusic
jsr (UpdateMusic).l
movem.l (sp)+,d0-a6
rte
; End of function HBlank
Expand Down Expand Up @@ -2041,8 +2041,8 @@ GM_Title:
moveq #palid_Sonic,d0 ; load Sonic's palette
bsr.w PalLoad1
move.b #id_CreditsText,(v_objspace+$80).w ; load "SONIC TEAM PRESENTS" object
jsr ExecuteObjects
jsr BuildSprites
jsr (ExecuteObjects).l
jsr (BuildSprites).l
bsr.w PaletteFadeIn
disable_ints
locVRAM $4000
Expand Down Expand Up @@ -2125,9 +2125,9 @@ GM_Title:
@isjap:
move.b #id_PSBTM,(v_objspace+$100).w ; load object which hides part of Sonic
move.b #2,(v_objspace+$100+obFrame).w
jsr ExecuteObjects
jsr (ExecuteObjects).l
bsr.w DeformLayers
jsr BuildSprites
jsr (BuildSprites).l
moveq #plcid_Main,d0
bsr.w NewPLC
move.w #0,(v_title_dcount).w
Expand Down Expand Up @@ -3997,8 +3997,8 @@ GM_Credits:
moveq #palid_Sonic,d0
bsr.w PalLoad1 ; load Sonic's palette
move.b #id_CreditsText,(v_objspace+$80).w ; load credits object
jsr ExecuteObjects
jsr BuildSprites
jsr (ExecuteObjects).l
jsr (BuildSprites).l
bsr.w EndingDemoLoad
moveq #0,d0
move.b (v_zone).w,d0
Expand Down Expand Up @@ -4126,8 +4126,8 @@ TryAgainEnd:
bsr.w PalLoad1 ; load ending palette
clr.w (v_pal_dry_dup+$40).w
move.b #id_EndEggman,(v_objspace+$80).w ; load Eggman object
jsr ExecuteObjects
jsr BuildSprites
jsr (ExecuteObjects).l
jsr (BuildSprites).l
move.w #1800,(v_demolength).w ; show screen for 30 seconds
bsr.w PaletteFadeIn

Expand All @@ -4138,8 +4138,8 @@ TryAg_MainLoop:
bsr.w PauseGame
move.b #4,(v_vbla_routine).w
bsr.w WaitForVBla
jsr ExecuteObjects
jsr BuildSprites
jsr (ExecuteObjects).l
jsr (BuildSprites).l
andi.b #btnStart,(v_jpadpress1).w ; is Start button pressed?
bne.s TryAg_Exit ; if yes, branch
tst.w (v_demolength).w ; has 30 seconds elapsed?
Expand Down Expand Up @@ -5255,7 +5255,7 @@ loc_74DC:
beq.s loc_7512
move.l a0,-(sp)
movea.l a1,a0
jsr Sonic_ResetOnFloor
jsr (Sonic_ResetOnFloor).l
movea.l (sp)+,a0

loc_7512:
Expand Down

0 comments on commit 7ffb9be

Please sign in to comment.