Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

floppy.h File Reference

#include "dma.h"
#include "irq.h"
#include "blockdev.h"

Include dependency graph for floppy.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Compounds

class  Floppy
 This is the floppy disk driver. More...


Functions

void floppy_init (void *floppy)
void floppy_deinit (void *floppy)
bool floppy_read_block (void *floppy, unsigned int block, void *data)
bool floppy_write_block (void *floppy, unsigned int block, void *data)
void floppy_interrupt_handler (volatile Handler_registers &registers)
void floppy_timer_handler (volatile Handler_registers &registers)

Variables

Floppy floppy
const unsigned int DG144_HEADS = 2
const unsigned int DG144_TRACKS = 80
const unsigned int DG144_SPT = 18
const unsigned int DG144_GAP3FMT = 0x54
const unsigned int DG144_GAP3RW = 0x1b
const unsigned int DG168_HEADS = 2
const unsigned int DG168_TRACKS = 80
const unsigned int DG168_SPT = 21
const unsigned int DG168_GAP3FMT = 0x0c
const unsigned int DG168_GAP3RW = 0x1c
const unsigned int FDC_DOR = 0x3f2
const unsigned int FDC_MSR = 0x3f4
const unsigned int FDC_DRS = 0x3f4
const unsigned int FDC_DATA = 0x3f5
const unsigned int FDC_DIR = 0x3f7
const unsigned int FDC_CCR = 0x3f7
const unsigned int CMD_SPECIFY = 0x03
const unsigned int CMD_WRITE = 0xc5
const unsigned int CMD_READ = 0xe6
const unsigned int CMD_RECAL = 0x07
const unsigned int CMD_SENSEI = 0x08
const unsigned int CMD_FORMAT = 0x4d
const unsigned int CMD_SEEK = 0x0f
const unsigned int CMD_VERSION = 0x10


Function Documentation

void floppy_deinit void *    floppy [inline]
 

void floppy_init void *    floppy [inline]
 

void floppy_interrupt_handler volatile Handler_registers   registers [inline]
 

Interrupt handler called to signal the completion of an operation.

bool floppy_read_block void *    floppy,
unsigned int    block,
void *    data
[inline]
 

void floppy_timer_handler volatile Handler_registers   registers [inline]
 

Timer handler that is called at a regular interval.

bool floppy_write_block void *    floppy,
unsigned int    block,
void *    data
[inline]
 


Variable Documentation

const unsigned int CMD_FORMAT = 0x4d
 

format track (+ MFM).

const unsigned int CMD_READ = 0xe6
 

read data (+ MT,MFM,SK).

const unsigned int CMD_RECAL = 0x07
 

recalibrate.

const unsigned int CMD_SEEK = 0x0f
 

seek track.

const unsigned int CMD_SENSEI = 0x08
 

sense interrupt status.

const unsigned int CMD_SPECIFY = 0x03
 

specify drive timings.

const unsigned int CMD_VERSION = 0x10
 

FDC version.

const unsigned int CMD_WRITE = 0xc5
 

write data (+ MT,MFM).

const unsigned int DG144_GAP3FMT = 0x54
 

gap3 while formatting (1.44M).

const unsigned int DG144_GAP3RW = 0x1b
 

gap3 while reading/writing (1.44M).

const unsigned int DG144_HEADS = 2
 

heads per drive (1.44M).

const unsigned int DG144_SPT = 18
 

sectors per track (1.44M).

const unsigned int DG144_TRACKS = 80
 

number of tracks (1.44M).

const unsigned int DG168_GAP3FMT = 0x0c
 

gap3 while formatting (1.68M).

const unsigned int DG168_GAP3RW = 0x1c
 

gap3 while reading/writing (1.68M).

const unsigned int DG168_HEADS = 2
 

heads per drive (1.68M).

const unsigned int DG168_SPT = 21
 

sectors per track (1.68M).

const unsigned int DG168_TRACKS = 80
 

number of tracks (1.68M).

const unsigned int FDC_CCR = 0x3f7
 

Config Control Register (output).

const unsigned int FDC_DATA = 0x3f5
 

Data Register.

const unsigned int FDC_DIR = 0x3f7
 

Digital Input Register (input).

const unsigned int FDC_DOR = 0x3f2
 

Digital Output Register.

const unsigned int FDC_DRS = 0x3f4
 

Data Rate Select Register (output).

const unsigned int FDC_MSR = 0x3f4
 

Main Status Register (input).

Floppy floppy
 


Torsion Operating System, Copyright (C) 2000-2002 Dan Helfman