mirror of
https://github.com/notwa/mm
synced 2024-05-18 05:23:22 -07:00
print to file
This commit is contained in:
parent
2d9ca2fae6
commit
bc6037092e
1
Lua/.gitignore
vendored
1
Lua/.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
*.State
|
*.State
|
||||||
|
oot debug.txt
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
-- use with inject.lua on O EUDB MQ
|
||||||
require = require "depend"
|
require = require "depend"
|
||||||
require "boilerplate"
|
require "boilerplate"
|
||||||
|
|
||||||
|
@ -5,27 +6,29 @@ local buffer = 0x700070
|
||||||
|
|
||||||
local vfc = A(0x168960, 4)
|
local vfc = A(0x168960, 4)
|
||||||
|
|
||||||
while true do
|
-- $ tail -f oot\ debug.txt | iconv -f euc-jp
|
||||||
|
local f = io.open('oot debug.txt', 'w+b')
|
||||||
|
|
||||||
|
while version == "O EUDB MQ" do
|
||||||
local pos = buffer
|
local pos = buffer
|
||||||
local str = ''
|
local str = ''
|
||||||
|
local fmt = '%c'
|
||||||
while true do
|
while true do
|
||||||
local b = R1(pos)
|
local b = R1(pos)
|
||||||
pos = pos + 1
|
pos = pos + 1
|
||||||
if b == 0 then
|
if b == 0 then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
if b < 0x80 then
|
str = str..string.char(b)
|
||||||
str = str..string.char(b)
|
|
||||||
else
|
|
||||||
str = str..'?'
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
print(str)
|
f:write(str)
|
||||||
|
f:flush()
|
||||||
local old = vfc()
|
local old = vfc()
|
||||||
for i=1,30 do
|
for i=1,30 do
|
||||||
emu.frameadvance()
|
emu.frameadvance()
|
||||||
local new = vfc()
|
local new = vfc()
|
||||||
if new ~= old then break end
|
if new ~= old then break end
|
||||||
end
|
end
|
||||||
console.clear() -- delete this if you want
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
f:close()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user