Giter Site home page Giter Site logo

retroric / fdrawcmd--simonowen Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simonowen/fdrawcmd

0.0 1.0 0.0 38 KB

fdrawcmd.sys is a Windows filter driver that exposes command-level access to the on-board floppy disk controller.

Home Page: http://simonowen.com/fdrawcmd

License: MIT License

C 13.38% C++ 86.41% Makefile 0.21%

fdrawcmd--simonowen's Introduction

fdrawcmd.sys

Introduction

fdrawcmd.sys is a Windows filter driver that exposes command-level access to the on-board floppy disk controller, making it possible to read/write many non-standard and copy-protected disk formats. The driver runs under Windows 2000 or later.

Development

There has been no new development in the last 5 years, and the driver is considered mostly complete for its original task. The majority of the code is over 10 years old now, and showing its age in places. Rather than risk refactoring it I've decided to release it as-is.

The bulk of the driver code validates and queues requests, which are ultimately passed down the driver stack to Microsoft's FDC.SYS driver, which manages the FDC chip. It uses the same private interface as the system FLPYDISK.SYS driver, which supports a range of DOS-compatible disk formats.

Replicating some copy-protection formats requires lower-level access than the FDC.SYS interface provides. For example, interrupting disk writes requires tracking the write position on the disk, so it can be stopped at the correct point. FDC.SYS doesn't expose its DMA ADAPTER_OBJECT, so we must use some slightly underhand tricks to obtain it. Similarly, the FDC.SYS command table has disabled read/write commands that use deleted data address marks, so we must locate and patch them to restore the missing functionality. There may be other naughty stuff I've since forgotten.

Building

If you need the driver to run on Windows 7 or later only, I recommend building using Visual studio 2015 (the free Community edition works fine). You'll also need a recent WDK installed, such as the WDK 10. The build automatically signs the driver with a test code-signing certificate.

For complete compatibility with Windows 2000 (or later) you'll need to use the Windows Server 2003 DDK (6001.18002), and build from the command-line. You'll also need to manually test sign the driver.

Installing

To install the driver requires registering it with the Service Control Manager, installing it as a lower filter under floppy disk class devices in the registry, then restarting the floppy device stack. That can all be performed manually, but I don't have detailed instructions to hand.

An easier option is to perform a one-time install of the official driver from my website using FdInstall.exe, then replace the driver binary in Windows\System32\Drivers\.

Starting with Windows Vista x64, kernel-mode drivers must be properly code-signed or Windows will refuse to load them. Despite the built driver containing a test signature, you'll still need to disable driver signature enforcement so Windows will accept it. Note that this only works for one boot, so it's not a permanent solution.

Each time you update the driver you'll need to restart the floppy device stack to reload it. Open Device Manager and expand Floppy drive controllers to find Standard floppy disk controller. Right-click on it and Disable it, then Enable it. If the device won't start you probably forgot to disable driver signature enforcement!

License

The fdrawcmd.sys source code is released under the MIT license.

Contact

Simon Owen http://simonowen.com

fdrawcmd--simonowen's People

Contributors

simonowen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.