Created
September 21, 2018 09:47
-
-
Save pocokhc/354aacd6070392a5ebf85d59c316fd2e 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
--[[ | |
TaoTao氏作成の | |
--- | |
ドクターマリオ (FC) 処理量表示luaスクリプト (FCEUX用) | |
https://gist.github.com/taotao54321/90de4d48324c7a9e00dedbbb5e4237cd | |
--- | |
をBizHawk版にしたものです。 | |
NES core を "NesCore"にしないと動きません。 | |
(QuickNes is not support) | |
--]] | |
local cycle_start = nil | |
local cycle_end = nil | |
event.onmemoryexecute(function() | |
cycle_start = emu.totalexecutedcycles() | |
end,0xB65B) | |
event.onmemoryexecute(function() | |
cycle_end = emu.totalexecutedcycles() | |
end,0xB65E) | |
local function main() | |
cycle_start = nil | |
cycle_end = nil | |
emu.frameadvance() | |
if cycle_start ~= nil and cycle_end ~= nil then | |
local duration = cycle_end - cycle_start | |
gui.text(8, 8, string.format("Sound: %d", duration)) | |
end | |
end | |
while true do | |
main() | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment