XMPlay Example + Tools

Programming examples for the Psy-Q SDK
Post Reply
zeroZshadow
What is PSXDEV?
What is PSXDEV?
Posts: 3
Joined: June 29th, 2013, 3:58 am

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!
Attachments
XMTester.zip
(464.41 KiB) Downloaded 434 times

zeroZshadow
What is PSXDEV?
What is PSXDEV?
Posts: 3
Joined: June 29th, 2013, 3:58 am

Re: XMPlay Example + Tools

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

Nikoomba
What is PSXDEV?
What is PSXDEV?
Posts: 2
Joined: August 28th, 2013, 1:21 am

Re: XMPlay Example + Tools

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
Shadow
Admin / PSXDEV
Admin / PSXDEV
Posts: 2233
Joined: December 31st, 2012, 5:37 pm
PlayStation Model: H2000/5502

Re: XMPlay Example + Tools

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
xmplay.zip
(1.14 MiB) Downloaded 201 times
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.

Development Computer: Windows 98, Pentium 3 [400MHz], 128MB SDRAM, DTL-H2000, DTL-H201A, 21" Sony Trinitron CRT, CD-ROM burner, 3.25" and 5.25" Floppy Diskette Drives and a ZIP 100 Diskette Drive.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest