User File #638290218259858296

Upload All User Files

#638290218259858296 - Klonoa: Moonlight Museum

Klo-MM.lua
36 downloads
Uploaded 8/30/2023 7:50 PM by inconsistent (see all 18)
Moonlight Museum OSD for RAM values (X+Y pos/spd, grounded, states, iframes)
local X
local Y
local XSPD
local YSPD 
local Ground
local State
local iFrames

states = {}
states[1] = "Idle" -- left
states[2] = "Idle" -- right
states[1025] = "Idle (Moo)" --left
states[1026] = "Idle (Moo)" -- right

states[5] = "Running" --left
states[6] = "Running" -- right

states[1029] = "Running (Moo)" -- left
states[1030] = "Running (Moo)" -- right

states[17] = "Airborne" -- left
states[18] = "Airborne" -- right
states[21] = "Airborne (M)" -- left, moving
states[22] = "Airborne (M)" -- right, moving
states[1041] = "Airborne (Moo)" -- left
states[1042] = "Airborne (Moo)" -- right
states[1045] = "Airborne (Moo) (M)" -- left, moving
states[1046] = "Airborne (Moo) (M)" -- right, moving

states[81] = "Fluttering" -- left
states[82] = "Fluttering" -- right
states[85] = "Fluttering (M)" -- left, moving
states[86] = "Fluttering (M)" -- right, moving
states[145] = "Airborne" -- left, finished flutter
states[146] = "Airborne" -- right, finished flutter
states[149] = "Airborne (M)" -- left, finished flutter, moving
states[150] = "Airborne (M)" -- right, finished flutter, moving

states[9] = "Landing" -- left
states[10] = "Landing" -- right
states[13] = "Landing (M)" -- left, moving
states[14] = "Landing (M)" -- right, moving
states[1033] = "Landing (Holding Moo)" -- left
states[1034] = "Landing (Holding Moo)" -- right
states[1037] = "Landing (Holding Moo) (M)" -- left, moving
states[1038] = "Landing (Holding Moo) (M)" -- right, moving

states[8449] = "Wind Bullet" -- left
states[8450] = "Wind Bullet" -- right
states[8453] = "Wind Bullet (M)" -- left, moving
states[8454] = "Wind Bullet (M)" -- right, moving

states[8465] = "Wind Bullet (Airborne)" -- throw, left
states[8466] = "Wind Bullet (Airborne)" -- throw, right
states[8209] = "Wind Bullet (Airborne) (R)" -- returning, left
states[8210] = "Wind Bullet (Airborne) (R)" -- returning, right
states[8469] = "Wind Bullet (Airborne) (T) (M)" -- throw, left, moving
states[8470] = "Wind Bullet (Airborne) (T) (M)" -- throw, right, moving
states[8213] = "Wind Bullet (Airborne) (R) (M)" -- returning, left, moving
states[8214] = "Wind Bullet (Airborne) (R) (M)" -- returning, right, moving

states[1557] = "Grabbed Moo (Airborne) (M)" -- left, moving
states[1558] = "Grabbed Moo (Airborne) (M)" -- right, moving

states[2049] = "Throwing Moo" -- left
states[2050] = "Throwing Moo" -- right
states[2053] = "Throwing Moo (M)" -- left, moving
states[2054] = "Throwing Moo (M)" -- right, moving
states[2065] = "Throwing Moo (Airborne)" -- left
states[2066] = "Throwing Moo (Airborne)" -- right
states[2069] = "Throwing Moo (Airborne) (M)" -- left, moving
states[2070] = "Throwing Moo (Airborne) (M)" -- right, moving

states[1073] = "Double Jumping" -- left
states[1074] = "Double Jumping" -- right
states[1077] = "Double Jumping (M)" -- left, moving
states[1078] = "Double Jumping (M)" -- right, moving

states[4112] = "Taking Damage?"
states[4113] = "Taking Damage" -- left
states[4114] = "Taking Damage" -- right
states[4104] = "Dying!"
states[4105] = "Dying!"

states[17425] = "Goomis" -- left
states[17426] = "Goomis" -- right
states[17429] = "Goomis (M)" -- left, moving
states[17430] = "Goomis (M)" -- right, moving
states[17457] = "Goomis Jump" -- left
states[17458] = "Goomis Jump" -- right
states[17461] = "Goomis Jump (M)" -- left
states[17462] = "Goomis Jump (M)" -- right
states[18065] = "Grabbed Goomis" -- left
states[18066] = "Grabbed Goomis" -- right
states[18069] = "Grabbed Goomis (M)" -- left, moving
states[18070] = "Grabbed Goomis (M)" -- right, moving
states[18097] = "Grabbed Goomis (BJ)" -- left, buffered jump
states[18098] = "Grabbed Goomis (BJ)" -- right, buffered jump

klonoaState = states[0]

while true do 
    X = memory.read_s16_le(0x03C2, "RAM")
    Y = memory.read_s16_le(0x03C4, "RAM")
    XSPD = memory.read_s16_le(0x03C6, "RAM")
    YSPD = memory.read_s16_le(0x03C8, "RAM")
    Ground = memory.read_u8(0x03D0, "RAM")
    State = memory.read_s16_le(0x03CC, "RAM")
    iFrames = memory.read_u16_le(0x03D8, "RAM")
    local klonoaInternalState = memory.read_s16_le(0x03CC, "RAM")

    gui.text(1,100, "X: " .. bizstring.hex(X), "white")
    gui.text(1,120, "Y: " .. bizstring.hex(Y), "white")
    gui.text(1,140, "X SPD: " .. XSPD, "white")
    gui.text(1,160, "Y SPD: " .. YSPD, "white")
    gui.text(1,180, "Ground: " .. Ground, "white")
    
    if (iFrames ~= 0) then
        gui.text(1, 220, "iFrames: " .. iFrames, "white");
    end

    if states[klonoaInternalState] ~= nil then
	    gui.text(1, 200, "STATE: " .. states[klonoaInternalState], "white")
    else
	    gui.text(1, 200, "UNKNOWN VALUE: " .. klonoaInternalState, "white")
    end

    emu.frameadvance()
end