I've noticed that visual boy advance has its own built in memory viewer, as shown in the picture below:
Where is this feature in SNES9x v1.43 or 1.51? I read a thread here that it's supposed to be built in, but I can't find the feature in the menus.
Also, is there a way to run algorithms when making a TAS? For example, "if memory address X has value Y then hold A for 13 frames". I really would like a way to eliminate excessive trial and error in TASing.
Joined: 4/20/2005
Posts: 2161
Location: Norrköping, Sweden
Yes, this is what lua-scripting is all about. You can make a lua script that does exactly that, plus a whole lot more. The latest SNES9X supports lua. There's some more information here.
That's one possibility. For a TAS this might be good for experimentation, but your final video can't have any of that.
I have a selection of small programs which demo what Lua can do. There's a Super Metroid script that draws a grey box around Samus' bounding box, blue on her projectiles, and red on everything else with HP displays and other useful data. There's one for Earthbound used to monitor the free sprite bank to prevent game crashes. Etc.
What interests you?
I'm TASing Fire Emblem 6 right now. A helpful lua script would be one where:
1. B is held
2. A diagonal input (eg/ up-left) is done on one frame
3. A different diagonal input (eg/ down-left) is done the next frame
4. Alternate 2 and 3 until reaching a particular memory address.
local MemoryAddress = 0x02000000 -- in hex
local Value = 37 -- in decimal
-- EDIT: Yeah what nitsuja said.
while memory.readbyte(MemoryAddress) ~= Value do --loop until MemoryAddress == Value
--note this will only check every other frame as written.
joypad.set(1,{["B"]=true,["up"]=true,["left"]=true})
--controller 1, hit B, up, left on this frame
vba.frameadvance() -- advance one frame with the current buttons held.
joypad.set(1,{["B"]=true,["down"]=true,["right"]=true})
--controller 1, hit B, down, right on this frame
vba.frameadvance()
end
vba.pause()
while true do
vba.frameadvance()
end
I get the impression that the above script is supposed to contain a call to memory.readbyte somewhere in it... Otherwise it is just comparing two constants endlessly.