mirror of
https://github.com/simh/simh.git
synced 2026-02-27 09:09:46 +00:00
AltairZ80: s100_hdc1001: Resolve CID 1515006.
This commit is contained in:
@@ -428,7 +428,12 @@ static uint8 HDC1001_Write(const uint32 Addr, uint8 cData)
|
||||
sim_debug(VERBOSE_MSG, &hdc1001_dev,DEV_NAME ": " ADDRESS_FORMAT
|
||||
" WR TF[DATA 0x%03x]=0x%02x\n", PCX, hdc1001_info->secbuf_index, cData);
|
||||
hdc1001_info->secbuf_index++;
|
||||
if (hdc1001_info->secbuf_index == (pDrive->xfr_nsects * pDrive->sectsize)) HDC1001_doCommand();
|
||||
if (hdc1001_info->secbuf_index == (pDrive->xfr_nsects * pDrive->sectsize)) {
|
||||
if (SCPE_OK != HDC1001_doCommand()) {
|
||||
sim_debug(ERROR_MSG, &hdc1001_dev,DEV_NAME ": " ADDRESS_FORMAT
|
||||
" HDC1001_doCommand() failed.\n", PCX);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case TF_SDH:
|
||||
hdc1001_info->sel_drive = (cData >> 3) & 0x03;
|
||||
@@ -489,7 +494,10 @@ static uint8 HDC1001_Write(const uint32 Addr, uint8 cData)
|
||||
|
||||
/* Everything except Write commands are executed immediately. */
|
||||
if (cmd != HDC1001_CMD_WRITE_SECT) {
|
||||
HDC1001_doCommand();
|
||||
if (SCPE_OK != HDC1001_doCommand()) {
|
||||
sim_debug(ERROR_MSG, &hdc1001_dev,DEV_NAME ": " ADDRESS_FORMAT
|
||||
" HDC1001_doCommand() failed.\n", PCX);
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* Writes will be executed once the proper number of bytes
|
||||
|
||||
Reference in New Issue
Block a user