Subj : cd-rw To : GENE KWIECINSKI From : Andrew Belov Date : Sat Aug 02 2003 06:53 pm Hello GENE! 01 Aug 03 00:23, GENE KWIECINSKI wrote to ALL: GK> Now, about *writing* to it... Buncha different possibilities listed, GK> like session, disk-at-once, track-at-once, sector-at-once, etc. Is GK> there any standard protocol for doing so? Most models support the so-called MMC command set. This removes the requirement for any specific drivers. For example, no CD-RW drive vendor supports OS/2, but the OS/2 community is happy using the CD recovers for a long time. GK> I'd imagine that with the simplest method, sector-at-once, it's like GK> writing to a generic IDE disk drive. In general, it's a bit different. Unless some specific packet modes are considered, the CD-RW drive should be thought of as a streamer: in write mode, it resembles a character device that's unable to seek back and forth. Another abstraction is that it has little "controls" for table-of-contents fixation, as the recorder keeps track of what has been written - you can't establish a "partition table" there manually, while you can do that with your HDD. However, you were right in your assumption that the interface builds on top of IDE/ATAPI commands. GK> Can DOS itself do it, thinking it's another drive? No. GK> Need drivers to do so? There are no known drivers. Remember, it's DOS, and you aren't going to map the CD recorder to some drive letter, are you? GK> Nothing that I saw in Ralf Brown's list so far. Just wondering how GK> "standard" said protocol is, or if it varies widely based on the mfr GK> of the drive. The primary agenda is locating the description of MMC command set. Then I advise to study the source code of several common CD writing utilities, e.g. CDRecord, to get acquainted with command formats and collect some practical examples. Personally I've had little experience in programming CD-RW hardware; but from a brief acquaintance with the CDRecord source code, it seems that the software side is not that tricky. GK> Now, I can probably hook into DOS's interrupts, hard-coded at first, GK> but expand that to include a loader and/or read from an GK> environment variable, but is it necessary? No hooks are necessary unless your idea is to utilize packet modes and make the recorder available under a drive letter with the UDF/Mt.Rainier formats. I'd better start with writing a non-resident program that would just "burn" an ISO9660 image from a file onto CD, reset the unit to its initial state, and defer the reading operations to MSCDEX/CD-ROM drivers. GK> Is it like for VGA, where you really only need drivers for GK> board-specific modes and whatnot, but can use standard generic GK> VGA/SVGA/etc. modes just fine? The low-level part is IDE - if the CD-RW drive resides on some non-standard IDE controller, you get plunged into programming that one to communicate with CD-RW. The specifications of MMC regard only the *commands* transmitted over some generalized IDE-like interface. Sincerely yours - Andrew --- * Origin: Conea Software Mail system - Moscow, Russia (2:5020/181.2) .