From 9e39cf0f4cb4b167eea39da8f39bc3f664366b56 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Tue, 27 Sep 2016 12:20:56 -0700 Subject: [PATCH] update lua text monitor for previous commit --- Lua/monitor debug text.lua | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/Lua/monitor debug text.lua b/Lua/monitor debug text.lua index 94164c0..0879360 100644 --- a/Lua/monitor debug text.lua +++ b/Lua/monitor debug text.lua @@ -1,14 +1,17 @@ -- use with inject.lua on O EUDB MQ require "lib.setup" require "boilerplate" +require "addrs.init" -local buffer = 0x700180 +local buffer = 0x700700 local vfc = A(0x168960, 4) -- $ tail -f oot\ debug.txt | iconv -f euc-jp local f = io.open('oot debug.txt', 'w+b') +local ignore_vframes = true + while version == "O EUDB MQ" do local pos = buffer local str = '' @@ -23,11 +26,21 @@ while version == "O EUDB MQ" do end f:write(str) f:flush() - local old = vfc() - for i=1,30 do + if ignore_vframes then + if R4(0x7006FC) == 0 then + W4(0x7006F8, 0x80700700) + W1(0x700700, 0) + else + print('buffer in use') + end emu.frameadvance() - local new = vfc() - if new ~= old then break end + else + local old = vfc() + for i=1,30 do + emu.frameadvance() + local new = vfc() + if new ~= old then break end + end end end