Posts for Alyosha

Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
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 (3572)
Joined: 11/30/2014
Posts: 2744
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 (3572)
Joined: 11/30/2014
Posts: 2744
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 (3572)
Joined: 11/30/2014
Posts: 2744
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 (3572)
Joined: 11/30/2014
Posts: 2744
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 (3572)
Joined: 11/30/2014
Posts: 2744
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 (3572)
Joined: 11/30/2014
Posts: 2744
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 (3572)
Joined: 11/30/2014
Posts: 2744
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 (3572)
Joined: 11/30/2014
Posts: 2744
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 (3572)
Joined: 11/30/2014
Posts: 2744
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 (3572)
Joined: 11/30/2014
Posts: 2744
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 (3572)
Joined: 11/30/2014
Posts: 2744
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 (3572)
Joined: 11/30/2014
Posts: 2744
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 (3572)
Joined: 11/30/2014
Posts: 2744
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 (3572)
Joined: 11/30/2014
Posts: 2744
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 (3572)
Joined: 11/30/2014
Posts: 2744
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 (3572)
Joined: 11/30/2014
Posts: 2744
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.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
Warp wrote:
Whether to publish something on Vault or Moons is ultimately arbitrary and up to opinion. You cannot remove arbitrariness from this.
I think this is why nothing ever happens when discussions about this come up. It doesn't really matter what the poll asks or how many ways there are to answer. This is a system that runs on inertia, not utility. The perception of the poll will not change even if it's content changes.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
It's dead. I lost interest and motivation. I don't have the patience to do all the interface stuff.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
It doesn't happen on single core GBHawk? it will take a few days again but I'll look into it. Also I did a few updates so please use the most recent dev build, it maybe might fix your problem. EDIT: also please verify that the rom you are using has one of these 2 hashes:
F2F52230B536214EF7C9924F483392993E226CFB	G	Pokemon - Crystal Version (USA, Europe) (Rev A)	GBC		
F4CD194BDEE0D04CA4EAC29E09B8E4E9D818C133	G	Pokemon - Crystal Version (USA, Europe)	GBC	
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
Cool, glad it works. Keep in mind that this is pretty much untested, so I would encourage you to try and think of difficult cases and see if anything breaks before seriously attempting any work. Things like SRAM have not been thoroughly looked into, and savestates haven't been verified for all cases. Also, trace logger and lag definition only follow the left console, if you need something more thorough and complicated, let me know.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
Will the truncated movie still obsolete the current run?
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
Cool, nice work finding an additional time save.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
I did some testing and it seems to work just fine. My guess is that you probably tried to link on both consoles at the exact same time. This will not work. There needs to be some time between when the first console tries to link and the second, usually a couple of frames. This is because the first console to try linking will become the master time keeper. The second console will then be slaved to it, and will only send and receive data when triggered by the master console. When you try to link at exactly the same time, both consoles try to be the master time keeper, and cannot sync properly.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3572)
Joined: 11/30/2014
Posts: 2744
Location: US
Chamale wrote:
Ah, thank you. The link buttons are working in the console window, but the games are responding as if they aren't linked. Here's a savestate of three Pokemon Yellow games prepared to trade, which aren't successfully linking. I appreciate that you're setting up this feature that may only be useful for one TAS. Hopefully I can get it working.
Alright good, so at least we're on the same page. Give me a few days to sort this out. The big advantage of in house cores is exactly for situations like this, new utilities are relatively easily built on top of an existing framework. As long as someone is actually going to use it, I'm happy to add stuff in.