Hey Rockin'-B! Yo Rockin'-B, I got your PM and here's some code to play CDDA tracks on the Saturn. The line 'Play_cdda(6, 12, 5)' is the most important one because it tells the Saturn: Play CD audio tracks 6 through 12, 5 times. Change the number to something like 'Play_cdda(6, 6, 10)' and it would play track 6, 10 times. *Heh, guess I'm just rambling now so here's what my 'OBJECT' file looks like: =================== ==================== =========== # source_program SRCS = codeB01.c SYSOBJS = $(CMNDIR)/cinit.o $(SGLLDR)/sglarea.o OBJS = $(SRCS:.c=.o) LIBS = -lcd -lsgl *Now here's my actual program code: =================== ====== #include <sgl.h> #include <sgl_cd.h> #include <sega_cdc.h> #include "sddrvs.dat" #define scsp_map_size 4 void Set_volume(int temp1) { slSndVolume(temp1); return; } void Set_cdda_pan(int temp1, int temp2, int temp3, int temp4) { slCDDAOn(temp1, temp2, temp3, temp4); return; } int Setup_sound(void) { char map[] = {0xff,0xff,0xff,0xff}; int i, y = 0; slInitSound(sddrvstsk, sizeof(sddrvstsk), (Uint8 *)map, (4)); CDC_CdInit(0x00,0x00,0x05,0x0f); return; } void Play_cdda(int temp1, int temp2, int temp3) { CdcPly plywk; CdcPly *ply = &plywk; CDC_PLY_STYPE(ply) = CDC_PTYPE_TNO ; CDC_PLY_STNO(ply) = temp1 ; CDC_PLY_SIDX(ply) = 1 ; CDC_PLY_ETYPE(ply) = CDC_PTYPE_TNO ; CDC_PLY_ETNO(ply) = temp2 ; CDC_PLY_EIDX(ply) = 99 ; CDC_PLY_PMODE(ply) = CDC_PM_DFL+ temp3 ; CDC_CdPlay(ply); return; } int ss_main() { slInitSystem(TV_704x240, NULL, 1); slPrint("CDDA playback example v0.01", slLocate(2, 2)); slPrint(" >>Plays back track number 6 - 12, 5x.", slLocate(2, 3)); Setup_sound(); Set_volume(127); Set_cdda_pan(127, 127, 0, 0); Play_cdda(6, 12, 5); while(-1) { slSynch(); } } // END OF CODE!! Well, that should just about do it! Hey, if you have any questions feel free. But give it a shot and tell me what you think. Like always, any thoughts are more than welcome. On a side note: I burned a CD with audio tracks from SOR2 and played them with this program. Streets of Rage music on the Saturn....beautiful. Freaking mint!! Hey, see ya & happy coding!! |