lua file for AVGN KO Boxing.
The game is a bit tricky that I don't feel like optimizing hardly.
I hope someone make nice TAS of the game.
while true do
ehp = mainmemory.read_u8(0x24) --enemy HP
hp = mainmemory.read_u8(0x23) --HP
eahp = mainmemory.read_u8(0x2C) --enemy apparent HP
ahp = mainmemory.read_u8(0x2B) --apparent HP
rand = mainmemory.read_u8(0x0) --random number
x = mainmemory.read_u8(0x27) --X
y = mainmemory.read_u8(0x28) --Y
ex = mainmemory.read_u8(0x29) --enemyX
ey = mainmemory.read_u8(0x2A) --enemyY
gui.text(1, 60, string.format("%X",rand))
gui.text(1, 75, string.format("HP = %d/%d, eneHP = %d/%d",ahp,hp,eahp,ehp))
gui.text(1, 90, string.format("(x,y) = (%X, %X), e(x,y) = (%X, %X)",x,y,ex,ey))
emu.frameadvance()
end