Last active
January 4, 2018 02:57
-
-
Save dagit/a71145262e268ccf051a06d2c5a21a1e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function print_nmi() | |
-- 10: give it a few frames to warm up, why not? | |
if emu.framecount() == 10 then | |
-- TODO: use gui.text(0, 0, foo) instead of print(foo) | |
print("" .. (memory.readbyteunsigned(0xfffa) + memory.readbyteunsigned(0xfffb)*256)) | |
end | |
end | |
emu.registerbefore(print_nmi) | |
-- load it with: | |
-- fceux --loadlua print_nmi.lua rom.zip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment