Files
86Box/src/scsi.c
OBattler 3f612ab71a IDE dword reads and writes reverted to original operation, fixes the last hard disk problems;
ATAPI CD-ROM word reads no longer incorrectly discard the upper 16 bits, fixes the CD-ROM problems;
Significantly rewrote parts of the AHA-154x and BusLogic emulation, NT 3.1 RTM and MS-DOS drivers now works correctly;
The function in cdrom.c to read data blocks from the disc now correctly advances the position of the sector to read in non-passthrough mode, fixes multiblock reads from directly mounted ISO's;
Both ATAPI and SCSI now always check for Unit Attention and Not Ready on command execution.
2017-01-20 23:53:19 +01:00

36 lines
692 B
C

/* Copyright holders: SA1988, Tenshi
see COPYING for more details
*/
/*SCSI layer emulation*/
#include <stdlib.h>
#include <string.h>
#include "86box.h"
#include "ibm.h"
#include "device.h"
#include "cdrom.h"
#include "scsi.h"
#include "timer.h"
uint8_t SCSIPhase = SCSI_PHASE_BUS_FREE;
uint8_t SCSIStatus = SCSI_STATUS_OK;
uint8_t scsi_cdrom_id = 3; /*common setting*/
//Initialization function for the SCSI layer
void SCSIReset(uint8_t id, uint8_t lun)
{
uint8_t cdrom_id = scsi_cdrom_drives[id][lun];
if (buslogic_scsi_drive_is_cdrom(id, lun))
{
cdrom_reset(cdrom_id);
SCSIDevices[id][lun].LunType = SCSI_CDROM;
}
else
{
SCSIDevices[id][lun].LunType = SCSI_NONE;
}
}