I am trying to play The Town With No Name, but when I load the cue file, DOSBox-x says, "Could not load image file: TWNN.CUE MSCDEX: Failure: Invalid file or unable to open" This is the list:
AUDIO2.OPUS
AUDIO3.OPUS
TWNN.BIN
TWNN.CUE
TWNN.BIN runs the game but does not play the opus files. Here is a hint, everything works with DOSBox ECE. What do I do?
@jadasse I'm not sure opus support has been tested. Could you however paste the contents of the CUE file here? And I assume the CUE file and the *.OPUS and .BIN file are all in the same directory?
In addition, depending on the OS, the real filename and the filename as specified in the CUE file may need to be identical. So if the actual filenames are all uppercase, they should be uppercase in the CUE file also.
DOSBox-X currently supports for cue sheets with FLAC, MP3, WAV, and OGG Vorbis CD-DA tracks. Unfortunately OPUS support is not enabled yet as it will apparently require external libraries. I think the OPUS support code is not fully included in the DOSBox ECE source tree either, but will require external linkage, unlike the code for FLAC, MP3, WAV and OGG audios.
They are in the same directory
@jadasse The only file there is opus.c, but it requires additional files (opusfile.h, speex_resampler.h, plus many more) which are apparently not included.
Wengier, do you have any recommendations where I cant find external linkage for it to work?
@kcgen I think you wrote the backend for the CD audio decoders. Unlike the FLAC, MP3, WAV, and Vorbis decoders, the Opus decoder seems to require a lot of external files (not included in the repository). Do you have any suggestions on the best approach to include such linkages for Opus support in the repository? Thanks!
I assume kcgen works with compatibility with audio.
There's also another rip of TWNN where the audio is included inside the bin and cue, but I'm having trouble finding it.
https://archive.org/download/town-with-no-name-msdos
This is the rip that works with DOSBox-x, but I'm having trouble trying to find the voice files.
It's ripped differently
Here's the other copy, ripped differently https://www.dropbox.com/s/zo3q3b88fwkyrqu/TWNN.7z
@Wengier , sorry for the late reply.
For ECE, the patch I gave them builds all of the dependencies and links them statically into the binary (libogg, libopus, and libopusfile) - it works for ECE because users typically only want those binaries. It's literally built into the DOSBox make system (including downloading the sources, extracting, and so on) so no effort needed for the maintainer to deal with those dependencies; especially handy on Windows.
For Staging and X, it's easier to depend on libopusfile (and ask users to install it), and let their repository manager deal with any knock-on dependencies such as libopus, libopushttp, libssl, libogg, etc..
Even vcpkg for Windows offers libopusfile, so that's easy to use for VisualStudio builds.
Here's the configure.ac snippet:
dnl Ogg Opus handling
dnl -----------------
dnl We want Opus tracks supported by default, and we also want the user
dnl to be aware if there's a problem finding the Opus dependencies so
dnl they can either a) install the opusfile library or b) explicitly
dnl disable Opus.
dnl To achieve this, we provide a --disable-opus-cdda configure option
dnl but by default we look for Opus and fail if we can't find it.
dnl We only skip supporting Opus if the user explicitly passes the
dnl --disable-opus-cdda argument.
AC_ARG_ENABLE(opus-cdda,
AS_HELP_STRING([--disable-opus-cdda],
[Disable Opus CD audio track support]))
AS_IF([test "x${enable_opus_cdda}" != "xno"],
[PKG_CHECK_MODULES([OPUSFILE],
[opusfile],
[LIBS="$LIBS $OPUSFILE_LIBS" HAVE_OPUS=yes])])
AM_CONDITIONAL(USE_OPUS, test "${HAVE_OPUS}" = "yes")
@Wengier - if you use the above then look for USE_OPUS in our current src/libs/decoders/Makefile.am and src/libs/decoders/SDL_sound.c and fold that logic into your older instance of the CDDA code (necessary for SDL 1.2 hardware CDROM support, like you mentioned).
Some platforms don't have all of the latest Opus libs or have broken pkg-config setups, so for that I put together a static-builder Makefile. Users can then:
cd contrib/static-opus
make
They then copy and paste the resulting two export ... lines back into their shell, after which ./configure .. will use those static libs instead of failing. This works on macOS, Haiku, and others. I also like using it for personal builds because I wants the very latest Opus improvements.. ;-)
@kcgen Thanks a lot for the detailed information about the opus dependencies that you developed. I definitely hope to make the feature cross-platform (at least with Visual Studio, MinGW, Linux, and macOS). I can certainly use vcpkg to try to link to libopusfile on my own computer for Visual Studio builds (x86 and x64; not sure if it is also available for the ARM32 and ARM64 triplets which are also expected for DOSBox-X Visual Studio builds), but this also means an extra requirement for other users to build the system and also for @joncampbell123 to make official releases, so for now I would still prefer a static linking that is built into the DOSBox-X make system. The full library source code will then appear in the repository (updatable with a script), and because of this I don't want too many libraries initially (though additional libraries may be added later on). Do you still have the patch that you gave to DOSBox ECE for this purpose? Thank you so much for developing this feature.
I actually don't have that version. At the time, I was maintaining the code in an ever-evolving directory atop SVN updates (what a nightmare of a process), and roughly halfway through the evolution of the CDDA patch is when I dropped the embedded codec stuff, so the version just prior to then is what ECE is using.
Fortunately ECE does provide all the patches in his source zip: https://dosboxece.yesterplay.net/download/DOSBox%20ECE%20r4387%20(source).7z
So that's the best bet!
@kcgen I see. You are certainly right that maintaining code atop SVN updates is indeed a nightmare. I have remembered that I used to maintain LFN patches etc for SVN updates too, but I stopped doing so after the features were integrated into DOSBox-X. That process was indeed a nightmare as you said.
Meanwhile, I was able to find the Makefile inside the zip file you posted that seems to provide library sources, but there are no actual source files inside the "internal" directory, nor the Visual Studio solution includes these files. On the other hand, I noticed that DOSBox Optionals seems to provide source files inside the "internal" directory. So I downloaded the source files and cleaned them up as well as adding them to the Visual Studio solution. And it WORKS! The next step will be to make the update process automatic, but the OPUS feature appears to already working now with commit https://github.com/joncampbell123/dosbox-x/commit/a5ff5c232fe6f5872dfa29b7a9132ca67f9759b6. Thank you so much!
@jadasse I have uploaded the updated Windows binary which should now have support for OPUS CD tracks. Please check it out:
Download link: dosbox-x-update.zip
No external linkage is required any more.
thanks! :)
Great find in dosbox optionals!
I knew Marty was using it too, but didn't realize he was bundling all the sources! That's great you found a solution that works for -X!
Many thanks to both Marty and kcgen! It works for DOSBox-X because of you both.