Posts for Adetque

Experienced Forum User
Joined: 11/1/2009
Posts: 10
I've been looking for this for hours but haven't been able to find anything, even by reading through the RAM Map on SMWCentral. What are the hex offsets for the X Pixel, Y Pixel, X Subpixel, and Y Subpixel for the sprite Mario is carrying? Thanks in advance.
Experienced Forum User
Joined: 11/1/2009
Posts: 10
Tompa wrote:
At the start of the first level in Super Demo World, you are 14 frames slower in version 1.51. 1.43 doesn't emulate the speed correctly in all cases, that has (as far as I know) been fixed with 1.51.
Thanks. I'll use 1.43 then. EDIT: Never mind I fail at frame perfecting stuff.
Experienced Forum User
Joined: 11/1/2009
Posts: 10
I'm trying to do a Super Demo World any% TAS, but for some reason I'm a few frames slower than the current TAS before the first level even starts. I'm using Snes9x 1.51+v6. Is there any difference between Snes9x 1.51 and 1.43 that I should know of? I heard 1.43 has less lag than 1.51, but I'm not sure about that.
Experienced Forum User
Joined: 11/1/2009
Posts: 10
Dromiceius wrote:
Edit: better yet, replace savestate.load with this:
gui.text(8,8, xvel .. " " .. yvel)
And frame-advance through the execution about where you expect the walljump is supposed to happen.
Thanks for that. Turns out I'm taking the wrong approach since I'm never able to cling the wall. So yeah, this problem is pretty much solved.
Experienced Forum User
Joined: 11/1/2009
Posts: 10
marzojr wrote:
Try putting a return after this line:
         snes9x.pause() --pause emulator
I didn't see how that would help, but I tried anyway, and it didn't do anything. Also, could it be that I'm taking a completely wrong approach to this?
Post subject: Either I'm extremely unlucky, or I'm bad with Lua scripts
Experienced Forum User
Joined: 11/1/2009
Posts: 10
I was trying to make a SMW wall jump bruteforcer Lua script, and I wrote this script:
local sav
sav = savestate.create()
savestate.save(sav)
local groundflag
groundflag = memory.readbyte(0x0077) --0x0077 checks if on ground
local xvel --0x007B
xvel = memory.readbyte(0x007B)
local yvel --0x007D
yvel = memory.readbyte(0x007D)
local input
while (yvel~=6 or yvel~=3) and groundflag<=2 do --if not on ground
	ran=math.random(2) --pick either 1 or 2
	if(ran~=1) then --if it's 1
		input = {B=true} --press B that frame
	else --if not
		input = {} --don't press B
	end
	joypad.set(1, input)
	groundflag = memory.readbyte(0x0077) --reread variables each frame
	xvel = memory.readbyte(0x007B)
	yvel = memory.readbyte(0x007D)
	if(xvel==0) then --if hit wall
		if yvel~=6 or yvel~=3 then --if not cling wall
			savestate.load(sav) --load state
		else --if cling wall
			snes9x.pause() --pause emulator
		end
	end
	snes9x.frameadvance() --advance 1 frame and go to beginning of loop
end
However, when I run the script it never pauses the emulator, which means I never managed to cling the wall. Am I doing something wrong here? I'm using Snes9x1.51v6
Experienced Forum User
Joined: 11/1/2009
Posts: 10
How would I re-swap the joypad again? I try to swap it in the middle of playing the movie and it doesn't work, and if a swap it before playing the movie it doesn't do anything.
Experienced Forum User
Joined: 11/1/2009
Posts: 10
I reinstalled it in a different folder and then Snes9x doesn't recognize any input at all.
Experienced Forum User
Joined: 11/1/2009
Posts: 10
No that's not what's going on. When I play it back, the entire TAS is in player 2 input when it's supposed to be in player 1 input.
Experienced Forum User
Joined: 11/1/2009
Posts: 10
I was TASing a romhack of SMW when the game switched my character to player 2. I never set my movie to be able to record player 2 actions, but I tried switching to player 2 anyway. And then somehow I glitched out the replay to make Snes9x think the entire replay is player 2 input and not player 1 input. How can I hex edit this out? Please help. Here's the video: http://dehacked.2y.net/microstorage.php/info/677323728/Total%20Kaizo.smv