summaryrefslogtreecommitdiff
path: root/ReadMe.TXT
blob: 9e2970a9d0c28967f33affdc96544bab7c529a05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
These files contain the code required for the low-level floppy disk driver.
Currently, there is no block device code that implements this driver.

System source files from my system are included as a reference.

To install the driver:
1. Copy Floppy.HC and Floppy.HH to the Kernel directory
2. Copy the headers at the bottom of the provided KernelC.HC into *your* KernelC.
3. Add "U8 FDC_DMA[0x4800];" to the bottom of KStart32.HC; This is the DMA buffer for the floppy disk (yeah, I know, DMA = blasphemy, but it's more reliable than PIO while being just as simple).
4. Add Floppy.HC and Floppy.HH to Kernel.PRJ so that they will be compiled into the kernel.

On startup, you will have to unmask IRQ6 and point its int to the IRQ handler, FDCIrqHandler.
To do this, write 0xB8 to port 0x21, then use IntEntrySet to set the vector for the aforementioned int.
In HolyC, that would be:
OutU8(0x21,0xB8);
IntEntrySet(0x26,&FDCIrqHandler,IDTET_IRQ);

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.