Home | Forums | What's new | Resources | |
CDDA,My Code, Can ya Help? |
mrkotfw - May 22, 2003 |
1 | 2 | Next> |
gameboy900 | May 22, 2003 | |||
Umm... CDDA is just another name for audio tracks. (Compact Disc Digital Audio). As for how you play it on a saturn from code I do not know. There are probably some functions to control the CD audio playback. |
printf | May 22, 2003 | ||||||||
First of all, CDDA sound is like gameboy900 said, another name for audio tracks. It's what you can find on lots of game CDs, from SegaCD to the newest PC games. CDDA files/tracks are usually very large, because they are the native audio format of the CD. They contain 16bit audio data at 44.1kHz, which is kind of a "high quality" audio... just like on normal audio CDs. Loading files like these into memory is not a good idea, since even short files will be too big to fit into the Saturns memory. Therefore CDDA files are played using the CD interface of the Saturn, which simply streams the CDDA data to the proper channels needed in order to generate a sound, completely ignoring the 68000 (also called Sound CPU). What is happening in the code above is to initialize the Sound CPU with the slInitSound() call, and then call up some CDDA initialization with slCDDAOn(). AFAIK, the 68000 has nothing to do with the CDDA being played, instead it handles the PCM/FM type of sound, which you can control via slPCMOn() and similar calls. So please don't confuse the two. Make sure the file you want to play exists on the game CD, because there is no error handling and you won't know why it failed... I guess you can remove the 68000 handling from the program and try it again as it shouldn't have any effect on CDDA. keep on programming... |
mrkotfw | May 22, 2003 | |||
wow, beautiful explanation. i get it now. ya thats what i was thinking if i can use PCM functions to control it. i dont know how burn CDDA onto the ISO! can you please show me an example printf? and how to create CDDA files? thank you |
AntiPasta | May 22, 2003 | |||
I've been wondering today (what a coincidence |
M3d10n | May 22, 2003 | ||||
Get your ISO, a few .WAV files and use Sega Cue Maker to make a .CUE file, then mount the .CUE in a virtual CD drive using either Daemon tools or Alcohol 120%. |
Taelon | May 22, 2003 | |||
I'll elaborate on M3dion's explanation. CDDA is stored on a CD as audio tracks separate from the ISO (data) track, not really as files. It IS possible (and in the case of Saturn games, rather common) to place pseudo-files into the ISO9660 directory structure whose LBAs (logical block addresses) point to the first sector of each audio track. But other than that, CDDA is wholly separate from the ISO. All you're doing when burning an iso/wav image via a cuesheet is creating a mixed-mode disc. Mixed-mode because the ISO becomes a Mode 1, 2048-bytes-per-sector track (track 1), and the wav files become CDDA audio tracks with 2352 bytes/sector, normally starting at track 2. So in order to "create a CDDA", all you do is come up with a wave file at 44.1kHz 16-bit stereo, and burn it. |
mrkotfw | May 22, 2003 | |||
heh, i get that...but! how do i load them ??? I mean I use the CD functions to Load a *file*, what you guys said it sounds like it embeds itself in the cd instead of being a file... im a little confused... |
printf | May 22, 2003 | ||||
You only use the file entry in the data track to point to the audio track you'd like to play. It should be possible to create a game CD with audio tracks/CDDA files by using the Sega CD tools (buildcd or what it's called). From there, you'd treat it just like any other file, but instead of loading it into memory, the SGL/SBL functions will know what to do with the audio data, in this case playing the sound. That's right, if you point to audio tracks, the 'read' function will actually start playing something! |
mrkotfw | May 23, 2003 | |||||||
thanks man, i now understand listen.... you think i can see a *.cti file with some CDDA tracks included please? i deleted mine.... ALSO i have a problem i just want to know
Code:
Thats what i have, but in the BITMAP.DOC it tells me that you need slInitBitMap(); and it only supports 256 colors! i know you guys explained this A MILLION times but takaissilly's code didnt work, I dont get that bmp15bit Demo by Cyber Warrior X, where did he put the 2d DATA?!!! whoa... confusing!
i guess if DONT use this function it wont set it to 256 colors... lol im an idiot... BAH i forgot for PCM sounds can i use slBGM* functions??? and for CDDA as well? i just need ta know |
mrkotfw | May 24, 2003 | |||
Hey, what did i do wrong? <_< Did i scare you guys off [again] ? |
printf | May 24, 2003 | ||||||||||||||
I don't know if there are any *.cti files with audio tracks available, you might want to ask someone who has already built a disc with those tools, I didn't do so.
To use more than 256 colors, you will need to set up the VDP2 plane accordingly on your own, and transfer the data you'd like to see displayed with a simple for loop. Taka's code was only an example, it's not actual code. CyberWarriorX's bitmap demo for 24 bit (haven't looked at his 15bit bitmap demo) is a little difficult to understand, but if you read it again you will see he writes the 24bit data into VRAM and uses the SGL functions for VDP2 setup. You can compile his demo and try a picture, if you don't use his plotpixel function in the 24bit demo (he is calculating the colors).
I believe *.snd and *.ton files are for FM music only, and that would be slBGM*. PCM is only handled by the slPCM* functions I guess, but you might want to read up on that or try the PCM example code. CDDA needs its own fading, and that should be inside the slCDDA* functions. |
mrkotfw | May 24, 2003 | |||
Thanks for clearing that up man, thank you very much. i guess i can ask in #gbadev for a workaround with the 24-bit... BTW where in the living F*CK is the data for the 2d??? LOL also, im moving back to linux... i cant stand the freezing and BSODs!!! OMFG im going crazy. but how am i gonna test my Bins?? i dont have a Action Replay+comms link.... if anyone.... anyone will be so generous to sell me (and they have to be trusted) a Action Replay + Pc Comms Link extremely cheap, dirt cheap, so cheap your practicly giving it to me! |
printf | May 25, 2003 | ||||||||||
CyberWarriorX didn't include any 2d data. The colors he needs for each pixel are calculated before PlotPixel is called, and that function simply puts the data in the format so it can be seen. You might want to check this in the code again, it's in 15bit and 24bit demo.
No idea. There was a Linux Saturn emulator a few years ago, but I don't think it works ok. Maybe WINE will do what you want?
You should check the auction pages in your country first, you might get a cheap card from some PSX guy in your country or city. |
Alexvrb | May 25, 2003 | |||
Windows isnt good, but I havent had a BSOD in couple of years. It could have something to do with your configuration, windows isnt at all forgiving. Everything has to be just so. The only hard locks ive had in some time have been caused by the half-life engine, and even then pretty rarely. Though that game doesnt seem to like being minimized on a lot of computers. Anyway, use whatever works for you, but I highly doubt you'll be satified with using Wine/WineX to run windows-based saturn emus. They're buggy and slow enough to begin with. If you eventually get a comms link and PAR, you could just test that way of course. |
mrkotfw | May 26, 2003 | |||
hey thanks man, thanks everyone... but i quit on CDDA for now... i'll keep this for a future reference... later i'll need all of this |
AntiPasta | May 26, 2003 | |||
take a look here... It has code on lotsa demo-style effects. |
mrkotfw | May 26, 2003 | |||
thanks man |
mrkotfw | May 26, 2003 | |||||||
Code:
Code:
HELP!!! |
printf | May 26, 2003 | ||||||||
You sure everything you want to include is there? I don't see why it shouldn't work, but if the CD functions are missing it might be due to a wrong include statement, or maybe the file is damaged? |
1 | 2 | Next> |