AltairZ80: wd179x: clean up / correct usage of status.
This commit is contained in:
parent
d47216212c
commit
c6e9acab8a
1 changed files with 11 additions and 13 deletions
|
@ -570,7 +570,6 @@ uint8 WD179X_Read(const uint32 Addr)
|
||||||
WD179X_DRIVE_INFO *pDrive;
|
WD179X_DRIVE_INFO *pDrive;
|
||||||
uint32 flags = 0;
|
uint32 flags = 0;
|
||||||
uint32 readlen;
|
uint32 readlen;
|
||||||
int status = SCPE_OK;
|
|
||||||
|
|
||||||
if (wd179x_info->sel_drive >= WD179X_MAX_DRIVES) {
|
if (wd179x_info->sel_drive >= WD179X_MAX_DRIVES) {
|
||||||
return 0xFF;
|
return 0xFF;
|
||||||
|
@ -651,14 +650,14 @@ uint8 WD179X_Read(const uint32 Addr)
|
||||||
if (pDrive->uptr->fileref == NULL) {
|
if (pDrive->uptr->fileref == NULL) {
|
||||||
sim_printf(".fileref is NULL!\n");
|
sim_printf(".fileref is NULL!\n");
|
||||||
} else {
|
} else {
|
||||||
status = wd179x_sectRead(pDrive,
|
wd179x_sectRead(pDrive,
|
||||||
pDrive->track,
|
pDrive->track,
|
||||||
wd179x_info->fdc_head,
|
wd179x_info->fdc_head,
|
||||||
wd179x_info->fdc_sector,
|
wd179x_info->fdc_sector,
|
||||||
sdata.raw,
|
sdata.raw,
|
||||||
WD179X_SECTOR_LEN_BYTES,
|
WD179X_SECTOR_LEN_BYTES,
|
||||||
&flags,
|
&flags,
|
||||||
&readlen);
|
&readlen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -878,7 +877,6 @@ static uint8 Do1793Command(uint8 cCommand)
|
||||||
WD179X_DRIVE_INFO *pDrive;
|
WD179X_DRIVE_INFO *pDrive;
|
||||||
uint32 flags = 0;
|
uint32 flags = 0;
|
||||||
uint32 readlen;
|
uint32 readlen;
|
||||||
int status;
|
|
||||||
|
|
||||||
if (wd179x_info->sel_drive >= WD179X_MAX_DRIVES) {
|
if (wd179x_info->sel_drive >= WD179X_MAX_DRIVES) {
|
||||||
return 0xFF;
|
return 0xFF;
|
||||||
|
@ -1040,7 +1038,7 @@ static uint8 Do1793Command(uint8 cCommand)
|
||||||
wd179x_info->intrq = 1;
|
wd179x_info->intrq = 1;
|
||||||
wd179x_info->drq = 0;
|
wd179x_info->drq = 0;
|
||||||
} else {
|
} else {
|
||||||
status = wd179x_sectRead(pDrive,
|
wd179x_sectRead(pDrive,
|
||||||
pDrive->track,
|
pDrive->track,
|
||||||
wd179x_info->fdc_head,
|
wd179x_info->fdc_head,
|
||||||
wd179x_info->fdc_sector,
|
wd179x_info->fdc_sector,
|
||||||
|
@ -1400,7 +1398,7 @@ static t_stat wd179x_sectWrite(WD179X_DRIVE_INFO* pDrive,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (SCPE_OK);
|
return (status);
|
||||||
}
|
}
|
||||||
|
|
||||||
static t_stat wd179x_trackWrite(WD179X_DRIVE_INFO* pDrive,
|
static t_stat wd179x_trackWrite(WD179X_DRIVE_INFO* pDrive,
|
||||||
|
@ -1471,6 +1469,6 @@ static t_stat wd179x_trackWrite(WD179X_DRIVE_INFO* pDrive,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return(SCPE_OK);
|
return(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue