Multisession information found where on CD???

Discuss anything specific to using Puppy on a multi-session disk
Post Reply
Message
Author
User avatar
Boogle
Posts: 9
Joined: Tue 07 Jun 2005, 05:23
Location: Australia

Multisession information found where on CD???

#1 Post by Boogle »

Hi, I tracked down this information, I will look into it a bit further once I finish work for the day, but thought I'd post it now so that others can look into it.

Hopefully it is of some use:

Somewhere behind the first 32 k on the CD, a block with information about the CD is located. You can extract the information with the following

shell script:

Code: Select all

#! /bin/bash

RD=/dev/cdrom
for i in 32768,7   32776,32 32808,32 32958,128 33086,128 33214,128 \
         33342,128 33470,32 33581,16 33598,16  33615,16  33632,16
do
    old_IFS="$IFS"
    IFS=","
    set -- $i
    IFS="$old_IFS"
    OFFSET=$1
    LENGTH=$2
    echo "*`dd if=$RD bs=1 skip=$OFFSET count=$LENGTH   2> /dev/null`#"
done

Found on webpage:
http://wt.xpilot.org/publications/linux ... tml#ss4.18

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

I Do I Do ID

#2 Post by Lobster »

I do have a good feeling about this. 8)

I do I do I do

Hope it works. This is excellent news. The MS Puppy (Multi-Session) is one of the innovative aspects of Puppy. It is my favourite potentials.

Now I know you said you were busy but you might like to look here . . .
http://www.goosee.com/puppy/development/developer.htm

If you scroll to the entry for June 5th
http://www.goosee.com/puppy/news.htm
you will find our Pup in Chief, Barry, has been reduced to profanity by the burden of development. . . . (he loves it really)

So Boogle, stick around. You might decide Puppy is worth adopting. Don't those big Puppy eyes and whimpering do anything for you . . . ?

Puppy - Linux - but cuter

:)

User avatar
Boogle
Posts: 9
Joined: Tue 07 Jun 2005, 05:23
Location: Australia

#3 Post by Boogle »

I did see the projects page a few days ago, and since I tried myself to burn a multi-session disk, but it still made a file on my HD, I decided to find out what was going on.

I to thought it is such a good idea that warranted a bit of time to find a solution.
I actually think that it should default to CD-profile, if it is mult-session, then write back to the CD, otherwise ask the user.
That would be the way I'd see it done.

But automatically choosing HD or CD is fine as long as it works! :P

I'll be finished up work soon, will then have to cook tea for the masses, and then I'll see if what my redhat server can tell me about the first 32k on both a closed and open CD.

In reference to Barry's June 5 entry, since Barry has got this far, I am suprised there are so few expletives around!!!...

User avatar
Boogle
Posts: 9
Joined: Tue 07 Jun 2005, 05:23
Location: Australia

#4 Post by Boogle »

Just ran a few quick tests. 1stly, you need to ensure there is only 1 space in the array of numbers in the for loop. The script I copied had multiple spaces sometimes.

2ndly, so far the data returned just look like the following:
CD name, Info about the software that created the iso image or created the data cd. (So Nero will have a comment here in a Nero Data CD)
And then some dates.
Not very useful so far... :(
*CD001#
*LINUX #
*CDROM #
* #
* #
* #
*MKISOFS ISO 9660/HFS FILESYSTEM BUILDER & CDRECORD CD-R/DVD CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING #
* #
*2005051623144500#
*2005051623144500#
*0000000000000000#
*2005051623144500#

Edit... Additional info:
Still nothing eye catching. I modified the dd statement so that it would just dump a bigger section, unformated.

Code: Select all

dd if=/dev/cdrom bs=1 skip=32000 count=9000
CD001LINUX                           CDROM

User avatar
Boogle
Posts: 9
Joined: Tue 07 Jun 2005, 05:23
Location: Australia

#5 Post by Boogle »

Ok, time to figure out how a cd works.

What does "finalize" mean?

Finalizing is the process of writing the final TOC (Table of Contents), which allows disks to be played on standard players. Unfinalized CD-R disks can be played on other CD-R recorders, but cannot be played on standard CD players until they have been finalized.
Once finalized, CD-R disks cannot be used for additional recording; the recording is permanent. Unfinalized CD-RW disks can be played on other CD-RW recorders. Unlike CD-R disks, CD-RW disks can be erased. You can erase the last track or the entire disk.


What is a TOC?

It is an acronym for Table of Contents. The TOC contains track and index numbers, track start and end times, and track length information, and is read each time a disk is loaded into a CD player.




So anyway I assume that the TOC needs to be at a pre-defined place... At the start of the disk... We need to have a look at the TOC to see the differences between multisession (one session) open, multisession (more than 1 session on disk) open, multisession closed, single session closed. I will try to find exactly this.

Further information:
On a conventional CD of any flavor, the first information the reader sees is the Table Of Contents (TOC). In CD-DA, the .CDA 'file' specifying each track is a fiction that a file manager (like Explorer) uses. In a single-session, closed disc, the TOC contains information which is interpreted by a DOS extension as being a directory. The rules for converting TOC information (including the fact that everything on the disc is read-only) are embedded in the extension, such as DOS's MSCDEX. On a multisession disc, the TOC for the first session tells the system where to find the next one - or whether the current one is the last, or whether the disc is now closed. DAO is necessarily single-session (which is why one cannot write DAO tracks in Mixed or CD-Xtra formats).

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#6 Post by BarryK »

Very interesting!
keep going... the anwer is in there somewhere!

User avatar
Ian
Official Dog Handler
Posts: 1234
Joined: Wed 04 May 2005, 12:00
Location: Queensland

#7 Post by Ian »

The trick is how to read the TOC. Finding out how to do this on the net is like getting the back teeth out of a Bengal tiger.
The standards govening CD burning should give some idea I think.

Guest

#8 Post by Guest »

You hit the nail on the head Ian.

I have continued the research, but it's been sparse, lots to do at work.

What I have found out is that when you close a CD it writes the absolute lead-in and final TOC in a negative sector.

Which I believe is at -02:32:19 (sector: -11419)

From what I have seen, dd was written initially for disk drives, and doesn't have support for reading negative sectors.

So... What we need is something that will read that section of data, if data exits, the CD is closed.

User avatar
Boogle
Posts: 9
Joined: Tue 07 Jun 2005, 05:23
Location: Australia

#9 Post by Boogle »

Arg, forgot to login, that was from me! :P

Oh, and it is a long weekend here is Australia. I'll finally have some spare time. Still a lot to do. We are having our place tiled in 2 weeks, so we have to move all the furniture...

But still relatively spare time!

For those are interested in CD writing... (This is just a FYI, doesn't help our research much... I found it interesting anyway)

What is the difference between fixation and finalization?
Fixation is the process of completing a CD-R or CD-RW disc session by writing Lead-In (table of contents) and Lead-Out information. Once a disc is fixated it can then be played back in CD and DVD-ROM drives and recorders and consumer electronics devices compatible with the particular disc type and format. It is also possible to record additional information later to create a multisession disc. Finalization, on the other hand, completely closes the disc so no further material can be added.

Guest

#10 Post by Guest »

Hrm, those sectors are a dead end, they contain ATIP information, and isn't useful to our cause.

Learn more about ATIP (Pre-Groove) here:

http://knowhow.cdfreaks.com/article.php?ID=122

User avatar
Boogle
Posts: 9
Joined: Tue 07 Jun 2005, 05:23
Location: Australia

#11 Post by Boogle »

Dang it logged me out again...

Anyway, I am looking for the "final table of contents" (TOC) at the moment.

There are enough references to it on the web, but not it's location on the disk.

Jesse
Posts: 466
Joined: Sun 08 May 2005, 16:07
Location: Auckland, NZ

#12 Post by Jesse »

I also happened to stumble across a program called cdrdao which might just give you the information you're after with its disk-info command. Its hosted on source forge, cdrdao.

http://sourceforge.net/projects/cdrdao/

I found some info here, I had a bit of a look, seems like it moght contain other good lead....

http://www.epanorama.net/links/pc_storage.html

Jesse

User avatar
Boogle
Posts: 9
Joined: Tue 07 Jun 2005, 05:23
Location: Australia

#13 Post by Boogle »

Hrm, It's been a while, so many things to do.

I had a quick look at cdrdao, not sure if it can get much further:
# cdrdao disk-info --device 0,0,0
Cdrdao version 1.1.7 - (C) Andreas Mueller <andreas@daneb.de>
SCSI interface library - (C) Joerg Schilling
Paranoia DAE library - (C) Monty

Check http://cdrdao.sourceforge.net/drives.html#dt for current driver tables.

Using libscg version 'andreas-0.5-UNIXWARE_Patch'

0,0,0: ASUS CRW-5224A Rev: 1.35

ERROR: No driver found for 'ASUS CRW-5224A', available drivers:

cdd2600
generic-mmc
generic-mmc-raw
plextor
plextor-scan
ricoh-mp6200
sony-cdu920
sony-cdu948
taiyo-yuden
teac-cdr55
toshiba
yamaha-cdr10x

For all recent recorder models either the 'generic-mmc' or
the 'generic-mmc-raw' driver should work.
Use option '--driver' to force usage of a driver, e.g.: --driver generic-mmc
The useful information in the above about 'CRW' etc, can also be obtained using:

cdrecord -scanbus
# cdrecord -scanbus
Cdrecord 2.0 (i686-pc-linux-gnu) Copyright (C) 1995-2002 J

User avatar
Boogle
Posts: 9
Joined: Tue 07 Jun 2005, 05:23
Location: Australia

#14 Post by Boogle »

Actually I looked further into cdrdao and there does appear to be many useful options.

EG:

Code: Select all

show-toc  - prints out toc and exits
  toc-info  - prints out short toc-file summary
  toc-size  - prints total number of blocks for toc
  read-toc  - create toc file from audio CD
  read-cd   - create toc and rip audio data from CD
  read-cddb - contact CDDB server and add data as CD-TEXT to toc-file
  show-data - prints out audio data and exits
  read-test - reads all audio files and exits
  disk-info - shows information about inserted medium
  msinfo    - shows multi session info, output is suited for scripts
  unlock    - unlock drive after failed writing
  blank     - blank a CD-RW
  scanbus   - scan for devices
  simulate  - shortcut for 'write --simulate'
  write     - writes CD
  copy      - copies CD
commands such as these are returning interesting results. Unfortunatly I have moved these computers into a different room because of tiling going on. For another 2 or 3 days, the CD in the drive a CDRW... and I can't switch it as it's crammed against the wall. And I can't be bothered taking out the computer before it (windows machine) to get to it just at the moment.

Hopefully someone can run these commands over some different media. closed and open CD's etc...

Here are the results for my CD-RW: (I made bold some of the more interesting lines returned...)
[root@linuxserver root]# cdrdao show-toc --device 0,0,0 --driver generic-mmc
ERROR: Missing toc-file.

Cdrdao version 1.1.7 - (C) Andreas Mueller <andreas@daneb.de>
SCSI interface library - (C) Joerg Schilling
Paranoia DAE library - (C) Monty

Check http://cdrdao.sourceforge.net/drives.html#dt for current driver tables.


Usage: cdrdao show-toc [-v #] toc-file

[root@linuxserver root]# cdrdao msinfo --device 0,0,0 --driver generic-mmc
Cdrdao version 1.1.7 - (C) Andreas Mueller <andreas@daneb.de>
SCSI interface library - (C) Joerg Schilling
Paranoia DAE library - (C) Monty

Check http://cdrdao.sourceforge.net/drives.html#dt for current driver tables.

Using libscg version 'andreas-0.5-UNIXWARE_Patch'

0,0,0: ASUS CRW-5224A Rev: 1.35
Using driver: Generic SCSI-3/MMC - Version 2.0 (options 0x0000)

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

Multisession CD Bibliography

#15 Post by Flash »

Multisession CD Bibliography

ANSI T13 ATAPI Technical committee Home page. ATA-ATAPI.COM by Hale Landis

Enhanced IDE FAQ and Utilities

Enhanced IDE/Fast-ATA/ATA-2 FAQ from 2000

Excellent CDR FAQ, mostly for audio CDs but still a lot of info. IML 1501 CD-R/W Encoder Decoder with ATAPI interface

Post Reply