This commit is contained in:
Tolik committed 2025-03-14 01:17:36 +10:00
1 parent d22e7b9aae
commit abe5437155
2 files changed
+41 -17

No files matched your search

+23 -1
View File
@@ -467,7 +467,6 @@ function get_build(fname)
end
return build
end
-- []===========================[]
@@ -475,5 +474,28 @@ end
function make_string_version(ver_, mod_, build_)
return (tostring(ver_) .. "." .. tostring(mod_) .. "." .. tostring(build_))
end
-- []===========================[]
-- []===========================[]
--for MAME lua console
function dump_vram(fname,from_m,to_m,step_m)
local fvram = io.open("./" .. fname, "w+b")
local vram_d = {}
if from_m == nil then from_m = 0 end
if from_m == "tbl" then from_m = 768 to_m = 927 step_m = 256 end
if from_m == "fnt" then from_m = 704 to_m = 767 step_m = 256 end
if to_m == nil then to_m = 262143 end
if step_m == nil then step_m = 1 end
local mem_d = -1024 + to_m
for step_i = 1, step_m, 1 do
mem_d = mem_d + from_m + 1024 - to_m
for mem_i = from_m, to_m, 1 do
fvram:write(string.char(manager.machine.memory.shares[':vram']:read_u8(mem_d)))
mem_d = mem_d + 1
end
mem_d = mem_d - 1
end
fvram:flush()
fvram:close()
end
-- []===========================[]