GP2X .mod File Being Loaded In Windows But Not On Gp2x


If anyone knows of a game written using SDL which uses MOD music then I could try the MOD from that and see if it works.
 
I have contacted the makers of Game Editor as this uses SDL and MOD playback works in Game Editor games on the GP2X. I have asked them if they can let me know what library and what code they use for MOD playback.
 
Take a look at Dodgin' Diamond II (source is in the archives), that uses an .xm file as background music.

Mod playback is better achieved through libmikmod than through SDL_mixer (see a few threads 1 or 2 pages down on this very board). SDL_mixer is also having problems playing large mod files correctly without audio glitches. It also resets their volume to max every time they loop, that's why I said it was a bitch :p

SDL_mixer is great for OGG though, not so much for MP3 though (slow).
 
Thanks! Just had a look in the Dodgin' Diamonds code and this is what it does to load the .xm file:

CODE

char buffer[512];

sprintf(buffer,"%s/bgm1.xm",DD2_DATA);
bgm=Mix_LoadMUS(buffer);



So it still uses Mix_LoadMUS(). I did try using the same method as above with the buffer variable, but it made no difference.

I have tried to set up MikMod but it won't link in Dev-C++.
 
I'm not sure if your file is or is not loading... But I do know it IS possible to play module files and I also know that some libraries of SDL have trouble with music playpack...

I'd try Yaustar's bundle if I were you... I think he found a combination of libs that ensure you get music playback...
 
Great, thanks. I'm downloading the Code::Blocks RC5 SDK now (GP2X pre-configured version). I'm glad it's a Windows version as although I'm a Mac fan and hate Windows, setting up a dev environment in Linux seems to be a headache. I'll get my game compiled in Code::Blocks and report back whether it worked.
 
Is this the correct one? I have downloaded and unpacked it. When I run it and create a new project, it asks me what type of project I want to create so I choose SDL, and it asks me for SDL's location, but I can't find it anywhere in the Code::Blocks directory. So I have no idea what to do next!
 
it's RC 5 you want really. But you DON'T create a new project. Use the template project, copy it to a new folder, then copy your source file into that. Then open it in codeblocks and add your sources
 
PokeParadox said:
it's RC 5 you want really. But you DON'T create a new project. Use the template project, copy it to a new folder, then copy your source file into that. Then open it in codeblocks and add your sources
The page I linked to says RC4, but the filename is "GP2X CodeBlocks SDK Rc5.exe". I tried opening the file sdlapp.cbp but it didn't provide a build target for GP2X. And when I tried to open the sdlapp.template file it seemed to import it as text rather than using it as a template!
 
Last edited by a moderator:
YESSSSSS!!! MOD playback in the "quick and dirty MOD player" I posted in this thread works! Now I know MOD playback works I can copy all my code from Dev-C++ in to the CodeBlocks app and finally get on with my game :D :D :D :D :D

THANK YOU PokeParadox for the suggestion, and Yaustar for the CodeBlocks GP2X version.
 
*Takes a bow*

Additionally you can get a similar Code::Blocks setup in linux (I use Ubuntu now)
It takes a bit off work of course.

EDIT: You really should use the edit button more also... Multiple consecutive posts are normally frowned upon on most forums ;)
 
Actually I already need Windows installed on my Mac for playing Eve, so I'll keep Code::Blocks running under Windows and get rid of the Linux installation (which I only did for Open2x).

As for the edit button, yes I know it's there :) But I've been desperate to get this working and thought incrementing the post count in the thread would alert people to the fact that I've posted again, whereas editing an existing post may go unnoticed.
 
Back
Top