使用MAME的Lua引擎修改内存数据
简要记录之。
执行生产mame.ini
mame64.exe -createconfig
修改参数,对应到自己的目录下的启动脚本文件
autoboot_script bootoot.lua
boot.lua的内容
require("lfs")
local function test_boot_script(path)
print(path .. " tested ...")
local file = io.open(path, "rb")
if file then file:close() end
return file ~= nil
end
local rom_script_file = lfs.currentdir() .. "\boot\" .. emu.romname() .. ".lua"
if test_boot_script(rom_script_file) then
print(rom_script_file .. " loaded ...")
dofile(rom_script_file)
end
ROM对应的Lua脚本中写操作代码,这样不存在个性化启动脚本的被自动忽略,设置有脚本的执行期望的代码,满分!
声明:该文观点仅代表作者本人,牛骨文系教育信息发布平台,牛骨文仅提供信息存储空间服务。
- 上一篇: Python3字符串各种内置函数详解
- 下一篇: 所有的性能调优
