XMPlay Example + Tools

Programming examples for the Psy-Q SDK
Post Reply
What is PSXDEV?
What is PSXDEV?
Posts: 3
Joined: Jun 29, 2013

XMPlay Example + Tools

Post by zeroZshadow » July 3rd, 2013, 12:48 am

I made a small example that shows how to use the XMPlay library and tools to add music to your application.
Please read the README.TXT included to see how the example is used.

The .BAT files are commented to show what each action does.
I tried to comment the main.c as clear and simple as possible to show the workings of XMPlay

Have fun!
You do not have the required permissions to view the files attached to this post.

What is PSXDEV?
What is PSXDEV?
Posts: 3
Joined: Jun 29, 2013

Post by zeroZshadow » July 3rd, 2013, 11:30 am

Small addition
I am using the cpe2psx tool here (its in the MAKE_AND_PLAY.BAT)
if you do not have this, please change this command to CPE2X
and remove the line "ren main.psx main.exe"
Sorry for not adding this in the readme

What is PSXDEV?
What is PSXDEV?
Posts: 2
Joined: Aug 28, 2013

Post by Nikoomba » August 28th, 2013, 4:42 am

If I follow the instructions in the readme file, the .exe does not compile.
This is without changing the .xm. It comes up with a parsing error.
I did change the .bat file as you instructed in your post since I wanted to use cpe2x.
I think cpe2x can't compile the code properly or something.

User avatar
Admin / PSXDEV
Admin / PSXDEV
Posts: 2562
Joined: Dec 31, 2012
PlayStation Model: H2000/5502
Discord: Shadow^PSXDEV

Post by Shadow » January 8th, 2017, 3:47 am

I have had the XMPLAY.LIB file on my PC for ages, but I never got around to using it nor uploading it. I checked the MD5, and it matches yours so both versions are the same. I was hoping yours would be newer since I've been playing around with it, and a few XM's don't play correctly which lead me to the library being not that accurately coded. As an example, I made a song from scratch using Fast Tracker, and the timing is off, even with a fixed BPM. The library isn't perfect, but this is a fantastic way to play several minute long songs with everything running from SPU RAM which is why it's being implemented into PSIO's Menu System.

I also contacted Jason Page (since he wrote the library) and I asked if he still had the source code. Unfortunately he does not, but, he did give me the PlayStation 2 source code which can be downloaded below.

Code: Select all

<!-- Sample code showing how to play .XM files -->
***** XMPlayer *****

PS2 Example code. 12.Dec.2000 - Jason Page (Technology Group (a division of SCEI R&D))

Plays XM files (converted into .XM, .XMH and .XMB files using the utility XM2PSX)
Main code runs on the IOP.
See "Info.TXT" for full list of commands.
Full source code included for xm player.

Handles playback of a maximum of 32 songs, using a maximum of 8 XM files.

To run:
From the EE directory:
dsedb -r run main.elf
You do not have the required permissions to view the files attached to this post.
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), PSIO Switch Board, DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.

PlayStation Development PC: Windows 98 SE, Pentium 3 at 400MHz, 128MB SDRAM, DTL-H2000, DTL-H2010, DTL-H201A, DTL-S2020 (with 4GB SCSI-2 HDD), 21" Sony G420, CD-R burner, 3.25" and 5.25" Floppy Diskette Drives, ZIP 100 Diskette Drive and an IBM Model M keyboard.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests