Posts for Alyosha
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
So I finally managed to track down the source of desyncs on console for Incredibles, and it turns out to be something related to gamepad IRQs. I don't have all the details yet, but what I know so far is that if I modify the ROM to not enable them, the existing test run syncs just fine. Gamepad IRQs are tricky because they are triggered at different times on console compared to emulator, since the input resolution is only 4 scanlines. But it also seems clear that my current implementation is somehow wrong. in the end I may need proper sub-frame input timing so that I can match input to the emulator where it would be console to get sync. I need to do several tests first, at least the problem is known now.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
Dimon12321 wrote:
Thank you very much for your effort for GBA emulation and verifications! A sceptic question, sorry. Did anyone else verified a movie which has been previously verified by you? I'm just worried that you may be developing GBAHawk with only your improvised verificator and ROM re-writer in mind.
I don't think so, but all my files are available here: https://github.com/alyosha-tas/GBA_replay_files and I use original carts except for homebrew. So, anyone can check, but that kind of thing is kind of unavoidable with things this niche.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
It's a new year, and almost 3 years already since I started this thread, wow that time went fast. That time though saw big advances in emulation and console verification on a number of systems. Here's my synopsis of the current state of R&D. NES: The biggest deficiency left for NES is reset behavior, but few runs use that anyway. Aside from that many / most TASes should be verifiable, even ones that rely on precise power up timing and DMC glitches. Console verification of NES TASes is now pretty standard, and it is far more rare to see one fail than succeed (as long as its being done on NESHawk.) There are some edge cases that are un-emulated in NESHawk, but they are unlikely to ever come up in practice, probably only if some homebrew dev used them for an emulator check. Implementing these would require a major rewrite to NESHawk, and I'm not sure they even effect all hardware revisions. Anyway, NES is in good shape. SNES: Modern versions of BSNES are now in BizHawk, but even so console verification has limited success. Most desyncs are random, very likely due to the audio chip clock, a well known issue. There are also some deterministic desyncs, though with unknown cause. There have been a few successful verifications along the way, and recently I saw that DwangoAC managed to verify a WIP of SMW 96 exits. Surprisingly, there is even new emulation discoveries still happening, as very recently an un-emulated cpu quirk was found. It's hard to say what is needed to advance verification efforts for SNES, it might even take some kind of hardware mod to tame the SPC clock. Deterministic desyncs make me think that something is not right on the emulation side, although it could still be a bot issue, but where to even look? GB/C: Nothing much new has come up that I'm aware of for GB/C, its pretty mature. GBA: Lot's of progress has happened on GBA. Tests from Flevoriux have nailed down most ppu timings and emulation details. Myself and GhostRain0 have found a lot of details related to prefetcher emulation. I've also found a few of other minor emulation details for other system components. All of this effort on the emulation side has led to many new verifications, including of first party games. There is still a ways to go, with some known desyncs and emulation deficiencies. However I'mn hopeful (and pretty confident) that 2024 will see GBA emulation and verificaiton mature to the level of NES and GB/C. N64: A great amount of emulation effort has taken place for N64 since my original post. The N64 core of the Ares emulator is maturing quickly and is increasingly accurate, with several talented N64 devs contributing. Even cache emulation is now close to cycle accurate, it's an impressive feat. I'm not aware of any actual console testing taking place yet, and perhaps it's still early as there are still many issues, but there are exciting prospects. Maybe I'll do some testing myself later this year. DS: While it seems like a likely next target for work after GBA and along side N64, the DS is a very complicated system and much work still needs to be done. Genesis: Bigbass made a new verification pipeline and tools for Genesis verifications and even made the first new verification for Genesis in a long time. This is impressive work and now there is a lot of room for more genesis testing and verification. I believe that sums up all the major developments. Console verificaiton is overall much more mature than it was 3 years ago, in some cases it is even commonplace. Also compared to 3 years ago, a lot of the low hanging fruit is now gone. So, what now? Personally I don't know what I will do once I finish up work on GBA. N64 looks like the only approachable system, though maybe its worth it to take another look at SNES. Then there are basic questions like what do we do about disc based systems? What do we do when clock speeds get too high to emulate systems in a cycle accurate way efficiently? That about sums up my thoughts, anyone else have any thoughts or predictions?
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
I was going to test this on console but the game ROM does not come with a proper GBA header, so would not work on a real GBA (except with flash cart.)
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
Nice another DMC glitch run, good work.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
i improved open bus emulation enough to fix my current tests. After that they pass on emulator the same as on console. So this leaves me with no leads as to why Incredibles doesn't work,. After initial loading takes place there is a lot of down time where the cpu is halted so there shouldn't be any timing sensitive errors, Only vblank and timer 1 IRQs occur, with audio DMA and not much else happening. So, I don't know, test rom injection was my only real strategy for isolating errors, back to the drawing board, I'll need more examples I guess.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
I've been pretty busy lately and haven't been able to focus on emulation, but now I am back on the accuracy grind. Figuring out Incredibles is the first thing I have to do. I made some test ROMs in the same style as Flintstones, and so far I am about half way through the game load process with no errors found. Then I made another test towards the end of the loading process that had a very large error compared to console. It turns out though that this test inadvertently uses accesses to un-mapped memory, so it wasn't really testing game loading, or at least it was mixing game loading and other edge cases of open bus accesses. It should still work in emulator as in console of course, so the first thing I have to do now is overhaul my open bus emulation to make sure I have all the edge cases correct. Looking over the available documentation it seems I definitely missed at least some details.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
BigBoyAdvance wrote:
Found this new clip that would save 35+ seconds compared to Qwerty6000's TAS published on this website. All you gotta do is jump in the correct spot and hold Up to climb through the wall. Sometimes you get stuck inside the wall lol. Link to video I'm not gonna TAS this game, so I'm leaving this here in case someone in the future wants to improve the current TAS.
Nice find! I was coincidentally thinking of looking into TASing this game in the future, now I'm even more motivated.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
Good progress in console verification recently. Sonic Advance Knuckles, Flintstones, and two runs of Connect 4 all verified. Additionally Perfection (which comes from the same cart as connect 4) was able to be verified directly from the BizHawk movie. So that's 5/5, good stuff. I tried resyncing an older Sonic Advance run made on vba but wasn't able to get correct RNG, so the remaining 3 Sonic Advance runs will need more effort to get working. I'm going to do my best to get to 20 verified runs by the end of the year.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
despoa wrote:
Would it be better if I set it to "Unknown"? Or do you want the rerecord count to be 1000?
Yeah unknown sounds fine.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
despoa wrote:
I'm gonna assume the rerecord count is still unknown since the original file was missing one.
I don't have my original files so I don't have a firm number. My guess would be around 1000.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
https://tasvideos.org/UserFiles/Info/638365412632797498 Ok please replace the movie file with this one with improved level 1 and other small improvements. Still console verified.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
Please set this to delayed. I didn't realize there was a world record run, and the level 1 in that run is faster than mine.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
Wow I'm surprised such a big improvement was possible for this game, nice work figuring out the RNG.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
A resync was posted by GoddessMaria a few posts above. Loading times are longer because Flash is very slow (when emulated correctly.) It takes ~460000 cycle, about 2 frames, to clear a 4k sector, and then 325 cycles to write a single byte.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
https://tasvideos.org/UserFiles/Info/638362605045693618 I managed to find a manip that gives the same number of frames as Tompa's run, 8 frames faster than my original resync (and hence 8 frames faster than the accepted run.) EDIT: Console verification video: Link to video
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
I think the 2.0.2 movie should be used for publication here, since the 2.0.1 version does not save the game properly due to emulation error.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
nymx wrote:
Was the version that you modified to be "Console Verified", derived from Tompa's inputs?
Yeah, it's just a resync.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
https://tasvideos.org/UserFiles/Info/638361257271922150 Here's the current best i can get with 9 checkers. Assuming no one gets faster manip I guess I'll submit this one after I try a little more.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
I haven't checked my movie for optimality, I just wanted to demonstrate that console sync is possible. Probably someone should at l;east try to improve before it is used for submission. That being said, I think a movie that is demonstrated to be console accurate should be preferred over one that is demonstrated not to be, it's supposed to be a TAS representing GBA not emulator. I also don't care about authorship, do whatever makes the most sense, I'm only interested in accuracy.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
ruadath wrote:
do you have the gbmv of the resynced movie? there was some "low hanging fruit" improvements to sonic advance that I did not have time to get working because of lag/sync issues -- maybe we can try again on the more accurate emulator and get lucky
https://tasvideos.org/UserFiles/Info/638359331014930395 Here you go, good luck!
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
I was able to resync the baseline Sonic Advance run and console verify it: Link to video I had to change some inputs on the ice level boss fight due to different icicles, so it's not the exact same as the original, but still its good to see consistency between both this and the knuckles version. The previous version of this TAS was verified in its original form, so there is a possibility the original run would work on some other cart, just not my particular one due to different Flash timings. I'll try the other 3 runs of this game when i get a chance.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
https://tasvideos.org/UserFiles/Info/638358560032196485 Here is a better strategy that wins with only 9 checkers. Basically, the computer will not let you win in 1 move if you have 3 in a row and an opportunity for 4 in a row the next move, but it will give you a chance to win on your next move if the opportunity doesn't already exist. It's possible this can also be done with only 8 checkers with a red start, I haven't checked yet, this is the first case I could get working. EDIT: Actually that's not possible since then red would get the connect 4 first, so 9 should checkers should be the minimum.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
https://tasvideos.org/UserFiles/Info/638358229433828542 Here is a version resynced on GBAHawk 2.0.2 that work on console, it is only 8 frames slower, not sure if better is possible.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2749
Location: US
This TAS (Tompa's most recent one) does not sync on console. Red blocks after the third black checker. Desyncs the same way on GBAHawk. So far I haven't been able to reproduce a winning condition without a much slower play from red.