User File #638183669502074999

Upload All User Files

#638183669502074999 - MAME lua script that tells framerate and aspect ratio of a game

mame-framerate.lua
58 downloads
Uploaded 4/29/2023 12:09 PM by feos (see all 184)
for k,v in pairs(manager.machine.screens) do
	local numerator = 0x3ffffffc
	local denominator = emu.attotime(0, v.refresh_attoseconds):as_ticks(numerator)
	print("\"" .. k .. "\" framerate: " .. numerator .. " / " .. denominator)
end

local bounds = manager.machine.render.ui_target.current_view.bounds
print("aspect ratio: " .. bounds.x1-bounds.x0 .. " : " .. bounds.y1-bounds.y0)