Once More Into The Fire Welcome back you pyromaniacs! You are not content with just knowing how to write audio and data CDs, are you? No! You want to know how to write bootable CDs, how to write Hybrid CDs that work on both Macs and PCs. You want to know how to squeeze more than 74 minutes of audio onto a single disc. If that's what you want, then you are definitely in the right place. But before we start with the fun stuff, let's take another look at the technical side of the CDR, the power behind the magic. How It All Works In the Guide to CD Burning Part 1, I gave the impression that there was a single layer on the CDR disc, and that's where the data is written. That description is, unfortunately, something of an oversimplification. In reality, there are actually four different layers present in a CDR disc: The first layer, the one closest to the label side, is a clear plastic layer, which is in fact where the label of the CD is printed. Another function of this layer is to act as a protection for the gold layer. The layer beneath the plastic layer is a gold colored layer. This is real gold. The primary purpose of this layer is to reflect the laser of the drive. The layer underneath the gold layer is the dye layer, where the actual data is recorded. And at the bottom is another clear plastic layer, which acts as protection for the dye layer. At this point, allow me to make a slight digression to address a question which many people have asked: Why do CDRs have different colors? The question can be easily answered by looking at the middle two layers, the reflective and the dye layer. The reflective layer is usually one of two colors, either gold, or a silver alloy mixture. The dye layer can also have different colors, depending on what it is made of. One common compound for the dye layer is cyanine, which is bluish in color. Another popular mixture is phthalocyanine, which is colorless, more or less. The resulting color of the CD is thus the color addition of the two layers. For example, green/gold discs combine a gold reflective layer with a cyan-colored dye, resulting in a gold appearance on the label side and a green appearance on the writing side. Ok, back to the main point of this section. One thing to note about the dye layer is that unlike the other three layers, which are smooth, the dye layer is pre-grooved. In other words, etched on the back of the plastic layer are grooves laid out in a spiral path. The dye then fills those grooves to form the dye layer. So why is it pre-grooved? The purpose is to guide the CDR laser. With this pre-grooved layer, CDR drives no longer have to figure out where it's burning, which simplifies it's design, thus lowering the price. Just think of the CD laser as a dog and the pre-grooved tracks as leash that guides the dog and tells it where to walk. To record data on to the disc, the laser actually melts the dye layer. Once the dye layer is melted, the lower plastic layer (which has also been heated up) actually flows into the hole created in the dye layer, and forms a pit. So then during the actual reading process the same laser reads the disc at lower power. At each pit, laser light reflects off the gold layer. The reflected light enters the laser reader, which detects the varying reflectance as the pits go by. Rainbow Colors Whenever you are writing something that is going to be shared among thousands, if not millions, of people, you had better have a standard. CD writing is no exception. Depending on what data you are writing to a CDR, there is always a standard by which the CDR software must comply. Otherwise, the data written by one CDR will be unreadable by another. Below is a list of the most common standards, each of which correspond to a specific data type being written to the CD: Red Book (also known as CDDA) is used to encode audio data. Yellow Book is used to encode data CDs and CDXA (more on that later). Green Book is used to encode Compact Disc Interactives (CD-I) White Book is used to encode Video CDs Blue Book is used to encode Video CDs and CD Extras Organ Book is not really a standard for encoding any data. It is simply the physical descriptions of a CDR disc. So many standards and so many colors! What is a person to do? Thankfully, for the most part you don't have to know any of the technical details. But here, I will take time out to discuss Red Book, because information from it might help you to understand some of the other concepts discussed later in the article. Since what I am about to discuss is rather peripheral to the main purpose of this article, feel free to skip to the next section if this discussion is not likely to hold your interest. Red Book First up is Red Book. As I mentioned earlier, it is the standard by which audio data is encoded. Phillips and Sony released the "red book" specification on Compact Disc Digital Audio System, and was adopted by the Digital Audio Disc Committee. It was later ratified as the IEC 908 standard for digital audio on compact discs. The IEC 908 standard primarily specifies the layout and data structure of the information area of the disc, which begins at the groove 46 mm from the center of the disc, extending to 117 mm at the edge of the disc. A Red Book compliant CD would story audio data in sectors, each valued at 2352 bytes, precisely 1/75th of a second of audio recorded at stereo 44KHz and 16bits in 2's complement PCM format. (So it's not actually the WAV that gets recorded. It's the WAV converted into a PCM format. PCM, by the way, stands for Pulse Code Modulation. For the pedantic, the 2352 bytes is not the amount of data that's actually on the CD. The 2352 bytes is the size after the data has undergone EMF demodulation and CIRC error correction, and after the subcoding stuff.) Beginning at 46mm is the Lead-In Area. This area stores meta-data that describes what kind of data is stored on the CD, the TOC, logical block addresses, etc. (Meta-data is information that describes characteristics of other data. For example, if my vitals were listed in a big book, that would be the data. Information such as the book is red, the ink that prints the data is blue, the data is written in Spanish, is meta-data.) By the way, if you are interested, the Lead-In area extends from 46mm from the center to 50mm from the center. After the Lead-In is the program area, where the actual audio is stored. According to Red Book standards, there must be a pre-gap before the actual data. This pre-gap is simply 150 sectors of blank data (or two seconds). There is a pre-gap in every track. Without getting into the gruesome details dealing with subcodes, simply note that there is a way to change the length of the pre-gap, and also to store non-blank data in the pre-gap. Keep this last statement in mind, as it will become useful later in the article when we discuss the trick behind Hidden Track CDs. I know that I just went through a lot of technical detail. So here is a quick summary: Red Book is the standard used to encode audio data. Red Book specifies that there is a Lead-In which describes what is stored on the CD There is a two second pre-gap between each audio track, and also prior to the first track (this is why some CD players will display -00:02 seconds. It's the pre-gap time). Pre-gap lengths can be changed through changing something called subcodes. After the pre-gap comes the actual data stored in PCM format (converted from WAV), in sectors that each stores 1/75th of a second of audio data. Know Your File Format We are almost through the boring part of the article. I promise! But before we can move on to the fun stuff, it is probably in our best interest to take another quick look at the different file formats that can be used on a CDR. ISO-9660: Probably the most popular file system. It was created as an international standard for writing CD Recordables. The Level I specification allows for the classic 8.3 filenames found in DOS. There is a Level II specification which allows for long filename support. The disadvantage is that it is not supported under MS-DOS. A Level III specification is also defined for noncontiguous storage of files, but it's not that important. Rock Ridge: Rock Ridge is an ISO 9660 extension that allows for Unix'ish file system support. This file system allows for mixed case, long filenames. It also allows for symbolic linking between files. HFS: Hierarchical File System is a Macintosh file system. Unfortunately, it is not ISO9660 based, which means it is not readable on Windows and Unix machines. Joliet: A file system created by Microsoft (who else but Microsoft) to support long filenames. Under non-windows systems, the short filenames are displayed. Romeo: An Adaptec Easy CD Creator file format. But, it never really caught on. A fairly nice chart detailing all the file systems can be found on Adaptec's web site at http://www.adaptec.com/tools/compatibility/cdrecfilename.html Fun Time Congratulations, you've survived the lecturers. Now it's time to have some fun. In this section, allow me to introduce to you some of the amazing possibilities available to you by using a CDR: Mix your own music CDs. In fact, you can create hidden tracks and sub track markers using CDRWIN scripts. Create your own data CDs. Not only can you create data CDs that can be read on a PC, you can create a Hybrid CD that's readable on both PCs and Macs. Create an enhanced CD that contains music and data Create an MPEG Video CD (VCD) Create a bootable CD Create an audio CD with 5.1 surround encoding Creating regular audio CDs from MP3s. Overburning, which means squeezing more than 74 Minutes of audio or 650MB on to a disc. Be Your Own DJ First, a very quick review of the major points covered in the beginner's guide: CD Audio tracks are just PCM files, which are converted from WAV files. Writing an audio CD involves extracting the tracks from an existing audio CD and writing it as an WAV. DO NOT play the CD and record it through your sound card. The extra D-A-D conversion lowers quality. Burn from a hard drive partition to avoid buffer underrun. Use Disc-At-Once mode to avoid the 2 second gap. If you are unsure of any of the above points mentioned, feel free to read the appropriate section in the beginner's guide before moving on. Otherwise, let's get started. Since we will be doing some advanced stuff in this article, Easy CD Creator will no longer suit our needs, at least not for this particular section. Instead, we will be using a program called CDRWIN by Golden Hawk. First, let's familiarize ourselves with the basic CDRWIN interface. This is definitely not your typical program interface. But underneath this unusual interface is a very powerful program. Before I go on, I would just like to say that this program has many features. Thus, it is impractical for me to cover them all here. Since this section is focused on audio, I will only cover the features having to do with audio extraction and writing. With that said, let's have a look: As you can notice from the screen capture above, the main interface of CDRWIN is divided into 2 row of 5 buttons, each of which correspond to a feature. If the button images are insufficiently telling, hover your mouse over a button to get a description of its function. Since we are concerned with burning audio discs, let's first take a look at the audio extraction feature in CDRWIN. Click on the third button in the top row. Wow! What a nasty looking interface. But don't worry, it's really not as bad as it looks. Let me just point out a few of the main features. If you look at the screen cap above, you will notice that the important features have been circled and labeled A, B, C, so on. First, direct your attention to the part of the screen cap labeled as A. This is where you can choose how the audio extraction will take place. You can extract an entire CD into an image file and automatically create a Cuesheet (I will get to that later). You can also do a standard extraction by selecting the tracks (best suited for Audio CD). If you want, you can even extract by specifying the precise sectors to read and copy. And the last option is to simply read the disc. For now, let's choose Select Tracks. With that selected, take a look at the part on the screen cap labeled B. This is where you can choose which CD-ROM drive to use for the extraction. This is also where you specify the output file for the extraction. To specify the output file (image filename as labeled), you need only to specify the first image filename and location. The rest will be named based on the track number and written to the same directory as the first. Now you are ready to choose the tracks you want to burn (look at section C of the screen cap). Simply click on the tracks you need. As you do that, the red circle representing the selected track will have a black circled put around it. Also notice the color codes for each of the tracks - Mode 1 (Data tracks), Mode 2 (Multimedia data), CDI and Audio. If you inserted an audio CD, you should only see red circles. You may have noticed that a check box labeled name tracks sequentially. Why didn't I have you check that before? The truth is, it's really not necessary. If it is unchecked, then the tracks will be labeled based on the track that's being copied. For example, if the first image filename you specified was 98Deg, then track 1 extracted would be named 98Deg01, track 4 would be named 98Deg04, so on. If name files sequentially were checked, then track 1 would be 98Deg01 and track 4 would be 98Deg02, assuming it was the second track copied. Before we click on start, let me call your attention to some of the advanced settings available. It is the section labeled D on the screen cap: Reading Options. RAW is what you need for audio discs. Error Recovery. Abort is self explanatory. Ignore means that any unreadable sector will be replaced with some unreadable data that is generated by the program. Don't ask me why this is in there. It sound pointless. Replace will replace unreadable data with some generated readable data. Jitter correction will compensate for the vibration of the disc as it is spinning. Sub Code Analysis. Don't worry about this one. It's a little beyond the scope of the discussion. Read Retry Count. This tells the system how many times to retry a failed read operation before giving up. CD-ROM drives do not support this option. Now you are ready to extract. Click on start to begin. After the extraction, cancel out of the audio extraction window. Click on the first button in row one. This will bring you to the CD writing screen. From the CD-ROM Recorder option you can choose which drive to use. The Recording Information section displays data about the currently loaded Cue Sheet. Now, look at the recording options. From there you can control the speed of the copy process. You can also choose to use test mode. In test mode, the recording laser is turned off so the disc isn't actually written to. It's a debug mode to ensure that there are no problems with the disc. The open new session option opens a new session after the current one is written. This keeps the disc open, allowing for more data to be added later. There are two ways to tell the program what to write. The first is to load tracks. This allows you to select which files to write to the disc. If you extracted WAV files from an audio CD, this is what you would use. The second is to load a cue sheet. A Cue Sheet is like a script. Contained in it are a list of files to be written to the disc. After you choose the method you want, click on start recording. Now you are probably thinking "I'm going to use load track." You may wonder why anyone would use load cue sheet. In fact, why even use this program? If I wanted to do a track by track recording, I'd just go back to Easy CD Creator. The answer is, cue sheets provide for a powerful way to control how the data is copied to the disc. In the next section, we will take a look at how cue sheets are written and what they can do. Cue Sheets Overview As I said above, cue sheets provide a new and powerful way to control how data is written. With the help of a cue sheet, you can: Control the amount of silence between tracks Create sub tracks. If a track has a sub track, then when you press the next track button on the CD, instead of skipping to the next track, the CD will start playing at the sub track within the current track. For example, let's say that a track was 6 minutes long. Unfortunately, the first 2 minutes of the song is a boring prelude, and every time you go to the song, you send 10 second forward past the first two minutes. By creating a sub track at 2 minutes into the song, all you have to do is press the next track button once, and the CD player will automatically start playing at 2 minutes. Create hidden tracks. Hidden tracks are tracks that normally wouldn't be played in a CD player unless you knew where it was, and specifically fast forward to that location. Create enhanced CDs that contain both audio and data. Now that you know the potential of cue sheets, let's take a look at how they are created. Cue Sheet Syntax Like most scripting languages, all you need to create a cue sheet is a text editor. Find your favorite text editor and open a new file. Before we start writing the cue sheets, we need to understand its language and syntax. The cue sheet language is quite simple, consisting of a small list of keywords. Of that list, we need only need an even smaller sub set of those keywords for our purposes: FILE TRACK INDEX PREGAP POSTGAP If curiosity is getting the better of you, feel free to read the help file for CDRWIN, which lists all the keywords for creating cue sheets. Normally, I would probably go through each of the words, explaining their functions. But in this case, it is best to teach by example. So I am going to give you several example cue sheets and explain from there. The cue sheets should be very self explanatory. Standard Audio CD, with a WAV file for each track: FILE C:\TRACK1.WAV WAVE TRACK 01 AUDIO INDEX 01 00:00:00 FILE C:\TRACK2.WAV WAVE TRACK 02 AUDIO INDEX 01 00:00:00 FILE C:\TRACK3.WAV WAVE TRACK 03 AUDIO INDEX 01 00:00:00 etc. There are a few things to note from the above example: The FILE keyword appears before all other keywords listed (in fact, it must appear before all other keywords except the CATALOG keyword). You specify a file first, then a track, then an index. The syntax for the file command is fairly obvious. FILE . The parameter can take on the following values: WAVE - WAV Audio AIFF - Another audio format MOTOROLA - A type of binary data BINARY - the stuff we see. TXT files, documents, etc. Obviously we'll be dealing with WAVE And BINARY Format most often. Once a file is specified, a TRACK can then be specified. There must be at least one track per file. The TRACK command syntax is as follows: TRACK . The can take on several values. But in our case, we'll be dealing with only two of them: AUDIO MODE1/2048 - used to write normal computer data. After a TRACK is specified, you can then specify one or more indices. The index number must be 00 or greater. To burn a normal Audio CD, your first index should be 01. After the index number, you must specify the starting time for the track. In my case, it was 00:00:00, the beginning. I could have very well specified 2:14:00, which would start the beginning of track one 2 minutes and 14 seconds into the WAV file. Finally, note that there is no pause area between each of the tracks. In other words, if the CD were burned correctly (and assuming each WAV doesn't have a silence in the beginning), one track would flow seamlessly into the next. Let me make one note about the time format. You may be wondering what the last 00 was for. After all, in 2:14:00 the 2 stands for two minutes, and the 14 stands for 14 seconds. What could 00 stand for? It stands for a special measurement called frames. Every second has 75 frames. So to specify 2 minutes and 14.2 seconds, I would type 2:14:15 (since 15/75 is 1/5). So why 75 frames per second? Why not a convenient 100 frames per second, or even 60 would be better? The answer becomes clear if we recall the fact that each sector on a CD stores 2352 bytes of data, which corresponds to 1/75th of a second of CD quality audio (look to the discussion on Red Book specifications for reference, found earlier in the tutorial). In the above example we wrote the cue sheet for a standard Audio CD. Nothing too exciting. Now lets create another standard audio CD. But this time, we need a one minute gap between each track. Here is how the CD would change. Changes are bolded: FILE C:\TRACK1.WAV WAVE TRACK 01 AUDIO INDEX 01 00:00:00 FILE C:\TRACK2.WAV WAVE TRACK 02 AUDIO PREGAP 01:00:00 INDEX 01 00:00:00 FILE C:\TRACK3.WAV WAVE TRACK 03 AUDIO PREGAP 01:00:00 INDEX 01 00:00:00 etc. The points to get out of the above example are: PREGAP command inserts digital silence into a track. In our case, 1 minute of it. It is generated by the program. The PREGAP command must come after a track command, but before all INDEX commands. There is another way to achieve the same effect, and that is to use the POSTGAP command. The POSTGAP, like the PREGAP, must come after the TRACK command, but must follow all INDEX commands. In the previous example you learned how to generate a pregap with with the PREGAP command. There is another way to generate gaps, and that is through the index command. In all of our previous examples we always index our tracks starting at 01. But in fact the index can start at 00. The time between index 00 and 01 is also considered as pregap time. Most CD players will skip index 00 and go straight to index 01. So to create a two second pregap with the index command, here is how the cue sheet would look: FILE C:\TRACK1.WAV WAVE TRACK 01 AUDIO INDEX 00 00:00:00 INDEX 01 00:02:00 FILE C:\TRACK2.WAV WAVE TRACK 02 AUDIO INDEX 00 00:00:00 INDEX 01 00:02:00 FILE C:\TRACK3.WAV WAVE TRACK 03 AUDIO PREGAP 00:30:00 INDEX 00 00:00:00 INDEX 01 00:02:00 etc. Points to get: Notice that INDEX 01 is now shifted to 2 seconds, and INDEX 00 starts at 00:00:00 of the WAV file. There is a subtle difference between using PREGAP and INDEX 00. When you use PREGAP, the data generated is always digital silence. When INDEX 00 is used, whatever data was stored in the first two seconds of the audio file is written into the pregap, even if it was normal audio. PREGAP And INDEX 00 can be used together, as in track 3. The PREGAP generated 30 seconds of digital silence, followed by two seconds of "stuff" from the WAV file. So why bother with INDEX 00? PREGAP seems easier. It is. But there is a neat trick you can pull with using INDEX 00, and that is to create hidden tracks. Remember that most CD players will skip the PREGAP And go straight to INDEX 01. So what you can do is to store a segment of audio in between INDEX 00 and 01. That data would never be read by normal CD Players. But on some CD players (such as mine) if you press the rewind button, it will actually rewind into negative time. That negative time is the "stuff" in the pregap. Most people don't notice it because most pregaps are only 2 seconds long. The rewind is too fast. But if the pregap were a lengthy 2 minutes, then you will see the time go negative. If you release the rewind button, the CD player will actually play the stuff in the pregap index. And there is your hidden track. Unless some one knew that there is data before a track, they'd never hear it. The CD player would just skip over index 00. Note that the hidden track technique can not only be applied to hiding audio data, it can also be used to create an enhanced CD that contains both data and audio by hiding the data in the pregap. Unfortunately, we cannot do that with CDRWIN. But it is a possibility with other programs. Let's continue with our discussion of using indices. We can create many indices under a single track, up to 99 indices. The purpose is to create sub tracks within tracks. When you press the next track button on the CD player, the CD player actually jumps to the next thing in the table of contents. In most cases, that would be index 01 of the next track (Index 00 is actually not stored in the table of contents). But if there happened to be more than one index to a track, the CD player would jump not to the next track, but to the index subindex within the current track. So let's look at the cue file: FILE C:\TRACK1.WAV WAVE TRACK 01 AUDIO INDEX 00 00:00:00 INDEX 01 00:02:00 INDEX 02 03:00:00 INDEX 03 05:30:00 FILE C:\TRACK2.WAV WAVE TRACK 02 AUDIO INDEX 00 00:00:00 INDEX 01 00:02:00 INDEX 02 04:00:25 FILE C:\TRACK3.WAV WAVE TRACK 03 AUDIO INDEX 00 00:00:00 INDEX 01 00:02:00 etc. Since no new syntax is introduced, I will forgo the point-by-point summaries. Notice that track one now has two additional sub indices. And track 2 has one more sub index. When you press the next track button in track one, it will first jump a point 3 minutes into the track. Press next track again, and it will jump to 5 minutes and 30 seconds into the track. On track 2, press the next track button and it will jump to a point 4 minutes and 1/3 of a second into the track (remember 75 frames per second). A friend comes to you and says that he wants to create a CD that whose tracks flow together from song to song with no stops in between. He tells you that cutting the big 650 meg WAV file into separate tracks, and making sure they all flow together is too difficult. You said you could solve his problem in six letters - CDRWIN. You proceed to tell him that CDRWIN can write a single WAV file into multiple tracks like so: FILE C:\FULLCD.WAV WAVE TRACK 01 AUDIO INDEX 01 00:00:00 TRACK 02 AUDIO INDEX 01 04:31:00 TRACK 03 AUDIO INDEX 01 08:32:00 TRACK 04 AUDIO INDEX 01 10:58:00 etc. Absolutely astounded, your friend gives you a million dollars (or at least a big thank you). Lastly, let's see how we can write MP3 files into standard audio tracks. There is really not much to it. You first need to decode the MP3 file into a WAV. The most popular way is to use Winamp's built in disc writer functionality: First, open Winamp. While with Winamp's main window in focus, press Ctrl + P to bring up the properties menu (right click would also work). From there, choose Output. From output, choose the disc writer plug-in. The plug-in will now ask for a directory in which to store the output files. Choose a directory and click on Ok. Back out of the properties dialog box. Load your MP3s and have them decoded into WAV. After the MP3s are decoded to WAV, you can now record it onto a CD following the instructions above. Writing 5.1 Surround Sound to a CDR Here is something that will impress your friends - writing some surround sound audio into an audio CDR. "How is that impressive", you ask. "After all, isn't it just like writing normal audio CDs?" The answer is no. The file format used for Dolby Digital AC3 format is quite different. To fully appreciate the elegance of writing 5.1 surround to a CDR, you will need to read up on AC-3 standards and audio remixing. Suffice it to say that if you asked the professionals, they will tell you there is no cheap way of writing AC3 audio to a CDR. As always though, someone smarter always comes up with a solution. That someone is Mike Sokol of EQ Magazine. The material discussed below is derived from his excerpts. You can read the articles at http://www.soundav.com/letter.html. As you all may well know, a 5.1 AC-3 audio streams consists of 5 channels of audio (Left, Center, Right, Left Surround, Right Surround) and one subwoofer channel, more properly known as the LFE, low frequency effects channel. To create a 5.1 audio stream, you cannot use a simple WAV file as it does not have any implementation for surround sound. Instead, what you will need to do is to store the audio for each of the six channels in its own WAV file and then encode those six wave files into an AC3 stream and write that to the CD. The AC3 file will have a WAV extension, but will not have the content nor structure of a normal wave file. If played on a standard CD player without the decoder, it will produce loud, obnoxious sounds that could potentially damage your speakers. Are you ready? Let's do it! The first thing you need to do is to download Soft Encode by Sonic Foundary - http://www.sonicfoundry.com/ - which will encode the 6 wave files for you. The full version of the software costs about 1,000 dollars, a little steep for your normal consumer. Luckily, there is a demo version which you can download and use. The downside (and you knew that there is always a downside) is that you cannot actually encode the file. That feature is disabled. But let's not let that stop us. Maybe we can't encode, but we can still have some fun. When you open Soft Encode, you should arrive at a screen similar to the one shown in the screen cap. Now click on the File menu and choose open. Here is where you can choose to open the six (or less) WAV files you need to encode. Simply select them one after another. After you select them, click on open. Now your screen should appear something like the this screen cap. Notice that now there are six tracks (or however many files you opened). Each of them represents a channel. To select which wave file corresponds to which channel, you will have to use the little diagram I have circled in red. The diagram consists of 6 boxes. In any given one, five of them are black, and one white. Those six boxes represent the channels. The white one is the current channel to which the file is assigned. So if the box on the lower right side of the diagram is white, that means the file will be playing through the back right speaker. Note, however, that the box in the center of the diagram is not the center channel. It is the LFE channel, in other words the subwoofer channel. After you assign the files to the different channels, you are ready to save the file. Click on File - Save As Wave. Now if the program had been the full version, you would have been presented with a dialogue box from where you could adjust what format to encode it to and such. Choose 3/2 and 448 for the bit rate. Encode the wave and write to your audio CD. And that's it. Once the CD is played in a DVD player with AC3 decoding, you should hear the surround channels. One note though, since this is a make shift technique, some DVD players will not play them, notably the pioneer DVD players. But it works on a majority of the players. So if you ever wanted to impress friends, this is the trick to pull. Creating Your Own Data CDs Now that we know how to write audio CDs, let's move on to writing data CDs. In this section, I will first go over writing basic data CDs, then move on to writing hybrid CDs that work in both Macs and PCs, and finally conclude with writing enhanced CDs and bootable CDs. The program we will be using is Nero Burning ROM. Since basic concepts and file formats have already been covered in the beginner's guide as well as earlier in this tutorial, I will thus dive straight into explaining the program. If you feel the need to review any of the concepts, do so by all means. Let's get acquainted with our program. Once you start Nero Burning Rom, the first thing you will see is a wizard that attempts to guide you through the process. For now, let's cancel that. Instead, go into the file menu and choose New. At this point you should see a dialog box like this: Take a look at the section labeled A. This is where you choose which type of CD you want to burn. ISO means a normal data CD. Mixed Mode CD is what I call enhanced CD, which contains both audio and data. CD-Copy is a way to make an exact duplicate of a CD, data or audio. If you scroll down the list, you'll see options like Bootable CD, Hybrid CD (readable on both Mac and PC), UDF formats and UDF/ISO hybrids. The UDF format may be unfamiliar to you, and with good reason. It is not a format supported by CDR drives. Instead, it is the format preferred by CDRW and DVD drives. The format was designed to handle large file sizes and to minimize the necessary changes if a file needed to be added or deleted. Since this guide primarily focuses on writing CDR discs, I will not discuss the UDF format any further. A definition is included simply for completeness. Let's write a normal data CD. So select CD-ROM (ISO) from the left hand side. Now take a look at the part on the screen cap labeled B. These tabs represent the different groups options available to you, based on your selection of the type of CD you are writing. Click on the File Options tab (3rd one). Now you should see several groups of options. Refer to the screen cap for confirmation. The section of the screencap labeled C1 is where you can choose the format used to write the CD. Your best bet is to use ISO Level 1 for maximum compatibility. As mentioned above, while ISO Level 2 allows for long filename support, it is not supported under DOS and Win 3.1. If you must have long filenames, then check the Joliet checkbox in the part of the screencap labeled C4. This will create a secondary parallel directory listing with long filenames. Win 9x and NT will read that directory listing while older systems will read the 8.3 filenames from the ISO directory listing. Now look at the section labeled C2. From here you can set what mode the tracks are written in. Mode 1 is what normal CD-ROMs are written in. It has the widest compatibility. Mode 2/XA is a special mode for writing multimedia CDs, such as a Video CD. In most circumstances, leave the Mode on Mode 1 as Mode 2 CDs cause problems with older CD-ROM drives. In section C3, you can change the character set used to describe the filenames. This determines what "symbols" can be used in a filename. This is analogous to saying that a filename can use the whole range of letters found in French, or perhaps Greek. Obviously the two character sets are different (French vs. Greek). In our case, the three available options are: ISO 9660, DOS and ASCII. The differences between the three formats are subtle. Most often, you will not run into a situation where the differences matter. Thus, for maximum compatibility, leave the character set on ISO9660. Moving on to section C5, this is where you can relax the ISO9660 standards, such as allow for more a directory depth of more than 8 levels. But be warned, some systems may not read the CD-ROM correctly if the standard is relaxed. This naturally leads us to section D. Pay attention to this bottom area. If you have selected an option that could make the CD-ROM unreadable on some systems, a warning message, like the one shown, will appear. With all the options set, you are ready to select your files. Once you click on new, you should see two windows open up. On the left hand side is whatever is currently in your CD. On the right is a view of the files on your system. Simply drag and drop whatever files you need into the left side. Notice the blue bar at the bottom of the screen, which indicates how much space is still available. Once you are done selecting your files, click on the Write CD from the File Menu. This will bring you the following screen. From this screen, you can change some of the settings for writing the disc. Most of the options are self explanatory. Don't use disc-at-once unless you won't be adding any more sessions to the disc. The option is most useful for Audio CDs, as it eliminates the 2 second gap problem. One nice feature that Nero has is caching. Under the options box, you can choose to cache small files. By default, it is enabled. You should leave it as is because caching will significantly decrease your chances of getting a coaster, especially for writing small files and files on slow mediums like CD-ROMs and floppies. God forbid that anyone would actually try to burn a file from a floppy! Once you are done, click on Write CD. One thing I should mention is that don't finalize the CD until all of your sessions are written. Once a CD is finalized, no additional files can be stored. But once you are sure you won't be adding any more sessions, do finalize the CD. Some older CD- ROM drives have a hard time reading non-finalized discs. Mixing Music and Data Now that we are masters of both data and audio CDs, let's put it all together and create an enhanced CD that has the best of both worlds. As I had mentioned before, there are three types of enhanced CDs. Mixed Mode (CD XA) puts the data first, then the audio. CD Plus is a multi-session CD that puts the audio first, then the data. And hidden track CDs put the data in track 1's pregap area. Now the question is, does it really matter which method we use? The answer is yes. The reason is for compatibility with older and even some of the more recent CD-ROMs. Old CD-ROMs will look at the last session for data. Most audio CD Players will expect to find audio on track 1, session 1. If it doesn't, it will assume that the disc is not audio. So the logical choice seems to be CD Plus. To write CD Plus discs, we will go back to using CDRWin. Since the CD Plus format requires that a disc have two sessions, you first need to create a cue sheet for the audio data. Once the cue sheet is created, write it into the first session of the disc using the record function. Be sure to select the Open New Session option in the recording window before you start. Otherwise, you won't be able to add another session to the disc, which will prevent you from recording the data part of the disc. Now let's move on to writing data discs. To write the data section of the disc do the following: Back out of the Recording dialogue box. Click on the 4th button in the first row. It's caption should be File Backup and Tools (Take a look at the screen capture) Within the tools dialogue box, choose the option Record Directories and files directly to an ISO9960 disc from the drop down menu in the section of the screen cap labeled A. Note that if you already have an ISO disc image, you can also choose the appropriate option to use that instead. If you know what an ISO9660 image file is, the options in the drop down should be fairly self-explanatory. If you don't, then just use what I mentioned above. The part of the screen cap labeled B is where all the files are listed. Notice that I circled the text (use drag and drop). I bring this to your attention because it is much easier to drag and drop your files from an explorer window than it is to add it through a dialogue box. If you'd like, you may also choose to change your file options in part C of the screen cap. The defaults should work fine. And finally, click on Start to begin recording. And you are done. That's that. Now, let's look at writing a CD XA disc, putting the data first, and then the audio. There are two major differences between CDXA and CD Plus. One of them is the placement of the data section of the disc, as I have mentioned. Another subtle difference is that while CD Plus is a multi-session disc, CD XA is not. CD XA discs can be written in one session. Simply place the data in track 1 and all other audio tracks following it. The simplest way to do this is to create a cuesheet. An example cue sheet is provided below: FILE C:\MYDATA.ISO BINARY TRACK 01 MODE1/2048 INDEX 01 00:00:00 POSTGAP 00:02:00 FILE C:\MYAUDIO.WAV WAVE TRACK 02 AUDIO PREGAP 00:02:00 INDEX 01 00:00:00 TRACK 03 AUDIO INDEX 01 05:50:65 TRACK 04 AUDIO INDEX 01 09:47:50 Since I have already extensively covered writing cue sheets, I won't go into detail here, except to say that when you are combining data and audio tracks, there is a mandatory 2-second post gap after the data track. Other than that, everything else should be pretty clear. Video Discs Now that we've done integrating both data and audio, why not go one step further? Let's put together data and video. When you integrate both data and video onto a CD, you are creating a CD-I disc. CD-I is a bigger umbrella term for a CD that stores special multimedia files and such. There are some substandards defined under the CD-I term for VCDs, Karaoke CDs, etc. The Video CD Standard (defined by White Book) allow for more data to fit into a CD than is possible if the data were stored on a Data CD. It also allows for interactive selection of content. The reason is that in a Video CD, certain bit errors are tolerable in that they will not degrade the quality of the movie noticeably. Thus, some of the error correction mechanism implemented in the data CD standard is removed. That extra space is thus available to store more movie stuff. In the end, a video CD can store 13% more than a standard data CD. A Video CD is composed of several Mode 2 CD XA tracks. The first track on the CD is actually a standard Mode 1 track. This is necessary to store the ISO information so that the CD is viewable on the computer. The tracks after track 1 store the actual movie files and such. Those are Mode 2 tracks with 2324 bytes per block, as opposed to the 2048 bytes for normal mode 1 tracks (hence 2324/2048 yields 1.13, or 13% gain). A VCD comes with several standard directories: VCD: information about the available tracks and how they shall be played EXT: contains info that tells a CDI player how to play the disc. CDI: this directory contains the Philips CDI application and it's support files. MPEGAV: this is where all the movie files are stored. Note that even though CD-I standards allows for interactive menus for VCDs, Nero doesn't support that feature. If you must have interactive menus, use Adaptec Easy CD Creator's Video CD Creator program. Having said that, let's write our first Video CD: First create the MPEG you need, or download it from you know where. Click on File - New from Nero In the New File dialogue box, choose Video CD from the left hand side. You can leave all the settings the way they are. Click on New At this point, you should see two windows. On the left hand side is your Video CD compilation windows. The top portion refers to the ISO section of the disc, the part that stores the normal computer files. The bottom portion displays the number of MPEG tracks available. On the right hand side, you should see a file browser window from which you can drag and drop the files you want to record. Note that if you drag an MPEG file into the upper portion of the Video CD window, it will not be recorded as a video track. You must drag and drop it into the lower portion. Once you are done, click on the record button (the icon on the toolbar with two CDs on it). Viola, you are done. Bootable CDs If you are like me, then 90% of your computer is probably betaware. More often than not (MUCH more often in my case), your system ends up crashing. What you need is a quick way to restore everything. Here, your CDR drive can also help you. With a CDR drive, you can create a bootable CD that can restore everything for you, much like the ones that come with Dell, IBM or any number of PC retailers. If you've used one of those disks, you'll know that once you put the CD into the CD-ROM drive, the system will automatically boot off the CD-ROM, much like how it boots off a floppy disk. Once booting is complete, the system will automatically start to restore your files. How is this accomplished? There are three basic parts to a CD of this kind: A bootable image on the CD, so that a basic operating system can be loaded from the CD. A program that will automate the restore process on the CD. A single data file, or a set of data files, which contains your system data. The bootable image is created by the CD writing program. In our case, Nero Burning Rom will do the job. In order for Nero to create the bootable image, you will need a bootable floppy on hand. Nero will then read the bootable floppy and compile the image file from there. One thing to note is that even though you are booting from a CD ROM drive, your system will not be able to access the CD-ROM unless you install DOS level drivers. What I just said may seem like a contradiction, but it is true because when you boot off the CD, your system treats the CD-ROM drive as a floppy (unless you use hard disk emulation, which not all systems support.) In fact, what happens is that your A:\ drive will become the CD floppy, and your actual floppy is shifted to B:\. In this situation, only the data written as a part of the boot image is accessible. To access the rest of your files, you must load DOS drivers. The easiest way to make a bootable floppy with CD- ROM support is to create a rescue disk using Windows 98's Add/Remove applet in Control Panel. Once the basic bootable files are created for you, you can go ahead to edit the autoexec.bat and config.sys as you see fit. (I will briefly cover multi-boot configurations in the proceeding section. But first, allow me to go over the last two parts of a bootable CD.) Besides a bootable image, you will also need a program that will automate the restore process. One of the most popular programs is Norton's GHOST. This program will both create the image file and restore from it. It is ideal for large scale system replication. Look on PC911 for a tutorial on using ghost. Write The Bootable Image First, prepare a Win98 boot disk, or any boot disk with CD-ROM support. Then follow these instructions: In Nero Burning ROM, create a New CD Layout (File - New) Now insert your boot disk into Drive A. Choose Bootable CD from the left hand side column of the File - New dialogue box. Now click on New and you are ready to add the rest of your files to the CD. Just to drive a point home, notice the part of Expert settings inside the red rectangle. From there, you can see that the bootable CD must in fact emulate a disk drive. Thus, by default, if the CD emulates a floppy, then you must load DOS CD-ROM drivers. A Brief on Multiple Configurations As of DOS 6.0, the Autoexec.bat and Config.sys files supported multiple boot configurations, allow the user to custom load a set of drivers for a particular task. This is the same menu you see with Windows 98's boot disk. In this section, I will quickly cover the basics behind reading and understanding multiconfig config.sys/autoexec.bat files. Since you'll most likely be dealing with Win98's boot disk, let's take it's autoexec.bat and config.sys files as our example. Autoexec.bat file @ECHO OFF set EXPAND=YES SET DIRCMD=/O:N set LglDrv=27 * 26 Z 25 Y 24 X 23 W 22 V 21 U 20 T 19 S 18 R 17 Q 16 P 15 set LglDrv=%LglDrv% O 14 N 13 M 12 L 11 K 10 J 9 I 8 H 7 G 6 F 5 E 4 D 3 C cls call setramd.bat %LglDrv% set temp=c:\ set tmp=c:\ path=%RAMD%:\;a:\;%CD-ROM%:\ copy command.com %RAMD%:\ > NUL set comspec=%RAMD%:\command.com copy extract.exe %RAMD%:\ > NUL copy readme.txt %RAMD%:\ > NUL :ERROR IF EXIST ebd.cab GOTO EXT echo Please insert Windows 98 Startup Disk 2 echo. pause GOTO ERROR :EXT %RAMD%:\extract /y /e /l %RAMD%: ebd.cab > NUL echo The diagnostic tools were successfully loaded to drive %RAMD%. echo. IF "%config%"=="NOCD" GOTO QUIT IF "%config%"=="HELP" GOTO HELP LH %ramd%:\MSCDEX.EXE /D:mscd001 /L:%CD-ROM% echo. GOTO QUIT :HELP cls call help.bat echo Your computer will now restart and the startup menu will appear. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. restart.com GOTO QUIT :QUIT echo To get help, type HELP and press ENTER. echo. rem clean up environment variables set CD-ROM= set LglDrv= This may seem scary at first glance, but let's take it one part at a time, and you will see that it is quite simple: @ECHO OFF set EXPAND=YES SET DIRCMD=/O:N set LglDrv=27 * 26 Z 25 Y 24 X 23 W 22 V 21 U 20 T 19 S 18 R 17 Q 16 P 15 set LglDrv=%LglDrv% O 14 N 13 M 12 L 11 K 10 J 9 I 8 H 7 G 6 F 5 E 4 D 3 C cls call setramd.bat %LglDrv% set temp=c:\ set tmp=c:\ path=%RAMD%:\;a:\;%CD-ROM%:\ copy command.com %RAMD%:\ > NUL set comspec=%RAMD%:\command.com copy extract.exe %RAMD%:\ > NUL copy readme.txt %RAMD%:\ > NUL In general, what this part of the batch file does (script file) is that it assigns values to a bunch of variables so that the rest of the program can use it. Those are the set commands. It then copies some of the vital files, such as extract.exe and command.com to a temporary part of your memory known as a RAM Drive. And that's all this part does. Simple. In the next part: :ERROR IF EXIST ebd.cab GOTO EXT echo Please insert Windows 98 Startup Disk 2 echo. pause GOTO ERROR In the Error section of the autoexec.bat file, the system checks to see if a file called ebd.cab is present. This is the file that contains most of the vital DOS commands on your boot disk, such as format, sys and fdisk. If the file is found, the batch file jumps out of the error checking loop and proceeds. If not, it loops back to the start of the ERROR and continues looping until the ebd.cab file is found, or until the user forcefully terminates the batch file. If ebd.cab is found, the batch program jumps to the EXT section of the file: :EXT %RAMD%:\extract /y /e /l %RAMD%: ebd.cab > NUL echo The diagnostic tools were successfully loaded to drive %RAMD%. echo. IF "%config%"=="NOCD" GOTO QUIT IF "%config%"=="HELP" GOTO HELP LH %ramd%:\MSCDEX.EXE /D:mscd001 /L:%CD-ROM% echo. GOTO QUIT Here is where the vital DOS commands from the ebd.cab is extracted to your RAM drive by using the extract command, which was copied to the RAM drive at the very beginning of the program. After the files are copied, the system then checks to see if the user chose to have CD-ROM support via the config.sys menu. If so, CD ROM drivers are loaded. If not, the program quits. To add your own commands so that they are executed regardless of which configuration is chosen, you must put those commands before the line that's marked red. To ensure that one of your commands is only executed if the user chooses to use the CD, put it in between the two blue lines. Now, let's look at your config.sys file: [menu] menuitem=CD, Start computer with CD-ROM support. menuitem=NOCD, Start computer without CD-ROM support. menuitem=HELP, View the Help file. menudefault=CD,30 menucolor=7,0 [CD] device=himem.sys /testmem:off device=oakcdrom.sys /D:mscd001 device=btdosm.sys device=flashpt.sys device=btcdrom.sys /D:mscd001 device=aspi2dos.sys device=aspi8dos.sys device=aspi4dos.sys device=aspi8u2.sys device=aspicd.sys /D:mscd001 [NOCD] device=himem.sys /testmem:off [HELP] device=himem.sys /testmem:off [COMMON] files=10 buffers=10 dos=high,umb stacks=9,256 devicehigh=ramdrive.sys /E 2048 lastdrive=z This file is much more readable. In the [menu] section, three choices for the menus are defined. Each menu item is associated with a specific section of the file. For example, if Start computer with CD-ROM support is selected, the system will proceed to load stuff in the [CD] section of the file, after it loads the [COMMON] section. Basically, anything under the COMMON section is loaded regardless of which configuration is chosen. Everything else is pretty obvious if you've ever dabbed in config.sys files. With the understanding of these basic concepts behind multiboot startup files, you should be able to modify the Win98 boot disk to suite the needs of your bootable CD-ROM. Be sure to make sure that everything works before you write it to the CD. Hybrid CDs So far, we've only written discs that either use ISO9960 format to be cross platform compatible (in other words, it runs on both Macs and PCs), or we've leveraged the strengths of a file system specific to a singular platform, and sacrificed the cross platform compatibility in the process. So is there a way to write a disc that can have the best of both worlds? The answer is yes! You can create a Hybrid CD that has both an ISO9660 file system, which can be read on PCs and Unix systems, and has a HFS file system, which is used under the Mac. In this manner, Mac users would be able to enjoy long filenames while PC users would still be able to read the disc. Unfortunately, to create a hybrid CD, you will need a SCSI hard drive with a HFS file system. Thus, for most casual users, Hybrid CDs are not an option, unless you are working on a Mac. But assuming that you have the necessary equipment, here is what you need to do: From File - New, choose the CD-ROM(Hybrid) from the left hand side. In the right hand side is a box that lists all of your HFS partitions. If the box is empty, that means you don't have any. Choose the HFS partition you need, and click on New. From here, drag and drop the files you need and after you are done, proceed to finish burning the disc. A few things to note about the hybrid CD. First, Nero will only write none shared hybrid CDs. What that means is that every file that needs to be visible on both file systems(PC and Mac) must be written twice, once in HFS and once in ISO. Also, the amount of space available to you for writing is less than 650 MB because the file system itself must take space to implement. You have approximately 640MB available on a Hybrid CD. Just keep these two points in mind, and you are ready to go. Overburning Overburning refers to the idea of squeezing more than 650MB of data onto a CD. The advantages to overburning are numerous. For one, you can store more stuff on the CD, which makes it handy for copying games and other programs which are bigger than 650 MB. An overburned CD can store up to 79 minutes. The typical extended time is about 2 minutes though. Overburning is also a great trick to create a CD that can't be copied, at least not by novices. But as the old saying goes, nothing is for free. Overburning is no different. There are also an equal number of disadvantages to overburning. The most common problem is that the data stored beyond the normal capacity is not readable. On an audio CD, the situation could range from scratchy noises to the track not being readable at all. On a data CD, the situation ranges from long, repeated reads to unreadable data. A second problem that could occur is an error message like Write emergency or track following error. Thus, if you are writing in disc at once mode, then you are screwed. The last problem is that it may damage some CDR drives, although the situation is very rare. Also note that not all CDR drives support overburning. You must check with your manufacturer to make sure that it is supported. If after considering the pros and cons, you decided to write an oversized disc anyway, here is how: In Nero, click on File - Preferences, Go into the Expert Features Tab. Click on OK and start compiling your CD. Note that there is no surefire way to determine the largest oversize burn possible. You will have to experiment with different settings. I'd suggest running a burn in test mode first to see just how big it can get. A Few Tips Before I conclude this article, here are a few tips for successful burning: Disable Screensaver. These can cause problems and ruin a disc. Along the same lines, turn off monitor auto shutoff. Disable all background programs if possible. Disable Auto insert notification. Delete useless files. You need some space to copy and burn the files. Defragment your hard drive if it is slowing down. Conclusion The world of CD writing has changed dramatically from the when the first CD writers hit the market. Back in those days, it was a pain, and coasters were surely a part of every burning experience. But today, things are drastically different. CD writing has never been easier. Aided by countless wizards and programs that are smarter and a lot more error resistant, truly anyone can use a CDR drive effectively. But to become a master at the art of CD writing (a title which I myself cannot yet claim with a clear conscience), a lot of practice and dedication is still needed. It is my hope that the two part CD writing guides I've authored have aided you in the pursuit of that goal. If you have any questions or suggestions on how this article can be improved, feel free to drop me a line at xinli1 @uiuc.edu. http://www.pcnineoneone.com