VOGONS


Getting UniPCemu up and running

Topic actions

Reply 80 of 81, by mr.cat

User metadata
Rank Member
Rank
Member

FWIW the P2/i440fx/patched Bochs combination seems ok with the latest commits.
SeaBIOS has trouble detecting the drives though (the boot menu is empty), that's starting with (UniPCemu) commit 52008e43 it looks like.
Tried it with multiple SeaBIOS versions too (with 0.3.0 being the oldest one) and they all fail in this manner (while they're ok with an older UniPCemu version).

So there's actually some difference between Bochs and SeaBIOS on how they do drive detection.
Ofc could be a timing issue yet again, as that seems to come up a lot...
SeaBIOS code for drive detection resides in ata_detect() in ata.c.

EDIT: reversing commit 52008e43 makes SeaBIOS able to boot again. So it's all about PCI vs. onboard priority?
There's four entries in the boot menu for some reason, even though there is only one CD image.

Last edited by mr.cat on 2022-04-11, 22:09. Edited 1 time in total.

Reply 81 of 81, by superfury

User metadata
Rank l33t++
Rank
l33t++
mr.cat wrote on 2022-04-10, 13:01:
FWIW the P2/i440fx/patched Bochs combination seems ok with the latest commits. SeaBIOS has trouble detecting the drives though ( […]
Show full quote

FWIW the P2/i440fx/patched Bochs combination seems ok with the latest commits.
SeaBIOS has trouble detecting the drives though (the boot menu is empty), that's starting with (UniPCemu) commit 52008e43 it looks like.
Tried it with multiple SeaBIOS versions too (with 0.3.0 being the oldest one) and they all fail in this manner (while they're ok with an older UniPCemu version).

So there's actually some difference between Bochs and SeaBIOS on how they do drive detection.
Ofc could be a timing issue yet again, as that seems to come up a lot...
SeaBIOS code for drive detection resides in ata_detect() in ata.c.

Took a quick look at your mentioned function. It looks like it should work (UniPCemu shouldn't have issues with what it's doing there). Indeed, it might be a timing issue once again, but I'm following specs on all of the defined IDE timings though (as far as they ARE documented, which basically is only the drive select, which actually is 400ns)?
The exact timings and base timings can be found in ide.c. They're mostly right at the top, which some timings being dynamic depending on seek times (seek times are added to base timings).
They're applies at the locations where ATA_FINISHREADYTIMING is used. ATAPI uses a constant timing instead (ATAPI_FINISHREADYTIMING). It's base timing is 6.0 for continuous sectors, 1.0 for ATAPI IDENTIFY PACKET DEVICE finishing and Set features/Set Multiple mode/Invalid command(or erroring out on ATA commands), 200.0/(205.0 for slave) for Execute Device Diagnostic, 5.0 for seek/recalibrate command, finally 200.0 for all remaining.

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io