# Guest functions routed through runtime hooks (implementations in this directory).
# Addresses are in BLUS30027 (Armored Core 4, disc 01.01).
# Read by ac4-recomp emit --hooks; a hooked f_<addr> calls ppu::hook_<name>(ctx, original).
# Format: <address> <name>   # comment
0x00951f94 pad_update             # pad object update: cellPadGetData, sticks normalized at +1172 (port at +384)
0x005ead28 pad_update_b           # second pad class: port at +736, sticks normalized at +1524
0x00b6b148 view_turn_set          # AC view slot 6: turn command setter (r3 view, f1); player call returns to 0xb52708
0x00b6acf4 view_turn_set_b        # the tutorial's AC view (vtable 0x10148768) slot 6: the same setter, also marking turn input for its steps
0x00b67cc8 input_turn_set         # the plain input class (vtable 0x1013f400) slot 6: the player's turn command in the SIMULATOR (VS scenes)
0x00b67970 view_pitch_set         # AC view slot 9: look pitch thunk to slot 8 (0xb6b2a4); player calls return to 0xb52800 / 0xb52c30
0x00a372e8 look_update            # an AC's look control: turn (0xa36c6c; +4 the camera's yaw against the body), pitch command, pitch integrator (0xa36684, state +48)
0x009ac8d4 view_matrix            # an AC's view matrix (r3 out 4x4, r4 the AC; body transform x look control rotation, at the head): the mouse camera's turn for the camera's callers
0x001406b8 present                # frame pacer: flip buffer +16; mode 1 (+4) repeats the flip above the target rate (+32)
0x00d88e78 setjmp           # guest setjmp: its call sites may return twice (recompiler; runtime/guest_setjmp.cpp)
0x00d88f9c longjmp          # guest longjmp: back to the live setjmp call (Lua script errors; runtime/guest_setjmp.cpp)
0x002b12dc lua_throw        # Lua 5.0 luaD_throw(L, status): logs script errors (game/lua_hooks.cpp)
0x004ddddc name_compare     # case-insensitive name compare (stack copies, lowercase, strcmp): native (game/native_hooks.cpp)
0x0054a648 pair_find        # pair lookup in a table of 8-byte entries, (A,B) -> 2, (B,A) -> 1: native (game/native_hooks.cpp)
0x0095c848 arena_alloc      # draw-data arena allocator (0x30000 16-byte units, counter at +0x300000, unchecked): high-water/overflow log (game/frame_hooks.cpp)
0x008fdbe8 heap_alloc       # game heap allocation (virtual): patched draw-arena objects (from 0x8ecbf8) get port memory (game/frame_hooks.cpp)
0x008fdbac heap_free        # game heap free: never frees those port-owned draw-arena objects (game/frame_hooks.cpp)
0x008ebfd8 layer_add        # draw-list layer append (r3 manager): counts entries dropped by full layers (game/frame_hooks.cpp)
0x008eb628 layer_add_direct # draw-list layer append (r3 layer header): same diagnostics
0x0091af7c menu_frame       # every frame: pads to key messages {384, code} via the framework vtable +20 (menu_mouse.cpp)
0x005de750 menu_dispatch    # dialog manager: a key message to its top dialog when it takes input (stops the menu mouse probe; menu_mouse.cpp)
0x005de614 menu_dispatch_v  # the same with the message by value (SYSTEM and others: scene +1228 managers; menu_mouse.cpp)
0x00640e98 menu_object      # a scene menu object: a key straight to one of its two dialogs (+272/+276 by +284; menu_mouse.cpp)
0x006a19a0 menu_dialog_key  # a dialog's base key handler (to its focus object +36): any other route ends here (stops the probe; menu_mouse.cpp)
0x009fc210 ac_turn_input      # an AC's turn input, every frame (r3 controller, r4 input): the player's turn object and AC body for the mouse camera (input_hooks.cpp)
0x009fc364 ac_turn_input_b    # the same while the turn command is not zero
