User File #45915235912113848

Upload All User Files

#45915235912113848 - JPC-rr Memory Poker

JPCPoker.lua
System: DOS
746 downloads
Uploaded 3/21/2018 6:55 PM by slamo (see all 61)
Simple memory writer for JPC-rr. Has one console command:
write x y
Where x is the address to be changed (byte) and y is the value you want to change it to. Can be easily modified to write words by changing "write_byte" to "write_word".
while true do
	a, b = jpcrr.wait_event();
	if a =="lock" then
		jpcrr.release_vga();
	elseif a == "message" then
		c,d,e = string.match(b, "(.*) (.*) (.*)");
		if c == "write" then
			if string.match(d, "-?[0-9]+") and string.match(e, "-?[0-9]+") then
				print("Changed "..tonumber(d).." to "..tonumber(e));
				jpcrr.write_byte(tonumber(d), tonumber(e))
			end
		end
	end
end