Major changes to NVR, system initialization (pc.c), and what goes on in the Windows startup (win.c.) Not fully done yet, but good enough for a first commit.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
* Implementation of the NEC uPD-765 and compatible floppy disk
|
||||
* controller.
|
||||
*
|
||||
* Version: @(#)fdc.c 1.0.3 2017/09/24
|
||||
* Version: @(#)fdc.c 1.0.4 2017/10/05
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "../dma.h"
|
||||
#include "../pic.h"
|
||||
#include "../timer.h"
|
||||
#include "../win/win.h"
|
||||
#include "floppy.h"
|
||||
#include "fdc.h"
|
||||
#include "fdd.h"
|
||||
@@ -677,7 +678,7 @@ void fdc_write(uint16_t addr, uint8_t val, void *priv)
|
||||
floppytime = 128 * (1 << TIMER_SHIFT);
|
||||
timer_update_outstanding();
|
||||
floppyint=-1;
|
||||
update_status_bar_icon(SB_FLOPPY | 0, 0);
|
||||
StatusBarUpdateIcon(SB_FLOPPY | 0, 0);
|
||||
fdc_reset();
|
||||
}
|
||||
if (!fdd_get_flags(0))
|
||||
@@ -714,7 +715,7 @@ void fdc_write(uint16_t addr, uint8_t val, void *priv)
|
||||
|
||||
for (i = 0; i < FDD_NUM; i++)
|
||||
{
|
||||
update_status_bar_icon(SB_FLOPPY | i, 0);
|
||||
StatusBarUpdateIcon(SB_FLOPPY | i, 0);
|
||||
}
|
||||
|
||||
fdc_reset();
|
||||
@@ -987,7 +988,7 @@ bad_command:
|
||||
fdc.stat = 0x50;
|
||||
}
|
||||
floppytime = 0;
|
||||
update_status_bar_icon(SB_FLOPPY | fdc.drive, 1);
|
||||
StatusBarUpdateIcon(SB_FLOPPY | fdc.drive, 1);
|
||||
fdc.inread = 1;
|
||||
break;
|
||||
|
||||
@@ -1032,7 +1033,7 @@ bad_command:
|
||||
floppy_writesector(fdc.drive, fdc.sector, fdc.params[1], fdc.head, fdc.rate, fdc.params[4]);
|
||||
floppytime = 0;
|
||||
fdc.written = 0;
|
||||
update_status_bar_icon(SB_FLOPPY | fdc.drive, 1);
|
||||
StatusBarUpdateIcon(SB_FLOPPY | fdc.drive, 1);
|
||||
fdc.pos = 0;
|
||||
if (fdc.pcjr)
|
||||
fdc.stat = 0xb0;
|
||||
@@ -1065,7 +1066,7 @@ bad_command:
|
||||
floppy_comparesector(fdc.drive, fdc.sector, fdc.params[1], fdc.head, fdc.rate, fdc.params[4]);
|
||||
floppytime = 0;
|
||||
fdc.written = 0;
|
||||
update_status_bar_icon(SB_FLOPPY | fdc.drive, 1);
|
||||
StatusBarUpdateIcon(SB_FLOPPY | fdc.drive, 1);
|
||||
fdc.pos = 0;
|
||||
if (fdc.pcjr || !fdc.dma)
|
||||
{
|
||||
@@ -1109,7 +1110,7 @@ bad_command:
|
||||
fdc.stat = 0x50;
|
||||
}
|
||||
floppytime = 0;
|
||||
update_status_bar_icon(SB_FLOPPY | fdc.drive, 1);
|
||||
StatusBarUpdateIcon(SB_FLOPPY | fdc.drive, 1);
|
||||
fdc.inread = 1;
|
||||
break;
|
||||
|
||||
@@ -1466,7 +1467,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(SB_FLOPPY | fdc.drive, 0);
|
||||
StatusBarUpdateIcon(SB_FLOPPY | fdc.drive, 0);
|
||||
paramstogo=7;
|
||||
}
|
||||
|
||||
@@ -1512,7 +1513,7 @@ void fdc_callback(void *priv)
|
||||
return;
|
||||
|
||||
case 2: /*Read track*/
|
||||
update_status_bar_icon(SB_FLOPPY | fdc.drive, 1);
|
||||
StatusBarUpdateIcon(SB_FLOPPY | fdc.drive, 1);
|
||||
fdc.eot[fdc.drive]--;
|
||||
fdc.read_track_sector.id.r++;
|
||||
if (!fdc.eot[fdc.drive] || fdc.tc)
|
||||
@@ -1672,7 +1673,7 @@ void fdc_callback(void *priv)
|
||||
{
|
||||
fdc.sector++;
|
||||
}
|
||||
update_status_bar_icon(SB_FLOPPY | fdc.drive, 1);
|
||||
StatusBarUpdateIcon(SB_FLOPPY | fdc.drive, 1);
|
||||
switch (floppyint)
|
||||
{
|
||||
case 5:
|
||||
@@ -1911,7 +1912,7 @@ void fdc_error(int st5, int st6)
|
||||
fdc.res[10]=0;
|
||||
break;
|
||||
}
|
||||
update_status_bar_icon(SB_FLOPPY | fdc.drive, 0);
|
||||
StatusBarUpdateIcon(SB_FLOPPY | fdc.drive, 0);
|
||||
paramstogo=7;
|
||||
}
|
||||
|
||||
@@ -2142,7 +2143,7 @@ void fdc_sectorid(uint8_t track, uint8_t side, uint8_t sector, uint8_t size, uin
|
||||
fdc.res[8]=side;
|
||||
fdc.res[9]=sector;
|
||||
fdc.res[10]=size;
|
||||
update_status_bar_icon(SB_FLOPPY | fdc.drive, 0);
|
||||
StatusBarUpdateIcon(SB_FLOPPY | fdc.drive, 0);
|
||||
paramstogo=7;
|
||||
}
|
||||
|
||||
@@ -2198,7 +2199,7 @@ void fdc_hard_reset()
|
||||
|
||||
for (i = 0; i < FDD_NUM; i++)
|
||||
{
|
||||
update_status_bar_icon(SB_FLOPPY | i, 0);
|
||||
StatusBarUpdateIcon(SB_FLOPPY | i, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user