# The retail executable's Sony SDK functions the build leaves out: PS2SDK's libraries define most of them by the same names (and
# structs of the same layout), and the platform layer's PS2 side (src/platform/ps2/) calls PS2SDK or does the rest. One asm
# function name a line, "name = target" defines a name the retail code used as another, # starts a comment.

# libdev, libgraph, libdma: the device resets and the path to the GS's (src/platform/ps2/graphics.cpp)
sceDevVif0Reset
sceDevVif1Reset
sceDevVu0Reset
sceDevVu1Reset
sceGsResetPath
sceDmaReset
sceDmaPutEnv
memclr

# libkernel: sifcmd
sceSifGetSreg
sceSifInitCmd
sceSifExitCmd
sceSifAddCmdHandler
sceSifRemoveCmdHandler
_sceSifSendCmd
sceSifSendCmd
isceSifSendCmd
SIF0_InterruptHandler
sceSifWriteBackDCache

# libkernel: sifrpc
sceSifInitRpc
sceSifExitRpc
_sceRpcGetPacket
_sceRpcFreePacket
_sceRpcGetFPacket
_sceRpcGetFPacket2
_request_end
_alarm_rdata
_request_rdata
_search_svdata
_alarm_bind
_request_bind
sceSifBindRpc
_request_call
sceSifCallRpc
sceSifCheckStatRpc
sceSifSetRpcQueue
sceSifRegisterRpc
sceSifGetNextRequest
sceSifExecRequest
sceSifRpcLoop

# libkernel: the SIF's system calls
sceSifStopDma
sceSifDmaStat
sceSifSetDma
isceSifSetDma
sceSifSetDChain
isceSifSetDChain
sceSifSetReg
sceSifGetReg

# libkernel: iopheap (the platform layer's Io::AllocateHeap and FreeHeap, on PS2SDK's)
sceSifInitIopHeap
sceSifAllocIopHeap
sceSifFreeSysMemory
sceSifFreeIopHeap

# libkernel: loadfile
_lf_bind
_lf_version
_sceSifLoadModule
sceSifLoadModule

# libkernel: iopcontrol. Nothing registers the reboot notifications sceSifInitRebootNotify clears
sceSifResetIop
sceSifSyncIop
sceSifRebootIop

# libcdvd: PS2SDK's libxcdvd, the one for the CD/DVD server of the disc's IOPRP image. sceCdLayerSearchFile and sceCdDiskReady_old
# are only called from within
cmd_sem_init
cdvd_exit
_sceCd_Poff_Intr
PowerOffCB
sceCdLayerSearchFile
sceCdSearchFile
_sceCd_ncmd_prechk
sceCdSync
sceCdSyncS
_sceCd_scmd_prechk
sceCdInit
sceCdDiskReady_old
sceCdDiskReady
sceCdGetError
sceCdBreak
sceCdMmode
sceCdReadClock
sceCdStInit
sceCdStStart
sceCdStSeek
sceCdStStop
sceCdStRead
sceCdStream

# libpad: PS2SDK's libpadx, for the disc's PADMAN (src/platform/ps2/pads.cpp)
scePadInit
_pad_intr_hdr
scePadInit2
_send_to_iop
scePadPortOpen
scePadPortClose
scePadGetDmaStr
scePadRead
scePadGetState
scePadSetReqState
scePadGetReqState
scePadInfoAct
scePadInfoMode
scePadSetMainMode
scePadSetActDirect
scePadSetActAlign
scePadGetButtonMask
scePadSetButtonInfo
scePadInfoPressMode
scePadEnterPressMode
scePadGetModVersion

# libmc: PS2SDK's for XMCSERV's protocol, which the disc's MCSERV speaks (src/platform/ps2/memorycard.cpp)
sceMcInit
sceMcOpen
sceMcMkdir
sceMcClose
sceMcRead
sceMcWrite
sceMcSync
sceMcGetInfo
sceMcGetDir
mceStorePwd
sceMcChdir
sceMcFormat
sceMcDelete

# libfs: PS2SDK's fileio (src/platform/ps2/files.cpp). sceFsReset is fioExit: the next call binds again
_sceFsIobSemaMK
new_iob
sceFsSifCallRpc
get_iob
_sceFs_Rcv_Intr
_sceFsSemInit
_sceFsWaitS
FUN_002d39d8
sceFsInit
_fs_version
sceFsReset
sceOpen
sceClose
sceLseek
sceRead
sceWrite

# libkernel: the system calls and Sony's kernel helpers (alarms, the timer, threads, the TLB and ExecPS2 patches, the TTY), which
# PS2SDK has by the same names. The entry runs PS2SDK's _InitSys in place of Sony's SystemInit
AddDmacHandler2
AddIntcHandler2
AlarmHandler
AllocTimerCounter
ChangeThreadPriority
convertfrombcd
converttobcd
Copy
CreateSema
CreateThread
Deci2Call
DelayThread
DeleteSema
_DisableDmac
DisableDmac
_DisableIntc
DisableIntc
_EnableDmac
EnableDmac
_EnableIntc
EnableIntc
EndOfHeap
Exit
FlushCache
GetMemorySize
GetOsdConfigParam
GetOsdConfigParam2
GetRomName
GetThreadId
GsPutIMR
iAllocTimerCounter
iFlushCache
iGetTimerSystemTime
InitAlarm
InitExecPS2
InitThread
InitTimer
InitTLB
InitTLBFunctions
iSetTimerAlarm
iSetTimerHandler
iSignalSema
IsT10K
iStartTimerCounter
_iWakeupThread
iWakeupThread
kCopy
kputs
PatchIsNeeded
PollSema
ReferThreadStatus
RemoveDmacHandler
RemoveIntcHandler
RotateThreadReadyQueue
sceDeci2ExRecv
sceDeci2ExSend
sceDeci2Open
sceDeci2Poll
sceDeci2ReqSend
sceTtyHandler
sceTtyInit
sceTtyWrite
SetGsCrt
SetNextComp
SetOsdConfigParam
SetSyscall
SetT2
SetT2_COMP
SetT2_COUNT
SetT2_MODE
SetTimerAlarm
SetTimerHandler
SetVSyncFlag
SignalSema
SleepThread
StartThread
StartTimerCounter
StartTimerSystemTime
SuspendThread
TimerUSec2BusClock
WaitSema
WakeupThread

# Sony's kernel code nothing calls any more: SystemInit and what only it and the helpers PS2SDK replaced used (syscall and timer
# handlers, the TLB and ExecPS2 patches' set-up)
AddIntcHandler2_002CF350
FUN_002cfae0
FID_conflict_SyncDCache
FID_conflict_iInvalidDCache
topThread
_DelayThreadHandler
QueueInit
QueuePeekWriteDone
SystemInit
RFU116
RFU091
RFU116_002D55F0
Copy_002D5600
DoSyscall_Handler_5B
cbTimerHandler
_InitAlarm
sceSifExecNotifyHandler
Copy_002D6818
_GetEntryAddress
_setup
InitTLB_002D6958
FUN_002d6b8c
UnkSyscall_0x82
FID_conflict_gcc2_compiled_
InitSystemCallTableAddress
InsertAlarm
UnlinkAlarm
sceSifInitRebootNotify
InitTLB32MB
kprintf
Call_FUN_002D5248
UnkSyscall_0x56
kprintf_char
serialPutchar
kputchar

# libscf: the console's ROM name and the clock's local time (PS2SDK's rom0_info, the platform layer's LocalTime)
GetRomName
IsT10K
sceScfGetTimeZone
sceScfGetSummerTime
tobcd
frombcd
convertfrombcd
converttobcd
FUN_0017d1e8
subdate
addhour
subhour
AdjustTime
sceScfGetLocalTimefromRTC

# Sony SDK code nothing reaches: the C library's scanf family, libdev's VU pauses and waits, libsdr's and the kernel
# library's unused helpers
sceDevVu0Pause
sceDevVu0Sync
sceDevVu1Pause
sceDevVu1Sync
func_002C5B48
func_002C5D80
func_002C6188
FUN_002c85d0
FUN_002ce1c8
FUN_002ce270
FUN_002ce2a8
FUN_002ce3b0
FUN_002ce4e8
FUN_002ce570
FUN_002ce630
FUN_002ce668
FUN_002ce870
FUN_002ce970
FUN_002ceac8
FUN_002ceb30
FUN_002cecc0
FUN_002ced88
FUN_002cef20
FUN_002cf0a0
FUN_002cf168
FID_conflict_gcc2_compiled__002CFE98
FID_conflict_SyncDCache_002CFF40
AreInterruptionsDisabled
StartThread_002D04B8
func_002D1D78
func_002D1D98
func_002D39E8
FUN_002d75d8
FUN_002d9ce8

# The kernel set-up's payloads (PS2SDK's set-up has its own): only the tables of Sony's set-up, which PS2SDK replaced, point at
# them
kFindAddress
FUN_002d5428
func_002D5588
kCopy_002D5610
FUN_002d6828
FUN_002d6c00
kFindAddress = 0
FUN_002d5428 = 0
func_002D5588 = 0
kCopy_002D5610 = 0
FUN_002d6828 = 0
FUN_002d6c00 = 0

# libkernel's second copy of the AddDmacHandler2 system call, and its DI/EI (PS2SDK's DIntr and EIntr are the same code)
AddDmacHandler2_002CF380
DisableInterruptions
EnableInterruptions
AddDmacHandler2_002CF380 = AddDmacHandler2
DisableInterruptions = DIntr
EnableInterruptions = EIntr

# The C library and GCC's runtime where the toolchain's newlib (libc_nano.a: sprintf, snprintf, strcat, strcmp, strcpy), PS2SDK's
# libkernel (memcpy, memset, strlen, strncpy: the game's own code) and libgcc (__muldi3, which libmpeg calls) do what the game's
# do, with every format and argument the program passes; "retail name = its name". src/platform/ps2/libc.cpp has memmove
# (Sony's, on PS2SDK's memcpy), printf (on deci2's kputs) and, by their retail names, what newlib does otherwise (malloc.cpp
# and libm.cpp too)
CopyBytesIntoMemory
FUN_002c70fc
DoConcat
StringDifference
CopyString
GetStringLength
StringCopy
FormatString
sceSnprintf
DebugPrint_
FUN_002d7fa0
memset
CopyBytesIntoMemory = memcpy
FUN_002c70fc = memmove
DoConcat = strcat
StringDifference = strcmp
CopyString = strcpy
GetStringLength = strlen
StringCopy = strncpy
FormatString = sprintf
sceSnprintf = snprintf
DebugPrint_ = printf
FUN_002d7fa0 = __muldi3

# Sony's newlib, scePrintf and libgcc code nothing calls any more: malloc's semaphores, vfprintf, dtoa and mprec, matherr,
# the TTY's write, scePrintf's formatter and output, libgcc's 64 bit divisions and soft doubles
FUN_002c22e0
WaitSemaphore1
SignalSemaphore1
FUN_002c95a8
FUN_002c9618
FUN_002c9690
FUN_002c9730
FUN_002c9cc0
FUN_002c9dc8
FUN_002c9e98
FUN_002caee0
FUN_002cb090
FUN_002cb198
FUN_002cced0
FUN_002ccee8
FUN_002ccf10
FUN_002cd000
FUN_002cd1f0
FUN_002cd638
FUN_002cdc68
FUN_002cde88
write
deci2Putchar
ftoi
printfloat
_sceSnprintf
func_002D1B38
printf_char
_sceSnprintf_pf
InitSemaphores
FUN_002d6df8
FUN_002d6f40
FUN_002d7638
FUN_002d7728
FUN_002d77c0
FUN_002d7908
FUN_002d8018
FUN_002d8038
FUN_002d86d0
FUN_002d86f0
FUN_002d8d88
FUN_002d8eb8
FUN_002d8f58
FUN_002d91b0
FUN_002d9208
FUN_002d9270
FUN_002d92c8
FUN_002d9428
FUN_002d9540
FUN_002d9590
FUN_002d9648
FUN_002d96e0
FUN_002d9780
FUN_002d97b0
FUN_002d9808
FUN_002d9aa8
FUN_002d9bb8
FUN_002d9c78
FUN_002d9ca8
