This is a description of my expierience implementing ScsiPort on OZONE. ScsiPort is the interface between a Microsoft OS and the corresponding SCSI controller chip drivers. So, for example, if you have an Adaptec 7880-based controller, it comes with a file called aic78xx.sys. The interface that aic78xx.sys is written to is called ScsiPort. You can dig up a more-or-less complete description of ScsiPort on

The reason for doing this is, well, have you attempted to get doc for an Adaptec controller? Maybe I'm just not good at it, but all I got was the run-around. So now I can use the surplus-priced motherboard's built-in 7880 chip with OZONE (you don't think I would actually spend money on an Adaptec board after that cr*p, do you?). Plus, now I can (theoretically) use any PCI SCSI controller card that has an MS driver.

So here's what I basically did to get this to work:

  1. Used a dumpbin /all aic78xx.sys command on my Win2K system to find out which routines the aic78xx.sys binary actually uses. Fortunately, there are only a couple dozen, and they are all ScsiPort... routines. One of the other scsi drivers uses some Hal... routines (I can't remember which other one I looked at though).
  2. Studied the ScsiPort... routines on
  3. Wrote my ScsiPort... routines. It is basically a subroutine library consisting of the various ScsiPort... routines.
  4. Wrote a disassembler that converts the aic78xx.sys file into an equivalent aic78xx.s file that can be assembled with the gas assembler. Originally, it just disassembled it into a bunch of .long and .byte directives, ie, no instruction decoding. But I later revised it to do some instruction decoding (by ripping off gdb's disassemble routine) for debugging purposes. All the .long/.byte's are still there, the decoded instructions are in there as comments.
  5. Put it all together as a loadable image, consisting of these modules:
  6. So I load and run that image, it scans the PCI bus for aic-type chips and creates an OZONE scsi-type device table entry. I can now use my standard scsi tools to access disks or whatever on the scsi bus.

Here are the fun things I had to do to make it work:

The process took about two weeks from start to where I'm at now, and there are about 3000 lines of original code. If you want to look at my sources for this stuff, they are here.

Here's what's left to 'finish up':

Thanks to Max on alt.os.development for the original challenge and for answering my questions.