Using the PCM chip to make sweet beautiful music!
Posted: Mon Apr 01, 2013 7:49 pm
Well, at least to some folks...
My internet has been pretty bad the last few weeks... damn the providers and their fear of competition.
So I've been working on how to make the PCM chip in the SegaCD make noise... it was pretty simple on emulators - and a big pain on real hardware. I eventually got it all figured out. Here's the source for a few things:
libpcm - My low-level handling of the PCM chip. It includes functions for setting the registers properly and loading samples (will pass samples straight through, or optionally convert signed 8-bit samples to the proper format).
cdmodplayer - A conversion of my MOD player code to load MODs from CD and play them on the PCM. Very nifty code suitable for homebrew. Handles 4, 6, and 8 channel MODs. It will resample the instruments to make them fit in the PCM ram... it sounds better with some instruments than others. Best if it doesn't need to resample the instruments (duh).
libmikmod-3.3.1 - A port of mikmod to the SegaCD. Works great for plain MODs... a bit slow on XMs. Clearly needs optimizing for the 68000 (duh). Not as fast or as efficient as my MOD code, but handles more formats. The code here is set to load IT/MOD/S3M/XM/M15 files.
mikmodplayer - What good is libmikmod without a player? This is a modification of cdmodplayer to use mikmod instead of my MOD handling.
cdboot - While working on the players, I found another bug in the filesystem code in my SCD boot loader. Here's the latest.
I'll upload a couple example ISOs when the internet gets better... I can't keep a connection long enough to upload the ISOs right now.
One thing I wanted to ask - on real hardware, if you let the players sit and do nothing for a few minutes, the SCD hangs. As long as you keep doing SOMETHING (navigate the menus, select MODs to play) it works fine. It's like there's some kind of watchdog timer that looks for activity and tries to reset the CD if nothing happens for too long. I noticed that on all my SCD stuff. It runs forever on emulators just fine, but hangs on real hardware if you do nothing for a period. Any ideas? I can't find squat about this in the SCD dev info available.
My internet has been pretty bad the last few weeks... damn the providers and their fear of competition.
So I've been working on how to make the PCM chip in the SegaCD make noise... it was pretty simple on emulators - and a big pain on real hardware. I eventually got it all figured out. Here's the source for a few things:
libpcm - My low-level handling of the PCM chip. It includes functions for setting the registers properly and loading samples (will pass samples straight through, or optionally convert signed 8-bit samples to the proper format).
cdmodplayer - A conversion of my MOD player code to load MODs from CD and play them on the PCM. Very nifty code suitable for homebrew. Handles 4, 6, and 8 channel MODs. It will resample the instruments to make them fit in the PCM ram... it sounds better with some instruments than others. Best if it doesn't need to resample the instruments (duh).
libmikmod-3.3.1 - A port of mikmod to the SegaCD. Works great for plain MODs... a bit slow on XMs. Clearly needs optimizing for the 68000 (duh). Not as fast or as efficient as my MOD code, but handles more formats. The code here is set to load IT/MOD/S3M/XM/M15 files.
mikmodplayer - What good is libmikmod without a player? This is a modification of cdmodplayer to use mikmod instead of my MOD handling.
cdboot - While working on the players, I found another bug in the filesystem code in my SCD boot loader. Here's the latest.
I'll upload a couple example ISOs when the internet gets better... I can't keep a connection long enough to upload the ISOs right now.
One thing I wanted to ask - on real hardware, if you let the players sit and do nothing for a few minutes, the SCD hangs. As long as you keep doing SOMETHING (navigate the menus, select MODs to play) it works fine. It's like there's some kind of watchdog timer that looks for activity and tries to reset the CD if nothing happens for too long. I noticed that on all my SCD stuff. It runs forever on emulators just fine, but hangs on real hardware if you do nothing for a period. Any ideas? I can't find squat about this in the SCD dev info available.