# Functions that keep their recompiled body instead of binding to the runtime
# handler of the same name. The ELF is symbolized and GH2 links Sony's
# libraries statically, so a name match swaps real code for a generic handler.
# One name per line, each under its reason.

# libscf. Takes no arguments: reads rom0:ROMVER into its own static buffer and
# returns a pointer to it, and IsT10K reads that buffer directly. The handler
# treats leftover $a0/$a1 as buffer and size and overruns guest RAM. With no
# rom0: device the real open fails, the buffer stays zeroed, and IsT10K reports
# a retail console.
GetRomName

# newlib's allocator. Every GH2 allocation reaches malloc (MemAlloc falls back
# to it while gCurHeap is null), so the handlers swapped the game's allocator,
# and with it which freed memory gets reused and when, for the runtime's
# first-fit list. The game's own grows its heap with sbrk up to EndOfHeap; the
# runtime keeps to its arena above. The whole family or none of it: a real
# _malloc_r reaches sbrk through malloc_extend_top.
malloc
free
realloc
memalign
_malloc_r
_free_r
_realloc_r
_calloc_r
_memalign_r
_malloc_trim_r
malloc_extend_top
__malloc_lock
__malloc_unlock

# libgraph. The handler fills sceGsDispEnv's DISPLAY with the caller's dx/dy
# as the raw position and no horizontal magnification; libgraph's own code
# adds the video mode's standard start (from sceGsGetGParam) and the MAGH a
# 640/512-pixel picture takes, which is what PCSX2's GS positions the picture
# by. Pure computation into the caller's struct.
sceGsSetDefDispEnv

