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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* Generic floppy disk interface that communicates with the
|
||||
* other handlers.
|
||||
*
|
||||
* Version: @(#)floppy.c 1.0.5 2017/10/02
|
||||
* Version: @(#)floppy.c 1.0.5 2017/10/05
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "../rom.h"
|
||||
#include "../config.h"
|
||||
#include "../timer.h"
|
||||
#include "../win/win.h"
|
||||
#include "floppy.h"
|
||||
#include "floppy_86f.h"
|
||||
#include "floppy_fdi.h"
|
||||
@@ -157,7 +158,7 @@ void floppy_load(int drive, wchar_t *fn)
|
||||
drive_empty[drive] = 1;
|
||||
fdd_set_head(real_drive(drive), 0);
|
||||
memset(floppyfns[drive], 0, sizeof(floppyfns[drive]));
|
||||
update_status_bar_icon_state(drive, 1);
|
||||
StatusBarUpdateIconState(drive, 1);
|
||||
}
|
||||
|
||||
void floppy_close(int drive)
|
||||
@@ -176,7 +177,7 @@ void floppy_close(int drive)
|
||||
drives[drive].format = NULL;
|
||||
drives[drive].byteperiod = NULL;
|
||||
drives[drive].stop = NULL;
|
||||
update_status_bar_icon_state(drive, 1);
|
||||
StatusBarUpdateIconState(drive, 1);
|
||||
}
|
||||
|
||||
int floppy_notfound=0;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* data in the form of FM/MFM-encoded transitions) which also
|
||||
* forms the core of the emulator's floppy disk emulation.
|
||||
*
|
||||
* Version: @(#)floppy_86f.c 1.0.5 2017/10/02
|
||||
* Version: @(#)floppy_86f.c 1.0.5 2017/10/05
|
||||
*
|
||||
* Author: Miran Grca, <mgrca8@gmail.com>
|
||||
* Copyright 2016,2017 Miran Grca.
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "../dma.h"
|
||||
#include "../nvr.h"
|
||||
#include "../random.h"
|
||||
#include "../win/win.h"
|
||||
#include "floppy.h"
|
||||
#include "fdc.h"
|
||||
#include "fdd.h"
|
||||
@@ -3424,7 +3425,7 @@ void d86f_load(int drive, wchar_t *fn)
|
||||
}
|
||||
fclose(d86f[drive].f);
|
||||
d86f[drive].f = NULL;
|
||||
update_status_bar_icon_state(drive, 1);
|
||||
StatusBarUpdateIconState(drive, 1);
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user