GP32 Mod Files In Mr Mirko's Sdk


Bacon

Still Fresh
Joined
Sep 3, 2003
Messages
6
I'm not quite sure this is the right forum to ask this question, but it is development related.

I've been learning C in my spare time for some months, and a few days ago I thought it was time to start applying what little knowledge I have so far to making a small prog on the GP32.

I'm using Mr Mirko's excellent SDK, and so far I've come along nicely, with a double buffered display and a couple of sprites moving about.

The thing I want to know if there is any mod tracker for Linux that allows me to make mod files compatible with the modfile library in the SDK. I tried making a short piece in Soundtracker and convert the resulting file with raw2c, but it crashed the program when I ran it on my GP32.

Do I have to hunt down a copy of Protracker and fire up an Amiga to make the music or is there any way to manke the music in Linux? Sure, I could use an existing mod file, but where's the fun in that? B)
 
Bacon posted on Oct 27 2005 at 09:41 PM said:
I'm not quite sure this is the right forum to ask this question, but it is development related.

I've been learning C in my spare time for some months, and a few days ago I thought it was time to start applying what little knowledge I have so far to making a small prog on the GP32.

I'm using Mr Mirko's excellent SDK, and so far I've come along nicely, with a double buffered display and a couple of sprites moving about.

The thing I want to know if there is any mod tracker for Linux that allows me to make mod files compatible with the modfile library in the SDK. I tried making a short piece in Soundtracker and convert the resulting file with raw2c, but it crashed the program when I ran it on my GP32.

Do I have to hunt down a copy of Protracker and fire up an Amiga to make the music or is there any way to manke the music in Linux? Sure, I could use an existing mod file, but where's the fun in that? B)


I bet you saved in the wrong FIle Format, the modplayer in the sdk can play all MOD Files, 4 Channel.

There are dozen of Tracker Formats, s3m, ST, xm,... Be shure to save in the right Format, MOD4Channel.
 
Last edited by a moderator:
I bet you saved in the wrong FIle Format, the modplayer in the sdk can play all MOD Files, 4 Channel.

There are dozen of Tracker Formats, s3m, ST, xm,... Be shure to save in the right Format, MOD4Channel.

I couldn't find any way to specify the mod format in Soundtracker. The only choices are "Save song", "Save module" and "Render wav". When I choose "Save mod" I don't get to choose the file format. I made sure to make a song with only 4 channels.

Btw, I love your SDK! With the help of the book I've been using to learn C (Programming in C by Stephen G. Kochan) and your code examples, I was able to get double buffering and sprites working in a few hours. Not bad in my view since the only C programs I've made before are the small exercises in the book :)
 
Bacon posted on Oct 28 2005 at 09:12 AM said:
I bet you saved in the wrong FIle Format, the modplayer in the sdk can play all MOD Files, 4 Channel.

There are dozen of Tracker Formats, s3m, ST, xm,... Be shure to save in the right Format, MOD4Channel.

I couldn't find any way to specify the mod format in Soundtracker. The only choices are "Save song", "Save module" and "Render wav". When I choose "Save mod" I don't get to choose the file format. I made sure to make a song with only 4 channels.

Btw, I love your SDK! With the help of the book I've been using to learn C (Programming in C by Stephen G. Kochan) and your code examples, I was able to get double buffering and sprites working in a few hours. Not bad in my view since the only C programs I've made before are the small exercises in the book :)


Thanx that you like it...
Starting in C is not so hard, only if it comes to pointer and registers, or double linked lists, it could damage your brain :)
 
Last edited by a moderator:
I did my tunes with soundtracker as well, but - as you mentioned - it isn't able to save 4 channel MODs. So I had to go the hard way and use dosbox with the good old FT2 to convert it to .mod...
 
don posted on Oct 29 2005 at 08:26 PM said:
I did my tunes with soundtracker as well, but - as you mentioned - it isn't able to save 4 channel MODs. So I had to go the hard way and use dosbox with the good old FT2 to convert it to .mod...

Hmmm talking about great trackers, if you have a pc then here is a link to a great help in trackers for linux and windows :)

The Mod archive

MilkyTracker home — oldschool.voodoofrog.com
 
Last edited by a moderator:
don posted on Oct 29 2005 at 06:26 PM said:
I did my tunes with soundtracker as well, but - as you mentioned - it isn't able to save 4 channel MODs. So I had to go the hard way and use dosbox with the good old FT2 to convert it to .mod...
Time to fire up dosbox then. Or perhaps an Amiga. Could be fun too.
 
Last edited by a moderator:
Just tried some tunes, and it seems like the ones using the tone portamento effect (3xx in col4) crash my gp32.
Maybe other effects are a problem too, but i don't have the time to test them all.

edit:
After adding some sprites, all mods seems to crash :unsure:
I'm sure i made some stupid mistake as i'm a nood coder.
 
Modplug Tracker and OctaMED SoundStudio for windows are two very good tracker programs for creating and converting .MOD files in various formats and channel arrangements.

Trooper
 
Mirkos SDK is a good place to start, but to be honest, I believe the blitting code and modmixer are an example at best. Try SDL sometime, you'll like it.

www.libsdl.org
http://sourceforge.net/projects/sdl-gp32

And also, Modplug tracker is a good program but be careful not to use its advanced features like more than 4 samples, and the effects. Otherwise it won't work.
 
Tip: If you copy/paste the 'Forum link' you will get a nice link like this :)
snippet: unknown author - Load MOD music from SMC

It could be an alignment problem. I've had many problems with raw data included in my application - sometimes adding new data (like sprite data) causes the program to crash in certain places, or even changing the order of the various data. It was alignment issues.

I now use a very simple ASM file to include all files (no need to convert them to c OR load them from disk) like this:

resources.S
Code:
	.ALIGN 4
	.ARM

	.GLOBAL  rsrc_ship
	.GLOBAL  rsrc_red
	.GLOBAL  rsrc_green
	.GLOBAL  rsrc_blue
	.GLOBAL  rsrc_splot
	.GLOBAL  rsrc_bullet
	.GLOBAL  rsrc_bonus
	.GLOBAL  rsrc_warp
	.GLOBAL  rsrc_title
	.GLOBAL  rsrc_font1

rsrc_ship:
	.INCBIN "resources/ship.png"

	.ALIGN 4
rsrc_red:
	.INCBIN "resources/red.png"
	
	.ALIGN 4	
rsrc_green:
	.INCBIN "resources/green.png"

	.ALIGN 4	
rsrc_blue:
	.INCBIN "resources/blue.png"
	
	.ALIGN 4
rsrc_splot:
	.INCBIN "resources/splot.gif"
	
	.ALIGN 4
rsrc_bullet:
	.INCBIN "resources/bullet.gif"
	
	.ALIGN 4
rsrc_bonus:
	.INCBIN "resources/bonus.png"
	
	.ALIGN 4
rsrc_warp:
	.INCBIN "resources/displace.png"
	
	.ALIGN 4
rsrc_title:
	.INCBIN "resources/title.gif"
	
	.ALIGN 4
rsrc_font1:
	.INCBIN "resources/dungeon.gdf"
NOTE: Every line that starts with a dot is tabbed in. The files are in a resource subfolder during compile time.

Use the resources in code like this:
Code:
extern unsigned char rsrc_bullet[] __attribute__ ((aligned (4)));

I may have gone a little overboard on the 'aligned' directives, but it fixed my problem :) i.e - I don't think you need it above, as it is already aligned in the S file.
 
Back
Top