Post subject: SNES memory viewer and other questions
Player (98)
Joined: 3/20/2008
Posts: 466
Location: Montreal, Quebec, Canada
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.
Post subject: Re: SNES memory viewer and other questions
Skilled player (1887)
Joined: 4/20/2005
Posts: 2160
Location: Norrköping, Sweden
Vykan12 wrote:
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.
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.
Editor, Skilled player (1942)
Joined: 6/15/2005
Posts: 3247
Snes9x v1.43 and v1.51 will soon have an even better RAM Watch. You can try out one of the svn builds.
P.JBoy
Any
Editor
Joined: 3/25/2006
Posts: 850
Location: stuck in Pandora's box HELLPP!!!
If you're not a big fan of SVNs though, it's only Cheat - RAM Search
Player (98)
Joined: 3/20/2008
Posts: 466
Location: Montreal, Quebec, Canada
Yes, this is what lua-scripting is all about.
I figured as much, but I got confused when I read this: What scripts actually do is modify RAM values.
Emulator Coder, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
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?
Player (98)
Joined: 3/20/2008
Posts: 466
Location: Montreal, Quebec, Canada
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.
Player (208)
Joined: 7/7/2006
Posts: 798
Location: US
Vykan12 wrote:
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
Save as " Something.lua "
Emulator Coder, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
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.