registering a logical drive

This is a discussion on registering a logical drive within the Networking/Device Communication forums, part of the General Programming Boards category; Under Windows XP using Visual Studio 6.0 or 2005, I want to create a custom hard drive (Im an EE). ...

  1. #1
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189

    registering a logical drive

    Under Windows XP using Visual Studio 6.0 or 2005, I want to create a custom hard drive (Im an EE). A search of the web shows lots of commercial products and some references to the ramdisk that microsoft puts out for free, but the problem is that Microsoft's doesnt actually give you the source code for the driver itself, just the application that interfaces with the driver. I want to actually have a system service that when installed presents the OS with a drive that appears to the system to be just another drive. I already have a system service skeleton, and I have the code that will interface with my device and I can present the LBA style 512 byte sectors, I just need to know how to go about interfacing with the OS itself. Any help would be much appreciated.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Have you downloaded the Windows DDK. I'm pretty sure that has the source-code for a ramdisk somewhere. If not, it definitely DOES have the driver for a real IDE drive.

    However, I'm not sure you actually want to do any of that... Driver development is quite difficult, and can be tricky when it comes to solving some of the less obvious parts.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    well, the thing is I have this piece of hardware that im building, and I can interface with my hardware just fine, but I want to present the storage as a drive that can be read from and written to just like a hard drive. Translating the physical storage into 512 byte logical blocks (LBA) is no problem, in fact I built it with LBA in mind. I just need to know how to tell the OS, hey I have a drive x: here, and then let the OS read from it and write to it, including formatting etc. I have the code that handles the low level I/O, I just need to know how to bridge the gap between my functions (that literally just read or write a block of data to/from a specific LBA address) and the Operating system. Im D/Ling the DDK as we type, so hopefully I can just hack up the included example to make it work.
    Last edited by abachler; 09-12-2007 at 11:31 AM.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  4. #4
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,691
    Here's code for a virtual floppy drive you may find useful.
    http://chitchat.at.infoseek.co.jp/vmware/vfd.html

    gg

  5. #5
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Very nice site. rather than look into the virtual floppy drive he has, I bumped up a few levels in the hierarchy and found he also has a virtual hard drive with source. One step closer to making my 50 cent idea a reality
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by abachler View Post
    well, the thing is I have this piece of hardware that im building, and I can interface with my hardware just fine, but I want to present the storage as a drive that can be read from and written to just like a hard drive. Translating the physical storage into 512 byte logical blocks (LBA) is no problem, in fact I built it with LBA in mind. I just need to know how to tell the OS, hey I have a drive x: here, and then let the OS read from it and write to it, including formatting etc. I have the code that handles the low level I/O, I just need to know how to bridge the gap between my functions (that literally just read or write a block of data to/from a specific LBA address) and the Operating system. Im D/Ling the DDK as we type, so hopefully I can just hack up the included example to make it work.
    This may be too late, and not the right thing to say, but how about you implement an IDE interface on your hardware - then you wouldn't have to worry about writing a driver.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  7. #7
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Well, there is some processing of the raw data that has to take place to make it ready to appear as a logical block. I already wrote the software to decode the media. Its not really feasable to implement it in hardware, at least not on whats left of a weekly paycheck.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Extracting data from a laptop hard drive
    By DavidP in forum Tech Board
    Replies: 6
    Last Post: 06-13-2009, 08:02 AM
  2. SATA HDD failure
    By PING in forum Tech Board
    Replies: 4
    Last Post: 12-23-2008, 12:25 AM
  3. Detect SCSI Hard Drive Serial Number
    By mercury529 in forum Windows Programming
    Replies: 3
    Last Post: 10-17-2006, 07:23 PM
  4. Replies: 2
    Last Post: 07-06-2005, 08:11 PM
  5. Spin A Drive and such
    By Seph_31 in forum C Programming
    Replies: 15
    Last Post: 11-20-2003, 06:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21