main() function
This commit is contained in:
parent
8900835408
commit
8f3c1c65d8
2 changed files with 19 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -3,12 +3,20 @@ local function print(data)
|
|||
_p(data .. "")
|
||||
end
|
||||
|
||||
local baseDir = os.getenv("MESEN_REMOTE_BASEDIR")
|
||||
--local dereg = nil
|
||||
local function main()
|
||||
--emu.removeMemoryCallback(dereg, emu.memCallbackType.cpuExec, 0x0000, 0xffff)
|
||||
|
||||
local server = dofile(baseDir.."/server.lua")
|
||||
local baseDir = os.getenv("MESEN_REMOTE_BASEDIR")
|
||||
|
||||
local host = os.getenv("MESEN_REMOTE_HOST") or "localhost"
|
||||
local port = os.getenv("MESEN_REMOTE_PORT") or 9355
|
||||
local wait = os.getenv("MESEN_REMOTE_WAIT") == "1"
|
||||
local server = dofile(baseDir.."/server.lua")
|
||||
|
||||
server.start(host, port, wait)
|
||||
local host = os.getenv("MESEN_REMOTE_HOST") or "localhost"
|
||||
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)
|
Loading…
Add table
Reference in a new issue