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