Posts for Alyosha

Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
Gensan 2 continues to provide challenges for console verification. http://tasvideos.org/userfiles/info/66301728356726713 Here is a file for gambatte (2.4.2) that desyncs on console on the second boss in a deterministic way. I have confirmed a version in GBHawk matches this run cycle for cycle in the boss area. GBHawk has an IRQ priority issue that is fixed in my local build that made it desync in a different way, but once I fixed that it syncs to the end of the game just like Gambatte. So there is some un-implemented behaviour in both GBHawk and Gambatte that is causing desync on actual hardware. I didn't see any uninitialized RAM so I don't think that is the cause. Also in this run mode 3 timing does not seem to be the issue (at least to the extent testable.) Currently I don't have any idea why this desyncs.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
Nice run, yes vote. It's good to see expert knowledge put into a TAS like this. A lot times I go into games like this with only superficial knowledge and inevitably miss things that I would only ever really know from time and experience. This TAS really shows the difference those things can make.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
NES games can also have issues with uninitialized RAM, it's not exceptionally rare. It is good to identify that problem though and ways to work around it for games that encounter it. Just having things written down in an organized way really helps.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
EZGames69 wrote:
What do you mean by this?
I mean LibTAS and the examples of games with built in TAS tools. Maybe not console verification in the usual sense but still a lot of progress compared to say genesis.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
Making and re-syncing TASes can take a lot of time and effort, are there any thoughts on which specific games or TASes should be looked at that can most help console verification? GB and GBC have progressed a lot recently, and PC of course too, but not so much for other consoles, where should effort be focused?
Post subject: Console De-Verified
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
I thought I would make a thread specifically for runs that failed to sync on console. There is a page with a lot of old tests here but a lot of those are too old to be relevant to modern development. Failed cases tend to find hardware edge cases not expected or covered by test ROMs, so keeping track of them seems like a helpful way to drive improvements to emulation and verification. More generally keeping track of what things can go wrong and why helps get a clearer picture of what path development needs to take. I expect a lot of older TASes to fail to sync just by virtue of being made on old inaccurate emulators, so I intend this thread mainly for new TASes made on accuracy focused emulators.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
ThunderAxe31 wrote:
I just found another graphical bug with GBHawk and SubGBHawk. The first 11 frames of the GBC BIOS sequence consist in a black screen. I can confirm this behavior is NOT present on any real console: GBC, GBA, GBI.
Fixed in master.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
PikachuMan wrote:
Super Bombliss DX crashes when trying to load game modes in GBHawk in version 2.5
thanks for the report, seems like a straightforward game so not sure what the problem is, I'll add it to the github tracker.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
I find it fascinating how there was a hint of this all the way back in 2007 but it took over a decade of technological development to be able to arrive at the point where this TAS could be made. Jumping to the middle of the credits seems a bit strange, but if there isn't any way to tell the game is beaten besides seeing the end screen then good enough I guess, yes vote.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
GBHawk still applies inputs on VBlank boundaries, so you cannot save time simply by converting between it and gambatte, unless the game samples inputs while the screen is off, which this game doesn't do. My guess is you just found some places where I didn't press input on exactly the right frame, like in the 2nd K .Rool fight where I am indeed 3 frames late. However trying to save after truncating my movie file when fixing this also corrupted my TASproj, seems like something bad is going on with TAStudio. EDIT: yeah i missed a few presses, here is a corrected file. http://tasvideos.org/userfiles/info/65880395759689215 I'll probably take another look and see if I missed any other small things.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
I (mostly) fixed 4 in a Row. This was actually a very difficult case. Just figuring out what the ROM format was took a lot more googling I expected (it's something called 'XROM' apparently, and only in 2 games.) After accounting for that there were several small bugs that needed fixing that slid under the radar until now. There is still a problem that a counter interrupt is happening one scanline too late, but that kind of thing could take forever to properly sort out and I currently don't have the time. So for now it will have to be good enough, at least it's playable.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
Thanks for the temp encode, such a long encode is too much for me to attempt.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
Oops, wrong movie file, please replace it with this one: http://tasvideos.org/userfiles/info/65608859443692523
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
Clever use of save abuse, yes vote.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
Thanks for the correction, not sure what happened there. Also I realized that I only saved frames in one spot, not two. Where I originally thought I saved frames in mashing was just a re-sync error, the only savings are in the cutscene skip.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
Do all the up and right presses do anything? Or are you just button mashing?
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
ThunderAxe31 wrote:
Why do the tilt controls need to be explicitly set? It's confusing, user-unfriendly. It's not like you can choose to not use them when you play on real hardware, as it's part of the cartridge itself, or decide to use it for other games.
Eventually I want to make different motion models for the control scheme. Right now it is Tilt (realistic.) Eventually I will add Tilt (simplified) and maybe some others that allow linear accelerations (speedrunners seem to use quick linear jerk motions to make Kirby jump, the accelerometers work just as well sensing any kind of acceleration.)
jlun2 wrote:
Thanks. Changing to tilt mode however disabled my dpad, which I need to select stuff in menus. Is there a way to enable both? Also do I need to change anything else? I can't seem to move still in game.
The tilt controls don't have default settings. Go to config -> controllers to set them. EDIT: Maybe I can make the tilt scheme a different sync setting, I'll think about how to do it. EDIT2: Ok controller setting now only effects MBC7 games
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
jlun2 wrote:
Not sure if this is the right place to ask, but how does one use motion control for games like Kirby's Tilt n Tumble? I can't seem to find an option for it.
GB -> settings -> sync settings -> controller -> tilt EDIT: Also I went through Gambatte's Halt tests and fixed a couple more edge cases. Passes all but the double speed mode tests now (which rely on mode 3 timing anyway.)
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
I have made various improvements to GBHawk's timer emulation. It now passes all of Gambatte's timer tests in both GB and GBC mode, while still syncing console verified runs and passing the other available timer tests. This doesn't fix the problem in Gensan 2, but it does narrow it down to being a purely GBA issue. Still not sure exactly how I will handle that one yet. I also made a test movie for Pinball Fantasies, and that run worked on console, so that was good. EDIT: I implemented a basic version of the GBA glitch. Basically if you are enabling the timer while changing frequency and the old frequency is different from the new frequency, and the old div position was a high bit and the new one is a low bit, then an extra increment of timer happens. This doesn't capture all of the details of the glitch, but gets all the basic cases, including Gensan2. The glitch is rare enough that it doesn't impact existing runs, but the details are strange enough that it's something to keep an eye on.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
Very impressive work on the bubbles. It's one of those things I would not have even considered looking at. Yes vote of course.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
Incredible that such a major glitch is only now being discovered. Great find.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
Daiku no Gen-san - Robot Teikoku no Yabou (Japan) I found an interesting case in this game today. It behaves slightly differently on GBHawk and Gambatte, and neither produces an input file that works on GBI. The first immediate difference between GBHawk and Gambatte is in a timer interrupt, which is pretty strange since timer emulation needs to be practically perfect for pokemon games to work, so there must be a weird edge case happening somewhere. The input files produced are slightly different, varying in timing in 6 places throughout the movie, but they both desync in the same way on console, and the inputs work out the same in terms of emulated frames. I also don't see any uninitialized RAM used, at least not in an obvious way that my checker picks up on. I'll be looking deeper into this, might be something interesting here. EDIT: Alright, so two things came up in this case. First, the primary desync was caused by an edge case of enabling the timer on the same cycle that a state change would occur. In this case, the timer was enabled by writing 5, which tells the timer to check bit 3 of the divider register. At this time, the divider register is 59591, which is 7 (mod 8), so this would trigger a state change since the divider register would increment at the same cycle. What should happen, on GBP at least, is that an extra timer increment should occur. Now, the details of this are not fleshed out that well. There is a test ROM for it called tac_set_disabled.gbc, and GBHawk and Gambatte both fail it in different ways, with neither getting really close. Also, the results are different depending on GBA variant. It's a race condition, so some cases could even be console dependent I suppose. It would probably be a good idea to run this test ROM on various GBP's and see what the results are. Anyway, if I implement the simplest possible case of going from off to on on the same cycle as an increment, then GBHawk desyncs in the same way as GBP. Gambatte on the other hand was already doing this. It desynced for a different more familiar reason, mode 3 timing:
083A:  CB 4E     BIT  1,(HL)             A:66 F:20 B:00 C:0C D:D8 E:85 H:FF L:41 SP:D9F8 Cy:461806951 LY:47 znHcie
083C:  28 03     JR   Z,0841h            A:66 F:20 B:00 C:0C D:D8 E:85 H:FF L:41 SP:D9F8 Cy:461806963 LY:47 znHcie
083E:  FB        EI                      A:66 F:20 B:00 C:0C D:D8 E:85 H:FF L:41 SP:D9F8 Cy:461806971 LY:47 znHcie
083A:  CB 4E     BIT  1,(HL)         A:66 B:00 C:0c D:d8 E:85 F:20 H:ff L:41 LY:2f SP:d9f8  Cy:461806948
083C:  28 03     JR   Z,0841h        A:66 B:00 C:0c D:d8 E:85 F:a0 H:ff L:41 LY:2f SP:d9f8  Cy:461806960
0841:  E1        POP  HL             A:66 B:00 C:0c D:d8 E:85 F:a0 H:ff L:41 LY:2f SP:d9f8  Cy:461806972
Top is GBHawk, bottom is Gambatte. This is at a part of the game where there is a lot of sprites + scrolling. Gambatte fails the test ROMs associated with this case. It's pretty crazy that one movie that I just recorded in a casual way by hand ran into 2 desync cases. I've attached the files for reference. I'm not sure exactly how I want to implement the timer fix in GBHawk yet, it might wait until after 2.5. http://tasvideos.org/userfiles/info/65391155339899622 http://tasvideos.org/userfiles/info/65391163693719305 EDIT: Actually the timer thing is adifferent case from what is tested in tac_set_disabled.gbc. The behaviour here depends on the initial state of the DIV register. I tried running a bunch of Gambatte's timer tests. It looks like the expected timer DIV initial state for GB is zero, and for GBC is 0xFFFF. Almost all of the tests work in GBC mode if I set timer to 0xFFFF. However if I do this then the Gensan 2 run syncs again because it doesn't get an additional timer increment. I need to determine what the initial state is for GBA to narrow down what is going on here. EDIT2: regardless of the initial value of DIV, an extra increment needs to occur in order for this run to sync. I'm currently not sure where it comes from, but it works perfectly on a much longer run , up to 25000 frames, if there is an extra increment when enabling. Note that the starting value of DIV being 0 or 0xFFFF is invisible to the pokemon TASes because they only read DIV and don't use the timer the same way, and invisible to pokemon TCG because DIV is reset by speed switch.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
No, there is an open issue for this but there hasn't been any activity on it. You can manually add database entries to gamedb_user.txt, but you have to be careful to follow the format used for that system. the issue is https://github.com/TASVideos/BizHawk/issues/1670
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
It doesn't 0 everything. 0x3000-0x5000, 0x5200-0x6000, and 0x7000-0x7990 in WRAM are all uninitialized, if I default them to 0xFF they stay that way. It looks like maybe it wants to check the player state but is in the wrong RAM bank, it reads from 0x595D WRAM which is in the never initialized range. Seems like it doesn't really matter though, doesn't have any actual impact. EDIT: the game Daiku no Gen-san - Ghost Building Company (Japan) uses uninitialized RAM at the start of level 2, this causes a desync towards the end of the level. I'm going to compile all the uninitialized RAM stuff in the opening post at some point.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
4384:  FA 5D D9  LD   A,(#D95Dh)         A:00 F:80 B:C2 C:91 D:0A E:00 H:C2 L:91 SP:C0B9 Cy:323183331 LY:149 ZnhciE
4387:  FE 01     CP   #01h               A:00 F:80 B:C2 C:91 D:0A E:00 H:C2 L:91 SP:C0B9 Cy:323183347 LY:149 ZnhciE
I was looking through different games and runs for uses of uninitialized memory and saw this example in Pokemon Crystal. It happens during the start of the credits. I tried setting D95D to one, and it does take a different code path but I didn't notice anything really different happening. Not sure what it could be related to, just thought I'd make note of it.