More minor floppy changes.
This commit is contained in:
@@ -197,7 +197,6 @@ fdc_ctrl_reset(void *p)
|
|||||||
fdc->st0 = 0;
|
fdc->st0 = 0;
|
||||||
fdc->lock = 0;
|
fdc->lock = 0;
|
||||||
fdc->head = 0;
|
fdc->head = 0;
|
||||||
fdc->abort = 0;
|
|
||||||
fdc->step = 0;
|
fdc->step = 0;
|
||||||
if (!(fdc->flags & FDC_FLAG_AT))
|
if (!(fdc->flags & FDC_FLAG_AT))
|
||||||
fdc->rate = 2;
|
fdc->rate = 2;
|
||||||
@@ -679,10 +678,9 @@ fdc_io_command_phase1(fdc_t *fdc, int out)
|
|||||||
fdc->stat = out ? 0x90 : 0x50;
|
fdc->stat = out ? 0x90 : 0x50;
|
||||||
if ((fdc->flags & FDC_FLAG_PCJR) || !fdc->dma)
|
if ((fdc->flags & FDC_FLAG_PCJR) || !fdc->dma)
|
||||||
fdc->stat |= 0x20;
|
fdc->stat |= 0x20;
|
||||||
if (out) {
|
if (out)
|
||||||
fdc->written = 0;
|
|
||||||
fdc->pos = 0;
|
fdc->pos = 0;
|
||||||
} else
|
else
|
||||||
fdc->inread = 1;
|
fdc->inread = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -706,7 +704,7 @@ fdc_sis(fdc_t *fdc)
|
|||||||
fdc->reset_stat--;
|
fdc->reset_stat--;
|
||||||
} else {
|
} else {
|
||||||
if (fdc->fintr) {
|
if (fdc->fintr) {
|
||||||
fdc->res[9] = (fdc->st0 & ~0x04) | (fdd_get_head(fdc->drive & 0x03) ? 4 : 0);
|
fdc->res[9] = (fdc->st0 & ~0x04) | (fdd_get_head(real_drive(fdc, fdc->drive)) ? 4 : 0);
|
||||||
fdc->fintr = 0;
|
fdc->fintr = 0;
|
||||||
} else {
|
} else {
|
||||||
fdc->res[10] = 0x80;
|
fdc->res[10] = 0x80;
|
||||||
@@ -1132,7 +1130,6 @@ fdc_write(uint16_t addr, uint8_t val, void *priv)
|
|||||||
fdc->head = (fdc->params[0] & 4) ? 1 : 0;
|
fdc->head = (fdc->params[0] & 4) ? 1 : 0;
|
||||||
fdd_set_head(real_drive(fdc, fdc->drive), (fdc->params[0] & 4) ? 1 : 0);
|
fdd_set_head(real_drive(fdc, fdc->drive), (fdc->params[0] & 4) ? 1 : 0);
|
||||||
fdc->gap = fdc->params[3];
|
fdc->gap = fdc->params[3];
|
||||||
fdc->dtl = 4000000;
|
|
||||||
fdc->format_sectors = fdc->params[2];
|
fdc->format_sectors = fdc->params[2];
|
||||||
fdc->format_n = fdc->params[1];
|
fdc->format_n = fdc->params[1];
|
||||||
fdc->format_state = 1;
|
fdc->format_state = 1;
|
||||||
@@ -1990,10 +1987,6 @@ int fdc_getdata(fdc_t *fdc, int last)
|
|||||||
int data;
|
int data;
|
||||||
|
|
||||||
if ((fdc->flags & FDC_FLAG_PCJR) || !fdc->dma) {
|
if ((fdc->flags & FDC_FLAG_PCJR) || !fdc->dma) {
|
||||||
if (fdc->written) {
|
|
||||||
fdc_overrun(fdc);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if ((fdc->flags & FDC_FLAG_PCJR) || !fdc->fifo) {
|
if ((fdc->flags & FDC_FLAG_PCJR) || !fdc->fifo) {
|
||||||
data = fdc->dat;
|
data = fdc->dat;
|
||||||
|
|
||||||
@@ -2022,7 +2015,6 @@ int fdc_getdata(fdc_t *fdc, int last)
|
|||||||
fdc->tc = 1;
|
fdc->tc = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
fdc->written = 0;
|
|
||||||
return data & 0xff;
|
return data & 0xff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ extern int fdc_type;
|
|||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t dor, stat, command, processed_cmd, dat, st0, swap;
|
uint8_t dor, stat, command, processed_cmd, dat, st0, swap, dtl;
|
||||||
uint8_t swwp, disable_write;
|
uint8_t swwp, disable_write;
|
||||||
uint8_t params[8], res[11];
|
uint8_t params[8], res[11];
|
||||||
uint8_t specify[2];
|
uint8_t specify[2];
|
||||||
@@ -53,11 +53,9 @@ typedef struct {
|
|||||||
int pnum, ptot;
|
int pnum, ptot;
|
||||||
int rate, reset_stat;
|
int rate, reset_stat;
|
||||||
int lock, perp;
|
int lock, perp;
|
||||||
int abort;
|
|
||||||
int format_state, format_n;
|
int format_state, format_n;
|
||||||
int tc, written;
|
|
||||||
int step, seek_dir;
|
int step, seek_dir;
|
||||||
int noprec;
|
int tc, noprec;
|
||||||
|
|
||||||
int data_ready, inread;
|
int data_ready, inread;
|
||||||
int bitcell_period, enh_mode;
|
int bitcell_period, enh_mode;
|
||||||
@@ -67,7 +65,7 @@ typedef struct {
|
|||||||
int fifo, tfifo;
|
int fifo, tfifo;
|
||||||
int fifobufpos, drv2en;
|
int fifobufpos, drv2en;
|
||||||
|
|
||||||
int gap, dtl;
|
int gap;
|
||||||
int enable_3f1, format_sectors;
|
int enable_3f1, format_sectors;
|
||||||
int max_track, mfm;
|
int max_track, mfm;
|
||||||
int deleted, wrong_am;
|
int deleted, wrong_am;
|
||||||
|
|||||||
Reference in New Issue
Block a user