1 2
10 11 12
19 20
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3821)
Joined: 11/30/2014
Posts: 2829
Location: US
SubGBHawk is here! Subframe inputs and resets are supported. By necessity, it works a little different then SubNESHawk. Every 'frame' has an input validity time. Any buttons pushed during that time are registered. Power button is also registered during this same time. If a frame end event happens, the validity time is truncated. This will be registered as a lag frame, however input will still be processed during time. So it's not actually lag, it's just a visual representation of where GBHawk is ending the frame (it's actually an audio frame strictly speaking.) So by example, lets say you pick a validity time of 200 Then you will have: (end of current frame, shown as lag frame) 200 *some inputs* 200 *some inputs* . . . 200 *some inputs* (another 'lag' frame 70224 cycles later.) you can change validity time whenever you want, it can be anywhere from one to 70224 (a normal frame time) with default of 70224. When power is pressed, it will act as pressed until the current frame ends. This is new so some testing is required, but it seems to be working correctly. This was one of my goals when first starting GBHawk, so it's nice to have it almost done.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3821)
Joined: 11/30/2014
Posts: 2829
Location: US
Thanks to Shonumi's documentation, the 4x adapter now functions in the current dev build. You can now play 4 player GB games in BizHawk. I tested f1-race, rc pro am, and wave race and 4 player functionality works for them. I tested 2 player on micro machines and it works. I tested 2 player on Yoshi's cookie and it does not work, not sure why yet. EDIT: Yoshi's Cookie is not responding to the four player adapter pings. I'm guessing it's not really compatible with it. I was testing Yoshi not Yoshi's cookie oops. As you can see from the screen shot, it doesn't quite run at 60 fps on my laptop, I'll try to do some optimizations to get the speed up, but for now if anyone is interested feel free to play around with it and let me know of any bugs. This should still be considered WIP. EDIT: the 4 player adapter is the default connection setting in 4x mode. You don't have to press anything to get into the 4 player adapter. This is the last major peripheral I wanted to implement personally in GBHawk. It probably doesn't have any TAS potential, I just thought it was cool. I'm not really 100% certain about the networking algorithm, I just did what made sense and followed Shonumi's documentation and it seems to work pretty well, although almost certainly not hardware accurate. I know there are a lot of other peripherals in the gameboy domain, but I'm not super interested in them. Some of them are probably TAS worthy, If anyone feels inspired to implement more of them I can help along the way.
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3573)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
This is so awesome!
It's hard to look this good. My TAS projects
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3821)
Joined: 11/30/2014
Posts: 2829
Location: US
I optimized GBHawk's cpu core a bit and now 4x is a bit more stable. Wave Race still struggles though, I think because it does more complicated stuff with the screen. Ultimately I'm just running up against the fact that GBHawk and C# are slow and doing 4x as much as normal plus linking logic is really a lot of stuff. Still I'll try a little more to get wave race up to speed, maybe there is something obvious I can do that I'm not seeing yet. At any rate the CPU improvements were a necessary step that would have to happen sooner or later just because the previous implementation was pretty sub-optimal.
TiKevin83
He/Him
Ambassador, Moderator, Site Developer, Player (155)
Joined: 3/17/2018
Posts: 358
Location: Holland, MI
Oh that reminds me I tried to see if GBHawk would play LIJI''s gbvideoplayer2 demos but they don't run anywhere near at full framerate so I couldn't really tell if they were accurate
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3821)
Joined: 11/30/2014
Posts: 2829
Location: US
TiKevin83 wrote:
Oh that reminds me I tried to see if GBHawk would play LIJI''s gbvideoplayer2 demos but they don't run anywhere near at full framerate so I couldn't really tell if they were accurate
Really? I tried just now at it runs at about 3x speed for me. Looks correct. No sound though, looks like I'm missing something there. I'll look into the sound.
TiKevin83
He/Him
Ambassador, Moderator, Site Developer, Player (155)
Joined: 3/17/2018
Posts: 358
Location: Holland, MI
You're right - I might have been building bizhawk in debug mode on accident making it run slower, but the sound isn't there either way
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3821)
Joined: 11/30/2014
Posts: 2829
Location: US
I think it's the same thing as with Oddworld 2 where the sound effects don't work. I haven't figured it out yet so at least this gives me another data point to work with. EDIT: Audio is fixed. It was similar to how Perfect Dark does audio. Oddworld 2 looks slightly different, looks like I need to emulate the DC bias of the audio better to get that to work.
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3573)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
How often do the linked cores need to sync up? I wonder if running them in separate threads would be beneficial.
It's hard to look this good. My TAS projects
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3821)
Joined: 11/30/2014
Posts: 2829
Location: US
The adapter itself is the master time keeper, so each console needs to only sync up when its sending out data. I don't have a clean way to do that right now though (everything just runs one cycle at a time.) I don't know anything about threads, but if you can make this : A.do_single_step(); B.do_single_step(); C.do_single_step(); D.do_single_step(); run simultaneously instead of sequentially, that would be where most of the benefit would come from. The linking itself doesn't slow things down that much, but it's just enough to bring it below full speed. Most of the work is being done in those do_single_step() calls and they are completely independent.
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3573)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
If they have to stay in sync per step, I think threads might hurt more than they help, maybe. But it would be pretty easy to try it
It's hard to look this good. My TAS projects
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3821)
Joined: 11/30/2014
Posts: 2829
Location: US
I made some improvements to the linking logic to be more efficient, it runs a bit better now. I'm at full speed pretty much all the time. It's possible that I could run the cores for X steps at a time instead of one step at a time for 4 player linking, but this would complicate the implementation and I'd rather avoid it.
Fortranm
He/Him
Editor, Experienced player (878)
Joined: 10/19/2013
Posts: 1121
Wario Land II (GBC) doesn't save properly even after I turn on the "Use Existing SaveRAM" option.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3821)
Joined: 11/30/2014
Posts: 2829
Location: US
Fortranm wrote:
Wario Land II (GBC) doesn't save properly even after I turn on the "Use Existing SaveRAM" option.
Alright I'll add it to the issue tracker.
EZGames69
He/They
Publisher, Reviewer, Expert player (4460)
Joined: 5/29/2017
Posts: 2761
Was it made by default if I try to import a VBM into bizhawk, it imports it to GBHawk instead of letting me choose the core? I am trying to get an old movie to sync on gambette for comparisons and I'm finding it really annoying that I cant choose which core to import it to.
[14:15] <feos> WinDOES what DOSn't 12:33:44 PM <Mothrayas> "I got an oof with my game!" Mothrayas Today at 12:22: <Colin> thank you for supporting noble causes such as my feet MemoryTAS Today at 11:55 AM: you wouldn't know beauty if it slapped you in the face with a giant fish [Today at 4:51 PM] Mothrayas: although if you like your own tweets that's the online equivalent of sniffing your own farts and probably tells a lot about you as a person MemoryTAS Today at 7:01 PM: But I exert big staff energy honestly lol Samsara Today at 1:20 PM: wouldn't ACE in a real life TAS just stand for Actually Cease Existing
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3821)
Joined: 11/30/2014
Posts: 2829
Location: US
It depends on which core you have loaded. If you have Gambatte loaded it will import as Gambatte.
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3573)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
as of 2.4, I added sync settings to the importer logic. To do that means it picks the core. I picked it to be GBHawk. My understanding is that is the more accurate and therefore preferred core. We have no support currently to add sync settings ANd let the user choose the core
It's hard to look this good. My TAS projects
EZGames69
He/They
Publisher, Reviewer, Expert player (4460)
Joined: 5/29/2017
Posts: 2761
Gambette as of right now is more accurate than GBHawk. the accuracy is so precise that it's expected that every game can be console verified (if put into GBC in GBA mode that is). So I think Gambette should be the default choice.
[14:15] <feos> WinDOES what DOSn't 12:33:44 PM <Mothrayas> "I got an oof with my game!" Mothrayas Today at 12:22: <Colin> thank you for supporting noble causes such as my feet MemoryTAS Today at 11:55 AM: you wouldn't know beauty if it slapped you in the face with a giant fish [Today at 4:51 PM] Mothrayas: although if you like your own tweets that's the online equivalent of sniffing your own farts and probably tells a lot about you as a person MemoryTAS Today at 7:01 PM: But I exert big staff energy honestly lol Samsara Today at 1:20 PM: wouldn't ACE in a real life TAS just stand for Actually Cease Existing
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3821)
Joined: 11/30/2014
Posts: 2829
Location: US
adelikat wrote:
as of 2.4, I added sync settings to the importer logic. To do that means it picks the core. I picked it to be GBHawk. My understanding is that is the more accurate and therefore preferred core. We have no support currently to add sync settings ANd let the user choose the core
it does? I tested just now and when gambatte is loaded the input roll still is imported as gambatte, so this at least needs to be fixed. I should be able to unify sync settings so that either core should work for importing though.
EZGames69 wrote:
Gambette as of right now is more accurate than GBHawk. the accuracy is so precise that it's expected that every game can be console verified (if put into GBC in GBA mode that is). So I think Gambette should be the default choice.
It is not more accurate, as far as I know everything that has console verified in Gambatte also works in GBHawk (with some re-syncing due to frame timing differences.) This also includes the most recent Mickey's Dangerous Chase level 1 WIP. Also this is only applicable for single speed mode, I don't think anything has been done for either core in double speed mode. EDIT: Also I'm fine with importing being for gambatte by default, I realize I'm probably the only one who uses GBHawk, and if the verification pipeline works better for gambatte so be it.
TiKevin83
He/Him
Ambassador, Moderator, Site Developer, Player (155)
Joined: 3/17/2018
Posts: 358
Location: Holland, MI
Alyosha, if you need any more movies to test: Super Mario Land 1.0 and 1.1 have resyncs TwistedTammer's LADX syncs almost as-is Mickey's Chase has that resync you just mentioned Pokemon Blue/Yellow NSC and Glitchless (I know you've tested some of these before) Pokemon Crystal Glitchless (I believe you tested this one as well) Pokemon TCG should have console-syncable movies soon
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3821)
Joined: 11/30/2014
Posts: 2829
Location: US
TiKevin83 wrote:
Alyosha, if you need any more movies to test: SMB 1.0 and 1.1 have resyncs TwistedTammer's LADX syncs almost as-is Mickey's Chase has that resync you just mentioned Pokemon Blue/Yellow NSC and Glitchless (I know you've tested some of these before) Pokemon Crystal Glitchless (I believe you tested this one as well) Pokemon TCG should have console-syncable movies soon
Pokemon blue yellow and crystal are linked on the opening post, I try to keep the resyncs available. I'll be getting to the new ones soon, I'm been very time constrained lately but covid19 looks like it will give me some free time. Also @EZgames69 or anyone else who needs help importing stuff, just tell me which movie you want and I can do it quite quickly, i have a lot of practice.
EZGames69
He/They
Publisher, Reviewer, Expert player (4460)
Joined: 5/29/2017
Posts: 2761
I can import and convert to the proper core just fine, it's just really annoying to have to do it.
[14:15] <feos> WinDOES what DOSn't 12:33:44 PM <Mothrayas> "I got an oof with my game!" Mothrayas Today at 12:22: <Colin> thank you for supporting noble causes such as my feet MemoryTAS Today at 11:55 AM: you wouldn't know beauty if it slapped you in the face with a giant fish [Today at 4:51 PM] Mothrayas: although if you like your own tweets that's the online equivalent of sniffing your own farts and probably tells a lot about you as a person MemoryTAS Today at 7:01 PM: But I exert big staff energy honestly lol Samsara Today at 1:20 PM: wouldn't ACE in a real life TAS just stand for Actually Cease Existing
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3573)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
Alyosha wrote:
adelikat wrote:
as of 2.4, I added sync settings to the importer logic. To do that means it picks the core. I picked it to be GBHawk. My understanding is that is the more accurate and therefore preferred core. We have no support currently to add sync settings ANd let the user choose the core
it does? I tested just now and when gambatte is loaded the input roll still is imported as gambatte, so this at least needs to be fixed.
Here's the importer logic:
Language: C

if (isGBA) { Global.Config.GbaUsemGba = true; var ss = new MGBAHawk.SyncSettings { SkipBios = true }; Result.Movie.SyncSettingsJson = ConfigService.SaveWithType(ss); } else { Global.Config.GbUseGbHawk = true; Result.Movie.SyncSettingsJson = ConfigService.SaveWithType(new GBHawk.GBSyncSettings()); }
As you see, it's hardcoded that GBA = mGBA, and GB/GBC = GBHawk (SGB not support in the importer yet)
It's hard to look this good. My TAS projects
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3821)
Joined: 11/30/2014
Posts: 2829
Location: US
Alright, I changed the importer so that the movie it produces matches the currently loaded core. Side Note: importing movies with 'GBC' as the console seems to give an error when loading. I'm not sure if I should change this in the importer or in the cores. But for now you might need to change the identifier in the 'header' file to GB for some movies to work, regardless of which core is loaded.
TiKevin83
He/Him
Ambassador, Moderator, Site Developer, Player (155)
Joined: 3/17/2018
Posts: 358
Location: Holland, MI
Yeah I've heard that currently Gambatte only uses GB in the header even with GBC in sync settings. Could be something to look into.
1 2
10 11 12
19 20