VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

Can a drive exist on a secondary master/slave without anything existing on the primary master? Or does this shift up to the primary connection from the OS and BIOS point of view?

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

Reply 1 of 10, by UselessSoftware

User metadata
Rank Newbie
Rank
Newbie

Yes you can do that.

Reply 2 of 10, by superfury

User metadata
Rank l33t++
Rank
l33t++

So which of the two happens? Does it appear on the secondary master/slave without any primary master/slave drives present(all returning 0s on reads)? Or does it move to the primary master and slave without a secondary master/slave present?

Will software still detect it if there's only a secondary master/slave?

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

Reply 3 of 10, by UselessSoftware

User metadata
Rank Newbie
Rank
Newbie
superfury wrote on 2020-08-25, 19:04:

So which of the two happens? Does it appear on the secondary master/slave without any primary master/slave drives present(all returning 0s on reads)? Or does it move to the primary master and slave without a secondary master/slave present?

I stealth edited quickly after I realized that was ambiguous. You can have it appear on the secondary without a primary present.

Reply 4 of 10, by superfury

User metadata
Rank l33t++
Rank
l33t++

Now I'm trying to boot the Hiren's boot CD 7.8 on UniPCemu, but it looks like it won't continue at some point reading some sector from the floppy disk image on the CD-ROM to 0070:0018?

I see it's reading the ATA status register for the CD-ROM drive(at the secondary master), but the status register returns 0x00(since it's been nuked with a SRST).

I see it read the status register a bunch of times, as well as writing the drive/head register with the value 0xA0 in between?

Perhaps the read request by the MS-DOS kernel isn't successfully returning for some reason? It keeps trying to read one sector to said location(according to the registers at said point in time)?

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

Reply 5 of 10, by superfury

User metadata
Rank l33t++
Rank
l33t++

Booting the Windows 98 OEM setup CD-ROM shows the startup menu. I choose to boot from CD-ROM, after which it says "Starting MS-DOS..." and then asks me for the location of COMMAND.COM?

It still seems to have an issue with reading the CD-ROM it seems? Or the boot drive(CD-ROM floppy disk image) in general? This happens with multiple MS-DOS based CD-ROM distribution disks?

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

Reply 6 of 10, by superfury

User metadata
Rank l33t++
Rank
l33t++

Does anyone know what the correct response is if a ATA controller plug doesn't have anything connected to it(no master or slave present)?

What do writes to e.g. port 1F0-1F7 and 3F6 and reads from ports 1F0-1F7 and 3F6 return?

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

Reply 7 of 10, by superfury

User metadata
Rank l33t++
Rank
l33t++

I've currently adjusted it as follows:
- Writes without any master/slave are ignored.
- Commands without any drive are ignored.
- Reads from ports x0-x5 return 0 without any master or slave present.
- Drive/head and status float the bus without any master or slave present.
- (Alternate) Status register without valid drive selected gives 0(overridden by the above to become floating).

That's what's now happening with regards to drive detection.

One thing I just added is that SRST will only affect CD-ROM drives in a limited way: they keep being ready, but set the signature and error register becomes 1. All other statuses stay that way(not affecting any other parameters of the drive, nor resetting the currently running command).
That's done, according to https://wiki.osdev.org/ATA_PIO_Mode .

The bootable MS-DOS based CD-ROMs now properly boot again?

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

Reply 8 of 10, by superfury

User metadata
Rank l33t++
Rank
l33t++

Are CD-ROM drives supposed to become not ready until receiving an ATAPI command(either identify device or a packet command) when SRST is raised?

Because the BIOS' CD-ROM driver for the i430fx seems to require that DRDY keeps being set after raising SRST? Otherwise, it won't send ATAPI commands anymore?

SFF8020i says this about that:

3. The functionality of the DRDY and DSC bits shall be restored on the first command following an SRST

What does it mean by that? What happens to them when SRST is raised and afterwards?

If SRST is supposed to clear DRDY, then the CD-ROM driver that's in the BIOS is faulty: it seems to require DRDY to send ATAPI commands(command A0, the Packet command)?

Edit: Hmm... Looking at Bochs' harddrv.cpp line 2628 (https://sourceforge.net/p/bochs/code/HEAD/tre … arddrv.cc#l2628 ), I see that it does always set DRDY, even with ATAPI drives?

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

Reply 9 of 10, by superfury

User metadata
Rank l33t++
Rank
l33t++

Hmmm... When the Hiren's boot CD 7.8 is inserted and running mini Windows 98 off the 22MB RAM drive, it runs without issues in both emulators, as long as there's no CD-ROM inserted? My Computer will start in Bochs when the CD-ROM isn't inserted or ejected? But when any CD-ROM is inserted, the program crashes? That happens in both Bochs and UniPCemu?

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

Reply 10 of 10, by superfury

User metadata
Rank l33t++
Rank
l33t++

Could it be that SRST and DEVICE RESET(08h) only mask the status register bits with 90h when used, until a ATAPI command is received or finished(depending on the command)? Then it gives all bits again?

Edit: Even changing it to work like that, SRST making it non-ready (only busy and DSC get set, all others masked off) still fails the boot process from CD-ROM emulating floppy on the i430fx? Now, even the CD-ROM drivers fail to load on Hiren's boot CD 7.8?

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