1 2
9 10 11
19 20
Skilled player (1738)
Joined: 9/17/2009
Posts: 4980
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Alyosha wrote:
@scrimpeh: Sure it's possible for input to have an impact when the screen is off, especially if IRQ's are on. The correct way to time runs is with cycle count. Gambatte also requires this, as TIKevin83 pointed out in a recent submission (just to a lesser extent.)
Not sure how feasible it is, but if so, can you please make a "Display cycle count" similar to "Display FPS" under view? Even if it ended up being the same cycle count, it messes up comparing runs unless the person knows to use "emu.totalexecutedcycles()" in lua beforehand. Edit: Does this also mean runs of GB games using GBHawk always have to have their times manually adjusted when submitted to here due to the site parser using frames as length?
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3811)
Joined: 11/30/2014
Posts: 2829
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, Emulator Coder, Expert player (3811)
Joined: 11/30/2014
Posts: 2829
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.
Fortranm
He/Him
Editor, Experienced player (878)
Joined: 10/19/2013
Posts: 1121
The pallets are not displayed correctly for Felix the Cat on GBC mode.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3811)
Joined: 11/30/2014
Posts: 2829
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, Emulator Coder, Expert player (3811)
Joined: 11/30/2014
Posts: 2829
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.
Editor, Expert player (2329)
Joined: 5/15/2007
Posts: 3933
Location: Germany
Fortranm
He/Him
Editor, Experienced player (878)
Joined: 10/19/2013
Posts: 1121
http://tasvideos.org/forum/viewtopic.php?t=2568&postdays=0&postorder=asc&start=300 There have been discussions about a potential Pokemon Gen 2 diploma run, which requires at least 3 players.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3811)
Joined: 11/30/2014
Posts: 2829
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, Emulator Coder, Expert player (3811)
Joined: 11/30/2014
Posts: 2829
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.
endrift
Any
Emulator Coder
Joined: 12/14/2014
Posts: 161
Are you talking about STAT IRQ blocking? That's a known thing that's fairly well understood these days. It's not well documented yet, but there are people who you can ask if you want more info. Specifically, most of them are on this Discord: https://discord.gg/gpBxq85 (there's an IRC bridge on EFnet too, but I'm not sure what the channel name is)
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3811)
Joined: 11/30/2014
Posts: 2829
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, Emulator Coder, Expert player (3811)
Joined: 11/30/2014
Posts: 2829
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, Emulator Coder, Expert player (3811)
Joined: 11/30/2014
Posts: 2829
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!
TiKevin83
He/Him
Ambassador, Moderator, Site Developer, Player (155)
Joined: 3/17/2018
Posts: 358
Location: Holland, MI
Thanks Alyosha, When you get done with that I'll check all of the testROMs I know of now that they display properly so we can see how close things are to being able to expand beyond Pokemon games with Console Verification.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3811)
Joined: 11/30/2014
Posts: 2829
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.
TiKevin83
He/Him
Ambassador, Moderator, Site Developer, Player (155)
Joined: 3/17/2018
Posts: 358
Location: Holland, MI
The RTC isn't too critical because it's a function of the cartridge and we've observed that Crystal cartridges do not all have the same RTC error. MrWint handled this in Gambatte by adding a variable for RTC speed error to the movie file, not sure how you'd want to handle it in GBHawk
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3811)
Joined: 11/30/2014
Posts: 2829
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, Emulator Coder, Expert player (3811)
Joined: 11/30/2014
Posts: 2829
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.
Editor, Reviewer, Skilled player (1354)
Joined: 9/12/2016
Posts: 1646
Location: Italy
I just tried the BizHawk 2.3.3 and noticed the new sync setting "Timer Div Initial Time". What I find it weird is that it says "Don't change from 0" but the default value is 8, which apparently should only be used for GBC in GBA mode. So, which one is the actually suggested one? Also, if it's known to be platform-related, shouldn't it be automatically changed depending on the mode used? (GB/GBC vs GBCinGBA)
my personal page - my YouTube channel - my GitHub - my Discord: thunderaxe31 <Masterjun> if you look at the "NES" in a weird angle, it actually clearly says "GBA"
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3811)
Joined: 11/30/2014
Posts: 2829
Location: US
Oops, yeah you are right it should say 'don't change from 8.' Yeah I should really remove that as a sync setting since it's probably always 8 (actually it's likely just CPU reset vector processing.) It's more of a leftover from comparisons with gambatte earlier on in development. I'll probably remove it as a sync setting for 2.4. EDIT: Done.
Editor, Reviewer, Skilled player (1354)
Joined: 9/12/2016
Posts: 1646
Location: Italy
All right, thanks. By the way, here is another thing:
Alyosha wrote:
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.)
Well, not really, since in order to fill the Pokédex in Gen 2 games you need to trade with both a Gen 1 game and a Gen 2 game. So it would need to implement cart swapping in GBHawkLink in order to have a Gen 2 catch em all movie... Well you can also use glitches in order to catch the remaining Pokémon, but at that point it would make no sense to use the trading system at all.
my personal page - my YouTube channel - my GitHub - my Discord: thunderaxe31 <Masterjun> if you look at the "NES" in a weird angle, it actually clearly says "GBA"
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3811)
Joined: 11/30/2014
Posts: 2829
Location: US
Nope, there is a 3x option where you run 3 games at a time. Just use 'GB3x' in multi disk bundler. It even does IR comm.
Editor, Reviewer, Skilled player (1354)
Joined: 9/12/2016
Posts: 1646
Location: Italy
Looks like the site parser identifies GBCHawk movies as GB platform, probably because the header doesn't include the IsCGBMode flag that Gambatte movies have. So we either need to implement this flag for GBCHawk or add more logic into the site code.
my personal page - my YouTube channel - my GitHub - my Discord: thunderaxe31 <Masterjun> if you look at the "NES" in a weird angle, it actually clearly says "GBA"
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3811)
Joined: 11/30/2014
Posts: 2829
Location: US
ThunderAxe31 wrote:
Looks like the site parser identifies GBCHawk movies as GB platform, probably because the header doesn't include the IsCGBMode flag that Gambatte movies have. So we either need to implement this flag for GBCHawk or add more logic into the site code.
Fixed in master. But might still be wrong for linked versions since mixing GB and GBC is allowed.
1 2
9 10 11
19 20