Virtual vs. Hardware device drive

Hi everyone,

I’m attempting to map a drive letter (x: for example) to a virtual device,
and I’m unsure as to the best way to go about creating the “device”. I’ve
got a few questions (I’m new to this list – please educate me if I’m
asking too much).

Q/ is a RAMDISK considered a virtual or hardware device?
Q/ is it possible to write a driver to simulate a mountable device such as
a CD-ROM, but have the bits stream from RAM or some disk hosted drive
image?
Q/ if yes, is it possible to write the driver in such a way that it does
not require a reboot to map the drive and access the data?

Thanks,
-Scott


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Refer to “Ramdisk” sample in nt4 ddk … under src/storage/disk
directory…

Taher

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of
xxxxx@e-academy.com
Sent: Tuesday, February 20, 2001 11:01 AM
To: File Systems Developers
Subject: [ntfsd] Virtual vs. Hardware device drive

Hi everyone,

I’m attempting to map a drive letter (x: for example) to a virtual device,
and I’m unsure as to the best way to go about creating the “device”. I’ve
got a few questions (I’m new to this list – please educate me if I’m
asking too much).

Q/ is a RAMDISK considered a virtual or hardware device?
Q/ is it possible to write a driver to simulate a mountable device such as
a CD-ROM, but have the bits stream from RAM or some disk hosted drive
image?
Q/ if yes, is it possible to write the driver in such a way that it does
not require a reboot to map the drive and access the data?

Thanks,
-Scott


You are currently subscribed to ntfsd as: xxxxx@veritas.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> ----------

From: xxxxx@e-academy.com[SMTP:xxxxx@e-academy.com]
Reply To: File Systems Developers
Sent: Tuesday, February 20, 2001 2:00 AM
To: File Systems Developers
Subject: [ntfsd] Virtual vs. Hardware device drive

Q/ is it possible to write a driver to simulate a mountable device such as

a CD-ROM, but have the bits stream from RAM or some disk hosted drive
image?

Yes.

Q/ if yes, is it possible to write the driver in such a way that it does
not require a reboot to map the drive and access the data?

Yes. DDK RamDisk example is a good start, there is NT4 version in the DDK
and improved w2k version somewhere on m$ web. Also, there are free examples
of drivers which use a file for driver image. Unfortunatelly, I forgot where
they are, maybe somebody else will remember.

Best regards,

Michal Vodicka
Veridicom
(RKK - Skytale)
[WWW: http://www.veridicom.com , http://www.skytale.com]


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Q/ is a RAMDISK considered a virtual or hardware device?
I would call it virtual

Q/ is it possible to write a driver to simulate a mountable device such
as
a CD-ROM, but have the bits stream from RAM or some disk hosted drive
image?
Yes it is possible and in fact I wrote a “virtual CD-ROM” driver
a couple of years ago that mounted cd image files from another disk.

Q/ if yes, is it possible to write the driver in such a way that it does
not require a reboot to map the drive and access the data?
Yes it is possible. The one I wrote did not require reboots at
all.

-----Original Message-----
From: Taher Vohra [mailto:xxxxx@veritas.com]
Sent: Tuesday, February 20, 2001 8:45 AM
To: File Systems Developers
Subject: [ntfsd] RE: Virtual vs. Hardware device drive

Refer to “Ramdisk” sample in nt4 ddk … under src/storage/disk
directory…

Taher

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of
xxxxx@e-academy.com
Sent: Tuesday, February 20, 2001 11:01 AM
To: File Systems Developers
Subject: [ntfsd] Virtual vs. Hardware device drive

Hi everyone,

I’m attempting to map a drive letter (x: for example) to a virtual
device,
and I’m unsure as to the best way to go about creating the “device”.
I’ve
got a few questions (I’m new to this list – please educate me if I’m
asking too much).

Q/ is a RAMDISK considered a virtual or hardware device?
Q/ is it possible to write a driver to simulate a mountable device such
as
a CD-ROM, but have the bits stream from RAM or some disk hosted drive
image?
Q/ if yes, is it possible to write the driver in such a way that it does
not require a reboot to map the drive and access the data?

Thanks,
-Scott


You are currently subscribed to ntfsd as: xxxxx@veritas.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@microsoft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi,

Q/ is it possible to write a driver to simulate a mountable
device such
as
a CD-ROM, but have the bits stream from RAM or some disk hosted drive
image?
Yes it is possible and in fact I wrote a “virtual CD-ROM” driver
a couple of years ago that mounted cd image files from another disk.

Can I have a question?
Does write a 'vritual CDROM driver that what you had done is to create a
CDROM device and processing various IRP about IPR_READ_TOC… and RAW_READ
etc?

Is writing this kind driver need IFS kit?

Thanks in advance


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You don’t need the IFS kit to create a Virtual CDROM driver. It can be
done as a SCSIPORT driver. The only thing that I have found difficult is
generating a TOC for an AUDIO disk, faking one for a DATA image is easy.
Anyone want to comment on what you need to do to generate a TOC for a file
that is a copy of an AUDIO CD-ROM?

Mark J. Cariddi
Consulting Associate
Open Systems Resources, Inc.
http://www.osr.com/

-----Original Message-----
From: Double Chiang [mailto:xxxxx@allion.com]
Sent: Tuesday, February 20, 2001 9:37 PM
To: File Systems Developers
Subject: [ntfsd] RE: Virtual vs. Hardware device drive

Hi,

Q/ is it possible to write a driver to simulate a mountable
device such
as
a CD-ROM, but have the bits stream from RAM or some disk hosted drive
image?
Yes it is possible and in fact I wrote a “virtual CD-ROM” driver
a couple of years ago that mounted cd image files from another disk.

Can I have a question?
Does write a 'vritual CDROM driver that what you had done is to create a
CDROM device and processing various IRP about IPR_READ_TOC… and RAW_READ
etc?

Is writing this kind driver need IFS kit?

Thanks in advance


You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I wrote a CD Ripper years back that did some of that. Its all user mode
stuff,
and uses the multimedia functions to build TOC’s. But it did some Stupid
Windows
Tricks ™ like binary win95/nt compatability, thunks, and jitter
correction for
slow systems, as well as the MMIO stuff. Rather than actually think hard
about
whether this is usefull to anyone, I just slapped the archive up on the
ntdev.org
ftp site (AIR1118.ZIP)

I only spent a few weeks on it and most of that on the thunking, so its
hardly
definitive. But it worked. My customer decided to not use it and opted
to go
through ASPI instead. All I remember about it was that I extracted the
same
5 seconds of Pink Floyds “The Wall” about 30,000 times during testing
and cant stand it since then :wink:

-bobk

You don’t need the IFS kit to create a Virtual CDROM driver. It can be
done as a SCSIPORT driver. The only thing that I
have found difficult is generating a TOC for an AUDIO disk, faking one
for a DATA image is easy. Anyone want to comment
on what you need to do to generate a TOC for a file that is a copy of an
AUDIO CD-ROM?

Mark J. Cariddi
Consulting Associate
Open Systems Resources, Inc.
http://www.osr.com/

-----Original Message-----
From: Double Chiang [mailto:xxxxx@allion.com]
Sent: Tuesday, February 20, 2001 9:37 PM
To: File Systems Developers
Subject: [ntfsd] RE: Virtual vs. Hardware device drive

Hi,

Q/ is it possible to write a driver to simulate a mountable
> device such
> as
> a CD-ROM, but have the bits stream from RAM or some disk hosted
drive
> image?
> Yes it is possible and in fact I wrote a “virtual CD-ROM”
driver
> a couple of years ago that mounted cd image files from another
disk.

Can I have a question?
Does write a 'vritual CDROM driver that what you had done is to
create a CDROM device and processing various IRP
about IPR_READ_TOC… and RAW_READ etc?

Is writing this kind driver need IFS kit?

Thanks in advance


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Thanks, I got it.

Another question is.
Is it possible to write filter driver for network redirector, and let that
mapped driver will report as local CDROM driver? I mean it still a network
mapped driver, but it display as a local CDROM and GetDriverType() will
report CDROM type.

Regards,

-----Original Message-----
From: Mark Cariddi [mailto:xxxxx@osr.com]
Sent: Wednesday, February 21, 2001 10:40 AM
To: File Systems Developers
Subject: [ntfsd] RE: Virtual vs. Hardware device drive

You don’t need the IFS kit to create a Virtual CDROM driver. It can be
done as a SCSIPORT driver. The only thing that I have found difficult is
generating a TOC for an AUDIO disk, faking one for a DATA image is easy.
Anyone want to comment on what you need to do to generate a TOC for a file
that is a copy of an AUDIO CD-ROM?

Mark J. Cariddi
Consulting Associate
Open Systems Resources, Inc.
http://www.osr.com/

-----Original Message-----
From: Double Chiang [mailto:xxxxx@allion.com]
Sent: Tuesday, February 20, 2001 9:37 PM
To: File Systems Developers
Subject: [ntfsd] RE: Virtual vs. Hardware device drive

Hi,

Q/ is it possible to write a driver to simulate a mountable
device such
as
a CD-ROM, but have the bits stream from RAM or some disk hosted drive
image?
Yes it is possible and in fact I wrote a “virtual CD-ROM” driver
a couple of years ago that mounted cd image files from another disk.

Can I have a question?
Does write a 'vritual CDROM driver that what you had done is to create a
CDROM device and processing various IRP about IPR_READ_TOC… and RAW_READ
etc?

Is writing this kind driver need IFS kit?

Thanks in advance


You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@allion.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

>Anyone want to comment on what you need to do to generate a TOC for a
file
You can build either a full TOC or a usual TOC depending on format
requested. In most cases returning the usual TOC is enough.

For the usual TOC you must fill the following structures:

typedef struct _CDTRACKDATA
{
UCHAR Reserved;
UCHAR Control : 4;
UCHAR Adr : 4;
UCHAR TrackNumber;
UCHAR Reserved1;
UCHAR Address[4];
} CDTRACKDATA, *PCDTRACKDATA;

Control is 4 for data, 0 for an audio track,
Adr is always 1,
TrackNumber is one-based number of a track,
Address depends on MSF bit in request. It’s either minute:second:frame
or track offset in MSB format.
trackoffset (if address is in MSF) = Address[0] * 75 * 60 + Address[1] *
75 + Address[2] - 150.

typedef struct _CDROMTOC
{
UCHAR Length[2];
UCHAR FirstTrack;
UCHAR LastTrack;
CDTRACKDATA TrackData[MAXIMUM_CDROM_TRACKS];
} CDROMTOC, *PCDROMTOC;

Length - is the length of the TOC - 2 bytes (in MSB).
FirstTrack - is always 1
LastTrack - is the number of audio tracks.

Make sure that you return also TrackData with the 0xAA track number.

For emulating of multisession/video/copy-protected/photo CDs the usual
TOC is not enough.

Max Lyadvinsky
Paragon CD Emulator Lead Developer
www.paragon-gmbh.com


From: Mark Cariddi[SMTP:xxxxx@osr.com]
Reply To: File Systems Developers
Sent: 21 ôåâðàëÿ 2001 ã. 5:40
To: File Systems Developers
Subject: [ntfsd] RE: Virtual vs. Hardware device drive

You don’t need the IFS kit to create a Virtual CDROM driver. It can be

done as a SCSIPORT driver. The only thing that I have found difficult
is
generating a TOC for an AUDIO disk, faking one for a DATA image is easy.

Anyone want to comment on what you need to do to generate a TOC for a
file
that is a copy of an AUDIO CD-ROM?

Mark J. Cariddi
Consulting Associate
Open Systems Resources, Inc.
http://www.osr.com/

-----Original Message-----
From: Double Chiang [mailto:xxxxx@allion.com]
Sent: Tuesday, February 20, 2001 9:37 PM
To: File Systems Developers
Subject: [ntfsd] RE: Virtual vs. Hardware device drive

Hi,

Q/ is it possible to write a driver to simulate a mountable
device such
as
a CD-ROM, but have the bits stream from RAM or some disk hosted drive
image?
Yes it is possible and in fact I wrote a “virtual CD-ROM” driver

a couple of years ago that mounted cd image files from another disk.

Can I have a question?
Does write a 'vritual CDROM driver that what you had done is to create a

CDROM device and processing various IRP about IPR_READ_TOC… and
RAW_READ
etc?

Is writing this kind driver need IFS kit?

Thanks in advance


You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@telecom.sins.ru
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Just create a CDROM device object and process CDROM ioctls described in
DDK and read irps.
If you want aspi layer can see your virtual CDROMs develop a SCSI
miniport.

Regards,
Max Lyadvinsky


From: Double Chiang[SMTP:xxxxx@allion.com]
Reply To: File Systems Developers
Sent: 21 ??? 2001 ?. 5:37
To: File Systems Developers
Subject: [ntfsd] RE: Virtual vs. Hardware device drive

Hi,

Q/ is it possible to write a driver to simulate a mountable
device such
as
a CD-ROM, but have the bits stream from RAM or some disk hosted drive
image?
Yes it is possible and in fact I wrote a “virtual CD-ROM” driver
a couple of years ago that mounted cd image files from another disk.

Can I have a question?
Does write a 'vritual CDROM driver that what you had done is to create a

CDROM device and processing various IRP about IPR_READ_TOC… and
RAW_READ
etc?

Is writing this kind driver need IFS kit?

Thanks in advance


You are currently subscribed to ntfsd as: xxxxx@telecom.sins.ru
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

RE: [ntfsd] RE: Virtual vs. Hardware device driveI wrote several virtual
CD-ROM device drivers (DOS, 9x, NT and 2000). I implemented them as CD-ROM
class drivers in NT and 2000. It was quite simple.

Chris,

What I did was to read the TOC form the CD-ROM (100 entries max.) and save
them in a header in the file. I save all 100 even if there are less than
100. If there are 12, 13 is the leadout and the other entries are blank.

To build it on the fly, you would need to store the raw sectors and all of
the sub-channel information; a waste of space. When the audio disk requires
a TOC, simply read the header.

Jamey
StorageCraft

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Mark Cariddi
Sent: Tuesday, February 20, 2001 6:40 PM
To: File Systems Developers
Subject: [ntfsd] RE: Virtual vs. Hardware device drive

You don’t need the IFS kit to create a Virtual CDROM driver. It can be
done as a SCSIPORT driver. The only thing that I have found difficult is
generating a TOC for an AUDIO disk, faking one for a DATA image is easy.
Anyone want to comment on what you need to do to generate a TOC for a file
that is a copy of an AUDIO CD-ROM?

Mark J. Cariddi
Consulting Associate
Open Systems Resources, Inc.
http://www.osr.com/

-----Original Message-----
From: Double Chiang [mailto:xxxxx@allion.com]
Sent: Tuesday, February 20, 2001 9:37 PM
To: File Systems Developers
Subject: [ntfsd] RE: Virtual vs. Hardware device drive

Hi,

Q/ is it possible to write a driver to simulate a mountable
> device such
> as
> a CD-ROM, but have the bits stream from RAM or some disk hosted drive
> image?
> Yes it is possible and in fact I wrote a “virtual CD-ROM” driver
> a couple of years ago that mounted cd image files from another disk.

Can I have a question?
Does write a 'vritual CDROM driver that what you had done is to create a
CDROM device and processing various IRP about IPR_READ_TOC… and RAW_READ
etc?

Is writing this kind driver need IFS kit?

Thanks in advance


You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Doing file IO in a SCSI miniport driver can be problematic.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Max Lyadvinsky
Sent: Tuesday, February 20, 2001 11:14 PM
To: File Systems Developers
Subject: [ntfsd] RE: Virtual vs. Hardware device drive

Just create a CDROM device object and process CDROM ioctls described in
DDK and read irps.
If you want aspi layer can see your virtual CDROMs develop a SCSI
miniport.

Regards,
Max Lyadvinsky


From: Double Chiang[SMTP:xxxxx@allion.com]
Reply To: File Systems Developers
Sent: 21 ??? 2001 ?. 5:37
To: File Systems Developers
Subject: [ntfsd] RE: Virtual vs. Hardware device drive

Hi,

> Q/ is it possible to write a driver to simulate a mountable
> device such
> as
> a CD-ROM, but have the bits stream from RAM or some disk hosted drive
> image?
> Yes it is possible and in fact I wrote a “virtual CD-ROM” driver
> a couple of years ago that mounted cd image files from another disk.

Can I have a question?
Does write a 'vritual CDROM driver that what you had done is to create a

CDROM device and processing various IRP about IPR_READ_TOC… and
RAW_READ
etc?

Is writing this kind driver need IFS kit?

Thanks in advance


You are currently subscribed to ntfsd as: xxxxx@telecom.sins.ru
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Although it’s recommended to call just ScsiPortXxx you can use other system routines in a SCSI miniport.

Max


??: Jamey Kirby[SMTP:xxxxx@storagecraft.com]
???: File Systems Developers
???: 21 ??? 2001 ?. 11:14
???: File Systems Developers
???: [ntfsd] RE: Virtual vs. Hardware device drive

Doing file IO in a SCSI miniport driver can be problematic.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Max Lyadvinsky
Sent: Tuesday, February 20, 2001 11:14 PM
To: File Systems Developers
Subject: [ntfsd] RE: Virtual vs. Hardware device drive

Just create a CDROM device object and process CDROM ioctls described in
DDK and read irps.
If you want aspi layer can see your virtual CDROMs develop a SCSI
miniport.

Regards,
Max Lyadvinsky


From: Double Chiang[SMTP:xxxxx@allion.com]
Reply To: File Systems Developers
Sent: 21 ??? 2001 ?. 5:37
To: File Systems Developers
Subject: [ntfsd] RE: Virtual vs. Hardware device drive

Hi,

> Q/ is it possible to write a driver to simulate a mountable
> device such
> as
> a CD-ROM, but have the bits stream from RAM or some disk hosted drive
> image?
> Yes it is possible and in fact I wrote a “virtual CD-ROM” driver
> a couple of years ago that mounted cd image files from another disk.

Can I have a question?
Does write a 'vritual CDROM driver that what you had done is to create a

CDROM device and processing various IRP about IPR_READ_TOC… and
RAW_READ
etc?

Is writing this kind driver need IFS kit?

Thanks in advance


You are currently subscribed to ntfsd as: xxxxx@telecom.sins.ru
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@telecom.sins.ru
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

or just create a helper dll that will do the IO. then link the dll to your
miniport. in that case your miniport is still portable across winos, and os
specific stuff is in that dll.

Max


??: Max Lyadvinsky[SMTP:xxxxx@telecom.sins.ru]
???: File Systems Developers
???: 21 ??? 2001 ?. 11:31
???: File Systems Developers
???: [ntfsd] RE: Virtual vs. Hardware device drive

Although it’s recommended to call just ScsiPortXxx you can use other system
routines in a SCSI miniport.

Max


??: Jamey Kirby[SMTP:xxxxx@storagecraft.com]
???: File Systems Developers
???: 21 ??? 2001 ?. 11:14
???: File Systems Developers
???: [ntfsd] RE: Virtual vs. Hardware device drive

Doing file IO in a SCSI miniport driver can be problematic.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Max Lyadvinsky
Sent: Tuesday, February 20, 2001 11:14 PM
To: File Systems Developers
Subject: [ntfsd] RE: Virtual vs. Hardware device drive

Just create a CDROM device object and process CDROM ioctls described in
DDK and read irps.
If you want aspi layer can see your virtual CDROMs develop a SCSI
miniport.

Regards,
Max Lyadvinsky


From: Double Chiang[SMTP:xxxxx@allion.com]
Reply To: File Systems Developers
Sent: 21 ??? 2001 ?. 5:37
To: File Systems Developers
Subject: [ntfsd] RE: Virtual vs. Hardware device drive

Hi,

> Q/ is it possible to write a driver to simulate a mountable
> device such
> as
> a CD-ROM, but have the bits stream from RAM or some disk hosted drive
> image?
> Yes it is possible and in fact I wrote a “virtual CD-ROM” driver
> a couple of years ago that mounted cd image files from another disk.

Can I have a question?
Does write a 'vritual CDROM driver that what you had done is to create a

CDROM device and processing various IRP about IPR_READ_TOC… and
RAW_READ
etc?

Is writing this kind driver need IFS kit?

Thanks in advance


You are currently subscribed to ntfsd as: xxxxx@telecom.sins.ru
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@telecom.sins.ru
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@telecom.sins.ru
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Nathan

Was the code publish for general use?
Is is available for learning purposes?


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

>To build it on the fly, you would need to store the raw sectors and

all of the sub-channel information
you do not need raw sector headers, CRC, etc. to build the TOC.
you can build it if you have the following information:
just the length of each track in sectors. And that is all!

for multisession CDs you must also have the starting offset of each
session.

for video CDs you must also know the track mode, but usually CDs have
the following tracks formats:

audio CDs
cdda - 2352 bytes of data

data CDs
data in mode 1 (rarely mode 2 form 1) - 2048 bytes of data

playstation CDs
data in mode 2 form 1 - 2048 bytes of data

video CDs
first track in mode 2 form 1 - 2048 bytes of data
second track in mode 2 form 2 - 2324 bytes of data

so it isn’t even necessary to read headers of sectors, to build the TOC
for a video CD for instance.

BTW, I build TOCs dynamically for every CD types in Paragon CD Emulator.
You can check it at www.paragon-gmbh.com. You can build for example an
audio CD from any audio files.

Max


From: Jamey Kirby[SMTP:xxxxx@storagecraft.com]
Reply To: File Systems Developers
Sent: 21 ôåâðàëÿ 2001 ã. 10:55
To: File Systems Developers
Subject: [ntfsd] RE: Virtual vs. Hardware device drive

RE: [ntfsd] RE: Virtual vs. Hardware device driveI wrote several virtual

CD-ROM device drivers (DOS, 9x, NT and 2000). I implemented them as
CD-ROM
class drivers in NT and 2000. It was quite simple.

Chris,

What I did was to read the TOC form the CD-ROM (100 entries max.) and
save
them in a header in the file. I save all 100 even if there are less than

  1. If there are 12, 13 is the leadout and the other entries are blank.

To build it on the fly, you would need to store the raw sectors and all
of
the sub-channel information; a waste of space. When the audio disk
requires
a TOC, simply read the header.

Jamey
StorageCraft

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Mark Cariddi
Sent: Tuesday, February 20, 2001 6:40 PM
To: File Systems Developers
Subject: [ntfsd] RE: Virtual vs. Hardware device drive

You don’t need the IFS kit to create a Virtual CDROM driver. It can
be
done as a SCSIPORT driver. The only thing that I have found difficult
is
generating a TOC for an AUDIO disk, faking one for a DATA image is easy.

Anyone want to comment on what you need to do to generate a TOC for a
file
that is a copy of an AUDIO CD-ROM?

Mark J. Cariddi
Consulting Associate
Open Systems Resources, Inc.
http://www.osr.com/

-----Original Message-----
From: Double Chiang [mailto:xxxxx@allion.com]
Sent: Tuesday, February 20, 2001 9:37 PM
To: File Systems Developers
Subject: [ntfsd] RE: Virtual vs. Hardware device drive

Hi,

Q/ is it possible to write a driver to simulate a mountable
> device such
> as
> a CD-ROM, but have the bits stream from RAM or some disk hosted
drive
> image?
> Yes it is possible and in fact I wrote a “virtual CD-ROM”
driver
> a couple of years ago that mounted cd image files from another
disk.

Can I have a question?
Does write a 'vritual CDROM driver that what you had done is to
create a
CDROM device and processing various IRP about IPR_READ_TOC… and
RAW_READ
etc?

Is writing this kind driver need IFS kit?

Thanks in advance


You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@telecom.sins.ru
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Yes, but the reason for not exposing them via the SCSI miniport header is
that it is not recommended. For one, SCSI port requests must be completed in
the SCSI port calling context. So, if you create a system thread in your
driver to handle file I/O, then you will force SCSI port to complete the
request in another process/thread context. This screws up the SCSI port
driver/miniport driver context. SCSI port is very sensitive with respect to
calls out side of the SCSI port context.

SCSI port also holds a couple of spinlocks before calling the miniport. I
doubt holding the spinlock long enough to do file I/O and wait for
completion is a good idea; if nothing else, it would eat clock cycles and
not let certain things get schedules.

We went down the path of a SCSI miniport driver for our virtual devices, but
it WAS problematic. Our solution was to write our own SCSI port driver that
has the same interface and semantics as the SCSI port driver from Microsoft.
Our SCSI port driver uses the same type of interface for miniport drivers as
does the MS driver. The main difference is that we deserialize the requests
so that they are not context sensitive. SInce we know that drivers we write
with our SCSI port driver are not hardware devices (do not talk directly to
hardware), we do not have to worry about hardware level I/O and the
restrictions imposed on such I/O. Sure, our device will eventually talk to
hardware, but through some other driver such as tape, disk or network.

One disadvantage to my method is that Microsoft does not officially support
WHQL and driver signing for SCSI port drivers because the interfaces
(private ones) are not documented. I hear that this may be changed, but
nothing official.

So, to have your device WHQLable and signed, you are better off writing a
class driver; like a CD-ROM class driver. Under 9x, you will need to write a
SCSI port driver (not miniport) because the CDIOCTL.H file was removed from
an early beta of 9x and was never re-released. This header file would
absolutely be required to write a proper CD-ROM port driver in 9x.

Using SCSI is nice and it allows the system to leverage other software
layers residing above the SCSI layer. And too, the SCSI spec. is quite
standard and is not likely to change.

So, we have chosen to virtualize our devices of recent as SCSI miniport
drivers using our own SCSI port driver architecture, but they are not truly
WHQLable at the moment.

My .02

Jamey

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Max Lyadvinsky
Sent: Wednesday, February 21, 2001 12:32 AM
To: File Systems Developers
Subject: [ntfsd] RE: Virtual vs. Hardware device drive

Although it’s recommended to call just ScsiPortXxx you can use
other system routines in a SCSI miniport.

Max


ïÔ: Jamey Kirby[SMTP:xxxxx@storagecraft.com]
ïÔ×ÅÔ: File Systems Developers
ïÔÐÒÁ×ÌÅÎÏ: 21 ÆÅ×ÒÁÌÑ 2001 Ç. 11:14
ëÏÍÕ: File Systems Developers
ôÅÍÁ: [ntfsd] RE: Virtual vs. Hardware device drive

Doing file IO in a SCSI miniport driver can be problematic.

> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]On Behalf Of Max Lyadvinsky
> Sent: Tuesday, February 20, 2001 11:14 PM
> To: File Systems Developers
> Subject: [ntfsd] RE: Virtual vs. Hardware device drive
>
>
> Just create a CDROM device object and process CDROM ioctls described in
> DDK and read irps.
> If you want aspi layer can see your virtual CDROMs develop a SCSI
> miniport.
>
> Regards,
> Max Lyadvinsky
>
>
> ----------
> From: Double Chiang[SMTP:xxxxx@allion.com]
> Reply To: File Systems Developers
> Sent: 21 ??? 2001 ?. 5:37
> To: File Systems Developers
> Subject: [ntfsd] RE: Virtual vs. Hardware device drive
>
> Hi,
>
> > Q/ is it possible to write a driver to simulate a mountable
> > device such
> > as
> > a CD-ROM, but have the bits stream from RAM or some disk hosted drive
> > image?
> > Yes it is possible and in fact I wrote a “virtual CD-ROM” driver
> > a couple of years ago that mounted cd image files from another disk.
>
> Can I have a question?
> Does write a 'vritual CDROM driver that what you had done is to create a
>
> CDROM device and processing various IRP about IPR_READ_TOC… and
> RAW_READ
> etc?
>
> Is writing this kind driver need IFS kit?
>
> Thanks in advance
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@telecom.sins.ru
> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntfsd as: xxxxx@telecom.sins.ru
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I found the W2K RAMDISK sample at
http://support.microsoft.com/support/kb/articles/Q257/4/05.ASP.

-----Original Message-----
From: Vodicka, Michal [mailto:xxxxx@rkk.cz]
Sent: Tuesday, February 20, 2001 6:16 PM
To: File Systems Developers
Subject: [ntfsd] RE: Virtual vs. Hardware device drive
Yes. DDK RamDisk example is a good start, there is NT4 version in the DDK
and improved w2k version somewhere on m$ web. Also, there are free examples
of drivers which use a file for driver image. Unfortunatelly, I forgot where
they are, maybe somebody else will remember.
ists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com