PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Loading non Protractor Mod files with mikmod......

Hello, i have been using the MikMod Libs that were compiled for Easy CE. The only problem is that .mod(protractor format) mods only have a set tempo and speed. There are other mod formats wich are nearly as small s3m, it, but this lib won't load them. I tried messing with the code myself, to add s3m's, but it seems I'm doing something wrong. I was wondering if you had any suggestions?

The reason I want to do this is because with a .it or s3m you can easily(well more easily than mod) convert a midi over and they sound fairly equal.
MikMod supports all these formats. The only problem is that you need to screw with the MikMod project files to get them to work. (They are disabled by default, I don't know why - probably size)

I forget the exact procedure, but it basically amounts to this:
1. Open the LibMikModWinCE workspace.
2. Add all the files in the mikmodce\loaders directory to the project.
3. Tell MikMod to enable the loaders. In the file mikmodce\playercode\mlreg.c there is a function MikMod_RegisterAllLoaders_internal. Change this function to read:
Code:

void MikMod_RegisterAllLoaders_internal(void)
{
_mm_registerloader(&load;_669);
_mm_registerloader(&load;_amf);
_mm_registerloader(&load;_dsm);
_mm_registerloader(&load;_far);
_mm_registerloader(&load;_gdm);
_mm_registerloader(&load;_it);
_mm_registerloader(&load;_imf);
_mm_registerloader(&load;_mod);
_mm_registerloader(&load;_med);
_mm_registerloader(&load;_mtm);
_mm_registerloader(&load;_okt);
_mm_registerloader(&load;_s3m);
_mm_registerloader(&load;_stm);
_mm_registerloader(&load;_stx);
_mm_registerloader(&load;_ult);
_mm_registerloader(&load;_uni);
_mm_registerloader(&load;_xm);
_mm_registerloader(&load;_m15);
}

MikMod should now support pretty much every format you can think of.
For the EasyCE and Overloaded libraries, I indeed disabled all but .mod, to cut down the size of the library. It's already pretty huge. :)

Someone told me that I should have used s3m instead of mod btw; s3m can have 4 channels like .mod, but it seems to be smaller, and the format has more features.

- Jacco.
So what do we do ? do we keep on working with .mod ?

has someone an url giving info° about .mod format and some utilities to convert ?

thx
The post by me above explains to add support for all formats that MikMod supports. If you want to save space, it's fairly easy to remove ones you don't need. Just remove the ldr_xxx.c from the project and remove the corresponding _mm_registerloader line from mlreg.c
ok bill, thx for the code !

i understood that Jacco tries to make standard overloaded.dll that customers will only have to load once and that is supposed to run any overloaded game.

if we change mikmod's code as you suggest, won't we produce a "personnal" overloaded.dll so it will have to be downloaded with the game ? is it a problem ?

(that 's a general question in fact ie with the transparent color wich is set by default to TRANSPARENT_COLOR=( RED_MASK || BLUE_MASK ); and that i use to set to TRANSPARENT_COLOR=0; (pure black). as it it a constant, i get a different Overloaded.dll, is it better to keep it "as is" or better ? or is it "allowed" to change some minor stuffs)

<<hope to be clear this time :p>>
I got the same impression about having only one Overloaded library.

Anyway, I think the mikmod library is part of the application, not Overloaded, so modifying it won't require any changes to Overloaded.

This might not be the case, though, if I looked at the project files I could figure it out. Unfortunately, I don't have them at the moment.

In either case, as long as you link with the modded mikmod (no pun intended) before Overloaded, eVC should use your version of the MikMod code instead of EasyCE's. On the other hand, I could be wrong, and you might get so many link errors your computer would explode :) .
Right Billcow, my computer has gone through the window...

you've got a new private message ;)
In the Overloaded libraries, MikMod is indeed in the DLL. If everyone prefers xm (or any other format) over mod I can add it though, so everyone is still using the same library.

Be careful with changing small things like the transparent color though; I don't think such a small change justifies a app-specific version of the DLL.
that's good to make things clear about that .dll, thx

about the TRANSPARENT_COLOR, i just included a small loop to change each pixel of a sprite from MY_TRANSPARENT_COLOR to TRANSPARENT_COLOR and to add 1 bit of green to any pixel that would already be set to TRANSPARENT_COLOR (so there's no hole), the dll is safe but i use my own transparency.

here it is:

Code:

for (i=0; i<m_mysprite->GetWidth(); i++)
if ( *(m_mysprite->GetBitmap()+i+j*m_mysprite->GetWidth()) == TRANSPARENT_COLOR )
*(m_mysprite->GetBitmap()+i+j*m_mysprite->GetWidth()) += 0x20; //small amount of green
else
if ( *(m_mysprite->GetBitmap()+i+j*m_mysprite->GetWidth()) == MY_TRANSPARENT_COLOR )
*(m_mysprite->GetBitmap()+i+j*m_mysprite->GetWidth()) = TRANSPARENT_COLOR;


i also have a little confusion: there's one overloadedARM.dll in Overloaded\Common\DLL but the download directory in the overloaded project is set to \Windows so i have the file twice on the PPC. i noticed that both are needed ?
The one in the Windows directory is not used. DLL's are loaded from a fixed location (../Common/DLL).
SiERRA · 14 Jul 2002, 17:23 UTC — XM Support
Ops! I was getting crazy for the xm's xDD Please, add support for .xm's! mod's are so useless nowadays (not for the channels, but instruments and composing without them is a nightmare ...) =))

Thank you,
SiERRA
Yeah .xm's would be nice. The amount of people I know with freeware .xm's is amazing...

Cheers,

Jape
I'd like to know those people, Jape :)
:) hehe.

Go to #flipcode on an IRC EnterTheGame server and ask for Wizzy. He'll be glad to help you out. Tell him I send you.

His l33t .XM skillz are really mad!

:)

Cheers,

Jape