Shows basic x, y position and position changes.
dofile("textrender.lua");
lagged = 0;
totalframes = 0;
lastxpos = 0;
lastypos = 0;
lastfcnt = 0;
deltaxpos = 0;
deltaypos = 0;
lastcustom = 0;
deltacustom = 0;
while true do
a, b = jpcrr.wait_event();
if a == "lock" then
--xpos = jpcrr.read_byte(0x1D689)+jpcrr.read_byte(0x1D68D);
--ypos = jpcrr.read_byte(0x1D68B)+jpcrr.read_word(0x1D68F);
xpos = jpcrr.read_byte(0x1C999)+jpcrr.read_byte(0x1C99D);
ypos = jpcrr.read_byte(0x1C99B)+jpcrr.read_word(0x1C99F);
--custom = jpcrr.read_word(0x30CA6);
fcnt = jpcrr.frame_number();
jpcrr.hud.top_gap(3, 16);
text = string.format("Pos: (%3u,%3u)/(%+3d,%+3d)", xpos, ypos, deltaxpos, deltaypos);
render_text(3, 0, 0, text, false, 0, 255, 0);
if (xpos ~= lastxpos) or (ypos ~= lastypos) then
deltaxpos = xpos - lastxpos;
deltaypos = ypos - lastypos;
--deltacustom = custom - lastcustom;
lastxpos = xpos;
lastypos = ypos;
--lastcustom = custom;
lastfcnt = fcnt;
end
jpcrr.release_vga();
end
end