From e261a2fa283ef6964a2b22f1926b3e344c1c8275 Mon Sep 17 00:00:00 2001 From: Patrick Linstruth Date: Tue, 10 Dec 2019 21:21:30 -0800 Subject: [PATCH] AltairZ80: Properly set current Tarbell drive and drive not ready flag on reset --- AltairZ80/s100_tarbell.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/AltairZ80/s100_tarbell.c b/AltairZ80/s100_tarbell.c index 0e790200..dd357082 100644 --- a/AltairZ80/s100_tarbell.c +++ b/AltairZ80/s100_tarbell.c @@ -317,7 +317,7 @@ t_stat tarbell_reset(DEVICE *dptr) } } - /* Enable PROM */ + pInfo->currentDrive = 0; pInfo->promEnabled = TRUE; pInfo->writeProtect = FALSE; @@ -339,9 +339,11 @@ t_stat tarbell_reset(DEVICE *dptr) pInfo->FD1771[i].writeTrkActive = FALSE; pInfo->FD1771[i].addrActive = FALSE; pInfo->FD1771[i].headLoaded = FALSE; - pInfo->FD1771[i].driveNotReady = TRUE; + pInfo->FD1771[i].driveNotReady = ((pInfo->uptr[i] == NULL) || (pInfo->uptr[i]->fileref == NULL)) ? TRUE : FALSE; } + sim_debug(STATUS_MSG, &tarbell_dev, TARBELL_SNAME ": reset controller." NLP); + return SCPE_OK; }