Difference between revisions of "Cuesheet"

From DOSBoxWiki
Jump to navigationJump to search
m (Reverted edits by 72.175.232.114 (Talk); changed back to last version by 67.170.209.59)
(0.000425170068027211)
Line 1: Line 1:
= Cuesheet =
+
XOSnlA  <a href="http://sgpioclztkhg.com/">sgpioclztkhg</a>, [url=http://nqplcrktxult.com/]nqplcrktxult[/url], [link=http://zntrxzokrbxk.com/]zntrxzokrbxk[/link], http://qzvkfgactxrp.com/
 
 
Cuesheet is a file format that specifies track structures of mixed mode compact discs.
 
It can be used with DOSBox, when a game needs to access audio tracks of its CD that is stored as an image file. The prevalent ISO format can only store data tracks.
 
 
 
== The CUE/BIN format for CD images ==
 
 
 
Cuesheets usually come as a CUE/BIN pair. The cuesheet, e.g. image.cue, is an ASCII text file that stores the access information for the “disc at once” binary dump, e.g. image.bin, of the CD's contents. (For more info on the cuesheet file format see [http://www.pcnineoneone.com/howto/cdburnadv4.html here].)
 
 
 
Mounting a CUE/BIN pair is done in the usual way with
 
<code><pre>Z:\>IMGMOUNT E C:\Images\MyImage.cue -t iso</pre></code>
 
 
 
An exemplary cuesheet is:
 
<pre>
 
FILE "image.bin" BINARY
 
  TRACK 01 MODE1/2352
 
    INDEX 01 00:00:00
 
  TRACK 02 AUDIO
 
    PREGAP 00:02:00
 
    INDEX 01 35:17:41
 
  TRACK 03 AUDIO
 
    INDEX 01 37:37:70
 
  TRACK 04 AUDIO
 
    INDEX 01 39:02:74
 
  TRACK 05 AUDIO
 
    INDEX 01 41:34:17
 
  TRACK 06 AUDIO
 
    INDEX 01 43:43:29
 
  TRACK 07 AUDIO
 
    INDEX 01 46:35:11
 
  TRACK 08 AUDIO
 
    INDEX 01 48:47:52
 
  TRACK 09 AUDIO
 
    INDEX 01 51:29:30
 
  TRACK 10 AUDIO
 
    INDEX 01 53:43:54
 
  TRACK 11 AUDIO
 
    INDEX 01 56:28:53
 
  TRACK 12 AUDIO
 
    INDEX 01 58:53:44
 
  TRACK 13 AUDIO
 
    INDEX 01 60:53:66
 
</pre>
 
 
 
=== Windows ===
 
 
 
Use a CD burning application like CDRWIN that can write image files in cuesheet format.
 
(An alternative to mounting the CUE/BIN images directly with DOSBox is to load it with the [http://www.daemon-tools.cc/ Daemon Tools] or similar virtual drives and mount that volume instead like a normal CD-ROM.)
 
 
 
=== Linux ===
 
 
 
In order to produce a CUE/BIN pair with Linux use the commands
 
<code><pre>
 
> cdrdao read-cd --datafile image.bin --driver generic-mmc:0x20000 --device /dev/cdrom --read-raw image.toc
 
> toc2cue image.toc image.cue
 
</pre></code>
 
The option <code>--driver generic-mmc:0x20000</code> takes care of the correct byte order. Omitting it would lead to noise instead of music.
 
 
 
=== Mac OS X ===
 
 
 
Producing a CUE/BIN pair under Mac OS X is similar to Linux, but with a couple of modifications.  First, you need to install the "cdrdao" package from either MacPorts (recommended), Fink, or from source.  Then, insert your CD.  It will mount automatically, and you'll need to unmount it with a command like:
 
 
 
<code><pre>
 
bash$ disktool -u disk3
 
disk3 device will be unmounted ...
 
***Notifications Complete for type 1
 
***Responding yes to unmount - disk3s0
 
***Disk Unmounted('disk3s0')
 
***Responding yes to unmount - disk3
 
***Disk Unmounted('disk3')
 
</pre></code>
 
 
 
Substitute the appropriate disk for "disk3".  You can find out which diskX block device corresponds to your CD or DVD drive by using the "mount" command.
 
 
 
After unmounting, the instructions are similar to Linux, except with a different device:
 
 
 
<code><pre>
 
cdrdao read-cd --datafile image.bin --driver generic-mmc:0x20000 --device IODVDServices/0 --read-raw image.toc
 
toc2cue image.toc image.cue
 
</pre></code>
 
 
 
== Compressed audio tracks ==
 
 
 
Another advantage of cuesheets is the possibility to compress audio tracks. The image of a CD's contents can split into an ISO image of the data track and one or more compressed files in OGG or MP3 format for the audio tracks. This method can drastically reduce the image's size without a substantial loss of audio quality.
 
 
 
First you have to rip and encode the audio tracks. The the cuesheet will have to be edited. Mind the changes for the first TRACK and the INDEX tags.
 
<pre>
 
FILE "image.iso" BINARY
 
  TRACK 01 MODE1/2048
 
    INDEX 01 00:00:00
 
FILE "track02.ogg" MP3
 
  TRACK 02 AUDIO
 
    PREGAP 00:02:00
 
    INDEX 01 00:00:00
 
FILE "track03.ogg" MP3
 
  TRACK 03 AUDIO
 
    INDEX 01 00:00:00
 
FILE "track04.ogg" MP3
 
  TRACK 04 AUDIO
 
    INDEX 01 00:00:00
 
FILE "track05.ogg" MP3
 
  TRACK 05 AUDIO
 
    INDEX 01 00:00:00
 
FILE "track06.ogg" MP3
 
  TRACK 06 AUDIO
 
    INDEX 01 00:00:00
 
FILE "track07.ogg" MP3
 
TRACK 07 AUDIO
 
    INDEX 01 00:00:00
 
FILE "track08.ogg" MP3
 
  TRACK 08 AUDIO
 
    INDEX 01 00:00:00
 
FILE "track09.ogg" MP3
 
  TRACK 09 AUDIO
 
    INDEX 01 00:00:00
 
FILE "track10.ogg" MP3
 
  TRACK 10 AUDIO
 
    INDEX 01 00:00:00
 
FILE "track11.ogg" MP3
 
  TRACK 11 AUDIO
 
    INDEX 01 00:00:00
 
FILE "track12.ogg" MP3
 
  TRACK 12 AUDIO
 
    INDEX 01 00:00:00
 
FILE "track13.ogg" MP3
 
  TRACK 13 AUDIO
 
    INDEX 01 00:00:00
 
</pre>
 
Warning: The length for the compressed audio tracks will never exactly match the original play length. It will deviate some frames (1 frame = 1/75 sec) from the correct values.
 
 
 
The ISO-image of the data track can be mastered with any CD Burning application.
 
 
 
=== Linux ===
 
 
 
In order to rip and encode the audio tracks you can use the commands
 
<code><pre>
 
> cdparanoia -B "2-"
 
> oggenc *.wav
 
</pre></code>
 
 
 
''Warning:'' It may be that DOSBox does not support encoded tracks out of the box, depending on your distro. (The official release for Windows normally does.) If not, you will have to compile it by yourself: After unpacking the sources and doing
 
<code>./configure</code>,
 
check that
 
<code>#define C_SDL_SOUND 1</code>
 
has been set in config.h.
 
(For example, the package SDL_sound-devel has to be present for Suse Linux 11.0 in order to set the flag.)
 
Then proceed as usual (see README and INSTALL for reference).
 

Revision as of 21:31, 12 April 2010

XOSnlA <a href="http://sgpioclztkhg.com/">sgpioclztkhg</a>, [url=http://nqplcrktxult.com/]nqplcrktxult[/url], [link=http://zntrxzokrbxk.com/]zntrxzokrbxk[/link], http://qzvkfgactxrp.com/