Does not work for regular game
local xspdRAM=0x03003DFC
local xpixRAM=0x03003DE1
local xsubpixRAM=0x03003DE8
local xspd, xpix, xsubpix
while true do
xspd=memory.readbyte(xspdRAM)
xpix=memory.readbyte(xpixRAM)
xsubpix=memory.readbyte(xsubpixRAM)
if xspd>127 then
xspd=0-(256-xspd)
end
xsubpix=xsubpix/16
if xsubpix==10 then
xsubpix="a"
elseif xsubpix==11 then
xsubpix="b"
elseif xsubpix==12 then
xsubpix="c"
elseif xsubpix==13 then
xsubpix="d"
elseif xsubpix==14 then
xsubpix="e"
elseif xsubpix==15 then
xsubpix="f"
end
gui.text(9,16,"X: " .. xspd,0x0000FFFF)
gui.text(33,16,"[" .. xpix .. "." .. xsubpix .. "]",0x0000FFFF)
emu.frameadvance()
end