# Functions the runtime may replace (ppc_hook). The recompiler gives each a
# slot; an empty slot runs the recompiled code. `@name` asks for a data symbol.
# Names the executable lacks are skipped, so this list serves every game.

# the OS: guest threads run on host threads, one at a time (os.cpp)
OSLoadContext          # the context switch: hand the CPU to another host thread
OSSaveContext          # learns which guest thread a host thread carries
OSCreateThread         # marks a context as a new thread to start

# console and fatal stops
__write_console        # MSL's console output: printf, OSReport
PPCHalt                # the CPU stops: OSPanic ends here
OSFatal                # the error screen

# leaving the game
OSReturnToMenu
OSRestart
OSShutdownSystem
__OSReboot

# the AI's interrupt: no audio block starts while the game is in it (hw.cpp)
__AIDHandler

# the MMU: nothing to configure on a flat address space
RealMode               # rfi into a real-mode routine that sets the BATs

# RSO modules recompiled with the executable (rso.cpp): where the game loads them
RSOLinkListFixed       # RSOLinkList's body: locates and links a module
RSOUnLinkList

# the Wii Remote: the public WPAD and KPAD API (wpad.cpp); the Bluetooth
# stack below it never starts
WPADInit
WPADRegisterAllocator
WPADGetStatus
WPADProbe
WPADDisconnect
WPADSetAutoSleepTime   # the Remote's sleep after minutes unused (SDKs of 2010 on)
WPADResetAutoSleepTimeCount   # (chan): the channel's last use is now; on the control block
WPADSetAutoSamplingBuf
WPADGetLatestIndexInBuf
WPADRead
WPADGetDataFormat
WPADSetDataFormat
WPADSetSamplingCallback
WPADControlDpd
WPADIsDpdEnabled
WPADGetDpdSensitivity
WPADGetAccGravityUnit
WPADSetCallbackByKPAD
WPADIsUsedCallbackByKPAD
WPADSetConnectCallback
WPADSetExtensionCallback
WPADSetSimpleSyncCallback
WPADStartFastSimpleSync
WPADStopSimpleSync
WPADControlMotor
WPADEnableMotor
WPADIsMotorEnabled
WPADControlSpeaker
WPADIsSpeakerEnabled
WPADCanSendStreamData
WPADSendStreamData
WPADGetSpeakerVolume
WPADSetSpeakerVolume
WPADGetSensorBarPosition
WPADGetRadioSensitivity
WPADGetInfoAsync
WPADGetInfo            # WPADGetInfoAsync, then asleep until the Remote answers
WPADSaveConfig
KPADInit
KPADInitEx             # KPADInit's body; games of 2010 call it directly
KPADReset
KPADRead
KPADReadEx             # KPADRead with an error out, the form some games call
KPADSetPosParam
KPADSetAccParam
KPADSetConnectCallback
KPADEnableDPD
KPADDisableDPD
KPADGetSensorHeight
KPADIsEnableAimingMode
__VIRetraceHandler     # VI's interrupt: the Remotes' connect and extension callbacks are called after it
kpad_wpad_status       # (chan, buf, dev) -> buf: the 2007 KPAD's copy of its WPAD samples of one device; no symbol names it, ports give it this name
