CUzeBox - The new official Uzebox emulator

The Uzebox now have a fully functional emulator! Download and discuss it here.
User avatar
Artcfox
Posts: 1060
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: CUzeBox - The new official Uzebox emulator

Post by Artcfox » Mon Jul 06, 2020 3:15 pm

Hi, sorry I didn't have access to a Windows machine and only had spotty Internet. The only versions I tested on Windows were 2.0.4 and 2.0.12, which works with the patch I posted. If you need intermediate versions tested I can do that.

User avatar
Jubatian
Posts: 1499
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: CUzeBox - The new official Uzebox emulator

Post by Jubatian » Mon Jul 06, 2020 5:51 pm

Artcfox wrote:
Mon Jul 06, 2020 3:15 pm
Hi, sorry I didn't have access to a Windows machine and only had spotty Internet. The only versions I tested on Windows were 2.0.4 and 2.0.12, which works with the patch I posted. If you need intermediate versions tested I can do that.
You mean the problem is present with SDL2 2.0.4? :shock: (That version shouldn't even have WASAPI, what else it defaults to then which is not directsound)

User avatar
Artcfox
Posts: 1060
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: CUzeBox - The new official Uzebox emulator

Post by Artcfox » Mon Jul 06, 2020 7:27 pm

No, I tried compiling (unpatched) against the latest 2.0.12, and got no sound, then I tried compiling against 2.0.4 and it had sound, but my gamepad wasn't recognized. Then I searched "SDL 2.0.12 windows no sound" and discovered why and added the patch I posted in this thread.

I can try the versions in between without the patch to figure out what is the earliest version the patch is needed on, rather than just look at what version the other game emulators use as their min version for setting that environment variable. I can also swap the dlls around after I compile against a different version, just give me a heads up as to what you want me to test. (I have reliable Internet and access to a Windows machine now.)

User avatar
Jubatian
Posts: 1499
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: CUzeBox - The new official Uzebox emulator

Post by Jubatian » Tue Jul 07, 2020 7:37 pm

Artcfox wrote:
Mon Jul 06, 2020 7:27 pm
No, I tried compiling (unpatched) against the latest 2.0.12, and got no sound, then I tried compiling against 2.0.4 and it had sound, but my gamepad wasn't recognized. Then I searched "SDL 2.0.12 windows no sound" and discovered why and added the patch I posted in this thread.

I can try the versions in between without the patch to figure out what is the earliest version the patch is needed on, rather than just look at what version the other game emulators use as their min version for setting that environment variable. I can also swap the dlls around after I compile against a different version, just give me a heads up as to what you want me to test. (I have reliable Internet and access to a Windows machine now.)
I don't think it is necessary, WASAPI is introduced in SDL 2.0.6, so that should be the low bound of a version check.

What I don't understand yet is why they aren't fixing this? Or why they didn't revert it if it is broken? :? They are seemingly keeping this defect in the library since 7 versions by now then.

User avatar
Jubatian
Posts: 1499
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: CUzeBox - The new official Uzebox emulator

Post by Jubatian » Fri Jul 24, 2020 6:07 pm

Hey, anyone having Windows and experienced the broken sound issue, could you give this CUzeBox build a go with an SDL library version past 2.0.5? (The zip has an earlier SDL.dll in it, I just packed it the usual way for a binary release). Didn't commit it yet since I don't know the effect.

I tried to do something different after some research, this build should actually use WASAPI when WASAPI is available, and produce sound through it, at least if it works.
Attachments
cuzebox_windows_x86.zip
CUzebox 20200724
(416.54 KiB) Downloaded 159 times

CunningFellow
Posts: 1254
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: CUzeBox - The new official Uzebox emulator

Post by CunningFellow » Fri Jul 24, 2020 9:26 pm

Just tried it on Win7 and SDL2.dll 2.0.12 32bit and it works fine.

I had previously had sound issues but I don't have records to tell you what version of SDL2.dll I had at that time.

User avatar
Artcfox
Posts: 1060
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: CUzeBox - The new official Uzebox emulator

Post by Artcfox » Sat Jul 25, 2020 4:35 pm

I'll give this a shot when I have access to a Windows machine.

User avatar
Jubatian
Posts: 1499
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: CUzeBox - The new official Uzebox emulator

Post by Jubatian » Wed Aug 19, 2020 4:04 pm

Artcfox wrote:
Sat Jul 25, 2020 4:35 pm
I'll give this a shot when I have access to a Windows machine.
Any news on this one? Still waiting for results before committing this change. Of course anyone else, please give it a go, whether it has any problem with sound.

User avatar
Artcfox
Posts: 1060
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: CUzeBox - The new official Uzebox emulator

Post by Artcfox » Thu Aug 20, 2020 1:03 am

Jubatian wrote:
Wed Aug 19, 2020 4:04 pm
Artcfox wrote:
Sat Jul 25, 2020 4:35 pm
I'll give this a shot when I have access to a Windows machine.
Any news on this one? Still waiting for results before committing this change. Of course anyone else, please give it a go, whether it has any problem with sound.
I can confirm sound plays when run with the dll packaged, and when I swapped it with the newest sdl dll (2.0.12) sounds play, but right upon initial startup of cuzebox there are a couple loud popping noises, that sound almost like when you are plugging or unplugging a 3.5mm audio cable connected to powered speakers. This does not happen with the originally packaged sdl version, but consistently happens when swapped with the newer version.

User avatar
Jubatian
Posts: 1499
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: CUzeBox - The new official Uzebox emulator

Post by Jubatian » Thu Aug 20, 2020 7:44 pm

Artcfox wrote:
Thu Aug 20, 2020 1:03 am
I can confirm sound plays when run with the dll packaged, and when I swapped it with the newest sdl dll (2.0.12) sounds play, but right upon initial startup of cuzebox there are a couple loud popping noises, that sound almost like when you are plugging or unplugging a 3.5mm audio cable connected to powered speakers. This does not happen with the originally packaged sdl version, but consistently happens when swapped with the newer version.
Thank you! Within the emulator the startup is properly managed, avoiding such pops (properly starts at silent level). The change when you use a later than 2.0.5 SDL library on Windows is that it should use WASAPI, which was why the audio was totally broken the first place. So this seems to actually work with WASAPI, but something within SDL might be broken. Or within WASAPI itself. Or the combination of both along with Windows version... The situation is that, as I found, that Microsoft decided that audio from now is represented in floating point numbers only. The emulator is designed to pass 8 bit unsigned data, it is just the most reasonable as the PWM resolution is 8 bits either way, there is no point trying to improve it. So here I ended up asking SDL to make the sample conversion (while allowing it to choose frequency as the emulator can work with any host frequency). Maybe this conversion is broken somehow (in SDL, introducing latency with improper initialization). But I just don't want to go too far, the point of SDL would be exactly that the game shouldn't carry a huge luggage of platform specific code.
CunningFellow wrote:
Fri Jul 24, 2020 9:26 pm
Just tried it on Win7 and SDL2.dll 2.0.12 32bit and it works fine.
Did you experince what Artcfox mentions on that setup?

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests