function Main()
status = memory.readbyte(0x0090)
xPos = memory.readbyte(0x00B8)
yPos = memory.readbyte(0x00A4)
xSub = memory.readbyte(0x00AE)
ySub = memory.readbyte(0x009A)
xSpd = memory.readbytesigned(0x00CC)
ySpd = memory.readbytesigned(0x00C2)
dir = memory.readbyte(0x030A)
xCam = memory.readword(0x0014)
yCam = memory.readbyte(0x0016)*256*16
statusS = memory.readbytesigned(0x0091)
xPosS = memory.readbyte(0x00B9)
yPosS = memory.readbyte(0x00A5)
xSubS = memory.readbyte(0x00AF)
ySubS = memory.readbyte(0x009B)
xSpdS = memory.readbytesigned(0x00CD)
ySpdS = memory.readbytesigned(0x00C3)
for i = 0, 10, 1 do
local status = memory.readbyte(0x0090+i)
local ySub = memory.readbyte(0x009A+i)
local yPos = memory.readbyte(0x00A4+i)
local xSub = memory.readbyte(0x00AE+i)
local xPos = memory.readbyte(0x00B8+i)
local ySpd = memory.readbytesigned(0x00C2+i)
local xSpd = memory.readbytesigned(0x00CC+i)
local dir = memory.readbyte(0x030A+i)
local yHtbx = memory.readbyte(0x0314+i)
local xHtbx = memory.readbyte(0x0328+i)
local health = memory.readbyte(0x0346+i)
local movement = memory.readbytesigned(0x035A+i)
local animation = memory.readbyte(0x0382+i)
local xDraw = (xPos*256+xSub-xCam)/16
local yDraw = (yPos*256+ySub-yCam)/16
gui.box(xDraw, yDraw, xDraw-xHtbx/16, yDraw-yHtbx/16, "#FF000099", "#FF000099")
end
gui.box(2, 10, 204, 60, "#FFFFFFA0", "#FFFFFFFF")
gui.text(6, 14, "X Speed: "..xSpd, "#000000FF", "#FF000070")
gui.text(6, 22, "Y Speed: "..ySpd, "#000000FF", "#00FF0070")
gui.text(6, 32, "X Position: "..(xPos*256+xSub), "#000000FF", "#FF000070")
gui.text(6, 40, "Y Position: "..(yPos*256+ySub), "#000000FF", "#00FF0070")
gui.text(6, 50, "Status: "..status, "#000000FF", "#00000020")
gui.text(106, 14, "X Speed: "..xSpdS, "#000000FF", "#FF000070")
gui.text(106, 22, "Y Speed: "..ySpdS, "#000000FF", "#00FF0070")
gui.text(106, 32, "X Position: "..(xPosS*256+xSubS), "#000000FF", "#FF000070")
gui.text(106, 40, "Y Position: "..(yPosS*256+ySubS), "#000000FF", "#00FF0070")
gui.text(106, 50, "Status: "..statusS, "#000000FF", "#00000020")
end
emu.registerafter(Main)