Posts for MUGG

Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
My old unreleased WIP might be 2 seconds faster, but I'm not certain. https://www.youtube.com/watch?v=5oIiazCGKsE Looks like Youtube broke my video again, the audio is off sync now.
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
Individual character improvements achieved since this run's creation:
CharacterThis run's timeNew timeVideo by runner
Peach7.707.00tauKhan
Bowser7.487.46 tauKhan
Luigi2.972.85sam
Ganondorf4.434.31 PracticalTAS
Fox5.235.21 tauKhan
Ness11.8711.75 tauKhan
Jigglypuff6.835.77tauKhan
Marth7.437.18 sam
Dr. Mario12.6711.75 PracticalTAS
Yoshi6.526.50 PracticalTAS
Mario7.317.28tauKhan
Kirby10.9510.80 sam
According to MegaQwertification's playlist title, the current total score is 2:35.85, subtracting that from this run's 2:39.97 yields a possible time save of 4.12 seconds.
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
Can Link / Young Link boomerang superjump up that stage?
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
@Zain Your video states your time is 2:37.10. But your video finishes at video time stamp 2:51 and gameplay looks slower compared to HappyLee's run. So 2:37.10 can't be right. If you want, you can upload the movie file for your SMB run here and then make a post here linking to your uploaded movie file.
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
Hello again, Zain. You should not submit a run if it doesn't beat all existing records. If you continue to do so you might get stripped of your ability to submit runs. You can share runs on the TASvideos User files section, or post them on your Youtube channel and link them on the game's forum topic. But submitting a run is only for when you are certain that it is the fastest record for that game and category. By searching "Super Mario Deluxe", I found a run in the "warps" category that is faster than your run.
Movie Rules wrote:
If you're aiming for speed, your submission must match or beat all known records.
That being said, this is not meant to discourage you. You are welcome to post on the forums or on Discord and get in touch with other users who will be happy to help you improve your skills.
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
LunaticJ made a video about how speedrunners broke Mario & Luigi Superstar Saga. Link to video For some reason, the video gives a lot of credit to me, although I think others also greatly contributed to this game over the years in various ways. I wanted to post a comment to the video but I'm not sure if Youtube deleted my comment because I put too many links in it, so I would like to post my thoughts here just so it is documented somewhere. The video mentions the Japanese TAS by Kurikinto_Sya, which is the first time the Japanese-only Firedash glitch came to be known, and states that any surviving footage of this run has been lost. As far as I remember, I contacted the author back then and he gave me the original .vbm. I might have it backed up somewhere but I didn't want to post it without the author's permission. The video states that I took a deeper look into the Mini Mario bug before finding the Action Command bug. Actually, I ended up finding Action Command bug by pure chance. On 30 Oct, 2012 (or so), I livestreamed myself on Twitch speedrunning the game on console and fooled around in Bowser's Castle after the run was over which is where I first encountered the bug, although I don't remember the details of that. I posted on the forums and posted videos to Youtube a few days later. https://www.youtube.com/watch?v=YQ-wUdj2Zqk https://www.youtube.com/watch?v=IaTYgMpLD3o (At some point and for some reason, I set these videos to unlisted. As I found out today, in 2021 as part of a security update, Youtube set videos uploaded before 2017 from unlisted to private, so nobody could see them anymore when checking my forum posts from 2012. I set them back to unlisted today so you can watch them once more.) Just a few days later, on Nov 5, 2012, I managed to use the new bug discoveries to skip half the game (forum post) which inspired me to create the 1:12:29 TAS. I'm a bit disappointed that the video doesn't really give credit to TAS authors after me (Potato, Migu, Pixiuchu) who created two new TASes that passed the 1 hour mark.
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
I noticed some mistakes in this run such as bumping into a wall at 0:33 and not taking the door directly at 1:15 (although I'm not familiar with this game in particular, in other Kirby games you could float up to take the door which would be faster than jumping up to it). At 1:21, it would probably be faster to hop over the enemy and then over the wall, or to inhale the enemy and then to jump over the wall. Other than that, in most Kirby games you can preserve speed when starting to float by letting go of left or right.
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
Tegron wrote:
MUGG, thank you, a couple of clarifications that I will describe here 1. Re-record count shows 4187 but in reality there is much more than you think, 3DS core sometimes does not count the number of savestates you have loaded. 2. Generally there is but you have to change every place to get to the other side anyway. 3. Yes it matters, coffees give back temporarily, Great Forge increases damage to x2 but you also get x2, it doesn't matter because you also use Bonus Ring to gain EXP anyway, we also have to drink coffees to increase stats, the route without amiibo in TAS loses from 3-4 minutes but gives back temporarily on bosses 4. There are not much useful glitches in the game except for the clip in Hoohoo Mountain which I think the ref found if I'm not mistaken? Also, I didn't know about this glitch but it looks like it's not useful
1. In that case, perhaps the rerecord count should be shown in the video encode as "unknown". 2. As far as I remember, the original game needs to manipulate the RNG prior to entering the room in order to spinjump as few times as possible. This should be considered in the next attempt of this game.
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
Thank you for publishing!
MUGG here improves on their previous "hard mode" run by 7 seconds when taking emulator differences into accounts. Hard mode accessed after being the game once and adds a lot more enemies. Minor optimizations in various levels were made, and a scrolling bug was used in Level 4-2 to despawn a slow-moving platform and save half a second.
Can we change this to fix some typos? Suggestion:
MUGG here improves on their previous "hard mode" run by 7 seconds when taking emulator differences into account. Hard mode is accessed after beating the game once and adds a lot more enemies. Minor optimizations in various levels were made, and a scrolling bug was used in Level 4-2 to move a slow-moving platform out of the way to save half a second.
Perhaps the note from the previous text about the run starting from a savestate should be added.
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
Playing Mario Pinball Land on Bizhawk, I'm trying to put this hook, which prints an error whenever it triggers.
Language: Lua

local val = { ball = { -- ... collided_with_flipper = false }, collectible = { --... }, cannon = { -- ... }, misc = { --... }, left_flipper = { --... }, right_flipper = { --... } } event.on_bus_exec(function(addr, val, flags) val.ball.collided_with_flipper = true end, 0x08015C1E)
error running function attached by the event OnMemoryExecute
Error message: [string "main"]:221: attempt to index a number value (local 'val')
However, this alternative code works:
Language: Lua

local collided_with_flipper = false event.on_bus_exec(function(addr, val, flags) collided_with_flipper = true end, 0x08015C1E)
Why didn't the first code work?
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
Congrats on finishing a run for this game. I see you are a runner on speedrun.com. Since I never played this remake, I can't really tell if this is of good quality. Some things I noticed: - The re-record count 4187 is rather low for a game of this length. - Is it not possible to collect the orbs in the Hohooros minigame by jumping like in the original game? - I guess there are a lot of differences to the original game in terms of gameplay, bros. attacks and dealing damage. Are the coffee items absolutely necessary? It seems that it takes several minutes. Are those minutes saved back? - I noticed the TASvideos forum topic is rather empty. I'm not sure if a lot of research has been done for this game yet in terms of bug hunting. Do the bugs pointed out in that topic not have any use? Also what about the bugs pointed out on the speedrun.com posts section such as here?
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
If anyone wants to help: I'm looking for a way to tell if the ball has collided with a flipper, a ground or anything else, in any given frame (e.g. an address that is called or written to). Up until now I have been using "is the ball's x speed different from one frame to the next?" which has been close enough to a "ball has collided" value but I need it to be more specific now. So if someone wants to help, I would appreciate it. EDIT: I created some tracelogs. Edited the ball's position so it would collide with different things on the 2nd frame. Removed the first 100 or so lines that were identical. https://www.mediafire.com/file/iekcolm38j4jr3g/tracelogs.zip/file Also I put a breakpoint for writes to the x speed address $03006524 and noted down the first address listed on collision. Flippers and doors seem to be treated the same as boundaries (grounds).
Blue pipe / Tent / Cannon / Hitter / !-Button
	080040DC  	from right top

Left ground/Right ground/Right flipper/door
	08005E80	left velo

flipper hits
	080054F0

Cannon suck
	08004932

Cannon suck, reached center, setting velo to 0
	08004996

Cannon: Ball enters and despawns
	0802878A

Entering new room first frame, velo 0
	08003AD8

Entering new world(Grass, Ice), velo set -4587/39321
	0800395C

Entering grass room 2 (top left)
	 windmill 
				, velo set -3276/52428
	08003906

Entering funfair, velo set -1310/39321
	080054F0

Entering desert, velo set -7864/39321
	080054F0

Funfair Goomba, grass goomba
	08004214

Grass bee
	08005D52

Grass bee sting
	08004E38

Grass beehive
	08005F2E

grass ? block
	08003FBA

windmill back side
	0800438E

windmill hole wall
	0800448E
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
Some newer thoughts. This time it's not just about altitudes(= flipper angles) but about ways we can collide the flipper with the ball.
1)
If necessary, advance so far that it takes no more than 10 frames for the ball to be in reach of a flipper.
Now, determine all possibilities for a first collision:

- Dumb brute force: For that flipper, try all of the 10 inputs (mentioned in a previous post) after 
  delaying for 0 to 3 frames and try appending "let go" and "hold" frames. 
- Maybe better way: Narrow down on the inputs we want to test based on the ball's trajectory relative to the flipper. 

For each result, try an additional "let go" or "hold" frame to determine 
if there is a collision on the next frame, too. (2 consecutive collisions)

- If the ball is above the flipper, try an additional "hold" frame.
- If the ball is below the flipper, try an additional "let go" frame.

2)
For any scenario fetched in 1), if the ball is going to be in reach of the other flipper in the next 10 or so frames, 
then adjust the other flipper's altitude (try all 10 inputs - or as many as we can fit in before the ball collides). 

For each resulting scenario, check identifying information from a text file and if it already exists, discard it.
If it doesn't exist yet, save the new scenario:
- Save state
- Save identifying information in the text file (framecount, ball's position and speed, flipper altitudes)

3)
Delete savestate used in 1).

4)
For all new scenarios saved in 2), repeat with 1)
When the ball first reaches the left flipper at the very start of the game, I found 16 possible first collisions via trial-and-error. Some of them have the possibility of another collision on the next frame, yielding more scenarios. For half of those scenarios where the ball isn't going to be in reach of the right flipper, repeat with 1) directly. For half of those scenarios where the ball is going to be in reach of the right flipper, adjust beforehand the other flipper's altitude to any of the 10 possible altitudes and save each resulting scenario, then repeat with 1). ---------- Edit: The above procedure, as far as I can tell, is accurate but takes quite some time. Maybe it is possible to reduce computation time by simply hex-editing the flipper altitude right before collision based on the last time that flipper collided and the altitude it had at that time.
For example:
- Flipper A hits the ball at frame 1000. It was a let go frame and its altitude was 0x200002.
- Flipper B bounces the ball back so it is in reach of flipper A again at frame 1003.
- Find all possible altitudes that can be reached in 2 frames from 0x200002 and then add a "Let go" or a "Hold" frame 
for the frame the collision happens.
I'm not sure if this is error prone but certainly worth considering. ---------- Edit: It might also be an idea to determine all run-throughs of a room using hex-editing without calculating if it is possible. And then verify all those run-throughs afterwards until we find one that is legitimate.
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
Shrek 2 on Gamecube Current best RTA You can have up to 4 human controlled players. However, at 3 players or less, you could switch characters at any time which cancels the character's current attack/move which speeds things up a lot. There are some sequence breaks, possibly also ones not shown in the video but idk. EDIT: Saw that this game exists on other consoles as well (XBox and PS2), but I don't know about differences.
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
You can probably use a luascript to draw the framecounter somewhere else on the screen. But I can't make a script for you, since I don't use FCEUX.
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
Are you saying I will be able to TAS The Summoning or Al-Qadim in Bizhawk? Will it run Mice Maze? I remember that game not being possible to run in JPC.
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
Nice! Can you only do this 1 time per stage, or multiple times?
Theoretically you can do this as often as you want but since the bug is rare you can only do it a few times. The bug can theoretically be used to remove walls such as in 3-3 or at the pipe section in 4-2 to move on quicker. But I'm not bringing fireflower into 3-3 so I can't create lag to make the bug happen - even if I did, shooting might not create any lag. And in 4-2 the location where the bug has to happen is not convenient - I would probably have to idle or lag more than the time I could save back. So for now I'm just aiming for the bug "anywhere" in 4-2 to remove the falling platform at the end.
EDIT: The script came out with a 0 lag, 7 idle frames scenario overnight. That's pretty good!
This saves 35 frames. It reaches the goal at framecount 87396 whereas the no-bug version reaches it at 87431. I might try a few other places to maybe come out with even less idle frames but other than that I'm content with this outcome. EDIT: I envisioned a new idea, removing the wall at the very end of 4-2. Mario can actually make the jump to the other side. This would save 66 frames at most compared to the no-bug version. However, it requires some heavy delays (idling and lag), by having an extra fireball from a snake fly to the right and by shooting before bouncing on the missile, in order to create lag at the specific spot the bug has to happen. This pretty much nullifies all the time that this could have saved back. My script didn't find results overnight here. So all in all, I'm not following this idea further.
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
By running the above script and also a version that randomly lets go of Right or B, I managed to get 3 results with the bug. They all take about 13 frames of delay (by idling and lag) and finish the level about 25 frames faster than the no-bug version. I'm glad about saving this much time but it needs optimizing. It should be possible to trigger the bug with only 1 or 2 delay frames. In one of the above-mentioned results, I was shooting and the bug happened before the first lag frame even happened - but the 13 lag frames that happened after that were unavoidable. The script currently running looks like this This being the responsible code:
Language: Lua

local waitframes = emu.framecount() +1 tastudio.onbranchload(function() (...) vary3 = math.random(22,45) vary4 = math.random(0,3) vary5 = math.random(0,7) end) (...) if run_test[6] then -- Have Mario on the ground, clear upcoming 200 frames in tastudio -- script will do inputs at set chance -- start this at 86282 local vary1 = math.random(1,80) local vary2 = math.random(1,50) local press_b = true local press_a = false local press_right = true -- star block jump if emu.framecount() >= waitframes + vary4 and emu.framecount() < waitframes + vary4 + 10 then press_a = true else press_a = false end -- ending jump if memory.read_u8(0xFFF3) > 0x83 then press_a = true end -- b kill if emu.framecount() == waitframes + 17 + vary5 then press_b = false end -- random if not press_a then if not (math.random(1,1000) < (980-vary1)) then if emu.framecount() > waitframes + 10 then press_right = false end end if emu.framecount() > waitframes + 17 + vary5 then if math.random(1,1000) > (980-vary2) and (emu.framecount() > waitframes + 16 + vary3) then press_b = false end end end tastudio.submitinputchange(emu.framecount(), "A", press_a) tastudio.submitinputchange(emu.framecount(), "B", press_b) tastudio.submitinputchange(emu.framecount(), "Right", press_right) if emu.framecount() > waitframes + 155 or emu.lagcount() > 407 then savestate.loadslot(5) end tastudio.applyinputchanges() end
If anyone wants to help with this, it would be much appreciated. EDIT: The script came out with a 0 lag, 7 idle frames scenario overnight. That's pretty good!
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
It looks like only the first instance of tastudio.submitinputchange() is handled and any more instances of it in the same frame are ignored. Playing on Bizhawk 2.9.1 Gambatte core.
Language: Lua

tastudio.submitinputchange(emu.framecount(), "B", true) tastudio.submitinputchange(emu.framecount(), "B", false) tastudio.applyinputchanges()
This will keep pressing B. I expected that it would let go of B. I can easily work around it but I'm just saying. Also this. event.on_bus_read()seems broken in Bizhawk 2.8 and 2.9.1. I'm not sure about the exact version it started and I don't know if it is fixed in 2.10.
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
I managed to get the bug by running a modified version of the linked script which repeatedly runs forward and jumps after delaying for increasing amounts of frames, while in a laggy situation. The laggy situation wasted a lot of time but due to the missing falling platform in the end, it reaches the goal at exactly the same frame as the optimized no-bug version. I'm convinced I can get it much faster eventually and save time with it. I'll keep trying. Link to video Modified luascript You have to change booleans at the beginning of the script. Currently it's set to have Mario delay, then start running/shooting, then jump. Upcoming input in the next ~200 frames in TAStudio has to be cleared and Mario has to be on the ground, obviously. The script running can be observed in the middle of the video. You will want to add client.pause() in line 86 or 223 so the script stops when the bug happens. This kind of test could be done in many places of the level. Of course it would be best to get the bug with the least amount of lag possible but it's already frustratingly hard to get the bug at all since it's very rare.
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
Improved script https://pastebin.com/55Leqbrp It will visually show on the screen when a bug frame has occured. The script will print information to the console if PRINT_INFO is set to true in line 5. The script recognized a scroll bug mid level in 4-1 and the one I got at the end of 1-3 and there have been no false alarms. The 4-1 one (bk2)
   FRAME 420  Cy:35112  **LAG**

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 9408

   FRAME 421  Cy:35110

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Write $FFEA (01)                 cycle: 2084
Execu $0050 (TIMER INTERRUPT)    cycle: 7062

   FRAME 422  Cy:35114  **LAG**

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $2254 (READ $FFE9)         cycle: 66
Write $FFE9 (5F)                 cycle: 90
Write $FFEA (02)                 cycle: 1872
Execu $0050 (TIMER INTERRUPT)    cycle: 4720

   FRAME 423  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Write $FFEA (03)                 cycle: 1246
Write $FFEA (00)                 cycle: 1276
Execu $0050 (TIMER INTERRUPT)    cycle: 2374

   FRAME 424  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 770
Execu $0050 (TIMER INTERRUPT)    cycle: 32800

   FRAME 425  Cy:35110  **LAG**

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 30454

   FRAME 426  Cy:35114

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 28114

   FRAME 427  Cy:35114

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 25768

   FRAME 428  Cy:35110  **LAG**

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 23422

   FRAME 429  Cy:35110

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Write $FFEA (01)                 cycle: 2702
Execu $0050 (TIMER INTERRUPT)    cycle: 21080

   FRAME 430  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $2254 (READ $FFE9)         cycle: 66
Write $FFE9 (40)                 cycle: 92
Write $FFEA (02)                 cycle: 1874
Execu $0050 (TIMER INTERRUPT)    cycle: 18738
Write $FFEA (03)                 cycle: 20664
Write $FFEA (00)                 cycle: 20694

   FRAME 431  Cy:35114  **LAG**

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 16392

   FRAME 432  Cy:35110

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 14048

   FRAME 433  Cy:35114

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 11704

   FRAME 434  Cy:35110

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 9360

   FRAME 435  Cy:35114  **LAG**

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 7016

   FRAME 436  Cy:35110

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 4670

   FRAME 437  Cy:35106  **LAG**

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 2330
Execu $0050 (TIMER INTERRUPT)    cycle: 35098

   FRAME 438  Cy:35120

Execu $0040 (VBLANK INTERRUPT)   cycle: 92
Execu $2258 (READ $FFEA)         cycle: 144
Write $FFEA (01)                 cycle: 3592
Execu $0050 (TIMER INTERRUPT)    cycle: 32758

   FRAME 439  Cy:35110

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $2254 (READ $FFE9)         cycle: 66
Write $FFE9 (41)                 cycle: 90
Write $FFEA (02)                 cycle: 1872
Execu $0050 (TIMER INTERRUPT)    cycle: 30408
Write $FFEA (03)                 cycle: 32686
Write $FFEA (00)                 cycle: 32716

   FRAME 440  Cy:35116  **LAG**

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 28064

   FRAME 441  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 25716

   FRAME 442  Cy:35108

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 23374

   FRAME 443  Cy:35114  **LAG**

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 21032

   FRAME 444  Cy:35118

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 18686

   FRAME 445  Cy:35106

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Write $FFEA (01)                 cycle: 7104
Execu $0050 (TIMER INTERRUPT)    cycle: 16336

   FRAME 446  Cy:35110

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $2254 (READ $FFE9)         cycle: 66
Write $FFE9 (42)                 cycle: 90
Write $FFEA (02)                 cycle: 1872
Execu $0050 (TIMER INTERRUPT)    cycle: 14000
Write $FFEA (03)                 cycle: 15926
Write $FFEA (00)                 cycle: 15956

   FRAME 447  Cy:35114  **LAG**

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 11656

   FRAME 448  Cy:35118

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 9310

   FRAME 449  Cy:35104

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 6962

   FRAME 450  Cy:35114  **LAG**

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 4626

   FRAME 451  Cy:35102

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 2278
Execu $0050 (TIMER INTERRUPT)    cycle: 35046

   FRAME 452  Cy:35120

Execu $0040 (VBLANK INTERRUPT)   cycle: 44
Execu $2258 (READ $FFEA)         cycle: 96
Execu $0050 (TIMER INTERRUPT)    cycle: 32714

   FRAME 453  Cy:35114

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Write $FFEA (01)                 cycle: 1088
Execu $0050 (TIMER INTERRUPT)    cycle: 30362
Write $FFEA (03)                 cycle: 32430
Write $FFEA (00)                 cycle: 32460

   FRAME 454  Cy:35110

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 28016

   FRAME 455  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 25674

   FRAME 456  Cy:35114

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 23330

   FRAME 457  Cy:35114

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 20984

   FRAME 458  Cy:35110

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 18638
Write $FFEA (01)                 cycle: 22812

   FRAME 459  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $2254 (READ $FFE9)         cycle: 66
Write $FFE9 (43)                 cycle: 90
Write $FFEA (02)                 cycle: 1872
Execu $0050 (TIMER INTERRUPT)    cycle: 16296
Write $FFEA (03)                 cycle: 18346
Write $FFEA (00)                 cycle: 18376


new row rendered on 422, 430, 439, 446 (no bug frames)
451 has lag and two timer interrupts
    the first one at cycle 2330 ("no bug frame" would have a write to $ffea here)
453 usual structure but without write to $ffe9
459 next row rendered
The 1-3 one (bk2)
   FRAME 57985  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 19360

   FRAME 57986  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Write $FFEA (01)                 cycle: 2616
Execu $0050 (TIMER INTERRUPT)    cycle: 17016

   FRAME 57987  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $2254 (READ $FFE9)         cycle: 66
Write $FFE9 (48)                 cycle: 90
Write $FFEA (02)                 cycle: 1872
Write $FFEA (03)                 cycle: 3084
Write $FFEA (00)                 cycle: 3114
Execu $0050 (TIMER INTERRUPT)    cycle: 14670

   FRAME 57988  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 12328

   FRAME 57989  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 9982

   FRAME 57990  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 7638

   FRAME 57991  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Write $FFEA (01)                 cycle: 2558
Execu $0050 (TIMER INTERRUPT)    cycle: 5298

   FRAME 57992  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $2254 (READ $FFE9)         cycle: 66
Write $FFE9 (49)                 cycle: 90
Write $FFEA (02)                 cycle: 1872
Execu $0050 (TIMER INTERRUPT)    cycle: 2954
Write $FFEA (03)                 cycle: 9832
Write $FFEA (00)                 cycle: 9862

   FRAME 57993  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 798
Execu $0050 (TIMER INTERRUPT)    cycle: 33376

   FRAME 57994  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 31032

   FRAME 57995  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 28688

   FRAME 57996  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 26344

   FRAME 57997  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Write $FFEA (01)                 cycle: 2580
Execu $0050 (TIMER INTERRUPT)    cycle: 23998

   FRAME 57998  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $2254 (READ $FFE9)         cycle: 66
Write $FFE9 (4A)                 cycle: 90
Write $FFEA (02)                 cycle: 1872
Write $FFEA (03)                 cycle: 3084
Write $FFEA (00)                 cycle: 3114
Execu $0050 (TIMER INTERRUPT)    cycle: 21656

   FRAME 57999  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 19310

   FRAME 58000  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 16970

   FRAME 58001  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 14624

   FRAME 58002  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Write $FFEA (01)                 cycle: 2990
Execu $0050 (TIMER INTERRUPT)    cycle: 12280

   FRAME 58003  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $2254 (READ $FFE9)         cycle: 66
Write $FFE9 (4B)                 cycle: 90
Write $FFEA (02)                 cycle: 1872
Write $FFEA (03)                 cycle: 3084
Write $FFEA (00)                 cycle: 3114
Execu $0050 (TIMER INTERRUPT)    cycle: 9936

   FRAME 58004  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 7592

   FRAME 58005  Cy:35112

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 5248

   FRAME 58006  Cy:35110

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 2904

   FRAME 58007  Cy:35118

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Execu $0050 (TIMER INTERRUPT)    cycle: 798
Execu $0050 (TIMER INTERRUPT)    cycle: 33330

   FRAME 58008  Cy:35108

Execu $0040 (VBLANK INTERRUPT)   cycle: 0
Execu $2258 (READ $FFEA)         cycle: 52
Write $FFEA (01)                 cycle: 1712
Execu $0050 (TIMER INTERRUPT)    cycle: 30980
Write $FFEA (03)                 cycle: 33006
Write $FFEA (00)                 cycle: 33036


new row rendered on f987, f992, f998, f003
f007 has two timer interrupts (but no lag)
f008 usual structure but without write to $ffe9
I'm not going to try it in 3-3 because I don't have fireflower before the vertical wall section and there is no lag. Unless I bring fireflower beforehand, the bug is probably not possible. So if anything I'm trying it in 4-2. Since it took quite some time to get the bug just once in testing with tons of lag in 4-1, I think the chances of getting it in the TAS are too slim. It might happen by chance though.
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
New script, unfinished but it's functional. It can be used with both game versions. https://pastebin.com/63CdSW6w It will show how many cycles have passed since the beginning of a frame, for any instance where $FFEA is written to with 0x00, 0x01, 0x02 or 0x03. I will finish it and research the scroll bug with it, hopefully leading to some information.
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
Using this short script with Super Mario Land
memory.usememorydomain("System Bus")

event.on_bus_read(function(addr, val, flags)
	print("TEST")
end, 0xFFEA)

while true do	
	emu.frameadvance()
end
On Bizhawk 2.3.1, it prints every frame but on Bizhawk 2.8 and Bizhawk 2.9.1, nothing gets printed. Am I missing something or is it broken?
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
I don't think it was a syntax error, exactly. It's just that the old script used the table.getn function, which was deprecated in Lua 5.1 and removed in Lua 5.2. BizHawk currently uses Lua 5.4. You fixed it correctly by changing it to use the # operator.
I was talking about lines like
if MouseX>280 and MouseX<290>130 and MouseY<138 then
that I had to correct to
if MouseX>280 and MouseX<290 and MouseY>130 and MouseY<138 then
and the code for the arrowUp clickable button was missing altogether. I added onmemoryread and onmemorywrite for no particular reason. Now that I think about it, I'm sure the original script only checked for executed bytes, not reads or writes.
On point (2), the script is looking for the execution of specific addresses, and it would not be surprising for code addresses to be different in different versions of the game. You'll need a separate table of addresses for each different version.
Yes, you are right. I will try to make a new script soon. Thank you. My new hard mode run is currently in 3-2. Theoretically, the scroll bug could save time in some of the later levels, e.g.
  • in 3-3 - if one of the vertical walls could be removed and
  • in 4-2 - if one of the vertical breakable walls could be removed to move on quicker, but regardless of where it happens in the level, it would allow to skip the falling platform at the end of the level.
Editor, Experienced Forum User, Published Author, Expert player (2362)
Joined: 5/15/2007
Posts: 3979
Location: Germany
I'm going to need to understand scroll bug better, in order to attempt it in the later levels. After I discovered my visualisation luascript doesn't run correctly due to syntax errors that have somehow slipped into that post, I tried to fix the script but now it will output information that's different from before (when compared to the screenshot I had posted). When running the "seemingly fixed" script, I noticed the information output is different between v1.0 and v1.1 of the game. V1.0 (Every few frames of running right) V1.1 (Every few frames of running right) Not sure what to make of this. Unfortunately, I'm not very good at this. Help on this would be very appreciated. My goal is a luascript that will do one or more of these things: - Detect when the scroll bug has occured - Visualize with a red vertical line which row has been omitted - For non-bug frames with writes to $FFEA, should show information like how many cycles have passed in that frame and how many cycles it should have been to make the bug frame occur (if that makes sense) Here is the script with syntax errors "seemingly fixed". Here is a movie file with the scroll bug happening.