Hi Everyone
While developing my Operation : Pew Pew game, I ran into an obstacle that caused me quite a bit of headache, until I discovered a very slick, and easy way to overcome a software bug/limitation.
I thought I'd share / document the process here, in case someone else has this problem in the future (and so I can find this thread again in 6 months once I've forgotten my own work around).
This problem...
I want background music in my game.
I want that music to be an awesome Amiga MOD file.
I'm all excited because I have the PlayerPRO DevKit (found here: Download #5)
So, I write my fancy C code (I'm using CodeWarrior PRO 4 (found here: CW PRO 4)
The MADLib (PlayerPRO's DevKit) allows the MOD file itself to be stored INSIDE my resource file, making my compiled application slick and a single file.
You can see in the sample code snippet below, I'm loading the music from the MADH resource at ID 3214.
So far so good...
So.. How do I get my music INTO MADH and give it ID 3214?

The included example comes with a tuna already at this location. It's not a great tune, but it lets you know your playback is working.
Let's replace it with our own awesome MOD...
Open up your resource file in ResEdit (You use the included example one, I'll use the one from my game)



You'll see the MADH resource. If you double click con it, you'll see the song data in hex.
That's great, but.. HOW DO I REPLACE IT WITH MY NEW MOD?!?!?
Close ResEdit.
Open up PlayerPRO 4.5 and REGISTER IT.
You MUST be using the REGISTERED version to do this.
You can download PlayerPRO 4.5 LINK from slot #1.
The serial # is included in the download.
Ok, run Player PRO.

Open your awesome MOD file

Click once on it in the Play List to highlight it.
You could / should test play it as well to ensure it plays properly with PlayerPRO (not all mod players support all 4, 000, 000, 000 versions of Amiga MOD effects codes).

Now, here's the disconnect...
The official documentation included with the dev kit states that with the song selected, simply go up to EDIT and select COPY.
This is suppose to place the data on the clipboard, then just paste it into the resource file... NOPE.
It's broken and doesn't copy anything to clipboard.

Don't freak out, there's actually a super easy fix!
Since you have the REGISTERED version of Player PRO...
With the song selected, go to FILE and then EXPORT AS and choose APPLICATION.

This will ask what platform you want to create the application for.
I selected 68K because that's my target. You do you.

This will create a single application file on your computer.

If you double click it, the tune will play with a built in MOD player.

Great! But how does that help get the music into my resource file?
Well, Now that we have a little application of your tune, let's open ResEdit again, and load the new song application you just made into it!

Oh look!
a MADH resource type!
Open it up, select the data and EDIT / COPY it.


Now, OPEN YOUR OWN application's resource file in ResEdit.
Navigate to your MADH resource (or create a new resource and manually give it MADH as the type), and PASTE.
If the example tune is already there, you'll get a warning asking if you want to overwrite it with the new data, change the ID, etc..
Let's overwrite it (choose NO).

Save your resource file, and VOILA!
Your new awesome MOD data is inside your resource file, and, if you're using the example, it probably already had the correct ID of 3214.
If it doesn't, make sure to set that (or set it to whatever you defined in your code).
That's it!
A little work around for getting your own music into your applications / games without having to have the songs as separate files.
I didn't go over setting up the libraries etc.. for the actual code to fucntion, but I can if anyone is interested.
Honestly, the example GAME that comes with the Dev kit shows you the setup pretty well.
I hope that helps someone, somewhere, sometime!
Take care
Aaron/DW
Dark Systems BBS
While developing my Operation : Pew Pew game, I ran into an obstacle that caused me quite a bit of headache, until I discovered a very slick, and easy way to overcome a software bug/limitation.
I thought I'd share / document the process here, in case someone else has this problem in the future (and so I can find this thread again in 6 months once I've forgotten my own work around).
This problem...
I want background music in my game.
I want that music to be an awesome Amiga MOD file.
I'm all excited because I have the PlayerPRO DevKit (found here: Download #5)
So, I write my fancy C code (I'm using CodeWarrior PRO 4 (found here: CW PRO 4)
The MADLib (PlayerPRO's DevKit) allows the MOD file itself to be stored INSIDE my resource file, making my compiled application slick and a single file.
You can see in the sample code snippet below, I'm loading the music from the MADH resource at ID 3214.
So far so good...
So.. How do I get my music INTO MADH and give it ID 3214?

The included example comes with a tuna already at this location. It's not a great tune, but it lets you know your playback is working.
Let's replace it with our own awesome MOD...
Open up your resource file in ResEdit (You use the included example one, I'll use the one from my game)



You'll see the MADH resource. If you double click con it, you'll see the song data in hex.
That's great, but.. HOW DO I REPLACE IT WITH MY NEW MOD?!?!?
Close ResEdit.
Open up PlayerPRO 4.5 and REGISTER IT.
You MUST be using the REGISTERED version to do this.
You can download PlayerPRO 4.5 LINK from slot #1.
The serial # is included in the download.
Ok, run Player PRO.

Open your awesome MOD file

Click once on it in the Play List to highlight it.
You could / should test play it as well to ensure it plays properly with PlayerPRO (not all mod players support all 4, 000, 000, 000 versions of Amiga MOD effects codes).

Now, here's the disconnect...
The official documentation included with the dev kit states that with the song selected, simply go up to EDIT and select COPY.
This is suppose to place the data on the clipboard, then just paste it into the resource file... NOPE.
It's broken and doesn't copy anything to clipboard.

Don't freak out, there's actually a super easy fix!
Since you have the REGISTERED version of Player PRO...
With the song selected, go to FILE and then EXPORT AS and choose APPLICATION.

This will ask what platform you want to create the application for.
I selected 68K because that's my target. You do you.

This will create a single application file on your computer.

If you double click it, the tune will play with a built in MOD player.
Great! But how does that help get the music into my resource file?
Well, Now that we have a little application of your tune, let's open ResEdit again, and load the new song application you just made into it!

Oh look!
a MADH resource type!
Open it up, select the data and EDIT / COPY it.


Now, OPEN YOUR OWN application's resource file in ResEdit.
Navigate to your MADH resource (or create a new resource and manually give it MADH as the type), and PASTE.
If the example tune is already there, you'll get a warning asking if you want to overwrite it with the new data, change the ID, etc..
Let's overwrite it (choose NO).

Save your resource file, and VOILA!
Your new awesome MOD data is inside your resource file, and, if you're using the example, it probably already had the correct ID of 3214.
If it doesn't, make sure to set that (or set it to whatever you defined in your code).
That's it!
A little work around for getting your own music into your applications / games without having to have the songs as separate files.
I didn't go over setting up the libraries etc.. for the actual code to fucntion, but I can if anyone is interested.
Honestly, the example GAME that comes with the Dev kit shows you the setup pretty well.
I hope that helps someone, somewhere, sometime!
Take care
Aaron/DW
Dark Systems BBS
