First of all, here are my RAM addresses:
0032 X|pixel
7093 X|subpixel
0033 X|big
154 Room
0034 Y|pixel
7093 Y|subpixel
0035 Y|big
003B Height
c5 en|x
cd en|y
333 force|field|hp
331 Boss|HP
23 Frame|rule
x1F Input|RNG
c3 En1|X
cf En1|Y
42 Throw1
43 Throw2
00C5 Boss|X
00CB Boss|Y
33D After|shot|move
x3B7 Boss|stop|80
47d extra|shot
It turned out I have several lua scripts for this game.
Here's one that displays your X and Y position with all decimals:
Language: lua
while true do
local function displayer()
xbig=memory.readbyte(0x033)
xpix=memory.readbyte(0x032)
ybig=memory.readbyte(0x035)
ypix=memory.readbyte(0x034)
xpos=256*xbig+xpix
ypos=256*ybig+ypix
x1=(xpos-8)/16
y1=(ypos-8)/16
gui.text(10,10,"X pos: " .. x1)
gui.text(10,18,"Y pos: " .. y1)
end
gui.register(displayer)
FCEU.frameadvance()
end
This handy script will tell you on what frame you reach a new room (very convenient as you won't have to check it yourself when comparing strategies):
Language: lua
room1=memory.readbyte(0x154)
while true do
room=memory.readbyte(0x154)
mf=movie.framecount()
if room~=room1 then gui.text(10,10,mf) end
room1=room
FCEU.frameadvance()
end
Here's a text bot that presses A during text sequences. I seem to remember it worked perfectly, but you might want to double check. Just run the script during a text sequence and it will take care of the rest.
Language: lua
while true do
key1={}
text=memory.readbyte(0x531)
textx=memory.readbyte(0x506)
c=7
if textx>36 then key1.A=1 end
joypad.set(1,key1)
FCEU.frameadvance()
end
In this game, randomness (in particular enemy movement and behaviour) is affected by your input. I also have a script that brute forces a random event until you get a desirable outcome, but that code looks a bit messy. Let me know if you come across a situation where you think you need this.
Phew, I think that's it. I sure have a lot of lua scripts.