User File #10091170670204738

Upload All User Files

#10091170670204738 (unlisted) - Super Mario Advance 4 e-reader lua

Super Mario Advance 4e.lua
1293 downloads
Uploaded 10/20/2013 10:34 AM by negative_seven (see all 6)
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