mirror of
https://github.com/copy/v86.git
synced 2025-12-31 04:23:15 +00:00
abort any ATA READ command called on ejected device (W95)
This commit is contained in:
parent
59a697ca93
commit
e1610ff1a9
1 changed files with 8 additions and 1 deletions
|
|
@ -1856,7 +1856,14 @@ IDEInterface.prototype.ata_read_sectors = function(cmd)
|
|||
" lbacount=" + h(count) +
|
||||
" bytecount=" + h(byte_count), LOG_DISK);
|
||||
|
||||
if(start + byte_count > this.buffer.byteLength)
|
||||
if(!this.buffer)
|
||||
{
|
||||
// TODO: Windows 95 treats our (empty) CD-ROM device as an ATA device, maybe a driver issue?
|
||||
this.error_reg = ATA_ER_ABRT;
|
||||
this.status_reg = ATA_SR_DRDY|ATA_SR_ERR;
|
||||
this.push_irq();
|
||||
}
|
||||
else if(start + byte_count > this.buffer.byteLength)
|
||||
{
|
||||
dbg_assert(false, this.name + ": ATA read: Outside of disk", LOG_DISK);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue