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
|
end
|
||||||
me.open = true
|
me.open = true
|
||||||
print("Monitor opened")
|
print("Monitor opened")
|
||||||
|
|
||||||
|
local pc = emu.getState().cpu.pc
|
||||||
|
print(string.format("PC: %04x", pc))
|
||||||
|
|
||||||
responseRegisterInfo(server.EVENT_ID)
|
responseRegisterInfo(server.EVENT_ID)
|
||||||
responseStopped(server.EVENT_ID)
|
responseStopped(server.EVENT_ID)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,14 +1,22 @@
|
||||||
local _p = print
|
local _p = print
|
||||||
local function print(data)
|
local function print(data)
|
||||||
_p(data .. "")
|
_p(data .. "")
|
||||||
end
|
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 server = dofile(baseDir.."/server.lua")
|
||||||
local port = os.getenv("MESEN_REMOTE_PORT") or 9355
|
|
||||||
local wait = os.getenv("MESEN_REMOTE_WAIT") == "1"
|
|
||||||
|
|
||||||
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