Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- emu = snes9x
- local range = 9
- local txtposx = 6
- local txtposy = 9
- local randomcall = 0
- memory.registerexec(0x008a9f, 2, function()
- randomcall = randomcall + 1
- end)
- gui.register(function()
- -- P1
- local xh = memory.readwordsigned(0x700988) + memory.readword(0x700A7D)/256
- local yh = memory.readwordsigned(0x700A02) + memory.readword(0x700AF7)/256
- local xsh = memory.readwordsigned(0x7016BF)
- local ysh = memory.readwordsigned(0x700BEA)
- gui.text (90, 2, "(P1)")
- gui.text (90, 10, string.format ("X-Pos: %.03f", xh))
- gui.text (90, 18, string.format ("Y-Pos: %.03f", yh))
- gui.text (90, 28, string.format ("X-Speed: % 01d", xsh))
- gui.text (90, 36, string.format ("Y-Speed: % 01d", ysh))
- -- P2
- local helper = memory.readword(0x7014A1)
- if 1 <= helper then
- if helper <= 19 then
- local xh = memory.readwordsigned(0x70098A) + memory.readword(0x700A7F) / 256
- local yh = memory.readwordsigned(0x700A04) + memory.readword(0x700AF9) / 256
- local xsh = memory.readwordsigned(0x7016C1)
- local ysh = memory.readwordsigned(0x700BEC)
- gui.text (170, 2, "(P2)")
- gui.text (170, 10, string.format ("X-Pos: %.03f", xh))
- gui.text (170, 18, string.format ("Y-Pos: %.03f", yh))
- gui.text (170, 28, string.format ("X-Speed: % 01d", xsh))
- gui.text (170, 36, string.format ("Y-Speed: % 01d", ysh))
- end
- end
- -- RNG
- local random = memory.readbyte(0x003743)
- local random2 = memory.readbyte(0x003744)
- local helper = memory.readword(0x7014A1)
- if helper <= 19 and 1 <= helper then a = 50 else a = 10 end
- gui.text (170, a, string.format ("Vari. RN: %01d", randomcall))
- gui.text (170, a+8, string.format ("RANDOM 1: %01d", random))
- gui.text (170, a+16, string.format ("RANDOM 2: %01d", random2))
- end)
- while true do
- snes9x.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement