Device Manager

On the road to file system

The major motivation for working on Device Manager at this point was the goal of getting file system eventually up and running. As planned earlier, we will implement file system driver as a “virtual” DRVR resource, which we will mount the file system with, and using it requires naturally the Device Manager.

Interestingly, the Device Manager API overlaps with File Manager’s calls, which means that certain traps (Open/Write/Read/Close) can be called for both files using the FCB IDs (positive ioRefNums), or device drivers using the driver reference numbers (negative ioRefNum). Besides those four traps, Device Manager has a set of calls which only apply to device drivers, and File Manager has a lot of calls which are only valid for FCBs. At this point the goal is to implement the core I/O functions.

Other benefits

Besides the (planned future) loading of file system DRVR and file system support, there are a few other benefits of implementing the device Manager:

  • We can also implement the famous Sound Driver, which a lot of early Mac games used (in combination with direct sound hardware access)
  • At some point, implement the standard mac Printer/Modem serial ports (which can be mapped with the Platform abstraction to any character-based serial physical or virtual input/output devices)