FDC: Fix a warning and the incorrect status flags.

This commit is contained in:
OBattler
2025-09-27 13:28:23 +02:00
parent 836f855683
commit fe0277c031
2 changed files with 3 additions and 4 deletions

View File

@@ -184,7 +184,7 @@ fdc_ctrl_reset(void *priv)
{
fdc_t *fdc = (fdc_t *) priv;
fdc->stat = 0x10;
fdc->stat = 0x80;
fdc->pnum = fdc->ptot = 0;
fdc->st0 = 0;
fdc->head = 0;
@@ -1211,7 +1211,7 @@ fdc_write(uint16_t addr, uint8_t val, void *priv)
case 0x07: /* Recalibrate */
fdc->rw_drive = fdc->params[0] & 3;
fdc->stat = 0x10 | (1 << real_drive(fdc, fdc->drive));
fdc->stat = (1 << real_drive(fdc, fdc->drive));
if (!(fdc->flags & FDC_FLAG_PCJR))
fdc->stat |= 0x80;
fdc->st0 = fdc->params[0] & 3;
@@ -1266,7 +1266,7 @@ fdc_write(uint16_t addr, uint8_t val, void *priv)
break;
case 0x0f: /* Seek */
fdc->rw_drive = fdc->params[0] & 3;
fdc->stat = 0x10 | (1 << fdc->drive);
fdc->stat = (1 << fdc->drive);
if (!(fdc->flags & FDC_FLAG_PCJR))
fdc->stat |= 0x80;
fdc->head = 0; /* TODO: See if this is correct. */

View File

@@ -176,7 +176,6 @@ static int16_t *
load_wav(const char *filename, int *sample_count)
{
FILE *f = NULL;
char full_path[2048];
if ((filename == NULL) || (strlen(filename) == 0))
return NULL;