| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: CD-ROM control programming |
Moin Mike,
19.11.95 06:53, you wrote a message to Simeon Cran:
MB> Simeon Cran wrote in a message to All:
SC>> I'm interested in reading the raw sectors off CD-ROMs. I
SC>> know that certain CD-ROM readers are capable of this and can
SC>> be controlled using an ASPI command called something like
SC>> "READ_RAW".
...
MB> You can read raw sectors off of a CD-ROM by simply calling
MB> DosOpen() against the drive letter with the OPEN_FLAGS_DASD bit
MB> asserted. However, this will fail if CDFS.IFS is loaded, since
MB> it claims ownership of the drive letter.
I have no problems to read a data CDROM using the code I posted here the
other day. Any switches different between your and my call to DosOpen?
MB> If you comment out the load of CDFS.IFS in CONFIG.SYS, then no
MB> file system will claim the drive letter created for the CD-ROM
MB> drive by OS2CDROM.DMD, and you can do direct access to it.
You can't lock the device if a filesystem driver is loaded. But you don't
need a lock if you're only reading (who wants to write to a CDROM?).
MB> If you have a file/device handle for the whole drive returned by
MB> DosOpen(), then you can either use DosRead() for conventional
MB> reads or DosDevIOCtl() in the manner expected by OS2CDROM.DMD for
MB> "read long." That is, "read long" will get you
the full sector
MB> with ECC data appended, and you will be responsible for detecting
MB> any read errors and applying the ECC code manually.
Perhaps this "read long" will need a lock, DosRead will definitely not.
MB> The chain of control is that the CD-ROM controller will be
MB> claimed by an ADD. OS2CDROM.DMD will issue an
MB> IOCC_UNIT_CONTROL/IOCM_ALLOCATE_UNIT command to the ADD at boot
MB> time, and this will prevent ASPI or any other device driver from
MB> successfully allocating the unit. In order to prevent this, you
MB> must either replace OS2CDROM.DMD -- which is strongly not
MB> recommended -- or insert your own FLT into the chain between the
MB> ADD and OS2CDROM.DMD.
You may control the allocation by adding switches to you ADD commandline.
All driver I know support a commandline as documented for AHA154X.ADD
(online help).
/AM:(target,lun) use with ASPI DMD
/SM:(target,lun) use with SCSI DMD
/DM:(target,lun) use with DASD DMD
The comments in the source of OS2CDROM.DMD declare a device with /!DM set
won't by allocated. But this flag is never tested. Perhaps the production
code works that way.
MB> If you only need this kind of access for testing purposes on your
MB> own system, then commenting out CDFS.IFS and using OS2CDROM.DMD
MB> directly is probably the easiest thing to do. If you need to
MB> make redistributable code, then you will have to write an FLT in
MB> order to hide the unit from OS2CDROM.DMD so that you can use it.
MB> Hiding a unit can be an involved project.
I don't think he has to do all those things. But I'm willing to test any
code which proves the contrary (how do you spell THIS?).
...
Tschuesz,
Vitus
PIN: 10:1000/100.20
Fido: 2:2474/100.20
Internet: vitus{at}vortex.de
---
* Origin: Really a Point of BetaBox, Walheim (2:2474/100.20)SEEN-BY: 270/101 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407 SEEN-BY: 712/515 517 628 713/888 800/1 7877/2809 @PATH: 2474/100 0 2433/1200 225 270/101 712/515 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.