diff options
| author | Harley Travis <harleytravis123@outlook.com> | 2026-06-19 21:10:33 -0500 |
|---|---|---|
| committer | Harley Travis <harleytravis123@outlook.com> | 2026-06-19 21:10:33 -0500 |
| commit | d9ed5989bd27bc00baf7d9fad0e8a2800d6e1afe (patch) | |
| tree | 2cd702a315a40c354f9c7e3bc5cd473eb615322e | |
| parent | 924e224a9819a410b163c28a7673cef5dc494982 (diff) | |
| download | templeos-floppy-driver-d9ed5989bd27bc00baf7d9fad0e8a2800d6e1afe.tar.gz | |
Update readme
I have updated the readme to reflect the major changes to the driver code.
| -rw-r--r-- | ReadMe.TXT | 53 |
1 files changed, 23 insertions, 30 deletions
@@ -3,38 +3,31 @@ This software (including source code) is licensed under the BSD Zero Clause License. See the Copying.TXT file for details. These files contain the code required for the low-level floppy disk driver. -Currently, there is no block device code that implements this driver as I -find it a bit beyond my capabilities. +It is integrated with TempleOS block device API, allowing floppy disks to be +used as RedSea volumes. + +The development history of this project can be found at: +https://git.yoshi128k.tk/cgit/templeos-floppy-driver To install the driver: -1. Copy KFloppy.HC, KFloppyA.HH, KFloppyB.HH, and KFloppyDMA.HC to ::/Kernel/ -2. In Kernel.PRJ(.Z), include KFloppyDMA.HC between KStart32 and KStart64; this -adds a buffer for DMA transfers to/from the floppy disk controller (see notes). -Also include KFloppyA.HH and KFloppy.HC at the end of the #includes. -4. In ::/StartOS.HC, include KFLoppyB.HH after KernelC.HH; this exports the -driver functions for use by your own programs. - -On startup, you will have to unmask IRQ6 and point its interrupt vector to my -IRQ handler, FDCIrqHandler. -To do this, write 0xB8 to port 0x21, then use IntEntrySet to set the vector for -the aforementioned int (this may be included in the startup files). - -In HolyC, that would be: -OutU8(0x21,0xB8); // Unmask IRQ6 -IntEntrySet(0x26,&FDCIrqHandler); // IRQ mode is the default - -Use FDCReset to initialize the drive (make sure a disk is inserted; it does not -test for one before doing things). - -FDCSeek does what it says. - -FDCRead/FDCReadMulti will read data from the disk. -FDCWrite/FDCWriteMulti will write data to the disk. -Data that has been read or is to be written goes in FDC_DMA. -(The FDC*Multi funs use multi-track mode; data will be read from both heads) - -The result of seeks, recalibrations, and data xfers will be displayed in the -Adam Task. +1. #include Install.HC in a terminal window; it will copy all the source code +and patches to the proper directories on your disk. +2. Refer to Instructions.TXT for instructions on applying the patches and +installing the driver, but do not do the Adam patches yet! Since I have not yet +implemented any sort of patch-like utility, you will have to do the patches +manually. Luckily, all of the needed modifications can be done by commenting out +the sections of code mentioned and/or #including the patch files. +3. Recompile the kernel with BootHDIns(). +4. Only when the kernel has been patched and recompiled can you do the Adam +patches, at which point you can run BootHDIns() again if you want to mount your +floppy drive(s) on startup. + +Your system will have been patched to unmask IRQ6 and update the IDT to point it +to an appropriate stub. + +The low-level functions of the driver will also be made available for your use, +but using the BlkRead() and BlkWrite() functions is preferred if you wish to do +low-level reading and writing. --A note about DMA-- If things went to plan, I would have use PIO to do data transfers to and from |
