Skip to content

Commit

Permalink
Fix for non-OEM BIOS
Browse files Browse the repository at this point in the history
  • Loading branch information
tsowell committed Jun 1, 2020
1 parent c3e9a5a commit 97686ea
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions kernel/arch/dreamcast/hardware/cdrom.c
Expand Up @@ -448,10 +448,16 @@ int cdrom_init() {

/* Reactivate drive: send the BIOS size and then read each
word across the bus so the controller can verify it. */
*react = 0x1fffff;

for(p = 0; p < 0x200000 / sizeof(bios[0]); p++) {
(void)bios[p];
if((*(uint16 *)0xa0000000) == 0xe6ff) {
*react = 0x3ff;
for(p = 0; p < 0x400 / sizeof(bios[0]); p++) {
(void)bios[p];
}
} else {
*react = 0x1fffff;
for(p = 0; p < 0x200000 / sizeof(bios[0]); p++) {
(void)bios[p];
}
}

mutex_lock(&_g1_ata_mutex);
Expand Down

0 comments on commit 97686ea

Please sign in to comment.