Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function round(num, idp)
- local mult = 10^(idp or 0)
- return math.floor(num * mult + 0.5) / mult
- end
- function text(x, y, text, color, backcolor)
- if backcolor==nil then backcolor=0x00000000 end
- gui.drawText(x, y, text,color,backcolor,8,"SF Intermosaic B")
- end
- while true do
- framecount = emu.framecount()
- calculated_lag = (framecount / 3)- ((framecount-100) % (emu.lagcount()+100))
- gui.drawBox(52,18,156,34,0x80106060,0x80106060)
- gui.drawBox(130,36,156,43,0x80106060,0x80106060)
- text(54,17, "Emu " ..emu.lagcount())
- text(54,24, "Calc " ..round(calculated_lag,1))
- text(120,18,"x " .. memory.read_u8(0xc126)+memory.read_u8(0xc127)*256)
- text(120,25,"y " .. memory.read_u8(0xc12a)+memory.read_u8(0xc12b)*256)
- text(144,34, memory.read_u8(0xc142) %128 )
- --text(144,34, memory.read_u8(0xc170) %128 )
- --wind pixels:
- --[[
- camcounter= memory.read_u8(0xC0BE)
- ycam = memory.read_u8(0xc0A4)
- xcam = memory.read_u8(0xc0A5) + 256*camcounter
- startAddress=0xc14f
- text(100,50, "xcam ".. xcam,0xFFFFFFFF,0x80000000)
- text(100,58, "ycam ".. ycam,0xFFFFFFFF,0x80000000)
- for i=0,9,1 do
- increase=49
- xpos=memory.read_u16_le((startAddress)+increase*i)
- ypos=memory.read_u16_le(startAddress+4+increase*i)
- posx=xpos-xcam
- posy=ypos-ycam
- gui.drawBox(posx,posy,posx+2,posy+2,0xFFFF0000)
- end
- --]]
- emu.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement