diff --git a/makefile b/makefile index 372dbe41..d9a23ac5 100644 --- a/makefile +++ b/makefile @@ -839,3 +839,4 @@ swtp6800mp-a2 : ${BIN}swtp6800mp-a2${EXE} ${BIN}swtp6800mp-a2${EXE} : ${SWTP6800MP-A2} ${SIM} ${MKDIRBIN} ${CC} ${SWTP6800MP-A2} ${SIM} ${SWTP6800_OPT} $(CC_OUTSPEC) ${LDFLAGS} + diff --git a/swtp6800/common/dc-4.c b/swtp6800/common/dc-4.c index 80cfd54d..b4aff57d 100644 --- a/swtp6800/common/dc-4.c +++ b/swtp6800/common/dc-4.c @@ -551,18 +551,18 @@ int32 fdcdata(int32 io, int32 data) } return 0; } else { /* read byte from fdc */ - if (dsk_unit[cur_dsk].pos < SECSIZ) { /* copy bytes from buffer */ - if (dsk_dev.dctrl & DEBUG_read) - printf("\nfdcdata: Reading byte %d u3=%02X", dsk_unit[cur_dsk].pos, dsk_unit[cur_dsk].u3); - val = *((uint8 *)(dsk_unit[cur_dsk].filebuf) + dsk_unit[cur_dsk].pos) & 0xFF; - dsk_unit[cur_dsk].pos++; /* step counter */ - if (dsk_unit[cur_dsk].pos == SECSIZ) { /* done? */ - dsk_unit[cur_dsk].u3 &= ~(BUSY | DRQ); /* clear flags */ - if (dsk_dev.dctrl & DEBUG_write) - printf("\nfdcdata: Sector read complete"); - } - return val; - } else + if (dsk_unit[cur_dsk].pos < SECSIZ) { /* copy bytes from buffer */ + if (dsk_dev.dctrl & DEBUG_read) + printf("\nfdcdata: Reading byte %d u3=%02X", dsk_unit[cur_dsk].pos, dsk_unit[cur_dsk].u3); + val = *((uint8 *)(dsk_unit[cur_dsk].filebuf) + dsk_unit[cur_dsk].pos) & 0xFF; + dsk_unit[cur_dsk].pos++; /* step counter */ + if (dsk_unit[cur_dsk].pos == SECSIZ) { /* done? */ + dsk_unit[cur_dsk].u3 &= ~(BUSY | DRQ); /* clear flags */ + if (dsk_dev.dctrl & DEBUG_write) + printf("\nfdcdata: Sector read complete"); + } + return val; + } else return 0; } } diff --git a/swtp6800/common/mp-s.c b/swtp6800/common/mp-s.c index 6c9c12a3..13ba3b12 100644 --- a/swtp6800/common/mp-s.c +++ b/swtp6800/common/mp-s.c @@ -1,4 +1,4 @@ -/* mp-s.c: SWTP MP-S serial I/O card emulator +/* mp-s.c: SWTP MP-S serial I/O card simulator Copyright (c) 2005-2011, William Beech @@ -188,6 +188,7 @@ int32 sio_reset (DEVICE *dptr) { sio_unit.buf = 0; // Data buffer sio_unit.u3 = 0x02; // Status buffer + sio_unit.wait = 10000; sim_activate (&sio_unit, sio_unit.wait); // activate unit return SCPE_OK; } @@ -198,8 +199,8 @@ int32 ptr_reset (DEVICE *dptr) { ptr_unit.buf = 0; ptr_unit.u3 = 0x02; - sim_activate (&ptr_unit, ptr_unit.wait); // activate unit -// sim_cancel (&ptr_unit); // deactivate unit +// sim_activate (&ptr_unit, ptr_unit.wait); // activate unit + sim_cancel (&ptr_unit); // deactivate unit return SCPE_OK; } @@ -209,8 +210,8 @@ int32 ptp_reset (DEVICE *dptr) { ptp_unit.buf = 0; ptp_unit.u3 = 0x02; - sim_activate (&ptp_unit, ptp_unit.wait); // activate unit -// sim_cancel (&ptp_unit); // deactivate unit +// sim_activate (&ptp_unit, ptp_unit.wait); // activate unit + sim_cancel (&ptp_unit); // deactivate unit return SCPE_OK; } diff --git a/swtp6800/swtp6800/swtp_defs.h b/swtp6800/swtp6800/swtp_defs.h index 6b286405..2466a5c0 100644 --- a/swtp6800/swtp6800/swtp_defs.h +++ b/swtp6800/swtp6800/swtp_defs.h @@ -25,7 +25,7 @@ Copyright (c) 2005-2012, William Beech */ #include -#include "sim_defs.h" // simulator defs +#include "sim_defs.h" // simulator defs /* Memory */