CUzeBox - The new official Uzebox emulator

The Uzebox now have a fully functional emulator! Download and discuss it here.
User avatar
L4rry
Posts: 239
Joined: Sun Dec 28, 2014 7:19 am
Location: Cape Town, South Africa

Re: CUzeBox - a new Uzebox emulator in progress

Post by L4rry » Wed Jan 03, 2018 1:27 pm

I've managed to successfully build and run cuzebox on Windows 10 with mingw in an msys shell. However, there seems to be no audio output. When building, I set TSYS=windows_mingw in Make_config.mk. Also, audio output for the old uzem emulator works fine (built and ran using the same tool chain, shell and platform) Let me know what I can do to help debug this issue.

PS. I haven't scoured the rest of this forum post to see if this was raised before, so apologies in advance if that's the case.

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

Re: CUzeBox - a new Uzebox emulator in progress

Post by Jubatian » Wed Jan 03, 2018 5:41 pm

L4rry wrote:
Wed Jan 03, 2018 1:27 pm
I've managed to successfully build and run cuzebox on Windows 10 with mingw in a msys shell. However, there seems to be no audio output. When building I set TSYS=windows_mingw in Make_config.mk. Also, audio output for the old uzem emulator works fine (built and ran using the same tool chain, shell and platform) Let my know what I can do to help debug this issue.

PS. I haven't scoured the rest of this forum post to see if this was raised before, so apologies in advance if that's the case.
What about the binaries provided on the Downloads page? There are no OS specific switches related to audio (expect some Emscripten stuff). I suspect something relating SDL, you may try forcing an SDL1 build and see what happens (Make_config.mk, FLAG_USE_SDL1). I won't likely be able to do anything further as I don't have access to Windows systems except for Wine (Windows Emulator on Linux), there I never experienced anything alike. CUzeBox uses SDL audio almost the same way like Uzem (there are no intentional differences, the audio logic built above SDL differs, but this shouldn't have effect on SDL itself).

User avatar
L4rry
Posts: 239
Joined: Sun Dec 28, 2014 7:19 am
Location: Cape Town, South Africa

Re: CUzeBox - a new Uzebox emulator in progress

Post by L4rry » Wed Jan 03, 2018 6:39 pm

Jubatian wrote:
Wed Jan 03, 2018 5:41 pm
L4rry wrote:
Wed Jan 03, 2018 1:27 pm
I've managed to successfully build and run cuzebox on Windows 10 with mingw in a msys shell. However, there seems to be no audio output. When building I set TSYS=windows_mingw in Make_config.mk. Also, audio output for the old uzem emulator works fine (built and ran using the same tool chain, shell and platform) Let my know what I can do to help debug this issue.

PS. I haven't scoured the rest of this forum post to see if this was raised before, so apologies in advance if that's the case.
What about the binaries provided on the Downloads page? There are no OS specific switches related to audio (expect some Emscripten stuff). I suspect something relating SDL, you may try forcing an SDL1 build and see what happens (Make_config.mk, FLAG_USE_SDL1). I won't likely be able to do anything further as I don't have access to Windows systems except for Wine (Windows Emulator on Linux), there I never experienced anything alike. CUzeBox uses SDL audio almost the same way like Uzem (there are no intentional differences, the audio logic built above SDL differs, but this shouldn't have effect on SDL itself).
I can verify that the binary for cuzebox on the downloads page has proper audio output on the same Windows 10 system. I'll play around a bit to see if I can understand what went wrong with the custom build I made.

User avatar
L4rry
Posts: 239
Joined: Sun Dec 28, 2014 7:19 am
Location: Cape Town, South Africa

Re: CUzeBox - a new Uzebox emulator in progress

Post by L4rry » Wed Jan 03, 2018 6:51 pm

L4rry wrote:
Wed Jan 03, 2018 6:39 pm
Jubatian wrote:
Wed Jan 03, 2018 5:41 pm
L4rry wrote:
Wed Jan 03, 2018 1:27 pm
I've managed to successfully build and run cuzebox on Windows 10 with mingw in a msys shell. However, there seems to be no audio output. When building I set TSYS=windows_mingw in Make_config.mk. Also, audio output for the old uzem emulator works fine (built and ran using the same tool chain, shell and platform) Let my know what I can do to help debug this issue.

PS. I haven't scoured the rest of this forum post to see if this was raised before, so apologies in advance if that's the case.
What about the binaries provided on the Downloads page? There are no OS specific switches related to audio (expect some Emscripten stuff). I suspect something relating SDL, you may try forcing an SDL1 build and see what happens (Make_config.mk, FLAG_USE_SDL1). I won't likely be able to do anything further as I don't have access to Windows systems except for Wine (Windows Emulator on Linux), there I never experienced anything alike. CUzeBox uses SDL audio almost the same way like Uzem (there are no intentional differences, the audio logic built above SDL differs, but this shouldn't have effect on SDL itself).
I can verify that the binary for cuzebox on the downloads page has proper audio output on the same Windows 10 system. I'll play around a bit to see if I can understand what went wrong with the custom build I made.
Ok, so I can confirm that building with SDL produces audio output. Building with SDL2 produces no audio. So in other words building with FLAG_USE_SDL1=1 produces audio. Building with FLAG_USE_SDL1=0 produces none.

User avatar
L4rry
Posts: 239
Joined: Sun Dec 28, 2014 7:19 am
Location: Cape Town, South Africa

Re: CUzeBox - a new Uzebox emulator in progress

Post by L4rry » Wed Jan 03, 2018 7:16 pm

L4rry wrote:
Wed Jan 03, 2018 6:51 pm
L4rry wrote:
Wed Jan 03, 2018 6:39 pm
Jubatian wrote:
Wed Jan 03, 2018 5:41 pm
What about the binaries provided on the Downloads page? There are no OS specific switches related to audio (expect some Emscripten stuff). I suspect something relating SDL, you may try forcing an SDL1 build and see what happens (Make_config.mk, FLAG_USE_SDL1). I won't likely be able to do anything further as I don't have access to Windows systems except for Wine (Windows Emulator on Linux), there I never experienced anything alike. CUzeBox uses SDL audio almost the same way like Uzem (there are no intentional differences, the audio logic built above SDL differs, but this shouldn't have effect on SDL itself).
I can verify that the binary for cuzebox on the downloads page has proper audio output on the same Windows 10 system. I'll play around a bit to see if I can understand what went wrong with the custom build I made.
Ok, so I can confirm that building with SDL produces audio output. Building with SDL2 produces no audio. So in other words building with FLAG_USE_SDL1=1 produces audio. Building with FLAG_USE_SDL1=0 produces none.
I noticed this comment in 'audio.c'
/*
** Note:
**
** This uses the legacy SDL API to support compiling with SDL1 as well. Don't
** try to "fix" this! (It will break SDL1 builds, notably Emscripten!)
*/
Not 100% sure if it's related, or even helpful.

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

Re: CUzeBox - a new Uzebox emulator in progress

Post by Jubatian » Wed Jan 03, 2018 8:52 pm

L4rry wrote:
Wed Jan 03, 2018 6:51 pm
Ok, so I can confirm that building with SDL produces audio output. Building with SDL2 produces no audio. So in other words building with FLAG_USE_SDL1=1 produces audio. Building with FLAG_USE_SDL1=0 produces none.
Maybe try with different SDL2 libraries (SDL2.dll)? If you downloaded the binary, then what if you try to put the SDL2.dll file provided alongside it?
L4rry wrote:
Wed Jan 03, 2018 7:16 pm
I noticed this comment in 'audio.c'
/*
** Note:
**
** This uses the legacy SDL API to support compiling with SDL1 as well. Don't
** try to "fix" this! (It will break SDL1 builds, notably Emscripten!)
*/
Not 100% sure if it's related, or even helpful.
Uzem also uses the legacy SDL API for audio, so if Uzem works (which is also SDL2), this shouldn't be a difference. The "Don't try to fix" note is for ensuring that nobody attempts to just rewrite it for the new SDL2 solution which would render CUzeBox incompatible with SDL1 (Emscripten can do SDL2, but there is about 1.5MBytes extra then! SDL1 may also be useful for a few older systems).

User avatar
L4rry
Posts: 239
Joined: Sun Dec 28, 2014 7:19 am
Location: Cape Town, South Africa

Re: CUzeBox - a new Uzebox emulator in progress

Post by L4rry » Wed Jan 03, 2018 10:23 pm

Jubatian wrote:
Wed Jan 03, 2018 8:52 pm
[Maybe try with different SDL2 libraries (SDL2.dll)? If you downloaded the binary, then what if you try to put the SDL2.dll file provided alongside it?
I copied SDL and SDL2 dependencies side by side (/lib /bin and /include) to test this if that's what you mean. Toggled by the flag mentioned in my previous comment. One option worked. The other one didn't. Anyway, I think it's clear there is a bug there. I can get a solid build with the proper flag setting. But maybe the default setting for FLAG_USE_SDL1 should be 1 instead of 0 in the mean time?

User avatar
L4rry
Posts: 239
Joined: Sun Dec 28, 2014 7:19 am
Location: Cape Town, South Africa

Re: CUzeBox - a new Uzebox emulator in progress

Post by L4rry » Wed Jan 03, 2018 10:31 pm

Was the downloadable binaries compiled with SDL or SDL2? Think that might be key. Sorry, don't want to high jack this thread entirely with this issue. Not that major I guess. It just seems the default build on windows is slightly flawed. I could be wrong though. Maybe just my environment. But I'm doubtful about that. Would be nice if there was someone else with a windows environment that can verify.

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

Re: CUzeBox - a new Uzebox emulator in progress

Post by Jubatian » Thu Jan 04, 2018 6:21 am

L4rry wrote:
Wed Jan 03, 2018 10:31 pm
Was the downloadable binaries compiled with SDL or SDL2? Think that might be key. Sorry, don't want to high jack this thread entirely with this issue. Not that major I guess. It just seems the default build on windows is slightly flawed. I could be wrong though. Maybe just my environment. But I'm doubtful about that. Would be nice if there was someone else with a windows environment that can verify.
They are built with SDL2, cross-compiled with MinGW from Linux. When building with SDL1, you can not resize the window or make it full-screen due to limitations in SDL1. No issues were reported so far with the precompiled binaries. I don't want to switch to SDL1 due to these, in a Windows environment, it is possible to set up some Linux distribution (VirtualBox, the OS is free) and cross-compile to Windows if nothing else works (in Debian it isn't even difficult: the necessary packages are provided). I will mark it as a bug if anyone else can reproduce this, with the cross-compile from Linux as a fall-back if you want an SDL2 binary (or use SDL1).

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

Re: CUzeBox - a new Uzebox emulator in progress

Post by CunningFellow » Thu Jan 04, 2018 6:47 am

I compiled my modified cuzebox on win7_64 with SDL2.

Cant give any more details as i am sitting in a hospital waiting room atm.

I know it worked though as i can test the RLE mode with it and also some music demos from artcfx

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests