Equivalent Subroutines
From Sonic Retro
Please add more subroutines if you know them.
Label format details:
Sonic 1: Hivebrain 2005 label/Git label (where applicable)
Sonic 2: Nemesis label/Xenowhirl 2007 label/Git label (where applicable)
S1 | S2B | S2 | S2K | S3 | S&K | S3K |
---|---|---|---|---|---|---|
Demo_Time | E56 | sub_7E6
DemoTime Do_Updates |
DemoTime | ? | $95A | Do_Updates |
Demo_TimeEnd
@end |
E70 | locret_800
DemoTime_End |
return_300504 | ? | $976 | ? |
JoypadInit | 12FC | 10EC
JoypadInit |
JoypadInit | 1342 | $10AE | Init_Controllers |
ReadJoypads | 132C | 111C
ReadJoypads |
ReadJoypads | 1372 | $10DE | Poll_Controllers |
Joypad_Read
@read |
133A | sub_112A
Joypad_Read |
Joypad_Read | ? | $10EC | Poll_Controller |
VDPSetupGame | 1368 | sub_1158
VDPSetupGame |
VDPSetupGame | 13AE | $111A | Init_VDP |
VDP_Loop
@setreg |
137C | loc_116C
VDP_Loop |
loc_300E68 | ? | $112E | $$setRegisters |
VDP_ClrCRAM
@clrCRAM |
13B0 | loc_11A0
VDP_ClrCRAM |
loc_300E9C | ? | $1162 | $$clearCRAM |
VDPSetupArray | 13F2 | word_11E2
VDPSetupArray |
VDPSetupArray | ? | $11A4 | VDP_register_values |
ClearScreen | 142A, and 1458 | 1248, and 1276
ClearScreen |
ClearScreen | 14D4, and 1502 | $11CA | Clear_DisplayData |
PlaySound | 14C0 | sub_135E
PlayMusic |
PlayMusic | ? | $1358 | Play_Sound |
PlaySound_Special | 14C6 | sub_1370
PlaySound |
PlaySound | ? | $1380 | Play_Sound_2 |
PauseGame | 14DC | sub_1388
PauseGame |
PauseGame | ? | $13E4 | Pause_Game |
NemDec | 15FC | NemDec_14DE
NemDec |
NemDec | ? | $15BA | Nem_Decomp |
LoadPLC
AddPLC |
173C | sub_161E
LoadPLC |
LoadPLC | ? | $16FA | Load_PLC |
LoadPLC2
NewPLC |
176E | sub_1650
LoadPLC2 |
LoadPLC2 | ? | $1746 | Load_PLC_2 |
ClearPLC | 179A | sub_167C
ClearPLC |
ClearPLC | ? | $1772 | Clear_Nem_Queue |
ClearPLC_Loop
@loop |
17A0 | loc_1682 | loc_30138C | ? | $1778 | ? |
RunPLC_RAM
RunPLC |
17A8 | sub_168A
RunPLC_RAM |
RunPLC_RAM | ? | $1780 | Process_Nem_Queue_Init |
RunPLC_ROM
QuickPLC |
18A8 | sub_178A
RunPLC_ROM |
RunPLC_ROM | ? | $1882/$1892 | ?/Load_PLC_Immediate |
Pal_FadeTo
PaletteFadeIn |
2596 | sub_23C6
Pal_FadeTo |
Pal_FadeTo | ? | $3AF0 | Pal_FadeFromBlack |
Pal_ToBlack
@fill |
25AE | loc_23DE
Pal_ToBlack |
Pal_ToBlack | ? | $3B80 | Pal_FillBlack |
Pal_FadeFrom
PaletteFadeOut |
263A | sub_246A
Pal_FadeFrom |
Pal_FadeFrom | ? | $3BE4 | Pal_FadeToBlack |
Pal_FadeOut
FadeOut_ToBlack |
265A | sub_248A
Pal_FadeOut |
Pal_FadeOut | ? | $3C04 | Pal_ToBlack |
PalLoad1 | 28E2 | 2712
PalLoad1 |
PalLoad1 | ? | $3DBE | LoadPalette |
PalLoad2 | 28FE | 272E
PalLoad2 PalLoad_Now |
PalLoad2 | ? | $3DDA | LoadPalette_Immediate |
PalLoad3_Water | 2916 | 2746
PalLoad3_Water |
PalLoad3_Water | ? | $3DF2 | LoadPalette2 |
PalLoad4_Water | 2932 | 2764
PalLoad4_Water |
PalLoad4_Water | ? | $3E0E | LoadPalette2_Immediate |
DelayProgram
WaitForVBla |
31D8 | sub_3384
DelayProgram WaitForVint |
DelayProgram | ? | $1D18 | Wait_VSync |
RandomNumber | 31E4 | sub_3390
RandomNumber |
RandomNumber | ? | $1D24 | Random_Number |
CalcSine | 320A | sub_33B6
CalcSine |
CalcSine | ? | $1D4C | GetSineCosine |
ObjectFall | D24E | sub_16380
ObjectMoveAndFall |
ObjectMoveAndFall | ? | $1AB32 | MoveSprite |
SpeedToPos | D27A | sub_163AC
ObjectMove |
ObjectMove | ? | $1AB52 | MoveSprite2 |
MarkObjGone
RememberState |
D2A0 | loc_163D2
MarkObjGone |
MarkObjGone | ? | $1B588 | Sprite_OnScreen_Test |
DisplaySprite | D3C2 | sub_164F4
DisplaySprite |
DisplaySprite | 19240 | $1ABC6 | Draw_Sprite |
DeleteObject | D3B4 | loc_164E6
DeleteObject |
DeleteObject | ? | $1ABB6 | Delete_Current_Sprite |
DeleteObject2 | Offset_0x00D3B6 | sub_164E8
DeleteObject2 |
DeleteObject2 | ? | $1ABB8 | Delete_Referenced_Sprite |
AnimateSprite | D412 | sub_16544
AnimateSprite |
AnimateSprite | AnimateSprite | $1ABE8 | Animate_Sprite |
SingleObjLoad
FindFreeObj |
SingleObjectLoad | loc_17FDA
SingleObjLoad |
SingleObjLoad | ? | $1BAF2 | Create_New_Sprite |
SingleObjLoad2 | E788 | loc_17FFA
SingleObjLoad2 |
SingleObjLoad2 | ? | $1BAFA | Create_New_Sprite3 |
SolidObject | SolidObject | loc_19718
SolidObject |
SolidObject | ? | $1DC56 | SolidObjectFull |
PlatformObject | F984 | loc_19C32
PlatformObject |
PlatformObject | ? | ? | ? |
ObjHitFloor
ObjFloorDist |
13898 | loc_1EDFA
ObjCheckFloorDist |
ObjCheckFloorDist | ? | ? | ? |
BossDefeated | none | loc_2D6CC
BossLoadExplosion |
? | ? | ? | ? |
BossMove | ? | loc_2DB0E | ? | ? | ? | ? |
AddPoints | AddPoints | sub_40D06
AddPoints |
AddPoints2 | ? | $DCCA | HUD_AddToScore |
KillSonic | KillSonic | loc_3F926
KillCharacter |
KillCharacter | ? | $10366 | Kill_Character |
Sonic_Move | Sonic_Move | loc_1A35A
Sonic_Move |
Knuckles_Move | ? | $11060 | Sonic_Move |
Sonic_MoveLeft | Sonic_MoveLeft | loc_1A6C0
Sonic_MoveLeft |
Knuckles_MoveLeft | ? | $113F6 | sub_113F6 |
Sonic_MoveRight | Sonic_MoveRight | loc_1A746
Sonic_MoveRight |
Knuckles_MoveRight | ? | $11482 | sub_11482 |
DebugMode | Debug_Mode | loc_41A78
DebugMode |
DebugMode | ? | $92A0E | DebugMode |
Touch_Monitor
React_Monitor |
Offset_0x021278 | loc_3F73C
TouchMonitor |
Touch_Monitor | ? | $1001A | loc_1001A |
Touch_Enemy
React_Enemy |
Offset_0x0212B8 | loc_3F78C
TouchEnemy |
Touch_Enemy | ? | $100BC | loc_100BC |
Touch_ChkValue
@chktype |
Offset_0x02123E | loc_3F6F2
Touch_ChkValue |
Touch_ChkValue | ? | $FFD4 | loc_FFD4 |
LevSelControls | LevelSelect_Controls | loc_94DC
LevSelControls |
LevSelControls | loc_6B4A | $7E64 | LevSelControls |
Sonic_ChgJumpDir
Sonic_JumpDirection |
Sonic_ChgJumpDir | loc_1A8E8
Sonic_ChgJumpDir |
Knuckles_ChgJumpDir | ? | $1164E | sub_1164E |
Sonic_RollLeft | Sonic_RollLeft | loc_1A8A2
Sonic_RollLeft |
Knuckles_RollLeft | ? | $11608 | sub_11608 |
Sonic_RollRight | Sonic_RollRight | loc_1A8C6
Sonic_RollRight |
Knuckles_RollRight | ? | $1162C | sub_1162C |
Sonic_LevelBound | Sonic_LevelBoundaries | loc_1A974
Sonic_LevelBound |
Knuckles_LevelBoundaries | ? | $116DE | Player_Check_Screen_Boundaries |
Boundary_Bottom
@bottom |
Offset_0x0103CE | loc_1A9B6
Sonic_Boundary_Bottom |
Knuckles_Boundary_Bottom | ? | $1172C | loc_1172C |
Sonic_Jump | Sonic_Jump | loc_1AA38
Sonic_Jump |
Knuckles_Jump | ? | $117DA | sub_117DA |
Sonic_Floor | Sonic_Floor | loc_1AEAA
Sonic_DoLevelCollision |
Knuckles_DoLevelCollision | ? | $11EEC | sub_11EEC |
Sonic_WalkSpeed | Sonic_WalkSpeed | loc_1A64E
CalcRoomInFront |
CalcRoomInFront | ? | $F61C | sub_F61C |
sub_14D48 | Offset_0x0136F2 | CalcRoomOverHead | CalcRoomOverHead | ? | $F72E | sub_F72E |
Sonic_RollSpeed | Sonic_RollSpeed | loc_1A7C6
Sonic_RollSpeed |
Knuckles_RollSpeed | ? | $11508 | sub_11508 |
TilemapToVRAM | 154C | sub_140E
ShowVDPGraphics PlaneMapToVRAM |
? | ? | ? | ? |
References