Posts for Alyosha

Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
never mind it's not needed after all, I just needed to move the frame processing to the correct spot, not sure why I had it the other way around. Should be good now with _vidbuffer removed from the state.
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
yeah _videbuffer is needed in the state, it's different from framebuffer. (At some point I really should standardize things a bit more.) Well I added it back in, tested and is fine now.
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
Oops yeah the buffers are left over copy-paste from other cores that have variable frames. I removed them now. I checked Bowling on both O2EM and MAME (via archive.org) and they have the same behaviour of no longer accepting input once the game over screen comes up. I checked trace logger and and vblank code is still running, it's just not checking for inputs. It looks like it's just waiting for a reset. It would be good to have a real hardware check, but I don't have a console. PAL should be ready for testing, it's probably got quite a few bugs still since the hardware is wired up slightly differently, but mostly it should be working.
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
CLChambers00 wrote:
The most interesting point for the TAS on this game is that in order to get the best and fastest stats so far in any% is faster than any TAS could ever do it because it requires RNG set up from the previous attempt and the TAS timing would include that entire setup.
Do you think sub-frame inputs / resets would be able to cut down the set-up time?
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
Here is an interesting case of a game that was made both in a console edition and also released as a 'emulator version' Happy Bird! is a homebrew game that has a console version that doesn't work right in O2EM, so an emulator version was made for it as well. I think this is a rather unique example of a combination of factors where existing emulation is sufficiently poor, and with too little demand for much attention, where game devs. have to re-target games to the emulator. Anyway, the 'emulator version' does not look correct in BizHawk (which it shouldn't) and the console version does look correct (which is good news for me since that game uses timing tricks similar to Blockout.) Here is a side by side of emulator version (left) and console version (right):
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
I do like the look of the +15 contrast example, though I have to admit the libretro shader does look closer to correct for the red and yellow, blue looks more accuracte in the +15 contrast though. But that's just me and I don't know how well the picture represents reality, nor do I own a GBC to check.
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
http://tasvideos.org/userfiles/info/62554681489154971 I found my first improvement in lolo 3. It is over half way through the run in level 11-4. I saved one step. You can fast forward to frame 129692 in the above movie to see it. The levels might be a bit more linear then the first two games but still I'm quite amazed how optimized Nitrodon had made this on his first try. I found not a single frame improvement until now. EDIT: http://tasvideos.org/userfiles/info/62570344549002605 saved a few more steps in the same level
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
I've made good progress on screen timing and now can get pixel accurate frames even for timing sensitive games like Speedway above. I also figured out the (probably) correct emulation for Blockout, which is much simpler and more realistic then what I was doing before. The key is that the VBL flag bit is reset upon read, not upon end of VBL. It's more of a 'VBL needs servicing' flag then a 'VBL in progress' flag. I probably should have guessed this earlier since the sound bit works the same way. There are still a few finer details that need to be sorted out, but I think all the major timing challenges are dealt with now.
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
Is that really what it looks like? That looks really washed out to me. Do you have a real screen pic for comparison? EDIT: I looked at some youtube videos and I guess it's pretty close, would still be good to see a high res pic though to compare.
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
Resetting bowling works fine for me (at least it does in the curent dev build.) I fixd a few more bugs (notably Speedway and Nimble Numbers Ned) I still need to do some more research into Blockout, the way I have it implemented now seems unrealistic for real hardware.
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
filpAM wrote:
Please revive the C++ version of GBHawk. So I can use it.
It's not worth it for the significant extra effort it would take to get linked modes working with the comparatively minor performance boost.
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
image hosting I did a lot of rework on the ppu and now things are working much better. Blockout behaves like console now, as does Cosmic Conflict, which is now closer to console then O2EM. The good thing about Cosmic Conflict and Blockout is that they both do fairly careful timing things but in different ways, so if they are both correct at the same time it's a pretty solid indication that the emulation is close to correct. A big open end remains in that Blockout turns on HBL interrupts but expects them to not happen. I don't know what's up here, I would need to find a game that actually uses HBL interrupts constructively to do things correctly but so far I can't find one. Anyway as always more testing is appreciated. I think I'm getting close on NTSC, PAL still needs some work though.
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
Leaving some notes here about Blockout. When running in the intro screen of 'blockout' (where it says 'press 1') the game is doing too much in one frame and it misses VBL interrupt, this is what causes the screen to flash. It can miss it by a wide margin, up to 2 scanlines, so this isn't something a small timing tweak can fix. The reason it is doing too much is that it runs extra routines for ball reflections and keyboard scanning, and this is just a little too much stuff. I looked for evidence of this in actual gameplay videos and found this: https://www.youtube.com/watch?v=DuMK4VhiwIo You can see around 2:28 in the video that there is a graphical artifact in the top right corner of the screen. So it's definitely also having trouble on console. The difference is that this only effects a couple scanlines. I'm not sure what mechanism I'm missing that allows this to happen. On the right track though. EDIT: It also turns on HBL interrupts and expects them to either not happen or happen only once per frame.
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
Sub Chase also stops after 3 minutes on O2EM. O2EM isn't the most accurate emulator, s I'm not 100% certain if it's intended or not, I'll look into it a bit more. I did add a reset button and fixed hard reset so it works now. I'll try knocking out those other bugs as well.
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
I have done quite a bit of optimizing GBHawk as a result of what I learned in trying to go to C++. GBC single and double speed modes are about 10% faster now. GB mode is 25% faster thanks to fixing a bottleneck. This isn't much obviously but it really helped out 4 player linked modes. I have scrapped the C++ core for now (I have it saved locally for possible future use in maybe a SGB core, but not sure yet.) This was still a worth while experiment as I learned a great deal in a relatively short amount of time. But that's enough with optimization for now. I'll be going back to bug fixing mode and syncing console verified gambatte runs and other accuracy stuff.
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
I remember jumping off the power pad to get super long jumps. I felt accomplished beating cheetah but now he looks so slow! Yes vote.
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
Yikes, you weren't kidding D:
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
Woah another out of nowhere improvement. I'm amazed you were able to save so much time here. I remember trying this game a couple years ago and I couldn't make any improvements. nice work and yes vote!
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
Wow out of nowhere a huge improvement! Yes vote!
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
Wow those are really impressive gains, great work, almost at the end now!
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
I was getting ~220 for GB games, and after the port about ~280 (unthrottled, no rewind enabled) So about a 25% increase EDIT: it turns out that I can get most of the additional benefits just by applying optimizations I made in C++ to the original C# core. I got to 260 fps (compared to 300 I got up to in C++.) It seems like my core design just isn't suitable to C++. I'll need to rethink things from the ground up in future cores. I think I'll probably ditch the C++ core. (I'll remove it from the code base but keep it locally in case I need it in the future.) With a few more optimizations to the C# core I'll probably be up around where I was anyway. And the optimizations also help out the linked modes, which was my original goal anyway.
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
I've got most of GBHawk ported to C++ (still not accessible in the Dev builds yet though.) With basically a one-to-one port and only minor optimizations, I get only a 60 fps boost from the conversion. This is much less then I was hoping for and hardly even worth it. I'm going to spend some time seeing what else I can do to speed things up, but probably this is the end of the road for my one cycle at a time approach. But anyway my goal is to get a 2x boost over the current C# core, right now that goal is a very long way off. @jlun2 I'll look into that stuff once this process is over.
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
Cool thanks for testing, I'll start looking into those.
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
I have started the process of converting GBHawk to C++. It should be a lengthy but relatively easy process compared to porting the z80 core. Nothing will change for now, and nothing will change from the user interface side regardless. This transition will free up much needed overhead for the linked modes and lay the foundation for future work.
Alyosha
He/Him
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player (4385)
Location: US
Joined: 11/30/2014
Posts: 2915
Location: US
Yup that's it.