Posts for Alyosha


Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Cool trick. Discoveries like this that are relatively simple yet no one ever thought to try always makes me wonder what other stuff is still out there to be found. Yes vote.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Yeah that should work nicely for cases of only uninitialized WRAM. I haven't tried Gensan 1 with just loading GBA bios, but I'll try in the next few days to check since it uses HRAM. If nothing else, it's pretty clear that 0xFF is not stable while 0 is, at least in my testing, very stable, so I think just clarifying that is already worth the time it took me to test everything.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
I resynced oracle of ages and seasons with initial RAM all 0's (but SRAm still 0xFF.) Ages synced fine, it even synced when I forogt to clear the RAM, so I guess it's not that sensitive to initial state. This time though Seasons also synced. Well, up to the last boss which I have to redo again since it broke again in the new resync. So I'm pretty confident that 0's in RAM is a good clean configuration for GBA mode runs that encounter uninitialized RAM. I'll be updating runs and input files as I get them sorted out.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
I made a test run of Gensan 1 in dev build which used 0xFF as initial HRAM. I then used my clearing cart that writes all 0xFF to console then hot swapped the Gensan cart and reset the Game Cube to see if it would sync. It did not. In fact it consistently desynced in the same spot about half way through the run. Both Gambatte and GBHawk agreed (cycle exact) that the run should have synced past the point it desynced, and testing indicated that the desync was the result of a different initial HRAM state then 0xFF. I tested this several times. It desynced in the same spot every time. So I think I can conclude pretty confidently that clearing HRAM to 0xFF does not hold through a reset. Actually, the reset seems to remove power from the GBP for a fairly long time, so if 0xFF is not the default unpowered state, it's not surprising that it doesn't work even with a hot swap. I then changed the run to use 0 instead and retested the hot swap. This worked right away. The run synced to the end of the game, which has never happened before with Gensan 1. So, at least for HRAM, I am setting initial state to 0. I'll do some more testing with other games that use uninitialized WRAM, maybe the same thing holds true there as well and 0 was the right choice to begin with. EDIT: looks like even 0 might still not result in 100% sync, so far I'm out 3/4.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
I'll be showing the Oracle of Ages run tonight at 10 pm eastern time at alyosha_tas if anyone is interested. I also uploaded the RAM clearing program to the github repo. It will set all WRAM and HRAM to 0xFF and then turn off the screen and execute an infinite loop in VRAM. I'm going to try a hot swap test of games that have previously failed due to uninitialized RAM in the next couple of days. Gensan 1 will probably be first on the list, and Race Days as well. I'm hopeful this method will eliminate problems with uninitialized RAM and allow some more runs to be verified.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
http://tasvideos.org/userfiles/info/68236736685619749 Here is a completed resync for oracle of seasons. Unfortunately the last boss desynced (RNG was good but behaviour was different) so I had to redo it at the cost of 90 frames, but everything else is as the original run, and it's right at the end of the run, so maybe it can still be fixed and won't really break anything else (except maybe the second form.) I made up a ROM that sets all WRAM to 0xFF. I then tried the run on console after I ran it. It still desynced in the same way as before, so maybe there is something more substantial then bad WRAM start up at play here. I didn't do a hot swap so I guess it's still possible it could have decayed in the 3 seconds it took me to swap carts and apply power again, not sure. But anyway it's something to keep in mind. I think I'll clean up the clearing ROM to execute from VRAM when it's finished, then maybe hot swapping will be a safer prospect. I think I'll take a break from Zelda for now though and work on something else for a bit, maybe some more work on HDMA edge cases. That resyncing process was mind numbing. I'm almost through my backlog of console verified runs now, so it's maybe also time to start thinking about where GB/C console verification should go from here. It's probably time for a more refined focus then just whatever i can get my hands on, but I'm not really sure how to do that. If anyone has any input please post it.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
I tried working on Seasons again. The initial desync was due to me improperly clearing SRAM, so I closed out the post in the de-verified thread about that one. I also got by the RNG desync that was stopping me before. The bad news is that the run deterministically (or at least the 2 times I tried) desyncs on console about half way through (~190000 frames in.) I tried changing WRAM initial state to reproduce this, I can get runs that desync at about ~100000 frames in, but not this exact desync. I would still guess some initial RAM value is causing the problem, but I don't want to spend forever figuring out exactly which one. I'll probably finish resyncing a run that at least will work in 2.5.3, even though it won't work on console, then move on, there's too much other stuff to do. I'll be streaming again at alyosha_tas at 10 pm eastern time tonight. Runs will be Oddworld 2, Kwirk, Super Mario Bros Deluxe (any% and You vs Boo) I don't think I ever posted the resynced Oddworld 2 run, it's still in gambatte just now it works in 2.4.2 and doesn't use equal length frames: http://tasvideos.org/userfiles/info/67165593974849577
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
I'll be doing another stream at alyosha_tas today at 10:30 eastern time. Runs will be Men in Black the Series, Spirou Robot Invasion, and Megaman Extreme. Also I updated the movie file in the opening post for oracle of ages to work in the dev build. Now it is consistent with console when writing 0xFF to SRAM. I'll try Oracle of Seasons again over the weekend, but I'm pretty sure the new initial WRAM state should solve the consistency problems there as well.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
CasualPokePlayer wrote:
https://github.com/ISSOtm/gb-bootroms/blob/443d7f057ae06e8d1d76fa8083650cf0be2cd0ae/src/cgb.asm#L297 Or it's set to 1 on this write to FF70 shortly before the end of the bootrom?
Huh, I guess I confused myself somewhere along the way. Anyway, I changed GBHawk to just set initial WRAM to 0xFF in GBA mode, since the game seems to check for 0 which is unlikely in most bytes from that dumped file. This gives sync on console that is now actually consistent with emulator when writing 0 to SRAM. So looks like problem solved there. I'll make a new movie for Ages and a new test for Seasons with writing 0xFF to SRAM now since that has been the standard.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Interesting, so definitely not the pattern like CGB, basically random junk. I'll do some more testing. Also, it seems like RAM bank automatically gets set to 1 on he write to FF50. I was only doing this on GB compatibility mode, but Gambatte seems to be doing it in CGB mode too, that is probably also important.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
TiKevin83 wrote:
I would be more suspicious that the cart battery isn't holding since it sometimes will work anyway and settle into FFs, but doesn't always work that easily.
I tested the battery on my Ages cart and it holds zeroes when I write zeroes.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Thanks to everyone who watched the test stream / gave helpful advice. Here is a repo of the input timestamp files I used, I'll be adding more as I get more organized: https://github.com/alyosha-tas/GBI_timestamps I'll link this in the opening post too. Also I did some more research on oracle of ages / seasons. Seasons was randomly syncing occasionally despite not properly clearing RAM, so I went back to Ages to see if maybe I missed something. It turns out that when I was verifying ages I was writing 0 to SRAM before playing the game, not 0xFF. Desptie this fact, I played the run on console several times this way and it always synced. In emulator though, 0xFF was written. If I tried writing 0xFF to the game, it now desyncs on console. How can that be? Ages reads several areas of unintialized RAM in order to set start up values. So, it must be that the initial state in GBA mode is different then in a CGB, so that the error in the time spent clearing WRAM cancels out the error in the time spent clearing SRAM when it is 0xFF. As unlikely as this sounds, it's basically the only variable that can change. I tried a few different possible initial RAM states, and indeed there are some possibilities where the difference in cycles executed after initial startup is only a few hundred cycles. So I think we really need a dump of WRAM from a GBP to see what it actually is.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
I'm going to be doing a test stream of some GB console verificaitons in about an hour (11 pm eastern time) if anyone wants to watch. I'll be doing batman return of the joker, battletoads, and maybe zen intergalactic ninja if things go smoothly. It will be alyosha_tas on twitch.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Unfortunately I was only able to catch a little bit of the event live, but what I saw looked pretty well put together and seemed to be going pretty well (at the time I saw it), so well done to the organizers and tech people for at least getting that far. Probably could have used a few more months of lead time, as putting together TAS content is just slow by nature. I don't really get the other criticism about involving this site more, the opportunity was there to get involved (though apparently some lack of communication caused an issue as above.) But honestly there weren't many posts in the event thread even expressing that much interest, where as event planning needs active people actively doing stuff. Seems reasonable not to keep pumping at a dry well. But also maybe some more lead time in the future can give more people the chance to get involved without being faced with a short deadline right out of the gate, maybe.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Game: Legend of Zelda: Oracle of Seasons Emulator: BizHawk: Gambatte (but also behaves the same in GBHawk) in GBA mode Console Verification Device: Gameboy Player with GBI Movie: http://tasvideos.org/userfiles/info/68126602397597426 Description of Desync: On emulator, Link walks over a pit after collecting a key. On console, Link falls in the pit instead. Research: I tried changing input latch timings but that made it worse. Comparing video of the desync to emulator, it looks like input is applied one frame to early after the room transition (or the transition takes one frame longer) after Link gets the key. No idea why. Also a complete run of Oracle of Ages syncs on console, what's different? Possible Next Steps: ? Status: Closed. Resolution: Uninitialized WRAM combined with improperly writing SRAM to 0 instead of 0xFF led to the desync.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
http://tasvideos.org/userfiles/info/68123456048984346 Well I tried resyncing oracle of seasons but it hit a hard desync a little over half way through the run at a mini boss. For some reason RNG advances in the middle of the fight in GBHawk but not VBA. Even if you edit the fight it will desync shortly after also due to RNG. But that doesn't really matter, because on console it desyncs in the Hero's Cave at the start of the game. After getting the first key Link is supposed to walk over a pit, but on console he falls in. No idea why this would be, I tried changing the input timings slightly but that just makes it worse. Oracle of Seasons seems to run pretty much the same as Ages, so not sure wy one syncs but the other doesn't. I put the run into Gambatte as well and plays the same as in GBHawk, and I confirmed that executed cycles match between the two cores. I also dumped input from the Gambatte run and it desyncs the same way on console. I'm going to put this one in the failures for now.
Post subject: Re: Odyssey2 System Bus only shows ROM.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
TheAlmightyGuru wrote:
The System Bus memory domain in the Hex Editor and RAM Search for the Odyssey2 emulator appears to only show the ROM memory domain. Is this a mistake? Shouldn't the system bus include the RAM?
No, system bus is what is visible to the 8048 from the PC register, which in this case is just whatever ROM banks are currently mapped in and the BIOS. RAM, ppu, etc are accessed with port R/W functions. I guess I could make a separate 'port bus' domain but it would be kind of messy, and even that would miss CPU RAM which is internal to the cpu. So, I think in this case it's better just to use the individual domains.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
http://tasvideos.org/userfiles/info/67994414567448321 I resynced the Zelda oracle of ages TAS to GBHawk. The above movie will play back in the current dev build. I have successfully console verified it as well. I recorded the last few minutes so I'll post a video tomorrow.Messed up the video so no upload. The run isn't an exact duplicate of the original, but it's correct to within a couple dozen frames, mostly just adding or subtracting a frame here and there to adjust. This run revealed a bug in GBHawk's implementation of the ram bank register. The wrong warp at the end of the game requires a return value of 0 when zero is written, even though bank 1 is used. It also requires upper bits to read back as 1s. This game reads uninitialized memory at start up, so I also adjusted GBHawk's initial RAM state to match an idealized version of Gambatte's to match timing a bit closer. But, the games isn't too picky about timing anyway. I also added a setting in GBHawk to allow dumping of double speed mode games to be used with GBI. I'll be working on the Oracle of Seasons run too, that one will probably not be done very soon though as it was made in VBA so will be much more tedious to sync. I think it will be worth the effort in the end though.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
EZGames69 wrote:
After a bit of a talk with TiKevin83, it’s unlikely we’ll see a solution for the desync on console for awhile, so I’m gonna retract my request to delay this submission.
what was wrong with it?
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
I fixed screen fading to white in GBC mode. I also made a big improvement to mode 1 timing, fixes a lot of tests but doesn't seem to effect any games yet. Mode 1 isn't used that often. I made a test run of Wacky Racers. GBHawk and Gambatte agree cycle for cycle, but the run desyncs on console with default input script. I adjusted the script so that inputs are set slightly later (about 2000 cycles at 4MHz) and then it worked fine on console. I think the problem is that the game processes input at scanline 143, very non-standard, as you'd normally expect input processed sometime into vblank. I tested a bunch of other possibilities why emulation might not be right, but it seems to be right so I'm leaving it there for now.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
6 years seems so long ago! Nice improvement on this, looking forward to the new improvement hyper jump to the end. yes vote.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Not sure how I'll deal with that yet. The screen can't go white immediately or cinematics on some games like MiB won't work. I'll consider it low priority for now, will have to get done eventually though. I'm making steady progress on a lot of HDMA cases and other miscellaneous timing stuff. I think the biggest weakness in overall timing right now is LY/LYC around the 153->0 transition in double speed mode. Timing of audio stuff in double speed mode also isn't that great yet, but I haven't looked at audio closely in a while so that's to be expected. I'm going to make a few more test runs of tricky games like Wacky Racers as well and see what comes up, that has proved useful before. If anyone has any GBC games they want to see console verified as well let me know. I think I'm going to look at the oracle of ages /seasons TASes soon also.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Looks like it would be faster to get the clip overall, so I'll cancel this one. I can't get the clip to work in 1.1 rev, but maybe I'm just not doing it right.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Oh neat, that's what I get for not doing proper research. Pretty cool glitch there. EDIT: not sure it's faster though, getting power ups takes a long time, make save enough time including killing the pirahna plants in 8-4 though.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Oh cool I was thinking about working on this game at some point but you beat me to it. Nice work and yes vote.