Large changes to configuration files again (the old ones might break, be careful);
Applied the mainline PCem slight CPU emulation speedup commit; Added emulation of removable SCSI hard disks; CD-ROM image handler now uses C FILE's (with the 64-bit size calls) instead of C++ iostreams, ISO images bigger than 2 GB should work properly again; Split RLL/ESDI and XT IDE disks to their own bus types; Turned status bar pane meaning and hard disks and CD-ROM BUS numbers to #define's; Other miscellaneous cleanups.
This commit is contained in:
47
src/fdc.c
47
src/fdc.c
@@ -957,7 +957,7 @@ bad_command:
|
||||
fdc.stat = 0x50;
|
||||
}
|
||||
disctime = 0;
|
||||
update_status_bar_icon(fdc.drive, 1);
|
||||
update_status_bar_icon(SB_FLOPPY | fdc.drive, 1);
|
||||
readflash = 1;
|
||||
fdc.inread = 1;
|
||||
break;
|
||||
@@ -1003,7 +1003,7 @@ bad_command:
|
||||
disc_writesector(fdc.drive, fdc.sector, fdc.params[1], fdc.head, fdc.rate, fdc.params[4]);
|
||||
disctime = 0;
|
||||
fdc.written = 0;
|
||||
update_status_bar_icon(fdc.drive, 1);
|
||||
update_status_bar_icon(SB_FLOPPY | fdc.drive, 1);
|
||||
fdc.pos = 0;
|
||||
if (fdc.pcjr)
|
||||
fdc.stat = 0xb0;
|
||||
@@ -1036,7 +1036,7 @@ bad_command:
|
||||
disc_comparesector(fdc.drive, fdc.sector, fdc.params[1], fdc.head, fdc.rate, fdc.params[4]);
|
||||
disctime = 0;
|
||||
fdc.written = 0;
|
||||
update_status_bar_icon(fdc.drive, 1);
|
||||
update_status_bar_icon(SB_FLOPPY | fdc.drive, 1);
|
||||
fdc.pos = 0;
|
||||
if (fdc.pcjr || !fdc.dma)
|
||||
{
|
||||
@@ -1080,7 +1080,7 @@ bad_command:
|
||||
fdc.stat = 0x50;
|
||||
}
|
||||
disctime = 0;
|
||||
update_status_bar_icon(fdc.drive, 1);
|
||||
update_status_bar_icon(SB_FLOPPY | fdc.drive, 1);
|
||||
fdc.inread = 1;
|
||||
break;
|
||||
|
||||
@@ -1437,7 +1437,7 @@ void fdc_poll_common_finish(int compare, int st5)
|
||||
fdc.res[9]=fdc.sector;
|
||||
fdc.res[10]=fdc.params[4];
|
||||
fdc_log("Read/write finish (%02X %02X %02X %02X %02X %02X %02X)\n" , fdc.res[4], fdc.res[5], fdc.res[6], fdc.res[7], fdc.res[8], fdc.res[9], fdc.res[10]);
|
||||
update_status_bar_icon(fdc.drive, 0);
|
||||
update_status_bar_icon(SB_FLOPPY | fdc.drive, 0);
|
||||
paramstogo=7;
|
||||
}
|
||||
|
||||
@@ -1483,7 +1483,7 @@ void fdc_callback()
|
||||
return;
|
||||
|
||||
case 2: /*Read track*/
|
||||
update_status_bar_icon(fdc.drive, 1);
|
||||
update_status_bar_icon(SB_FLOPPY | fdc.drive, 1);
|
||||
fdc.eot[fdc.drive]--;
|
||||
fdc.read_track_sector.id.r++;
|
||||
if (!fdc.eot[fdc.drive] || fdc.tc)
|
||||
@@ -1643,7 +1643,7 @@ void fdc_callback()
|
||||
{
|
||||
fdc.sector++;
|
||||
}
|
||||
update_status_bar_icon(fdc.drive, 1);
|
||||
update_status_bar_icon(SB_FLOPPY | fdc.drive, 1);
|
||||
switch (discint)
|
||||
{
|
||||
case 5:
|
||||
@@ -1882,7 +1882,7 @@ void fdc_error(int st5, int st6)
|
||||
fdc.res[10]=0;
|
||||
break;
|
||||
}
|
||||
update_status_bar_icon(fdc.drive, 0);
|
||||
update_status_bar_icon(SB_FLOPPY | fdc.drive, 0);
|
||||
paramstogo=7;
|
||||
}
|
||||
|
||||
@@ -1940,36 +1940,6 @@ int fdc_data(uint8_t data)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (fdc.tc)
|
||||
{
|
||||
fdc_log("FDC read: TC\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (dma_channel_write(2, data) & DMA_OVER)
|
||||
{
|
||||
fdc_log("FDC read: DMA over\n");
|
||||
fdc.tc = 1;
|
||||
}
|
||||
|
||||
if (!fdc.fifo)
|
||||
{
|
||||
fdc.data_ready = 1;
|
||||
fdc.stat = 0xd0;
|
||||
}
|
||||
else
|
||||
{
|
||||
fdc_fifo_buf_advance();
|
||||
if (fdc.fifobufpos == 0)
|
||||
{
|
||||
/* We have wrapped around, means FIFO is over */
|
||||
fifo_count++;
|
||||
fdc_log("%04X: FIFO wrap around (threshold == %02X), DRQ sent\n", fifo_count, fdc.tfifo);
|
||||
fdc.data_ready = 1;
|
||||
fdc.stat = 0xd0;
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
result = dma_channel_write(2, data);
|
||||
|
||||
if (fdc.tc)
|
||||
@@ -1998,7 +1968,6 @@ int fdc_data(uint8_t data)
|
||||
fdc.stat = 0xd0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user