From: Giuseppe C. <co...@lu...> - 2001-08-04 13:04:33
|
On Fri, 3 Aug 2001, strobe anarkhos wrote: > Hey, > I'm interested in porting cdrdao to Darwin but there aren't many >clues as to how exactly it works (looking at the 1.1.5 archive I >decompressed). There is some mention that it uses the same 'SCSI library' >as cdrecord, but to my knowledge that hasn't been ported either. Do I >need to have intimate knowledge of cdrecord before I can port cdrdao? Cdrdao's low level SCSI transport library is libscg, written by Joerg Schilling, and found in his cdrecord's package. From what I see in the latest version he met some problems in porting to Darwin. Porting libscg is the first step. You should read PORTING and README.macosX. Question regarding libscg are welcome on cdrecord-devel mailing list (http://lists.berlios.de/mailman/listinfo/cdrecord-developers) ... > I can already burn various kinds of CDs on this OS using >closed-source programs, but they don't support RAW DAO. I'm somewhat >knowledgeable in how Darwin functions, but not at all with how cdrdao >does. Is there a detailed description of how cdrdao communicates with the >drive? How this process differs between OSs would probably help too. Cdrdao sends standard SCSI commands. You're not interested in why and what. Libscg handles the command transport and the way it does is platform-specific. I am not a C++ programmer but I think that cdrdao would compile and work without hassle (perhaps some trouble can come from posix threads). ... > This is basically what I know so far about the inner workings in >OS X (without going through ridiculous detail). OS X (or Darwin, same >thing in this context) has a well organized object-oriented driver >architecture called IOKit or "I/O Kit". It also has a registry which is a >vast hierarchy encompassing all hardware and drivers detected. In OS X my >CD-R burner is recognized as an atapi device type. The atapi 'protocol >transport' appears to manage the atapi protocol. Then, curiously, it's >registered as a SCSI peripheral (I've read that cdrecord does something >similar, but I'm not familiar with the reasoning or history behind this. >Other ATA devices like hard drives are registered as ATA block devices, >but the CDRW burner is registered as a SCSI peripheral.). It's then >registered as a SCSI peripheral "Type05" which I speculate means a CD/DVD >device. This is then used by a CD block storage driver and a SCSI 'task' >'initer' or "CDIniter" driver which I suppose notifies the system when >something is inserted. Atapi is SCSI protocol over IDE bus. ... > Now if I know exactly how cdrdao works what I may be able to do > is author a program or library which connects to the SCSI peripheral > nub of the CD-R using that device exclusively (done using a higher > probe score). Keep in mind I don't know much about the SCSI protocol > despite using it constantly since 1986. I also don't know much about > the RAW DAO protocol, but I do know a little about how CD formats work > (sector areas are sync, header, subheader, user, auxiliary, > errorflags, subchannel. CDDA uses 2352byte user, 294 errorflags, 96 > subchannel, etc. etc.). I hope somebody on this list can help in those > areas in which I'm clueless so I can get this thing to work. You will need to understand OS specific SCSI transport support. For some examples in what is expecting you look at libscg/scsi-{aix,apollo,...}.c in cdrecord package. ... PS: MAX 80 COLUMNS IN YOUR EMAIL, PLZ!!! -- Giuseppe "Cowo" Corbelli -->> Riding on Linux-2.4.7-xfs -<! Computer programmers never die, they just get lost in the processing. !>- |