User File #639071854331889176

Upload All User Files

#639071854331889176 - Tonma Arcade Lag Searcher

ManualSetLag.lua
131 downloads
Uploaded 2/20/2026 11:57 AM by Bloopiero (see all 5)
Short script that I wrote to find lag frames in Tonma Arcade. Needs to be manually stopped and started once in a while, for mysterious reasons.
memory.usememorydomain("v30 : ram : 0xA0000-0xA3FFF")

local function main()
	event.onframestart(function()
		lag1 = memory.readbyte(0x23E0)
	end)

	event.onframeend(function()
		lag2 = memory.readbyte(0x23E0)
	end)

	if lag1 == lag2 then
		emu.setislagged()
		tastudio.setlag(emu.framecount(), true)
		emu.setlagcount(emu.lagcount()+1)
	end
end

while true do
	main();
	emu.frameadvance()
end