Post subject: Enable write to SNES:CARTROM
Oziphantom
He/Him
Joined: 7/21/2019
Posts: 11
I'm using the Lua features for some dev, only CARTROM is "read only" so I can't modify anything.. I tried both BSnes and SNES9x cores. Is there an option or config setting that unlocks CARTROM to be writable?
Oziphantom
He/Him
Joined: 7/21/2019
Posts: 11
the code has this in it
var md = new MemoryDomainIntPtrMonitor(name, MemoryDomain.Endian.Little, (IntPtr)blockPtr, size,
				id != LibsnesApi.SNES_MEMORY.CARTRIDGE_ROM, // hack: for just this one memory area, it will be readonly
				byteSize, Api);
anybody know why?
Editor, Emulator Coder, Site Developer
Joined: 5/11/2011
Posts: 1108
Location: Murka
If you enable writing there, you'll crash the emulator
Pokota
He/Him
Joined: 2/5/2014
Posts: 779
Practical answer: CARTROM is the file-on-disk. If you want to modify that, open it up in a hex editor rather than in BizHawk.
Adventures in Lua When did I get a vest?
Oziphantom
He/Him
Joined: 7/21/2019
Posts: 11
Does Bizhawk have an option to auto reload the ROM upon its modification, or is there a "live reload ROM" command?
Pokota
He/Him
Joined: 2/5/2014
Posts: 779
There is no Live Reload, you'll just have to load it every time (and because of Windows, you have to unload the rom every time as well). My question is, what game are you hacking and why?
Adventures in Lua When did I get a vest?
Oziphantom
He/Him
Joined: 7/21/2019
Posts: 11
I'm not hacking, I'm developing. But I have some effects. So tweak numbers assemble load wait nope that was not quite right assemble load wait nope that was not quite right vs LUA gui the lets me modify the values in real time tweak nope tweak nope tweak I can also just give the lua file to the artist so they can tweak the values to their liking. they can't handle modifying an asm file and assembling. a like GUI really really speeds things up. Then I just make a button that exports the values in a text file for me to include. the SNES is so frustrating, everything is 5 thou out. I basically need to use 2 emulators, so I can get a debugger in one to find the memory locations because the assembler doesn't output a proper label file, or a listing file. Then I need to use bizhawk so I can get LUA with a GUI. and now I have to make my code copy stuff to RAM, and run from RAM. Then make a GUI that modifies the RAM, then convert the code back to use ROM which is a real pain. Why because the emulator can't modify a memory location...sigh...