I was making my first TAS with this game since last week. I expected it would be easy, but the game's physics is complicated than I thought. After lots of trial and error, I found a glitch in first level, which is awesome. So far so good.
Anyway, here's my WIP that completes first two level: http://tasvideos.org/userfiles/info/4298203092772943. Since I don't have Youtube account, I couldn't post the encode. Sorry for inconvenience.
Well, I think I can do it by myself. Actually I searched and checked RAM Watches to make sure every boost I made is optimized. There are RAM addresses which stand for X/Y speed and direction. X/Y direction is very useful pointer to make TAS because boosting is only possible when its value is not zero.
Only annoying and weird thing is that these RAM address change when I enter other stage, so I have to re-search again to find them(but it takes just several minutes, so I don't think it bad). GBA uses 4 bytes, doesn't it?
Joined: 3/2/2010
Posts: 2178
Location: A little to the left of nowhere (Sweden)
GBA uses 1, 2 and 4 byte integers. Your values can be either one of these.
Regarding that the values change places in RAM for each level means that the values are re-created for each level, if you're lucky there is an address in memory that keeps track of the new location for each level, you can find this by entering a level you know the RAM address for, then RAM search for that address, if you find any entries, watch those and see if they change when you go to another level, and if they changed, check if their values are addresses in RAM where the value has moved to.
I've tried your suggestion but got no valid result. They only show meaningless figures when moving to next level. I convert them into hexadecimal number but still have no idea what they mean. I'll just attach my address list when I submit this.
There's actually more puzzling problem than this. I'm now in stuck at level 3. This level has only a single minigame like this:
It seems that the game ends when I travel a certain distance(the number of rings collected does not count, it varies whenever I play), but I can't find RAM addresses which indicate boost counter, which is bad news for making TAS. This gonna take some time....
Joined: 3/2/2010
Posts: 2178
Location: A little to the left of nowhere (Sweden)
I found the pointer address to the speed-addresses, sadly it's ALSO level-dependent, so the pointer also changes location from level to level, and there doesn't seem to be any pointer to keep track of the pointers. If you want to try to find a pattern in the pointer addresses they are here:
02025BA4, 4bytes, hexadecimal, x-speed-ptr for level 1
02034950, 4bytes, hexadecimal, x-speed-ptr for level 2-1
0201CCD0, 4bytes, hexadecimal, x-speed-ptr for level 2-2
I guess the game loads the level (hit-boxes etc) into RAM before it loads the mechanics (speed values etc), so the size of the level decides how far the speed values etc is offsetted (is that a word?) from the initial address (the address where the game starts writing level specific data in the RAM).
I also discovered that the speed values are 2byte values, in some levels you may avoid some artifacts in the values if you reduce the watched scope to 2bytes instead of the current 4bytes. It may also make the values easier to find in some levels if you search for 2byte values.
Sad that the location of fixed pointer is still unknown. But that's okay; still I can handle finding addresses because it doesn't take so long.
My goodness, why didn't I recheck values within 2bytes? I could have missed something important. Thanks for your support!
By the way, let me talk about the process. I finally found an optimizing strategy in level 3 and finished it just a while ago. I saved about 300 frames than I thought it would take. WIP is here : https://www.dropbox.com/s/uli7hu3dv15f8mm/Finding%20Nemo%20-%20~level3%2C%2020130205.vbm
If memory serves me, there's no specific obstacle till level 6. I'll post my WIP then.
You know what, I just found a critical mistake on stage 3. A textbox in the beginning can be skipped 21 frame earlier. Now I have to start it from here. Aw....
Okay, I tried several times to attach old input to new one, resulting in nothing but desync. I'm sure this is because stage 3 is very laggy so that even a single change on input will mess up everything. I'm going to redo stage 3 and try editting on stage 4.
I used the editor on level 4, and thankfully it syncs perfectly. After that, however, it turned out that pearl bouncing operates randomly, so every sub-stages I used pearl bouncing need to be redone. Well, still I'm satisfied I can revive some of inputs.
I'm back again. Did I say I missed a couple frame? Well, while redoing the whole thing, I found some shortcuts I hadn't noticed. I finished level 8 and so far saved 389 frames comparing to old run. Yeah, it was worth it.
Here's my WIP, by the way : http://tasvideos.org/userfiles/info/5497669584088249
The movie will desync on level 9.
EDIT: New run submitted
In the RTA run there is a glitch where you can pause and unpause the game and that stops pearls from despawning after being used by clams.
This saves ~2 seconds in the second level and ~20 seconds in the seventh level.
I resynced up to the level past the angler fish chase, still needs some work, but works on console:
Link to video
There is some limited RNG in this game apparently. The flag in the fish tank level for example moves the wrong way in this test run so that level is ~1 second slower.
I'll finish this up and that should be another run verified.