So, like the edit in my last post says, you could possibly execute code that would write to A2D5 but it would require you to finish the first level, go to a level that has a coin in a right place so touching that coin would get an address to read 'A2', and then you would have to go to another level and perform the lag glitch in the correct x position in the level. This takes way too long to do or at least it would save not more than 5 seconds over the current TAS...
I had a better idea yesterday:
On version 1.0, on the title screen you can press a button combination to go to a level. This probably was a feature that was used by the developers to create the demos that play when you wait at the title screen too long and they forgot to remove it.
Up + Select: Mushroom level demo
Up + A + Select: Hippo level demo
Up + B + Select: Turtle Zone level demo
Up + A + B + Select: Macro Zone level demo
As you play the level, the music is muted and the game will save your input in SRAM. When all input slots are used up, it freezes and you have to reset. With those input slots you could write out:
08 D5 A2
or
AE D5 A2
---
http://i.imgur.com/sM1KCXc.png
The first address in a slot states how long you waited doing nothing, the second tells what input you pressed, and the third tells how long you pressed it. So you would wait 8 or 174 frames and press "^v>As" for 162 frames.
EDIT: Please note that the way I labeled the bytes seems to be wrong. It is really like this: 1 byte for the button combination, and 1 byte for how long you pressed it. Doesn't change the fact that you can write up a program in 0xA300 onwards.
---
Then you try to do the pause glitch with the addresses A203~A205 reading a code that jumps to the code that we just wrote. Unfortunately I don't really know how or if that would work.
According to
this, it seems that I want A203-A205 to read something like this:
C3 <address where we wrote our code>
I would love it if somebody helped me with this
EDIT:
Another image, describing the idea that I had:
I edited values manually for testing purposes. And the game would execute A201~ over and over and over and never stop. I don't understand why.
If I don't put in C3 00 A3, it executes whatever code was there originally and stops at C0 (RET NZ, which I don't know what it means to be honest...). If I put a C0 or other RETURNs at, say, A303, it doesn't prevent the game from getting stuck in an infinite loop.
Again, I hope someone can help me because I will not be able to get it to work by myself...