nxdk icon indicating copy to clipboard operation
nxdk copied to clipboard

SDL_mixer port

Open JayFoxRox opened this issue 5 years ago • 4 comments

I have prototyped an SDL_mixer port in https://github.com/JayFoxRox/nxdk/pull/68

As far as I know, that port is currently still broken (possibly issues in https://github.com/XboxDev/nxdk-sdl/pull/20) - but it does at least compile.

I'm not sure about upstreaming yet either, although I'm open to someone else polishing and upstreaming it.

JayFoxRox avatar Jan 18 '20 18:01 JayFoxRox

Still no mixer support?

erfg12 avatar Mar 07 '23 12:03 erfg12

Not as part of this repository, but my port probably still works (with minimal changes?).

I personally (and probably @XboxDev, too) also moved away from adding ports in this repository because it's a maintenance headache.

Most libraries run on Xbox without any or with minimal changes. Also see https://github.com/JayFoxRox/nxdk/pull/84 for examples. I even have a private repository with some rough install scripts which can install 100+ common libs using nxdk (using the libs default build-system, like cmake or autotools) - and there's hardly any changes to nxdk or those libs required.

Most ports were only required because nxdk required a very specific makefile for each library. nxdk has also started to adopt a standard toolchain format and added some CMake helper (https://github.com/XboxDev/nxdk/pull/518).

Because SDL_mixer has CMake (https://github.com/libsdl-org/SDL_mixer/blob/release-2.6.3/CMakeLists.txt) and autotools (https://github.com/libsdl-org/SDL_mixer/blob/release-2.6.3/autogen.sh) support, I'd assume it doesn't require a port anymore. It probably works out of the box if you install it as their documentation tells you to do - if it doesn't, you should probably report problems here.

JayFoxRox avatar Mar 07 '23 23:03 JayFoxRox

I cloned the SDL_mixer source into the nxdk/lib/sdl directory, copied the https://github.com/fgsfdsfgs/nxdk/blob/development/lib/sdl/SDL2_mixer/Makefile text into the sdl Makefile and the game built. But when launching it in xemu, it just shows the Xbox logo and NXDK in text under that. So I'm not sure if it was successful.

erfg12 avatar Mar 08 '23 03:03 erfg12

[...] and the game built.

What "game"? nxdk isn't a game. We can't help if you don't provide code for reproducing the issue. Anyhow, this is also going off-topic quickly and probably deserves its own issue (or better yet: ask on XboxDev Discord).

I cloned the SDL_mixer source into the nxdk/lib/sdl directory, copied the https://github.com/fgsfdsfgs/nxdk/blob/development/lib/sdl/SDL2_mixer/Makefile text into the sdl Makefile and the game built.

If you are using the legacy method of building a lib (using the old nxdk makefile) then you can probably also just cherry-pick the commits by fgsfdsfgs (instead of manually cloning SDL_mixer repos or copying files). If that doesn't work, you should provide your code / all changes so we could assist, but it's unlikely you'll get much help because it's not the recommended workflow anymore (I think).

Like I said in my previous post: Usually it's enough to build and install the lib (SDL_mixer in this instance) through its own build-system (cmake in this instance). If that still doesn't work, you should probably create your own issue and provide information what you tried (including commands you ran).

But when launching it in xemu, it just shows the Xbox logo and NXDK in text under that.

There could be a bunch of different reasons, including emulation problems from xemu, or problems with how you patched your kernel for homebrew etc. - could also be problems (or even intended behaviour) of your application code.

There's not enough information to help you, but it's also off-topic.

JayFoxRox avatar Mar 09 '23 15:03 JayFoxRox