Uzem ported to SDL2
Re: Uzem ported to SDL2
Okay, I submitted the pull request.
Re: Uzem ported to SDL2
Doing the merge but I have some build error under Windows. I'm fixing them right now. Btw, just to confirm,you didn't build it under Windows right?
Edit: Ok found it. A "#include <stdio.h>" in gdbserver.h was moved in a conditional block for non windows platforms.
Edit 2: Well, it compiles, but it crashes right away.
Edit: Ok found it. A "#include <stdio.h>" in gdbserver.h was moved in a conditional block for non windows platforms.
Edit 2: Well, it compiles, but it crashes right away.
Re: Uzem ported to SDL2
I fixed the crash issue. It runs, but I'm underwhelmed to say the least...it currently runs even slower than before on my machine and the sound it terrible and stutters like crazy. It can't even emulate 28Mhz! If it only runs fine on linux, we've got a problem. At this point I don't like the idea of pushing that to the branch until we can figure out why it is so slow.
Edit: I have created a tag on the branch so I can go back. So I'll push the changes. Attached is a build with SDL2 if you guys on windows could give it a try and report on the performances.
Edit: I have created a tag on the branch so I can go back. So I'll push the changes. Attached is a build with SDL2 if you guys on windows could give it a try and report on the performances.
- Attachments
-
- uzem140_sdl2.zip
- (791.52 KiB) Downloaded 590 times
Re: Uzem ported to SDL2
I did not test it under Windows, and I find that very surprising!
The first thing I'd try is removing the
flag from the call to CreateWindow. With that flag, when you tell the renderer to "present," it will wait for your monitor's vsync to avoid tearing.
Which version of Windows are you using, and do you have hardware rendering support?
I ask because the help for uzem says this:
You could also try replacing the flag:
with the software fallback:
The other option that you could try is there are additional flags that you can pass to SDL2 to specify whether you want to use the OpenGL or Direct3D backend, but by default it should pick the best one for the platform you are on.
But I suspect that something weird is going on if software rendering is actually faster for you than using the GPU.
I'll see if I can borrow a Windows computer and try it for myself.
The first thing I'd try is removing the
Code: Select all
SDL_RENDERER_PRESENTVSYNC
Which version of Windows are you using, and do you have hardware rendering support?
I ask because the help for uzem says this:
which I did not find to be true.--hwsurface -w Use SDL hardware surface (probably slower)
You could also try replacing the flag:
Code: Select all
SDL_RENDERER_ACCELERATED
Code: Select all
SDL_RENDERER_SOFTWARE
But I suspect that something weird is going on if software rendering is actually faster for you than using the GPU.
I'll see if I can borrow a Windows computer and try it for myself.
Re: Uzem ported to SDL2
I just realized that my wife has a computer that runs Windows!
So, I tried the build that you posted, and it runs great on Windows 7. 100% full speed emulation, even when I ran it in the "windowed" mode and then maximized the window to cover the entire 1080p display minus the title bar.
Her computer doesn't even have a video card in it, so it's just using the on-board Intel graphics for this.
I'm not sure what's going on with your computer, Uze.
So, I tried the build that you posted, and it runs great on Windows 7. 100% full speed emulation, even when I ran it in the "windowed" mode and then maximized the window to cover the entire 1080p display minus the title bar.
Her computer doesn't even have a video card in it, so it's just using the on-board Intel graphics for this.
I'm not sure what's going on with your computer, Uze.
Re: Uzem ported to SDL2
Geez, I don't know either. I have pretty old but beefy Nvidia graphics card but I don't know why I have all these issues.I'm not sure what's going on with your computer, Uze.
Now, I don't know why, it just crashes all the time all I got is:
Code: Select all
C:\work\uzebox\git\tools\uzem>uzem SOLITAIR.HEX
EEPROM file not found, continuing with emulation.
Loading Hex Image...
Using HEX path for SD emulation: ./
SD Emulation of following files:
So I'll have to debug what is going on with the SD loading.
Re: Uzem ported to SDL2
What if you rename that hex file to all lowercase?
Edit: With the Windows version, I tried one with all lowercase, and all uppercase, and they both work.
Edit: With the Windows version, I tried one with all lowercase, and all uppercase, and they both work.
Re: Uzem ported to SDL2
Nope, still crash. Don't bother, I'll trace that tomorrow.
Re: Uzem ported to SDL2
I disabled the vsync flag, no luck. In fact I'm testing with ghosty ghost. When at the menu, the music is fine, no drop. As soon as it scrolls, CPU emulation speed drops and sound stutters! Just to be sure can test with that game?
Re: Uzem ported to SDL2
I just tested Ghosty Ghost on both my 5 year old Linux laptop, and on a 3 year old Windows box, and it runs perfectly @ 28.636 MHz.uze6666 wrote:I disabled the vsync flag, no luck. In fact I'm testing with ghosty ghost. When at the menu, the music is fine, no drop. As soon as it scrolls, CPU emulation speed drops and sound stutters! Just to be sure can test with that game?
I would see if you can find an upgrade for your video card drivers, or try switching to your on-board graphics card if you have one.
BTW: What a challenging game! The best score I could manage was 7.