Posts for Alyosha


Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
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.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
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.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
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.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
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.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
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.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Great at least the DLL error is sorted out. I'll come back to this once the current round of GBHawk upgrade are done and O2 is sorted out. And yeah mapping hardware isn't supported yet, it's probably the first thing I'll do.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
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.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
The missing DLL error seems to have been sorted out (Thanks to zeromus and TIKevin83.) Download and run the updated prereq installer and it should work now hopefully.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Nice work and research, yes vote.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
adelikat wrote:
Do you have any docs on mappers? I haven’t been able to find much.
Nope. Which games specifically are you referring to? I should be able to guess at a mapper implementation with trace logger. Also do you know of any US games that don't work? I see the above list consists mostly of EU (videopac) games which technically aren't implemented yet but is next on the lsit.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Thanks for testing, I'll start looking into those bugs and mappers too. And yeah work on this has been slow and inconsistent, I'm trying to knock things off my todo list so I can focus a bit more.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
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, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Good idea. I don't have time right now to bot it up though. Are you going to give it a try? If not I'll look into once I have finished a few of the other things higher up on my TODO list maybe in a couple months.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Wow I'm dumb, I didn't even realize that I was looking at the completely wrong set of values. I just tried 8,0,0,2 in GBC and indeed it makes it to the end. So I guess GBC version can be submitted since it's faster. Too bad good values are so much slower in the GBC in GBA version. Here's a file: http://tasvideos.org/userfiles/info/61505883417763093
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Cool, I'll try to look at savestates this weekend if they aren't fixed by then. I vaguely remember working through them before so hopefully tracking down errors wont be too bad.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
if (!prefetched_) { PC_READ(opcode); } ^ comment out that read in cpu.cpp line 544. You already read the opcode above with pc_read_first. I'm not 100% sure of the intent so you might want another solution. But it runs fine after I commented that out. EDIT: well, it runs but savestates are broken and cause a crash. It's a start though.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Odyssey 2 emulation is almost ready for release. Anyone interested in TASing please test the dev build for bugs, particularly commercial games (I'm aware of some homebrew bugs but not as concerned right now.)
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
I fixed a collision detection bug so more games should be functional now. Games I tested included UFO and KC Munchkin.
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/61309991900386543 Alright here is a better WIP that incorporates all of the improvements in the nico video TAS. So far I only saved additional frames in 2 places: 4 frames in Pirate panic collect the stars and ~15 frames in hothead hop by not turning back into dixie after the first bonus (you can turn into dixie for free going into the cannon.) I'm not completely certain I didn't gain/lose frames elsewhere by only comparing to the video, but I'm going to go over everything again anyway.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Interesting, how do you measure something like this? Do you know how BizHawk compares to other emulators that RTA people use for practice?
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Cool nice work. You seem to be really talented at optimizing stuff, I hope you can stay motivated to the end of this.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Wow I'm not even close to that, thanks for the link. Well whatever my first step as always is just to have a file that beats the game.
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/61239989505386084 I've started on updating DKL2 100%. This is a more long term side project, something easy to work on without RNG troubles. I decided to use GB instead of SGB so I can use GBHawk, it doesn't seem to add much anyway. I'm using the existing run as a baseline file. Loading times are between 40 and 50 frames longer per instance though, so the resulting run will be very significantly longer then the current publication indicates. In terms of actual gmeplay, this is about 15 seconds faster.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
The publication description says that the run starts from a save state but this is not correct, it only starts from sram.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
I fixed several more bugs in AtariHawk recently and also added the keyboard controller, so the dozen or so games that needed that can now be played / tased.