-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame_6_load_test.LUA
More file actions
28 lines (20 loc) · 867 Bytes
/
Copy pathgame_6_load_test.LUA
File metadata and controls
28 lines (20 loc) · 867 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
boardNum = 0
function printInfo()
tempVar1 = emu.read(0x0047, 'memType.cpuDebug', false)
tempVar2 = emu.read(0x0048, 'memType.cpuDebug', false)
emu.drawString(12, 12, "tempVar1: " .. tempVar1, 0xFFFFFF, 0xFF000000, 1)
emu.drawString(12, 21, "tempVar2: " .. tempVar2, 0xFFFFFF, 0xFF000000, 1)
emu.drawString(12, 30, "Total: " .. tempVar1+tempVar2, 0xFFFFFF, 0xFF000000, 1)
end
function setRamBP()
emu.write(0x00F2, boardNum, 'memType.cpu')
boardNum= boardNum+1
end
function breakCode()
emu.breakExecution()
end
--Register some code (printInfo function) that will be run at the end of each frame
emu.addMemoryCallback(printInfo, emu.memCallbackType.cpuWrite, 0x00F0, 0x00F0)
emu.addMemoryCallback(breakCode, emu.memCallbackType.cpuWrite, 0x0200, 0x0240)
--Display a startup message
emu.displayMessage("Script", "Game 6 Load Test Loaded.")