Add SDK symbols to fix analyze_calls (#427)

This works locally to fix things.

The new changes to analyze_calls relies on symbols.us.txt including a
symbol for every single function in main. This was not the case - many
functions which do not have names, for example, func_80020D3C did not
have an entry in symbols, because splat would just autogenerate a symbol
name with the numeric placeholder.

This PR adds explicit symbols for every function that was previously
throwing errors. I just did this by manually patching in each function
until analyze_calls would run successfully. Hopefully it works in the CI
just as it works on my own computer.

---------

Co-authored-by: bismurphy <bismurphy@users.noreply.github.com>
This commit is contained in:
bismurphy 2023-08-01 21:43:21 -04:00 committed by GitHub
parent 4cc37b85cc
commit 103a9a9f4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 2 deletions

View File

@ -372,13 +372,18 @@ CdReadSync = 0x8001C188;
CdReadCallback = 0x8001C254;
CdRead2 = 0x8001C26C;
StClearRing = 0x8001C320;
func_8001C380 = 0x8001C380;
StSetStream = 0x8001C4C8;
func_8001C550 = 0x8001C550;
func_8001C64C = 0x8001C64C;
func_8001C730 = 0x8001C730;
mem2mem = 0x8001D0A0;
dma_execute = 0x8001D0D4;
SsSetMVol = 0x8001D290;
SsSetSerialAttr = 0x8001D2E0;
SsSetSerialVol = 0x8001D374;
_SsInitSoundSeq = 0x8001D470;
func_8001D798 = 0x8001D798;
_SsSeqPlay = 0x8001D864;
_SsGetSeqData = 0x8001D974;
_SsNoteOn = 0x8001DC20;
@ -414,12 +419,24 @@ SsQuit = 0x80020440;
_SsStart = 0x80020460;
SsStart = 0x800206C8;
SsSetTickMode = 0x80020798;
func_800209B4 = 0x800209B4;
func_80020C94 = 0x80020C94;
func_80020D3C = 0x80020D3C;
func_80020F44 = 0x80020F44;
func_80021174 = 0x80021174;
func_80021188 = 0x80021188;
SsSetReservedVoice = 0x80021198;
SsVabClose = 0x800211D0;
SsVabFakeBody = 0x800212AC;
func_80021350 = 0x80021350;
func_80021880 = 0x80021880;
func_800219E0 = 0x800219E0;
SsUtGetProgAtr = 0x80021A30;
SpuVmVSetUp = 0x80021B38;
SsUtGetVagAtr = 0x80021BFC;
func_80021E38 = 0x80021E38;
func_80021EEC = 0x80021EEC;
func_80021F6C = 0x80021F6C;
SpuVmAlloc = 0x8002220C;
SpuVmKeyOnNow = 0x80022474;
SetAutoVol = 0x800236F0;
@ -439,6 +456,7 @@ _SsVmGetProgPan_0 = 0x80025A38;
SsUtKeyOnV = 0x800264A0;
SsUtKeyOffV = 0x800267E8;
SsUtPitchBend = 0x80026954;
func_80026D4C = 0x80026D4C;
SsUtGetDetVVol = 0x80026DD8;
SsUtSetDetVVol = 0x80026E14;
SsUtGetDetVVol_0 = 0x80026E2C;
@ -459,12 +477,17 @@ CloseEvent = 0x800283A4;
DisableEvent = 0x800283B4;
SpuInitMalloc = 0x800283C4;
SpuMalloc = 0x80028418;
func_80028D3C = 0x80028D3C;
SpuMallocWithStartAddr = 0x80028D40;
SpuSetNoiseVoice = 0x80029070;
SpuSetAnyVoice = 0x80029094;
_spu_setReverbAttr = 0x80029810;
SpuClearReverbWorkArea = 0x80029CE0;
WaitEvent = 0x80029E7C;
func_80029FBC = 0x80029FBC;
func_8002A024 = 0x8002A024;
func_8002A09C = 0x8002A09C;
func_8002ABF4 = 0x8002ABF4;
TestEvent = 0x8002AD5C;
_spu_setInTransfer = 0x8002AD6C;
SpuGetAllKeysStatus = 0x8002B458;

View File

@ -230,11 +230,11 @@ class NonMatchingFunc(object):
assumed_path = f"/{self.overlay_name}/{self.text_offset}.c"
c_paths = [src for src in src_files if src.endswith(assumed_path)]
if len(c_paths) != 1:
print("CPATH MATCH FAILURE")
print(c_paths)
print(nonmatching_path)
print(assumed_path)
print(split)
kill = 3 / 0
self.src_path = c_paths[0]
@ -419,7 +419,6 @@ if __name__ == "__main__":
# Sort the names
for overlay in overlays:
overlays[overlay].sort()
print(overlays)
html = '<html><head><meta charset="UTF-8"></head><body>'
for overlay, funcs in overlays.items():
# create a heading for the overlay