Posts for Alyosha

Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
CasualPokePlayer wrote:
Note that with GBI you can just eliminate the GBP detection entirely (it's a configurable option), or alternatively plugging in something to the link port will prevent serial communication from taking place (this is what RTA runners do IIRC).
Woah really? Thanks for the tip! I'll give this a try.
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
Some minor follow up here. I started testing with SMB3, but GBP does have an effect on sync, so I will need to more carefully emulate GBP before I can sort that one out. GBP detection uses the serial port with a certain protocol, so it takes up some amount of the processing time.
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
Awesome work, now that is a proper Dedede fight. I console verified this run: Link to video I removed myself as co-author as anything I did previously is superseded by the new run. I'm surprised you were able to find so many frames to save, nice optimization work.
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
Nice work! Console verified: Link to video (And, after numerous complaints from youtube commenters, I finally found the setting in OBS for mono sound!)
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
Link to video Recent 101% DKC run verified as well. That's all DKC runs verified (even though I have to wait for next release to put a check mark on DKC2.)
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
Link to video Donkey Kong Country 2 is finally verified! Now the only remaining run that fails to verify is Snood with that weird crash, but I'm going to set that aside for now and move on to more interesting (and simpler) things. DKC 2 and Super Metroid GBA were both huge time sinks, but both ultimately revealed important emulation details. Time to focus on Flash saving.
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
Now that DKC2 is finally figured out, I can turn my attention to other things not accuracy related. I still want to include manual Flash timings for next release, and one of the games I want to test for that is SMB Advance: SMB 3. Coincidentally though, this game has GBP detection. So, I'm going to try to get that working at the same time. I implemented rumble support already about a month ago along with the screen detection algorithm, but the GBP rumble commands seem to be more complicated than indicated on GBA TEK. More work needed there. I also want to have a pretty comprehensive implementation of the LDM^ glitch, but I'm willing to let that one wait for a future version since it's not critical and I can turn off emulation of it by commenting out a single line. Overall GBA is starting to feel like its in pretty good shape, time to start thinking about what's next.
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
I made an IPS patch for other people who want to try to play this back on console: https://www.dropbox.com/scl/fi/lydg5qhtzuh3t5qx69123/Super_Mario_Bros_Bad_Apple.ips?rlkey=qd5sf03sg8xtxqxriqxt70bzs&st=xu5d9jxe&dl=0 Additionally, if you are using the TAStm32 v3, you need to make the following changes in tastm32.py:
    def main_loop(self, run):
        global DEBUG
        frame = 0
        frame_max = len(run.buffer)
        latches_per_bulk_command = 28
        count_d = 0
        
        while True:
            # hack for SMB Bad Apple
            if (run.fn > 40960) and (run.fn < 54500):
                if count_d == 0:
                    latches_per_bulk_command = 32
                    count_d = 1
                elif count_d == 1:
                    latches_per_bulk_command = 28
                    count_d = 2
                elif count_d == 2:
                    latches_per_bulk_command = 28
                    count_d = 3
                else:
                    latches_per_bulk_command = 28
                    count_d = 0
            else:
                latches_per_bulk_command = 28
This keeps the buffer from becoming empty as the code is being loaded. Be aware that NesHawk is tuned to my NES, which is a revision g, which is a common variant but I can't garauntee it will work on other variants. Even then expect it work less than 50% of the time.
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
After a great deal of testing I finally figured out what was wrong with Donkey Kong Country 2. The problem is here:
0801431A:      4778  Bx (R15)
0801431E:  00000000  (fail)  AND (no flags) R00, R00, (R00 << 00)
That second instruction is an ARM instruction, but it is not word aligned. This is fine in general, but evidently it is not fine for the prefetcher. It seems in this situation the prefetcher continues to fetch, but the comparison to check if it has the correct value always fails. Implementing this, DKC 2 now desyncs in the same way as on console. One I have tested sufficiently thoroughly, I will resync the existing run and test on console again. This is another one of those edge cases that I just wouldn't have thought to check on my own. Luckily my testing methodology points me in the right direction pretty reliably.
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
Another great Kwirk project completed, nice work! Pretty cool you got it down to only a single repeat. Do you foresee the tools you used here being applicable to other projects?
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
Link to video I got it work on console, took quite a few tries though,
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
Link to video After improving emulation with the newly discovered fact that DMA halts IRQ pipeline, I was able to verify Super Metroid - GBA Edition.Now all the metroid runs are verified. Doing the testing of this one used up a lot of my time, and unfortunately it didn't fix DKC2, so now I will have to repeat the process again for that game to finally figure out the issue. So progress is very slow, but at the least with this testing methodology finding the problem is almost garaunteed, just extremely costly in terms of time.
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
I found a pretty fundamental bug in IRQ emulation while working on why Super Metroid desyncs. The bug concerns what happens with IRQs when a DMA is occurring. Currently I have IRQs go through the pipeline normally during DMA, but current testing indicates that the IRQ pipeline is stalled during DMA. This is at least responsible for the desync in Super Metroid, and probably DKC 2 as well. I haven't worked out the details exactly yet, but hopefully fixing this will be pretty straight forward. Pretty surprising this bug went undetected for so long. Finding this was difficult as the desync occurred 30 minutes into a run. I had to devise a way to load the game state on the desired frame and then inject this into the game code and branch back and forth to run timing tests. This is the technique I will probably have to use to diagnose Snood.
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
The other 32MB zero mission rom hack, metroid desolation, console verified just fine: Link to video One thing I noticed about both Super Metroid GBA and DKC2 is that they both desync in places where HBL DMA is running every scanline. This makes me think that some weird DMA edge case is responsible for the desyncs, but so far I can't conjure up any cases I haven't already covered.
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
I finally got a 32 MB cart so I can test the remaining metroid runs. Super Metroid GBA edition desyncs about 30 minutes in due to a missing lag frame on console. I looked at the trace logs, and in GBAHawk the offending frame misses not being a lag frame by only about 12 cycles, new record! I'll take a closer look and see if this is easier to track down than DKC2. I'm still surprised how small the margins of error can be. If this trend continues into more modern and complicated systems, tracking down root causes starts to seem impossible. But on GBA I'm sure I'll figure it out eventually.
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
Not sure how, but at least 2 published runs are still in the workbench forum: https://tasvideos.org/Forum/Topics/25590 https://tasvideos.org/Forum/Topics/25458
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
This run is still on the workbench despite being published, some kind of glitch?
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
This version verified as well. Link to video
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
I found an edge case of prefetcher behavior not accurately emulated in GBAHawk so far. It concerns what happens when an 0x20000 boundary is reached. Previously I discovered that the prefetcher becomes disabled at these boundaries. and that there is sometimes an extra cycle penalty as a result. The conditions for the 'sometimes' are not currently correct in GBAHawk as new testing shows. It seems I need to be more careful in defining states that the prefetcher can be in to get this correct. I may take this opportunity to reorganize the prefetcher code better to sort all this out. This is the first time in a while I found a new inaccuracy in execution timing. I don't think it will effect DKC 2 as I already tried the run with the extra cycle penalty both on and off and nothing changed, but maybe in reviewing my code again something new will become apparent.
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
Link to video Console verified, cool run!
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
All of the Mega Man Zero 1 & 3 runs are now verified. Here is the Zero 3 100% one: Link to video Eventually I'll do 2 & 4, but presumably they are are about the same in terms of accuracy requirements so I'll move on to other games for now. With almost 60 GBA runs verified, I'm well ahead of where I wanted to be this year in terms of numbers, though fell a bit behind in emulation work as I still don't have manual Flash timings done. I really want to figure out DKC 2 though, so I'm going to keep on the grind, maybe I'll try some glitchier runs like Dark Arena.
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
I started working on some new tests for a strange hardware glitch involving accessing banked registers after loading user mode registers through LDM^. https://github.com/alyosha-tas/gba-tests/blob/master/LDM/LDM_ALU.gba The basic effect, described here: https://github.com/mgba-emu/mgba/issues/2942 , is that reading OR's user and banked registers together and writes write to both sets of registers. Unsurprisingly, this is extremely annoying to implement. It basically requires an entire separate execution path when the processor is in this state. It's still a work in progress, there are a lot of cases to work through. There is also a test for this in the most recent AGBEEG tests. But these tests were tested on 3DS hardware which evidently behaves differently as they don't work on GBP. So far I don't see any games even use LDM^, so this might have low utility, but its a good thing to be aware of (I did check if Snood perhaps encounters this but it doesn't.) EDIT: Additionally, when I compiled the recent AGBEEG tests the cartridge tests fail on hardware. It looks like I get a different binary than the release version when i compile from source at that commit, so my tool chain must be a little different. Anyway the test passes on emulator but fails on console. I'm pretty sure this is the result of changing wait states, as when I change the order they are checked in, the fails happen in a different way. This is unexpected, and itself another major headache to implement if my guess is correct. But, one complicated edge case at a time.
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
Today I was able to accomplished one of my goals and console verify a Mega Man Zero run! Link to video RetroEdit's script was invaluable here as there was hundreds of extra lag frames all over the run. Resyncing didn't take long with the script though. I'll try to work on the other Zero 1 and 3 runs, I forgot 2 was the japanese version so I don't have a cart for that right now. The zero games were some of my favorites from the console, so it's really satisfying seeing a console verified TAS, I'm hopeful for the rest as well. Onwards!
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
Here is the Serious Sam test run from Dimon12321: Link to video I've got a few more resyncs in the works too.
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4082)
Joined: 11/30/2014
Posts: 2884
Location: US
ViGadeomes wrote:
Hello, I would like to see a console verification of [5944] GBA Power Rangers Time Force by MamaLuigiMomsLotsaSpaghetti in 06:37.02 resynced by myself due to the massive amount of lags that GBAHawk has compared to mGBA on this movie to see if they are accurate.
I completed this verification with the resynced file: Link to video Also I did the recent Donkey Kong Country run and the other Dora the Explorer one as well.
Accepting hardware donations for console verification! See my homepage for details: https://tasvideos.org/HomePages/Alyosha Monetary donations also accepted via gofundme: https://gofund.me/82aabaee