mirror of
https://github.com/Ed94/pikuma_ps1.git
synced 2026-07-17 23:01:25 -07:00
First pass review
This commit is contained in:
@@ -1,17 +1,15 @@
|
||||
-- autoexec.lua - pcsx_debug_helper plugin entry point.
|
||||
-- Packaged in scripts/pcsx_debug_helper.zip. Loaded by pcsx-redux via
|
||||
-- the -archive CLI flag (see scripts/launch_pcsx_debug.ps1).
|
||||
-- Packaged in scripts/pcsx_debug_helper.zip. Loaded by pcsx-redux via the -archive CLI flag (see scripts/launch_pcsx_debug.ps1).
|
||||
--
|
||||
-- Registers two web handlers for external CLI tools:
|
||||
-- /api/v1/lua/gte - full GTE state (32 data + 32 control regs + PC)
|
||||
-- /api/v1/lua/gp - GP state summary (screenshot endpoint + VRAM endpoint refs)
|
||||
--
|
||||
-- The GTE handler reads COP2 regs via PCSX.getRegisters().CP2D/CP2C. The
|
||||
-- pcsx-redux gdb stub doesn't expose COP2, so this is the only way for
|
||||
-- external tools to see GTE state.
|
||||
-- The GTE handler reads COP2 regs via PCSX.getRegisters().CP2D/CP2C.
|
||||
-- The pcsx-redux gdb stub doesn't expose COP2, so this is the only way for external tools to see GTE state.
|
||||
--
|
||||
-- The GP handler is a thin pointer: pcsx-redux's Lua API exposes only PCSX.GPU.takeScreenShot()
|
||||
-- (no GPUSTAT, no GP0/GP1 command log, no display state). For richer GP state, the existing web endpoints are the practical path:
|
||||
-- The GP handler is a thin pointer:
|
||||
-- pcsx-redux's Lua API exposes only PCSX.GPU.takeScreenShot() (no GPUSTAT, no GP0/GP1 command log, no display state). For richer GP state, the existing web endpoints are the practical path:
|
||||
-- /api/v1/state/still - PNG screenshot
|
||||
-- /api/v1/gpu/vram/raw - VRAM raw bytes (1MB)
|
||||
--
|
||||
@@ -48,8 +46,6 @@ local function register_handlers()
|
||||
end
|
||||
|
||||
local ok, err = pcall(register_handlers)
|
||||
if ok then
|
||||
print("[pcsx_debug_helper] handlers registered: gte, gp")
|
||||
else
|
||||
print("[pcsx_debug_helper] registration failed: " .. tostring(err))
|
||||
if ok then print("[pcsx_debug_helper] handlers registered: gte, gp")
|
||||
else print("[pcsx_debug_helper] registration failed: " .. tostring(err))
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user