forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MikMod Module Player for PSP

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Sat Jul 09, 2005 7:11 am    Post subject: MikMod Module Player for PSP Reply with quote

I've ported MikMod module player V3.0.3 to PSP. I think this about the last version released before the player GUI was split from the actual player, c1999. I can't find any current maintainer to submit changes to.

It will play most MOD, XM, IT, S3M, STM, MTM, 669, FAR, DSM, MED, ULT and UNI tracker files (while other things are happening).

An example app is included. I built it with cygwin and beta 1.0 SDK.
The modules I used are hardcoded in the source.

http://members.iinet.net.au/~jimshaw/PSP/mikmod-3.0.3.zip

Thanks to Peter Amstutz and all the other MikMod developers who released it under a free-to-anyone license.
Also many thanks to the ps2dev people for the psp sdk.

Jim
Back to top
View user's profile Send private message Visit poster's website
emumaniac



Joined: 08 May 2005
Posts: 79

PostPosted: Sat Jul 09, 2005 7:39 am    Post subject: Reply with quote

link not working ?
Back to top
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Sat Jul 09, 2005 7:54 am    Post subject: Reply with quote

Fine here. :-/
Jim
Back to top
View user's profile Send private message Visit poster's website
caetla



Joined: 09 Jul 2005
Posts: 3

PostPosted: Sat Jul 09, 2005 10:41 am    Post subject: Reply with quote

get compilation issue :

Code:

root@graziella /usr/local/pspdev/psp/sdk/samples/mikmod-3.0.3 # ./build-mikmod.psp.sh
make: Warning: File `mdreg.c' has modification time 1.3e+04 s in the future
psp-gcc  -O2 -I. -I../include -I/usr/local/pspdev/psp/sdk/include -g -DPSP   -c -o mdreg.o mdreg.c
psp-gcc  -O2 -I. -I../include -I/usr/local/pspdev/psp/sdk/include -g -DPSP   -c -o drv_psp.o drv_psp.c
drv_psp.c:87: warning: initialization from incompatible pointer type
ar r ../lib/libmikmod.a stream.o virtch.o munitrk.o \
        mloader.o mlreg.o npertab.o sloader.o load_uni.o load_mod.o load_m15.o load_mtm.o load_s3m.o load_stm.o load_669.o load_far.o load_dsm.o load_med.o load_xm.o load_ult.o load_it.o s3m_it.o mplayer.o mdriver.o mdreg.o drv_nos.o drv_raw.o drv_wav.o drv_psp.o
make: warning:  Clock skew detected.  Your build may be incomplete.
make: `../lib/libmmio.a' is up to date.
make: Warning: File `mikmodpsp.c' has modification time 1.6e+04 s in the future
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I../include -DPSP -DUSE_ZIP -DCPU_SNAGGER   -c -o mikmodpsp.o mikmodpsp.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I../include -DPSP -DUSE_ZIP -DCPU_SNAGGER  -L. -L/usr/local/pspdev/psp/sdk/lib   mikmodpsp.o ../lib/libmikmod.a ../lib/libmmio.a -lpspaudiolib -lpspaudio -lpspdebug -lpsplibc -lpspkernel -o mikmod.elf
../lib/libmikmod.a: could not read symbols: Archive has no index; run ranlib to add one
collect2: ld returned 1 exit status
make: *** [mikmod.elf] Error 1
All done.



any idea ?
thanks
Back to top
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Sat Jul 09, 2005 1:16 pm    Post subject: Reply with quote

Looks like however you unzipped it has messed up the file dates.
Try using the 'touch' utility to fix them.
eg.

Code:
cd playercode
touch mdreg.c


also, if it doesn't build clean in one go, use
Code:
./clean-mikmod.sh


FYI I just put the zip file in the samples folder and did
Code:
unzip mikmod-3.0.3.zip
cd mikmod-3.0.3
chmod 777 build-mikmod.psp.sh
./build-mikmod.psp.sh


for a full build.

Jim
Back to top
View user's profile Send private message Visit poster's website
caetla



Joined: 09 Jul 2005
Posts: 3

PostPosted: Sat Jul 09, 2005 3:34 pm    Post subject: Reply with quote

it seem you miss the final error :

../lib/libmikmod.a: could not read symbols: Archive has no index; run ranlib to add one
collect2: ld returned 1 exit status
make: *** [mikmod.elf] Error 1
All done.

Caetla
Back to top
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Sat Jul 09, 2005 4:18 pm    Post subject: Reply with quote

I'm sorry, I don't know what's wrong there.
Maybe if you do what it says, find libmikmod.a and do
Code:
ranlib libmikmod.a

then run the build again that will work.

Jim
Back to top
View user's profile Send private message Visit poster's website
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Sat Jul 09, 2005 10:38 pm    Post subject: Reply with quote

Nice work, but for big sound files it needs some minutes to load. I've patched it to load from memory the source and compiled with a nice sample. Now the music starts immediatly after program launch and I've added some text output for the instrument names, which are used for the composer comments.

With the bin2o it is very easy to include large binary files into the PBP file, but you have to use the -G0 switch, if the file is too large. Just put a "music.xm" file into the userdir (need not to be in xm-format, but the name is hard coded in the Makefile) and you can recompile it with your own music.

It is only a quick hack, the clean solution would be to use a special FILE_MIKMOD struct instead of FILE*, which has some pointers to the file IO functions and could be initialized with memory IO or file IO functions, like in ZLIB.
Back to top
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Sun Jul 10, 2005 9:45 am    Post subject: Reply with quote

Thanks! That's a good idea.

What I think I'll do today is build a proper file selection graphical front end for both MikMod and the YM players and put up a src+binary release.

Are there any directory scanning APIs or is it going to be easier to use a playlist?

edit: Another question, maybe it will be enough to improve the buffering in stdio in PSPSDK to get the big modules to load - I'm guessing the real problem is streaming byte-by-byte from the MS?

edit2:
You'll like this one a lot more. MikMod PSP V1.1 is released!
http://members.iinet.net.au/~jimshaw/PSP/mikmod-3.0.3.zip
Includes a file browser and a binary release!
Big modules now load instantly too!

Jim
_________________
http://www.dbfinteractive.com
Back to top
View user's profile Send private message Visit poster's website
Sixtoe



Joined: 11 Jul 2005
Posts: 1

PostPosted: Tue Jul 12, 2005 9:07 am    Post subject: Reply with quote

Loverly to have a .mod player for the psp, good work. Handful of requests if possible for a future version...

Can you support files in directories please? (I have too many mods ;) At the moment if you have a directory and select it the player crashs the psp.

Can you make the player automatically move on to the next song in the list?

Can the graphics on playback be optional? (seems to be badly flickering, also not having graphics will improve battery life I imagine)

Can the list be sorted alphabetically rather than randomly (or is it by order added to the dir?)

Cheers,

Six...
Back to top
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Tue Jul 12, 2005 8:55 pm    Post subject: Reply with quote

I think all those things are desirable, along with playlists, shuffle and all the other wonders of media player.
The graphics are crap, and just an experiment, I don't think they're going to flatten the battery too quick. I'll have to learn how the blitter library works for next time.

Thanks for the feedback.

Jim
_________________
http://www.dbfinteractive.com
Back to top
View user's profile Send private message Visit poster's website
wulfie



Joined: 08 Jul 2005
Posts: 28

PostPosted: Sat Jul 23, 2005 9:49 pm    Post subject: Reply with quote

have there been any updates to this awesome player? personally I'd like to see the graphics be 'optional' ;)
Back to top
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Sun Jul 24, 2005 8:35 pm    Post subject: Reply with quote

Frankly, this was never supposed to be a binary release. I wanted to use a mod player for doing as yet undesigned PSP demos. Both the YM player and MikMod have been incorporated into PSPMediaPlayer. While that also is an immature product, I'm sure it would be better if all these media types were supported in one central program and we could all work on the UI, which is the important thing for end users. We're not yet all cooperating at that level, though I hope soon we might.
So, no, I'm not really doing updates unless I need them myself and I feel like it.
Thanks for calling it awesome though :-)

Jim
_________________
http://www.dbfinteractive.com
Back to top
View user's profile Send private message Visit poster's website
Warren



Joined: 24 Jan 2004
Posts: 173
Location: San Diego, CA

PostPosted: Mon Jul 25, 2005 1:47 am    Post subject: Reply with quote

People are more than welcome to contribute to PSPMediaCenter, we were supposed to have a GUI to it made by qubitz but he seems to have dropped the ball. We have setup the gui subdir of PSPMC so that it is very easy to add new GUIs and select them at compile time.
Back to top
View user's profile Send private message
PompeySteve



Joined: 16 Mar 2005
Posts: 14

PostPosted: Mon Jul 25, 2005 3:16 am    Post subject: Reply with quote

Hi

I'm having trouble compling... the first error I get is :

mikmodpsp.c (79) : error: parse error before 'dir'

Any ideas?

Cheers

Steve
Back to top
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Mon Jul 25, 2005 7:57 am    Post subject: Reply with quote

The source is compatible with an older version of the SDK. I'll post up a new version later this week.

Jim
_________________
http://www.dbfinteractive.com
Back to top
View user's profile Send private message Visit poster's website
adresd



Joined: 17 Jan 2004
Posts: 43

PostPosted: Mon Jul 25, 2005 8:41 pm    Post subject: Reply with quote

As Warren pointed out.

in PSPMC, the gui's have been abstracted out, so ppl can add more.. I please ask they leave the debug gui pretty much alone for me and warren to play with (unless good reasons).

The same is true of the decoders (mp3,ogg,mikmod etc) so they can be easily added/compiled in/out.

the main thing PSPMC does, at its base is handle a list of decoders, the main other point is the gui, which is easily alterable/selectable.

This was all done to try and encourage people to contribute to it, without the normal complaints of 'i dont like that gui', well easy, write your own one, as long as we dont end up with 2^40 gui's it should be manageable.
Back to top
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Sun Jul 31, 2005 9:36 pm    Post subject: Reply with quote

Is there a reason why I can't see the source for pspmediacentre in SVN?

Anyway, as promised, updated source for MikMod with latest SDK version is here
http://members.iinet.net.au/~jimshaw/PSP/mikmod-3.0.3.zip
also including new binaries.

Changes:
Source updated to latest PSPSDK.
Sorts the file list alphabetically.
Media files now live in PSP/MUSIC instead of local folder.
Some WAV files can now be played (flakey).
Graphics are off by default.

Jim
_________________
http://www.dbfinteractive.com
Back to top
View user's profile Send private message Visit poster's website
Warren



Joined: 24 Jan 2004
Posts: 173
Location: San Diego, CA

PostPosted: Mon Aug 01, 2005 12:12 am    Post subject: Reply with quote

It's in the PSPWare repository, not PSP.
Back to top
View user's profile Send private message
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Thu Aug 04, 2005 8:26 am    Post subject: Reply with quote

What's the current state of mikmod? Looks like there is already a bit of mikmod integrated in PSPMediaCenter. I've compiled PSPMediaCenter (which was a bit difficult, because it expected libmad and libTremor directories instead of using the standard include path, but libmad uses PSPDIR instead of PSPSDK, so even if using the standard directory it would not work, or do I need to set the PSPDIR variable, too? ), but looks like it shows only mp3's from the music directory.

nevyn has repackaged Jim's latest port to a library, perhaps it should be imported in psp svn repository, like libmad and libTremor, and then it can be used from PSPMediaCenter and other programs. If this is the way to go, it should be done like other libraries, first importing the original source as a vendor branch and then the PSP changes.
Back to top
View user's profile Send private message
nevyn



Joined: 31 Jul 2005
Posts: 136
Location: Sweden

PostPosted: Thu Aug 04, 2005 8:33 am    Post subject: Reply with quote

Here's my feeble attempt at a library package:
http://ncoder.nevyn.nu/psp/mikmodlib.zip

(Packaging and unix libraries really isn't my area of expertise, so that package is seriously fugly. ('tho it works))
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Thu Aug 04, 2005 5:37 pm    Post subject: Reply with quote

If someone wants to drop mikmod in as a library into svn, then do it. Sounds like a good idea. I'm on holiday for the next month :-) so I won't be doing any work on it.

I've updated it to the latest PSPSDK and mikmod builds and works well there.

It's true that 3.0.3 isn't the latest version of mikmod, but the 3.1.x and 3.2.x libmikmod code I found will be a fair bit harder to port for very little gain. So I'm not planning to do that.

Jim
_________________
http://www.dbfinteractive.com
Back to top
View user's profile Send private message Visit poster's website
_tmator_



Joined: 15 Nov 2004
Posts: 19
Location: France

PostPosted: Mon Oct 24, 2005 6:06 pm    Post subject: Reply with quote

Hi,

i port libmikmod 3.11.1 and i want to commit it on svn but is it a good idea to have twoo mikmod vesion with same headers filename ?

this can do a conflict ....

i wait your suggestions

thx.
Back to top
View user's profile Send private message
nevyn



Joined: 31 Jul 2005
Posts: 136
Location: Sweden

PostPosted: Mon Oct 24, 2005 6:32 pm    Post subject: Reply with quote

_tmator_ wrote:
Hi,

i port libmikmod 3.11.1 and i want to commit it on svn but is it a good idea to have twoo mikmod vesion with same headers filename ?

this can do a conflict ....

i wait your suggestions

thx.


It'd be a real bad idea for one to have both mikmodlib and libmikmod installed on their computer, but I guess it'd be fine to have both in the /repository/. If I remember correctly though (and I might be wrong on this, on both parts) libmikmod has a GPL license and the ps2dev svn doesn't allow infectious licenses.

I'm real curious tho': What's new in libmikmod, compared to the old mikmodlib?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
_tmator_



Joined: 15 Nov 2004
Posts: 19
Location: France

PostPosted: Mon Oct 24, 2005 6:39 pm    Post subject: Reply with quote

i don't know but i use it to run bb demo from aalib ;)
Back to top
View user's profile Send private message
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Mon Oct 24, 2005 8:42 pm    Post subject: Reply with quote

nevyn wrote:
If I remember correctly though (and I might be wrong on this, on both parts) libmikmod has a GPL license and the ps2dev svn doesn't allow infectious licenses.


GPL would conflict with the BSD licence of Lua Player, but looks like it as LPGP, which is ok: http://mikmod.raphnet.net/#license

Perhaps there are fewer bugs in it and more features, then it would be a good idea to delete the current SVN libmikmod, but please check, if the wav read function of the 3.11.1 has the bug fixed, which I've fixed in the SVN version (it has problems reading some wav files, because the read function didn't tested the chunks the right way).
Back to top
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Tue Oct 25, 2005 7:10 pm    Post subject: Reply with quote

It didn't look like much had changed in the driver, feature-wise, to me. Still only mono PCM samples for instance, and one new module format added. All the work seems to have been done in the front-end player, which isn't much use on the PSP. The player is GPL.
I didn't think it was worth the extra hassle to go from PD to LGPL.

Jim
_________________
http://www.dbfinteractive.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group