Posts for MUGG


Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
Alyosha wrote:
Nice work! one long unexplained bug figured out!
I wouldn't say that. It's still a very rare bug, I haven't been able to do it without lua yet. $FFE9 does normally update even during lagframes. Only in 0.1% of cases, it doesn't and we need to figure out why.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
I reproduced scroll glitch by using lua, to freeze enemies on the screen to create lag. Due to the lag, the scroll glitch happens (at a rare chance). The game skips a vertical row. This is what it looks like normally: But due to the glitch it is like this (notice the tree is gone): As a side-effect, the game still scrolls as far as it normally would, thus wrapping around the level. The bug happens because $FFE9 doesn't update after a lagframe occured. So in the end, it's a very interesting glitch but probably not so useful for TAS purposes. However, I secretly hope lagframes could lead to other more severe tricks.
Language: Lua

memory.usememorydomain("System Bus") local tbl={} while true do --freeze mario at the sky memory.write_u8(0xE201,0) --freeze enemies on the screen if emu.framecount()%3==0 then for i=1,10,1 do val= memory.read_u8(0xD100+16*i-16) if val ~= 255 and val~=0x0A and val~=0x0B and val~=0x49 then if tbl[i]==nil then tbl[i]=true end end end elseif emu.framecount()%3==1 then count=0 for p=1,table.getn(tbl),1 do if tbl[p]==true then memory.write_u8(0xD100+16*p-16+3,40) -- x memory.write_u8(0xD100+16*p-16+2,20+p*12) -- y end count=count+1 if count>5 then break end end tbl={} end emu.frameadvance() end
I will try to record a movie file without lua/cheat.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
(Combined WRAM) $02065A = Current Room Edit, die and continue to go to a new room.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
I investigated for hidden lifts / blocks / ground tiles today. Here are the results: https://i.imgur.com/jqRb4jr.png
  • The game uses map patterns and reserves certain tiles for hidden content.
  • Certain "reserved" tiles are unused, in 3-3. --> put this on TCRF
  • In the two autoscrollers there is a wall of hidden blocks at the boss, respectively. --> put this on TCRF
  • Whoever made the map for VGMaps didn't know about certain blocks... (This is also the case for some of the Mario & Luigi Superstar Saga maps at VGMaps.)
  • There are no more invisible ground tiles aside from those in the middle of 2-2. And there is no lift in 4-2, so
    urawaza.in wrote:
    ◇リフト2  4-2の真中らへんにもリフトがある
    this is wrong.
Find hidden blocks or ground:
Language: Lua

foundit=false hiddentile = 0x5F -- invisible block that reveals a lift/1up/powerup invistile = 0x62 -- invisible ground in 2-2 address="script started" while true do if emu.framecount()%90==0 then address="" foundit=false for i=0x9800,0x9AFF,0x01 do if memory.read_u8(i) == hiddentile then foundit=true address=address .. "\n$"..string.format("%x",i) end end if not foundit then address="tile not found" end end gui.text(50,50,address, 0xFFFFF070) emu.frameadvance() end
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
I tried the latest interim (commit ffbb1f339). - The GB menu lacks the core picker (Unlike the GBA menu) - GBHawk and Gambatte use separate gamepad config (Unlike the two GBA cores that share their config). - Can GBHawk not run GBC games?
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
Looks like you're doing some pretty good work. I read that your core will even surpass Gambatte in terms of accuracy! So I will look forward to testing a few certain bugs once it's ready. Maybe I will be motivated to do some SML1/2 TASing, too.
Post subject: Re: re: icon
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
DoubleATam wrote:
I'm a complete amateur, but would this be more along the lines of what you're hoping for?
I actually think this is pretty nice!
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
In Bizhawk 2.2 (mGBA 0.6.0), when going into sleep mode in GBA Yoshi Topsy-Turvy (U), it cancels out immediately.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
Silver and gold medal minimum requirements
	level 0		1-1
	silver: 3 apples 
	gold: 7 apples
	(max: 7 apples)
	
	level 1		1-2
	silver: 3 apples
	gold: 9 apples
	(max: 9 apples)
	
	level 2		1-3
	silver: 3 apples
	gold: 9 apples
	(max: 9 apples)

	level 3		2-1
	silver: 60 coins
	gold:	70 coins
	(max:	73 coins)
	
	level 4		2-2
	silver:	3 apples
	gold:	5 apples
	(max:	5 apples)
	
	level 5		2-3
	silver: 65 coins
	gold:	85 coins
	(max:	88 coins)
	
	level 6		2-4
	silver:	50 coins
	gold:	80 coins
	(max:	82 coins)
	
	level 7		2-5
	silver:	5 apples
	gold:	8 apples
	(max:	8 apples)

	level 8		2-6
	silver: 70 coins
	gold:	90 coins
	(max:	93 coins)

	level 9		3-1
	silver:	8 shyguys
	gold:	10 shyguys
	(max:	11 shyguys)
	
	level 10	3-2
	silver:	40 coins
	gold:	55 coins
	(max:	59 coins)
	
	level 11	3-3
	silver:	8 rockies
	gold:	10 rockies
	(max:	11 rockies)
	
	level 12	3-4
	silver:	40 coins
	gold:	50 coins
	(max:	56 coins)
	
	level 13	3-5
	silver:	15 ducks
	gold:	20 ducks
	(max:	20 ducks)
	
	level 14	3-6
	silver: 65 coins
	gold:	85 coins
	(max:	89 coins)
	
	level 15	3-7
	silver:	6 apples
	gold:	9 apples
	(max:	9 apples)
	
	level 16	3-8
	silver:	45 coins + 8 piranha
	gold:	65 coins + 12 piranha
	(max:	67 coins + 12 piranha)
	
	level 17	4-1
	silver:	1 seconds
	gold:	15 seconds
	
	level 18	4-2
	silver:	40 coins
	gold:	45 coins
	(max:	49 coins)
	
	level 19	4-3
	silver:	1 seconds
	gold:	20 seconds
	
	level 20	4-4
	silver:	15 ducks
	gold:	22 ducks
	(max:	25 ducks)
	
	level 21	4-5
	silver:	1 seconds
	gold:	20 seconds
	
	level 22	4-6
	silver:	60 coins + 7 apples
	gold:	80 coins + 10 apples
	(max:	83 coins + 10 apples)
	
	level 23	4-7
	silver:	12 piranhas
	gold:	14 piranhas
	(max:	14 piranhas)
	
	level 24	4-8
	silver:	1 seconds
	gold:	25 seconds
	
	level 25	4-9
	silver:	75 coins
	gold:	86 coins
	(max:	91 coins)

	level 26	4-10
	silver:	1 seconds + 60 coins
	gold:	20 seconds + 75 coins
	(max:	77 coins)

	level 27	boss
	
	level 28	5-1
	silver:	1 alive
	gold:	4 alive
	
	level 29	5-2
	silver: 1 seconds + 80 coins
	gold:	40 seconds + 90 coins
	(max: 95 coins)
	
	level 30	5-3
	silver:	25 ghosts
	gold:	32 ghosts
	(max:	34 ghosts)
	
	level 31	5-4
	silver:	70 coins
	gold:	85 coins
	(max:	92 coins)
	
	level 32	5-5
	silver:	1 alive
	gold:	4 alive
	
	level 33	5-6
	silver:	1 seconds + 10 ducks
	gold:	10 seconds + 17 ducks
	(max:	18 ducks)

	level 34	5-7
	silver:	1 seconds + 70 coins
	gold:	25 seconds + 80 coins
	(max:	83 coins)
	
	level 35	5-8
	silver:	50 coins + 8 ducks
	gold:	65 coins + 10 ducks
	(max:	68 coins + 12 ducks)

	level 36	5-9
	silver:	65 coins + 1 alive
	gold:	85 coins + 4 alive
	(max:	88 coins)
	
	level 37	5-10
	silver:	1 seconds + 8 apples
	gold:	15 seconds + 10 apples
	(max:	10 apples)
	
	level 38	5-11
	silver:	40 coins + 1 alive
	gold:	45 coins + 4 alive
	(max:	50 coins)
	
	level 39	6-1
	silver: 60 coins + autoscroller
	gold:	87 coins + autoscroller
	(max:	90 coins
	
	level 40	6-2
	silver:	30 coins + 1 alive
	gold:	40 coins + 4 alive
	(max:	45 coins)
	
	level 41	6-3
	silver:	7 apples + autoscroller
	gold:	11 apples
	(max:	11 apples)
	
	level 42	6-4
	silver:	50 coins
	gold:	70 coins
	(max:	74 coins)
	
	level 43	6-5
	silver:	1 seconds + 20 ducks
	gold:	20 seconds + 25 ducks
	(max:	25 ducks)
	
	level 44	6-6
	silver:	60 coins + autoscroller
	gold:	90 coins + autoscroller
	(max:	92 coins)
	
	level 45	6-7
	silver: 50 coins + 10 apples
	gold:	65 coins + 12 apples
	(max:	70 coins + 12 apples)
	
	level 46	6-8
	silver:	75 coins
	gold:	85 coins
	(max:	88 coins)
	
	level 47	6-9
	silver: 1 second + 7 apples
	gold:	25 seconds + 10 apples
	(max: 	10 apples)
	
	level 48	6-10
	silver:	80 coins + autoscroller
	gold	95 coins + autoscroller
	(max:	99 coins)
	
	level 49	6-11
	silver:	55 coins + 1 alive
	gold:	75 coins + 4 alive
	(max:	76 coins)
	
	level 50	6-12
	silver:	12 ducks + autoscroller
	gold:	20 ducks + autoscroller
	(max:	20 ducks)
	
	level 51	finalboss
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
Note: I fixed the problem I'm describing here, see the edit below. I'm using lua to press keys on the keyboard, in order to tilt GBA Yoshi Topsy-Turvy. The tilt is delayed one frame which is fine, except when I want to load a state... For example, I want to keep tilting right: frame 1: tiltRight frame 2: tiltRight frame 3: tiltRight -- I save a state here frame 4: whatever I load the state and do frame 4: tiltRight but at this point, it behaves as if I didn't tiltRight on frame 3. A way to work around this is to hold the tiltRight key and load the state. But it's very unintuitive and would leads to mistakes if I had to remember this every time I need to loadstate. I was wondering if it's possible to fix this, maybe by using userdata functions (to save the info that I did tiltRight on frame 3, so after loadstating, it does the tiltRight automatically). I'm not familiar with those functions, so I would appreciate your help. My current script that has the behavior as explained above is here line 523 in the pastebin. Edit: I found a solution. Userdata wasn't of any help because the code is always executed at the end of a frame. So I put the tilt function like this:
Language: Lua

event.onframestart(function() if Displays[4][2] then -- "tilt" is active doTilt() end end)
and it behaves perfectly now!
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
It doesn't matter where Yoshi is standing. The line gets drawn depending on the angle the game is tilted. In both screenshots above, the angle is 0. Please note I'm not very good with math things. I achieve much of what I want through trial and error.
Language: Lua

-- draw line from yoshi to this destination (*80 factor is how far the line goes) des1 = math.sin(AngleDegree*RPD)*-80 des2 = math.cos(-AngleDegree*RPD)*80 des3 = math.sin((AngleDegree+90)*RPD)*-80 des4 = math.cos(-(AngleDegree+90)*RPD)*80 gui.drawLine(Xscreen,Yscreen,Xscreen+des1,Yscreen+des2,0xFFFFFFFF) -- below yoshi gui.drawLine(Xscreen,Yscreen,Xscreen-des1,Yscreen-des2,0xFFFFFFFF) -- above yoshi gui.drawLine(Xscreen,Yscreen,Xscreen+des3,Yscreen+des4,0xFFFFFFFF) -- left of yoshi gui.drawLine(Xscreen,Yscreen,Xscreen-des3,Yscreen-des4+1,0xFFFFFFFF) -- right of yoshi (this is the line that looks off, but by adding +1 it looks as before)
I added +1 and it looks like before. This is good enough for my purposes.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
converted the lua to Bizhawk https://pastebin.com/4j9b1C0C v0.1 https://pastebin.com/VujaUZ7s v0.2 (tilting is not delayed 1 frame anymore) Same as before, except it now finds and updates the dynamic addresses (xspeed, yspeed, angle) automatically. Timer and objectives are removed. You can edit your position/speed/current level number. Press E on the keyboard to tilt left, R to tilt right. EDIT: I wonder if game can glitch if there are too many musical notes... https://www.youtube.com/watch?v=uaml44qUmZU
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
I'm in the middle of converting and re-writing my Yoshi Topsy-Turvy script, from VBA to Bizhawk. I stumbled on a problem, where I want to draw an axis on top of Yoshi, depending on the current angle the game is tilted in. But after I finished the re-write it looks different. The x-axis looks off by a small margin. I noticed using this gives a different result in both emulators:
Language: Lua

angle = 0 -- as read from memory when not tilting AngleDegree = angle * 1.40625 -- converting from 0-255 to 0°-360° RPD = 0.0174532925 -- radians per degree print(math.cos(-(AngleDegree+90)*RPD))
VBA prints: 1.79489673697e-009 Bizhawk prints: 1.79489673696339E-09 Is this a bug?
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
I feel like it will require someone more proficient (Masterjun LordTom etc.) to look into the memory and find out where the ACE is hidden in this one. It's basicly going to be a repeat of SMB3 and Zelda 1. Question: How is this done? I would like to try this in other places. https://www.youtube.com/watch?v=3UpXJDN8CCs
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
What even is Equestria Girls: Magical Movie Night and the digital series? I guess this is what happens when I stay away from Equestria Daily too long.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
Hello Foulco, I managed to do it :-O http://dehacked.2y.net/microstorage.php/info/1970539497/StarTropics.bk2 It would be good to break down and understand the glitch. So if you can record an input file of the credit warp or the debug menu, I would be grateful. I'm sure other users will be happy to investigate, too. Maybe the bug can be done at the Snake boss, too. You can upload your input file here: http://dehacked.2y.net/microstorage.php
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
whaaaaaat Well this is interesting. I will play around with this tomorrow. Maybe will run it too, since up until the Kraken was as far as I managed in the past.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
There is a small graphical glitch I encountered while TASing on Bizhawk-Gambatte (ver 2.2). I load a state A (this is the starting point). I advance to a certain frame*. I load state A again. The next frame, it shows the glitched sprites. The frame after that, it is normal again. If I advance to a different frame, and then load state A, it doesn't happen. I think other effects that I saw was that my character and enemies turned invisible. I'm noticing this problem especially in the current level I'm in (The Smurfs GB, level 11 "The Cliff"). I turned off the luascript and it still happens. No memory freezing or lua memory editing is going on. Seems to be graphical only. ___ *This frame will always produce the problem. The chance of landing on such a frame is really high in The Smurfs GB, level 11.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
MUGG wrote:
Here's another emulation glitch [...] As a side-effect, the dragon's head will be gone. I haven't checked it just now, but on the real console you can't run out of present boxes nor does the dragon's head vanish [...]
MUGG wrote:
In GB The Smurfs, in the dragon boss, VBA has this bug: if you pick up too many presents, dragon's head despawns and you run out of presents [...] But on real console and Gambatte, it works correctly: You can pick up as many presents as you want [...]
We need to talk about this glitch. The glitch mentioned above always happened to me when I was playing/testing on VBA but it never happened on my real GBA. As a result, I've always considered it to be an emulation glitch. But right now I'm making a new TAS in Bizhawk-Gambatte to improve my old VBA run and the Dragon's head despawned while I was playing around! I was really confused how this bug, which I thought of as an old VBA bug, slipped into Gambatte. After some further testing, the Dragon's head despawning actually turned out to be a version-exclusive glitch. It only works in version 1.0. It never was an emulation glitch. I always used the 1.0 ROM, but I have a 1.1 cartridge. And due to VBA having many other (confirmed) emulation glitches at the time, I quickly came to a false conclusion. Sorry about this.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
Notes event 33
  • Take damage in the offscreen area? Can maybe take 2~3% with no time loss
  • Get hit by cars at the start --> tech on the platform? Seems impossible though
event 51
  • I thought getting all three off the stage as Falcon could save a second, but in actuality, you want Mewtwo and Gigabowser gone as fast as possible.
  • So maybe try manipulate Mewtwo/Gigabowser into rolling to the left --> Knee --> Dair
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
I did lowscore because some guy requested it. http://dehacked.2y.net/microstorage.php/info/1267827518/lowscore%20sml%20testrun%2010110%20points.bk2 (Bizhawk 2.2, Super Mario Land v1.0) 10110 points: 2-3 10 points from score tallying. Goal pedestral can't be touched at 0 seconds left. 3-3 100 points from unavoidable coin near the beginning. 4-3 5000 poins from killing the cloud boss. 5000 points from killing Tatanga.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
I just watched the MLP movie. It was decent but... https://pastebin.com/RXbm4Y5z + For a movie that was in the works for 2~3 years, it was lacklustre. I can get more out of the Equestria Girls movies than this, personally. The lack of known characters is a big killer for me. The villains never seemed so world threatening. It was overall a nice watch but not something that will make me come back to watch certain parts or listen to certain songs.
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
frame comparison
---Old---New
VBA-23Bizhawk
20112017 ---Total timesave
first frame fade-in (copyright info)1618+2
white screen186188+2
first frame fade-in (language select)204208+4
white screen254257+3
first frame fade-in (gargamel house)272--
white screen321329+8
first frame fade-in (menu)339357+18
first frame fade-out (from menu)377395+18
first frame fade-in Act 1 (character is visible)481529+48
first frame fade-out (entering the stump)810858+48
completely white screen Act 1 complete869934+65
white screen (from score tally)12031276+73
first frame fade-in Act 2 (character is visible)12921390+98
completely white screen Act 2 complete4384--
white screen (from score tally)4650--
first frame fade-in Act 3 (character is visible)47394874+135
completely white screen Act 3 complete60266161+135
white screen (from score tally)6336--
first frame fade-in Act 4 (character is visible)64256596+171
completely white screen Act 4 complete78478010+163
white screen (from score tally)81538326+173
first frame fade-in Snake (character visible)81728364+192
completely white screen Snake complete8839--
white screen (from rescue cutscene)9131--
(...)---
Remaining ingame time Note: 12.34 means 12 ingame seconds and 34 frames. 1 ingame second equals 80 frames (on Hard difficulty).
---Old---New---Timesave per level
Act 01 - The Forest96.2396.230.00
Act 02 - The River Smurf62.0462.040.00
Act 03 - The Bridge84.4984.490.00
Act 04 - The Swamps82.7783.04-0.07
Snake92.2992.290.00
Act 05 - The Sarsaparilla Fields79.6079.600.00
Act 06 - The Mountains (part 1)89.6089.67-0.07
Act 06 - The Mountains81.1182.35-1.24
Act 07 - The Flight on a Stork62.0262.04-0.02
Act 08 - The Old Gold Mine69.3769.38-0.01
Act 09 - Inside the Volcano86.1586.21-0.06
Dragon87.5757.62-0.05
Act 10 - The Sledge Race70.1070.100.00
Act 11 - The Cliff87.7087.700.00
Act 12 - Gargamel's Manor House (part 1)87.6787.70-0.03
Act 12 - Gargamel's Manor House80.4681.09-0.43
Gargamel87.1687.21-0.05
Editor, Experienced Forum User, Published Author, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
Random trivia about ingame seconds Ingame seconds depend on difficulty. Easy = 135 frames Normal = 90 frames Hard = 80 frames Enemy list: 00 = [glitch? causes instant death] 01 = moscito 02 = bee 03 = jumping fish 04 = horizontal moving fish ? 05 = bad smurf 06 = worm 07 = back and forth fish ? 08 = horizontal moving crow 09 = vertical moving crow 0A = hedgehog 0B = ice bear 0C = [enemy vanishes] 0D = springboard (stationary) 0E = mushroom with 1up 0F = mushroom with raspberry 10 = mushroom with leaf 11 = springboard (pick up) 12 = present (pick up) 13 = infinite presents 14 = key 15 = 1up 16 = star 17 = leaf 18 = raspberry 19 = S-boost 1A = ? 1B = eagle (Act 12) 1C = eagle (Act 7) 1D = eagle (Act 11) 1E = squirrel's nut 1F = nut (falling straight down) 20 = ? 21 = ? 22 = ? 23 = ? 24 = falling rock (Act 6) 25 = ? 26 = falling rock (Act 8) 27 = falling rock (Act 8) 28 = Azrael 29 = ? 2A = ? 2B = ? 2C = ? 2D = ? 2E = hole in ground 2F = ? 30 = ? 31 = ? 32 = ? 33 = ? 34 = ? 35 = bird that you can jump on 36 = squirrel 37 = thunder cloud 38 = thrown present 39 = dropped present 3A = ? 3B = ? 3C = ? 3D = ? 3E = ? 3F = ? 40 = ? 41 = ? 42 = ? 43 = ? 44 = ? 45 = ? 46 = ? 47 = ? 48 = leaf that you can jump on 49 = ? 4A = frog 4B = frog 4C = dragon boss 4D = ? 4E = ? 4F = ? 50 = ? 51~FF = [glitch] Lua for Bizhawk, v1.0 ROM
Language: Lua

local ScriptInfo = {"SMURFS Luascript by Mugg1991", "v0.1", "Oct 2017"} memory.usememorydomain("System Bus") function text(x, y, text, color, backcolor) if backcolor==nil then backcolor=0x00000000 end gui.drawText(x, y, text,color,backcolor,10,"Arial") end client.SetGameExtraPadding(80,0,0,0) console.clear() for i=1,table.getn(ScriptInfo),1 do print(ScriptInfo[i]) end XposBefore=0 nomove=0 event.onexit(function() client.SetGameExtraPadding(0,0,0,0) end) event.onloadstate(function() nomove=0 end) local dirTable = { [16] = 1, [32] = 2, [48] = 3 } while true do Xcam = memory.read_u16_le(0xFF97) Ycam = memory.read_u16_le(0xFF99) Xpos = memory.read_u16_le(0xFFA1) Ypos = memory.read_u16_le(0xFFA3) Xvelo = memory.read_u8(0xFFCB) dir = memory.read_u8(0xFFEF) timerTen = memory.read_u8(0xF9CD) timerOne = memory.read_u8(0xF9CE) timerSub = "." .. string.format("%02d",memory.read_u8(0xF93E)) timer = string.format("%x%x",timerTen,timerOne) invuln = memory.read_s8(0xF9AA) health = memory.read_s8(0xF9B6) rng = memory.read_u8(0xFAB1) difficulty = memory.read_u8(0xD9DB) text(18,24,"velX " .. Xvelo,0xFFFFFF00) text(26,33,"dir " .. tostring(dirTable[dir]),0xFFFFFF00) text(32,49,"X " .. Xpos,0xFFFFFF00) text(32,58,"Y " .. Ypos,0xFFFFFF00) text(12,67,"camX " .. Xcam,0xFFFFFF00) text(12,76,"camY " .. Ycam,0xFFFFFF00) text(8,91,"invuln " .. invuln,0xFFFFFF00) text(8,100,"health " .. health,0xFFFFFF00) text(18,109,"time " .. timer,0xFFFFFF00) text(54,109,timerSub,0xFFFFFF00) text(24,118,"rng " .. rng,0xFFFFFF00) text(2,127,"difficulty " .. difficulty,0xFFFFFF00) if XposBefore ~= Xpos then nomove=0 else nomove=nomove+1 end text(8,49,nomove,0xFFFF4000) XposBefore = Xpos emu.frameadvance() end
I found 90 frames improvement. So I might start a new run sometime.