main() function

This commit is contained in:
Empathic Qubit 2021-11-05 04:19:12 +01:00
parent 8900835408
commit 8f3c1c65d8
2 changed files with 19 additions and 7 deletions

View file

@ -81,6 +81,10 @@ return function(server)
end
me.open = true
print("Monitor opened")
local pc = emu.getState().cpu.pc
print(string.format("PC: %04x", pc))
responseRegisterInfo(server.EVENT_ID)
responseStopped(server.EVENT_ID)
end

View file

@ -3,6 +3,10 @@ local function print(data)
_p(data .. "")
end
--local dereg = nil
local function main()
--emu.removeMemoryCallback(dereg, emu.memCallbackType.cpuExec, 0x0000, 0xffff)
local baseDir = os.getenv("MESEN_REMOTE_BASEDIR")
local server = dofile(baseDir.."/server.lua")
@ -12,3 +16,7 @@ local port = os.getenv("MESEN_REMOTE_PORT") or 9355
local wait = os.getenv("MESEN_REMOTE_WAIT") == "1"
server.start(host, port, wait)
end
main()
--dereg = emu.addMemoryCallback(main, emu.memCallbackType.cpuExec, 0x0000, 0xffff)