First batch of Acer A1G fixes, fixes #3992.

This commit is contained in:
OBattler
2024-01-08 22:27:09 +01:00
parent 39258ecdeb
commit 3a62aa4ea7
6 changed files with 178 additions and 102 deletions

View File

@@ -2977,6 +2977,22 @@ ide_board_reset(int board)
ide_drive_reset(d);
}
void
ide_drives_set_shadow(void)
{
for (uint8_t d = 0; d < IDE_NUM; d++) {
if (ide_drives[d] == NULL)
continue;
if ((d & 1) && (ide_drives[d]->type == IDE_NONE) && (ide_drives[d ^ 1]->type != IDE_NONE)) {
ide_drives[d]->type = ide_drives[d ^ 1]->type | IDE_SHADOW;
if (ide_drives[d]->tf != NULL)
free(ide_drives[d]->tf);
ide_drives[d]->tf = ide_drives[d ^ 1]->tf;
}
}
}
/* Reset a standalone IDE unit. */
static void
ide_reset(UNUSED(void *priv))