Skip to content

Commit

Permalink
Sync some symbols from pokeheartgold
Browse files Browse the repository at this point in the history
These were found by correlating identical code between Sky and Heart
Gold.

This is the first of a series of results from this correlation work.
Some of the changes included in this commit:
- init code
- math utilities (FX_, VEC_, MTX_)
- graphics utilities (GX_ and friends)

None of the code here is decompiled, so this change only includes
renames and tweaks to the asm.

Note: GX_HBlankIntr is not the same between EoS and Heart Gold, but the
label was added anyway because it is between GX_Init and GX_VBlankIntr
in both games. The latter two functions DO match between games.
  • Loading branch information
UsernameFodder committed Dec 29, 2023
1 parent fd2fb44 commit 8e6873c
Show file tree
Hide file tree
Showing 20 changed files with 1,445 additions and 1,236 deletions.
2 changes: 1 addition & 1 deletion asm/include/itcm.inc
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
.public EnableIrqFlag
.public EntityIsValid__0230827C
.public EntityIsValid__02319F8C
.public GeomMtxMult4x3
.public G3_MultMtx43
.public GeomSetTexImageParam
.public GeomSetVertexCoord16
.public GetAllBaseForms
Expand Down
82 changes: 41 additions & 41 deletions asm/include/main_02000C6C.inc
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
.public _020AF698
.public _020AFF38_EU
.public _020AFF3C_EU
.public _020B2B98
.public GXi_DmaId
.public _020B3380
.public _020B3384
.public _020B33A0
Expand Down Expand Up @@ -230,49 +230,49 @@
.public sub_02019304
.public sub_0204A5D0
.public sub_02076070
.public sub_02076074
.public sub_020761E8
.public sub_0207621C
.public sub_02076258
.public sub_020762A0
.public sub_02076308
.public sub_02076324
.public sub_02076464
.public sub_020766F4
.public sub_02076844
.public sub_02076944
.public sub_020769F0
.public sub_02076BC8
.public sub_02076E90
.public sub_02076EB0
.public sub_02076F58
.public sub_02076FC8
.public sub_0207729C
.public sub_020772B0
.public sub_020772C4
.public sub_020772E8
.public sub_0207730C
.public sub_02077320
.public sub_0207735C
.public sub_02077370
.public sub_02077384
.public sub_02077398
.public sub_020776E8
.public sub_020777C4
.public sub_0207793C
.public sub_02077A8C
.public sub_020783D0
.public sub_02078470
.public sub_020784B8
.public sub_02078500
.public sub_02078544
.public sub_0207855C
.public sub_0207859C
.public sub_020785B4
.public GX_Init
.public GX_VBlankIntr
.public GX_DispOff
.public GX_DispOn
.public GX_SetGraphicsMode
.public GXS_SetGraphicsMode
.public GXx_SetMasterBrightness_
.public GX_SetBankForBG
.public GX_SetBankForOBJ
.public GX_SetBankForBGExtPltt
.public GX_SetBankForOBJExtPltt
.public GX_SetBankForTex
.public GX_SetBankForTexPltt
.public GX_SetBankForLCDC
.public GX_SetBankForSubBG
.public GX_SetBankForSubOBJ
.public GX_SetBankForSubBGExtPltt
.public GX_DisableBankForBG
.public GX_DisableBankForOBJ
.public GX_DisableBankForBGExtPltt
.public GX_DisableBankForOBJExtPltt
.public GX_DisableBankForTex
.public GX_DisableBankForTexPltt
.public GX_DisableBankForLCDC
.public GX_DisableBankForSubBG
.public GX_DisableBankForSubOBJ
.public GX_DisableBankForSubBGExtPltt
.public G2x_SetBlendAlpha_
.public G3X_Init
.public G3X_ClearFifo
.public G3X_SetClearColor
.public GX_BeginLoadBGExtPltt
.public GX_EndLoadBGExtPltt
.public GX_BeginLoadOBJExtPltt
.public GX_EndLoadOBJExtPltt
.public GXS_BeginLoadBGExtPltt
.public GXS_EndLoadBGExtPltt
.public GXS_BeginLoadOBJExtPltt
.public GXS_EndLoadOBJExtPltt
.public sub_02078900
.public sub_02078A98
.public sub_02078C68
.public sub_0207902C
.public OS_GetLockID
.public sub_02079844
.public sub_02079888
.public sub_02079940
Expand Down
34 changes: 17 additions & 17 deletions asm/include/main_0200C4CC.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1110,23 +1110,23 @@
.public sub_0206F38C
.public sub_0206F4E0
.public sub_0206F5C8
.public sub_02077C48
.public sub_02077CAC
.public sub_020783D0
.public sub_02078470
.public sub_020784B8
.public sub_02078500
.public sub_02078544
.public sub_0207855C
.public sub_0207859C
.public sub_020785B4
.public sub_020785F4
.public sub_02078650
.public sub_02078790
.public sub_020787DC
.public sub_02078810
.public sub_0207887C
.public sub_0207902C
.public G3i_OrthoW_
.public G3i_LookAt_
.public GX_BeginLoadBGExtPltt
.public GX_EndLoadBGExtPltt
.public GX_BeginLoadOBJExtPltt
.public GX_EndLoadOBJExtPltt
.public GXS_BeginLoadBGExtPltt
.public GXS_EndLoadBGExtPltt
.public GXS_BeginLoadOBJExtPltt
.public GXS_EndLoadOBJExtPltt
.public GX_BeginLoadTex
.public GX_LoadTex
.public GX_EndLoadTex
.public GX_BeginLoadTexPltt
.public GX_LoadTexPltt
.public GX_EndLoadTexPltt
.public OS_GetLockID
.public sub_02079094
.public sub_0207A2DC
.public sub_0207B9EC
Expand Down
22 changes: 10 additions & 12 deletions asm/include/main_02075600.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1517,10 +1517,8 @@
.public _020A9EA4
.public _020A9EB8
.public _020A9ECC
.public _020AE0B4
.public _020AE0C4
.public _020AE0C6
.public _020AE0C8
.public sTexPlttStartAddrTable
.public sTexStartAddrTable
.public _020AEBF8
.public _020AEC1C
.public _020AEC5C
Expand All @@ -1535,8 +1533,8 @@
.public _020AEEF0
.public _020AF38C
.public _020AFE44
.public _020B2B94
.public _020B2B98
.public sIsDispOn
.public GXi_DmaId
.public _020B2B9C
.public _020B2BAC
.public _020B2BB0
Expand Down Expand Up @@ -1612,9 +1610,9 @@
.public _020B333C
.public _020B3364
.public _022B9208
.public _022B9588
.public _022B958A
.public _022B958C
.public sDispMode
.public GXi_VRamLockId
.public gGXState
.public _022B958E
.public _022B9590
.public _022B9592
Expand All @@ -1627,8 +1625,8 @@
.public _022B95A0
.public _022B95A2
.public _022B95A4
.public _022B95A8
.public _022B95C4
.public sSubBGExtPltt
.public sClrImg
.public _022B95E4
.public _022B95E8
.public _022B95EC
Expand Down Expand Up @@ -1711,7 +1709,7 @@
.public _secure
.public ACTOR_LIST
.public ARM9_UNKNOWN_DATA__NA_209EAAC
.public ARM9_UNKNOWN_TABLE__NA_20ADFB0
.public FX_AtanIdxTable_
.public ARM9_UNKNOWN_TABLE__NA_20AE924
.public BaseFormsEqual
.public DTCM_BSS
Expand Down
4 changes: 2 additions & 2 deletions asm/include/overlay_00.inc
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@
.public sub_020590DC
.public sub_0205B77C
.public sub_0205B80C
.public sub_02075720
.public CRYPTO_RC4Init
.public sub_020757B0
.public sub_020778D0
.public G3X_Reset
.public sub_020790DC
.public sub_0207911C
.public sub_02079550
Expand Down
118 changes: 59 additions & 59 deletions asm/include/overlay_02.inc
Original file line number Diff line number Diff line change
Expand Up @@ -106,72 +106,72 @@
.public strcpy
.public strlen
.public strncpy
.public sub_02075BFC
.public sub_02075C38
.public FX_DivS32
.public FX_ModS32
.public sub_02076070
.public sub_020761E8
.public sub_0207621C
.public sub_02076258
.public sub_020762A0
.public sub_02076308
.public sub_02076324
.public sub_02076464
.public sub_020766F4
.public sub_02076844
.public sub_02076944
.public sub_020769F0
.public sub_02076BC8
.public sub_02076CB0
.public sub_02076DE4
.public sub_02076E90
.public sub_02076EB0
.public sub_02076F58
.public sub_02076FC8
.public sub_02077048
.public sub_0207729C
.public sub_020772B0
.public sub_020772C4
.public sub_020772E8
.public sub_0207730C
.public sub_02077320
.public sub_02077334
.public sub_02077348
.public sub_0207735C
.public sub_02077370
.public sub_02077384
.public sub_02077398
.public sub_020773C0
.public sub_020773E8
.public sub_0207741C
.public sub_02077598
.public sub_02077704
.public sub_0207772C
.public sub_02077CF8
.public sub_02077D4C
.public sub_02077DA4
.public sub_02077DFC
.public sub_02077E54
.public sub_02077EA8
.public sub_02077F00
.public sub_02077F58
.public sub_02077FB0
.public sub_02078010
.public sub_02078070
.public sub_020780D0
.public sub_02078130
.public sub_02078190
.public sub_020781F0
.public sub_02078250
.public sub_020782B0
.public sub_02078310
.public sub_02078370
.public GX_VBlankIntr
.public GX_DispOff
.public GX_DispOn
.public GX_SetGraphicsMode
.public GXS_SetGraphicsMode
.public GXx_SetMasterBrightness_
.public GX_SetBankForBG
.public GX_SetBankForOBJ
.public GX_SetBankForBGExtPltt
.public GX_SetBankForOBJExtPltt
.public GX_SetBankForTex
.public GX_SetBankForTexPltt
.public GX_SetBankForClearImage
.public GX_SetBankForARM7
.public GX_SetBankForLCDC
.public GX_SetBankForSubBG
.public GX_SetBankForSubOBJ
.public GX_SetBankForSubBGExtPltt
.public GX_SetBankForSubOBJExtPltt
.public GX_DisableBankForBG
.public GX_DisableBankForOBJ
.public GX_DisableBankForBGExtPltt
.public GX_DisableBankForOBJExtPltt
.public GX_DisableBankForTex
.public GX_DisableBankForTexPltt
.public GX_DisableBankForClearImage
.public GX_DisableBankForARM7
.public GX_DisableBankForLCDC
.public GX_DisableBankForSubBG
.public GX_DisableBankForSubOBJ
.public GX_DisableBankForSubBGExtPltt
.public GX_DisableBankForSubOBJExtPltt
.public G2_GetBG0ScrPtr
.public G2S_GetBG0ScrPtr
.public G2_GetBG0CharPtr
.public G2x_SetBlendBrightness_
.public G2x_ChangeBlendBrightness_
.public GX_LoadBGPltt
.public GXS_LoadBGPltt
.public GX_LoadOBJPltt
.public GXS_LoadOBJPltt
.public GX_LoadOAM
.public GXS_LoadOAM
.public GX_LoadOBJ
.public GXS_LoadOBJ
.public GX_LoadBG0Scr
.public GX_LoadBG1Scr
.public GXS_LoadBG1Scr
.public GX_LoadBG2Scr
.public GX_LoadBG3Scr
.public GX_LoadBG0Char
.public GXS_LoadBG0Char
.public GX_LoadBG1Char
.public GXS_LoadBG1Char
.public GX_LoadBG2Char
.public GX_LoadBG3Char
.public sub_02078A98
.public sub_02078B20
.public sub_02078C3C
.public sub_02078C68
.public sub_02078C98
.public sub_02078CC8
.public sub_0207902C
.public OS_GetLockID
.public sub_02079094
.public sub_020790DC
.public sub_0207911C
Expand Down
6 changes: 3 additions & 3 deletions asm/include/overlay_11.inc
Original file line number Diff line number Diff line change
Expand Up @@ -799,9 +799,9 @@
.public sub_0206C134
.public sub_0206C144
.public sub_0206C164
.public sub_02075E4C
.public sub_02075EC8
.public sub_020778D0
.public VEC_Distance
.public FX_Atan2Idx
.public G3X_Reset
.public SwitchAnimationControlToNextFrame
.public TEAM_MEMBER_TABLE_PTR
.public TRIG_TABLE
Expand Down
2 changes: 1 addition & 1 deletion asm/include/overlay_29_023498A0.inc
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@
.public sub_02051DD0
.public sub_02051E60
.public sub_0205BAB0
.public sub_020778D0
.public G3X_Reset
.public SubstitutePlaceholderStringTags
.public UnloadOverlay
.public WriteQuicksaveData
2 changes: 1 addition & 1 deletion asm/include/overlay_34.inc
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@
.public sub_02051B44
.public sub_02051C24
.public sub_02052060
.public sub_020778D0
.public G3X_Reset
Loading

0 comments on commit 8e6873c

Please sign in to comment.