OAKCDROM.SYS not detecting generic ATAPI drive in UniPCemu?

Emulation of old PCs, PC hardware, or PC peripherals.

OAKCDROM.SYS not detecting generic ATAPI drive in UniPCemu?

Postby superfury » 2017-12-14 @ 11:02

I see it issuing an ATAPI Inquiry command, read the resulting data, read the error register(containing the result code), then aborting saying there are no drives? Since it's executed the Inquiry command, it should have detected it, but it doesn't for some reason?

The packet data that's received is filled with UniPCemu's detection data:
Code: Select all
      ATA[channel].Drive[drive].data[0] = 0x05; //We're a CD-ROM drive!
      ATA[channel].Drive[drive].data[1] = 0x80; //We're always removable!
      ATA[channel].Drive[drive].data[3] = ((2<<4)|(1)); //We're ATAPI version 2(high nibble, from SFF-8020i documentation we're based on), response data format 1?
      ATA[channel].Drive[drive].data[4] = 31; //Amount of bytes following this byte for the full buffer? Total 36, so 31 more.
      strcpy_padded(&ATA[channel].Drive[drive].data[8],8,(byte *)"UniPCemu"); //Vendor ID
      strcpy_padded(&ATA[channel].Drive[drive].data[16],16,(byte *)"Generic CD-ROM"); //Product ID
      strcpy_padded(&ATA[channel].Drive[drive].data[32],4,&FIRMWARE[1][0]); //Product revision level


The result is read in it's entirety, with no remaining data(the size being the lowest of the Inquiry Packet size and the cylinder registers specifying the maximum size).

So:
1. It issues the ATAPI PACKET command.
2. It sends the ATAPI PACKET.
3. It reads the result data(the above packet data, C/D and I/O is set, REL cleared).
4. It reads the entering result phase from the ATA STATUS register.
5. It reads the error code from the Sector Count register(Interrupt reason register), terminating the command(C/D and I/O and REL cleared).
superfury
l33t
 
Posts: 2114
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Re: OAKCDROM.SYS not detecting generic ATAPI drive in UniPCemu?

Postby superfury » 2017-12-14 @ 12:06

Is there a generic ATAPI testsuite that can test the I/O of ATAPI emulation? What does stuff like Bochs use to verify the correctness of their CD-ROM controllers(and regression tests)?
superfury
l33t
 
Posts: 2114
Joined: 2014-3-08 @ 11:25
Location: Netherlands


Return to PC Emulation

Who is online

Users browsing this forum: No registered users and 3 guests