News:

11 March 2016 - Forum Rules

Main Menu

Snes9x Lua read ROM data?

Started by Garland, March 18, 2020, 09:07:09 PM

Previous topic - Next topic

Garland

Is it possible to read ROM data using Lua in Snes9x, or only RAM? Simple things like rom filename, or game name from within the ROM itself.

tvtoon

Do you want LUA bindings to read these values from Snes9x? I think they have been submitting them to the main repository, it is not hard to get them.

Garland

Game name was found with:


local game = ""
for i=0, 22, 1
do
    m = memory.readbyte(0xFFC0 + i)
    game = game .. string.char(m)
end