Posts for Alyosha
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Cool! I'm always surprised how these type of things end up with a useful result instead of just random nonsense. Nice work, yes vote.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
There is not. There is already an issue on the tracker for this, probably won't happen any time soon.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
I mostly fixed this. Saving won't change the displayed value to hex anymore. Loading still will, but at least you can change it back now since the 'display as' button now works correctly. Some things with signed values are still wrong, so I don't recommend using them.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Cool transparency effect! I dont think i would have noticed if you didnt point it out.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
http://tasvideos.org/userfiles/info/58687251796716780 I managed to recreate the game end glitch in Wario Land in the most recent GBHawk build. It's not exactly the same as the original, but I found another suitable setup with only small modifications. the levels are played the exact same, only the ending input changes. This one would be cool to see console verified. The Gambatte version does not work, it seems the STOP instruction is emulated differently in current builds. I'm not entirely sure what's going wrong. EDIT: Game de Hakken!! Tamagotchi - Osutchi to Mesutchi (Japan) now works in GBHawk (except for RTC.) this is a Japan only Tamagotchi game that has it's own unique cartridge hardware. The game is playable in non-RTC mode at least now. I might go back to fix up the RTC someday but it's not a priority, I just wanted the mapper implemented.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Alright I added an RTC offset correction factor. It doesn't directly translate into the Gambatte equivalent setting, but I doubt there will be too many 2+ hour runs where it will be all that noticeable. From what I can tell the error is only around 1/32768 of a second. EDIT: http://tasvideos.org/userfiles/info/58555860013787500 Finally, this long exercise is at an end and I have a complete re-sync of the pokemon crystal run in GBHawk. This has been an excruciating but also very rewarding task, as I learned a great deal about the GBC in the process and fixed many bugs both small and large. With both the crystal run and yellow run working, the Gen 2 catch em all should be doable with realistic accuracy (although linking is not tested for accuracy itself.) Now we should finally be able to start pushing forward with other games. I already pass many more sprite timing tests then Gambatte does, and with these two runs as bench marks it strongly constrains what in the code can be changed in the future.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Yeah we should definitely be able to start cracking some of the simpler games. for single speed mode at least (and GB games) there really shouldn't be much standing in the way of console verification anymore. I guess we'll find out. After that double speed mode basically isn't even touched yet, so that should be interesting. Anyway I'm over half way through the run now (past the radio tower.) Truth be told there are some inconsistencies with the RTC but it isn't effecting sync yet, and I can always adjust that as needed so it's not a big deal.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
I ran into a desync around frame 60000, surprising it made it so far without running into it. Turns out it was a window timing bug. This process has revealed a lot of small errors here and there that I'm glad I'm getting the opportunity to fix. Now I'm up to frame 116000 (just past the third gym.) I don't think there will be any more desyncs unless something comes up with the RTC, but anyway I'll make sure to make it to the end. Pokemon Yellow and Crystal both rely on careful mode 3 (HBL) timing but in different ways. Yellow relies on reading STAT mode 3 status, while Crystal relies on mode 3 interrupts. So, getting both the Crystal run and yellow run working at the same time strongly constrains what else can be right and wrong with PPU timing (at least for this part of it) so this is all really valuable for accuracy. Cool stuff!
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
After the most recent changes I am now able to sync the crystal run up through the first gym leader. This has been a laborious process but it really helped me to understand the timings that need to be correct in order for this run to work.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Nope not STAT blocking I have that pretty well working I think. It's figuring out when in the course of IRQ handling an interrupt from the same source can re-assert the IRQ flag. Originally I had supposed it was after the IRQ vector is chosen, but it seems this is wrong and it cannot happen until processing is complete and the next instruction starts. At least this is what is necessary for the pokemon crystal run, which is console verified, to work.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
I'm making renewed progress on syncing up pokemon crystal. I'm able to get in game with the correct RNG and RTC now. I'm still investigating the emulation of the IRQ blocking that's going on on the cpu side. It looks like it blocks IRQs from re-raising the IRQ flag while the interrupt is still being processed. It works correctly for crystal. I'm going to take some time and make sure it doesn't effect the other runs before I commit it though.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Looks like Kwirk isn't quite done yet. I realized I made a mistake in 2-7 pushing a block unnecessarily, then I noticed that I could also saves 4 steps with a pretty obvious oversight. I don't think there are any other improvements before 2-7, but I'm going over everything again. EDIT: 3-4 improved by one move and one unnecessary push. 3-7 improved by 2 unnecessary moves. 3-9 improved 4 unnecessary moves (my goodness I made a lot of oversights.)
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Initial testing shows GB gmes running at about 25 fps on my laptop in 4x mode, pretty slow. I think I can probably improve this a little bit but it will be hard getting up to 60 fps, probably impossible for GBC games. EDIT: actually I had my laptop in low power mode, in regular mode I get just about 60 fps. With a few optimizations I should be able to get full 60 fps when all the linking is done. Also, here is card pop on pokemon trading card game: This one seemed to give Shonumi some trouble so I used it as a test case to see how robust my implementation is. I didn't run into any trouble, but the games are changing speed a lot during the IR comm process, which is pretty strange. I didn't look into why they do this or too heavily into the IR algorithm since it seems to work just fine. One thing I did notice is that you can't have both players press 'A' near the same time or it fails.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
I'm having fun working on Gameboy stuff lately, so I decided to go ahead and work on 4 player support. It will be a stripped down version focusing on the 4 player cable (DMG 007) for now, hopefully I'll be able to get the speed up to full speed. Nothing functional yet, but if anyone has any ideas of how 4 player support might be used in a TAS setting let me know so I can consider them.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
WRAM is pokable, so you can easily override the initial 'randomization' even in 2.x Just do this after memory domains are setup:
			for (int i = 0; i <_memoryDomainList> 0)
				{
					if ((i & 1) > 0)
					{
						_memoryDomainList[0].PokeByte(i, 0);
					}
					else
					{
						_memoryDomainList[0].PokeByte(i, 0xFF);
					}
				}
				else
				{
					if ((i & 1) > 0)
					{
						_memoryDomainList[0].PokeByte(i, 0xFF);
					}
					else
					{
						_memoryDomainList[0].PokeByte(i, 0);
					}
				}
			}
I think this correctly recreates the second pattern above (I just tested it and it works as expected.) Seems like a good alternative to the incorrect randomization routine. Is this something we want to do for SNES? Will the run even sync with this 'fix?'
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
That's a cool graph, SNES people really have done their research. Thanks for posting that. So looks like 0x55 is valid (or close enough.) And also 0x00 - 0xFF, that's surprising, pretty cool. I wonder if I can force BizHawk to use that alternating 0x00 - 0xFF pattern, that should be enough for this submission, I think I'll try. (Building bsnes is hopeless for me, but maybe I can do something post initialization.)
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Wow the characters in Pooyan are quite impressive, almost looks like Minecraft now, nice work.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
return 0x55555555
seems just as good as
return iter = (iter >> 1) ^ (((iter & 1) - 1) & 0xedb88320); 
to me. Both are likely equally improbable. Since 00 and FF both work, I think this is good enough. That aside, this game looks cool and that ending was really impressive, I vote yes.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Fortranm wrote:
The pallets are not displayed correctly for Felix the Cat on GBC mode.
oops, fixed now. EDIT: http://tasvideos.org/userfiles/info/58572449838190423 here is a GBHawk resync of the previous pokemon blue glitched run by gifvex. This run now uses a different ppu core in GBHawk so it's good it still works. This core will be used for GB compatibility mode games like this going forward. EDIT2: I got IR comm working now too, in 3x version as well.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
More progress is being made on various fronts on GBHawk. Frame processing is improved so MIB the series behaves correctly and doesn't flicker now. HDMA is improved so that Worms Armageddon, which expects one cycle of HDMA transfer to occur when the screen is off, now works correctly. The linking protocol is significantly improved so that games needing double speed mode transfers in GBC double speed mode now work, and an edge case of HDMA interference is dealt with, so now Perfect Dark multiplayer works. I've found where the pokemon crystal run desyncs in GBHawk. There is some interrupt blocking that occurs when an HBlank interrupt occurs while an interrupt for HBlank is currently happening. This is un-emulated so far so I'll have to look into it.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
That information is now outdated. Gbhawk now uses constant length frames, so frame count is now an accurate representation of time.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
@Chamale: Ok Pokemon Crystal is finally fixed. Turns out it was an HDMA bug. Please try 3x again and make sure everything is good on your end. I'm making more progress at tracking down and fixing accuracy issues. I'll be checking Pokemon yellow glitched next, then trying to sync the crystal run. After that I should have all the information I need to at least have an accurate single speed mode. All of the pokemon games only run in single speed mode, so this should be pretty straight forward. Then the next step will be GBC in compatibility mode, which should be only small adjustments from single speed mode. After that the big challenge will be double speed mode. EDIT: I just added in IR support for GBC as well, it still needs testing though. EDIT2: http://tasvideos.org/userfiles/info/58572461423264950 here is a resync of the pokemon yellow game end glitch run as well.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
http://tasvideos.org/userfiles/info/58572432775661275 Here is the pokemon yellow console verified run resynced in GBHawk (again.) This isn't anything new, more just a proof of correctness for all the rework I've done since I resynced it the last time. Now I will move on to Crystal.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
I've decided not to just truncate this. I did not optimize for any%, only the same rules as the current run. there are many other variables to consider, I'll leave it someone else. Feel free to reject.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
I have made some pretty significant changes to GBHawk and the associated linked versions, they are pretty big changes which should help with long term maintenance and improvements. First, frames now run at a constant time interval. No more variable length frames or waiting for VBlank. This should take care of audio issues. However, input processing still happens on VBlank boundaries, so there won't be any annoying circumstances where input can change midway through a video frame just because Bizhawk cuts up the frame there. Second, the input processing method from GBHawk is carried over to the linked versions, so that each separate console now also only processes input on VBlank boundaries. This is helpful because linked modes always ran at a constant rate by necessity, but the input could happen anywhere the frame was cut. This issue is now dealt with. Third, video processing is improved, so that in linked versions there won't be anymore annoying visual glitches after loading a state. This has a slight downsize of increasing state size by quite a bit, but it's still small overall (~50KB) Finally on the accuracy front, I've separated GBC-GB compatibility mode ppu from GBC single speed mode. this will eventually allow for more accuracy improvements and hopefully more console verification. GBC in GBC mode behaves quite differently from compatibility mode, so this was a necessary and long overdue step. As always keep an eye out for regressions. I'll be testing the new changes by re-syncing pokemon yellow and hopefully the crystal run to GBHawk. EDIT: @chamale please try the dev build for pokemon crystal, it might have fixed it.