User File #638390394260205244

Upload All User Files

#638390394260205244 - Pac-Man World 3 (USA)

PMW3DS.lua
65 downloads
Uploaded 12/24/2023 6:30 PM by inconsistent (see all 32)
Pac-Man World 3 (US) OSD for RAM values
local X, Y, Z
local SPD, YSPD
local Angle
local Ground
local iFrames
local rollTimer
local State

States = {
    [0] = "Idle",
    [1] = "Running",
    [2] = "Airborne",
    [4] = "Butt Bounce",
    [5] = "Butt Bounce (Starting)",
    [7] = "Rev-Roll (Charging)",
    [8] = "Rev-Roll (Starting)",
    [9] = "Rev-Roll",
    [10] = "Punch (1)",
    [11] = "Punch (2)",
    [12] = "Punch (3)",
    [13] = "Punch (End)",
    [14] = "Punch (End)",
    [15] = "Pac-Chain",
    [18] = "Wall Jump",
    [19] = "Wall Hang",
    [20] = "Dying",
    [22] = "Climbing",
    [23] = "Climbing (Up)",
    [24] = "Climbing (Down)",
    [25] = "Climbing (Left)",
    [26] = "Climbing (Right)",
    [27] = "Climbing",
    [28] = "Ledge Hang",
    [29] = "Ledge Hang (Left)",
    [30] = "Ledge Hang (Right)",
    [31] = "Rod Hang",
    [32] = "Rod Hang (Grabbing)"
}

while true do 
    memory.usememorydomain("Main RAM")
    X = memory.read_s32_le(0x0EBD78)
    Z = memory.read_s32_le(0x0EBD80)
    Y = memory.read_s32_le(0x0EBD7C)
    SPD = memory.read_s16_le(0x0EBF6C)
    YSPD = memory.read_s32_le(0x0EBD94)
    Angle = memory.read_u16_le(0x0EBD72)
    Ground = memory.read_s8(0x0EBDA4)
    iFrames = memory.read_u8(0x0EBF44)
    rollTimer = memory.read_s16_le(0x0EBE20)
    State = memory.read_s8(0x0EBE28)

    gui.text(1,100, "X: " .. X, "white")
    gui.text(1,120, "Z: " .. Z, "white")
    gui.text(1,140, "Y: " .. Y, "white")
    gui.text(1,160, " YSPD: " .. YSPD, "white")
    gui.text(1,180, "SPD: " .. SPD, "white")
    gui.text(1,200, "Angle: " .. bizstring.hex(Angle), "white")
    gui.text(1,220, "Ground: " .. Ground, "white")
    gui.text(1,240, "Roll Timer: " .. rollTimer, "white")

    local stateText = States[State]
    if stateText then
        gui.text(1,260, stateText, "white")
    else
        gui.text(1,260, "UNKNOWN: " .. State, "red")
    end

    if (iFrames ~= 0) then
        gui.text(1, 280, "iFrames: " .. iFrames, "white");
    end

    emu.frameadvance()
end