Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- memory.usememorydomain("68K RAM")
- function update()
- xcam = memory.read_u16_be(0xE814)
- ycam = memory.read_u16_be(0xE818)
- xscreen = memory.read_u8(0xD401)
- yscreen = memory.read_u8(0xC009)
- xspeed = memory.read_s8(0xB6A5)
- xsubspeed = memory.read_u8(0xB6A6)
- yspeed = memory.read_s8(0xB6AD)
- ysubspeed = memory.read_u8(0xB6AE)
- xheadspeed = memory.read_s8(0xD605)
- xheadsubspeed = memory.read_u8(0xD606)
- yheadspeed = memory.read_s8(0xD705)
- yheadsubspeed = memory.read_u8(0xD706)
- end
- update()
- gui.defaultPixelFont("fceux")
- while true do
- update()
- local xwithsub = xspeed + (xsubspeed / 256)
- local ywithsub = yspeed + (ysubspeed / 256)
- local text = tostring(string.format("% .2f % .2f",xwithsub,ywithsub))
- local xwithsub = xheadspeed + (xheadsubspeed / 256)
- local ywithsub = yheadspeed + (yheadsubspeed / 256)
- text = text .. "\n" .. tostring(string.format("% .2f % .2f",xwithsub,ywithsub))
- text = text .. "\n" .. tostring(string.format(" %4d %4d ",xcam,ycam))
- text = text .. "\n" .. tostring(string.format(" %4d %4d ",xscreen,yscreen))
- gui.pixelText(60, 6, tostring(text))
- emu.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement