Large changes to configuration files again (the old ones might break, be careful);
Applied the mainline PCem slight CPU emulation speedup commit; Added emulation of removable SCSI hard disks; CD-ROM image handler now uses C FILE's (with the 64-bit size calls) instead of C++ iostreams, ISO images bigger than 2 GB should work properly again; Split RLL/ESDI and XT IDE disks to their own bus types; Turned status bar pane meaning and hard disks and CD-ROM BUS numbers to #define's; Other miscellaneous cleanups.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "timer.h"
|
||||
#include "device.h"
|
||||
#include "scsi.h"
|
||||
#include "scsi_disk.h"
|
||||
#include "cdrom.h"
|
||||
#include "scsi_buslogic.h"
|
||||
|
||||
@@ -500,9 +501,6 @@ int buslogic_do_log = 0;
|
||||
#endif
|
||||
|
||||
|
||||
static void BuslogicStartMailbox(Buslogic_t *);
|
||||
|
||||
|
||||
static void
|
||||
BuslogicLog(const char *format, ...)
|
||||
{
|
||||
@@ -998,20 +996,6 @@ BuslogicReadL(uint16_t Port, void *p)
|
||||
}
|
||||
|
||||
|
||||
/* This is BS - we just need a 'dev_present' indication.. --FvK */
|
||||
static int
|
||||
buslogic_dev_present(uint8_t id, uint8_t lun)
|
||||
{
|
||||
if (lun > 7) return(0);
|
||||
|
||||
if (scsi_cdrom_drives[id][lun] >= CDROM_NUM) return(0);
|
||||
|
||||
if ((cdrom_drives[scsi_cdrom_drives[id][lun]].bus_type == 4)) return(1);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
static void BuslogicWriteW(uint16_t Port, uint16_t Val, void *p);
|
||||
static void BuslogicWriteL(uint16_t Port, uint32_t Val, void *p);
|
||||
static void
|
||||
@@ -1020,7 +1004,6 @@ BuslogicWrite(uint16_t Port, uint8_t Val, void *p)
|
||||
int i = 0;
|
||||
uint8_t j = 0;
|
||||
Buslogic_t *bl = (Buslogic_t *)p;
|
||||
uint8_t max_id = (bl->chip >= CHIP_BUSLOGIC_ISA) ? 16 : 8;
|
||||
uint8_t Offset;
|
||||
MailboxInit_t *MailboxInit;
|
||||
ReplyInquireSetupInformation *ReplyISI;
|
||||
@@ -1130,8 +1113,6 @@ BuslogicWrite(uint16_t Port, uint8_t Val, void *p)
|
||||
break;
|
||||
|
||||
case 0x01:
|
||||
aha_0x01:
|
||||
{
|
||||
bl->Mbx24bit = 1;
|
||||
|
||||
MailboxInit = (MailboxInit_t *)bl->CmdBuf;
|
||||
@@ -1147,8 +1128,7 @@ aha_0x01:
|
||||
|
||||
bl->Status &= ~STAT_INIT;
|
||||
bl->DataReplyLeft = 0;
|
||||
}
|
||||
break;
|
||||
break;
|
||||
|
||||
case 0x03:
|
||||
bl->DataBuf[0] = 0x00;
|
||||
@@ -1633,6 +1613,8 @@ BuslogicHDCommand(Buslogic_t *bl)
|
||||
Lun = req->LUN;
|
||||
hdc_id = scsi_hard_disks[Id][Lun];
|
||||
|
||||
if (hdc_id == 0xff) fatal("SCSI hard disk on %02i:%02i has disappeared\n", Id, Lun);
|
||||
|
||||
pclog("SCSI HD command being executed on: SCSI ID %i, SCSI LUN %i, HD %i\n",
|
||||
Id, Lun, hdc_id);
|
||||
|
||||
@@ -1717,6 +1699,8 @@ BuslogicCDROMCommand(Buslogic_t *bl)
|
||||
Lun = req->LUN;
|
||||
cdrom_id = scsi_cdrom_drives[Id][Lun];
|
||||
|
||||
if (cdrom_id == 0xff) fatal("SCSI CD-ROM on %02i:%02i has disappeared\n", Id, Lun);
|
||||
|
||||
pclog("CD-ROM command being executed on: SCSI ID %i, SCSI LUN %i, CD-ROM %i\n",
|
||||
Id, Lun, cdrom_id);
|
||||
|
||||
@@ -1913,7 +1897,7 @@ BuslogicProcessMailbox(Buslogic_t *bl)
|
||||
|
||||
if (mb32.u.out.ActionCode != MBO_FREE) {
|
||||
/* We got the mailbox, mark it as free in the guest. */
|
||||
pclog("BuslogicStartMailbox(): Writing %i bytes at %08X\n", sizeof(CmdStatus), Outgoing + CodeOffset);
|
||||
pclog("BuslogicProcessMailbox(): Writing %i bytes at %08X\n", sizeof(CmdStatus), Outgoing + CodeOffset);
|
||||
DMAPageWrite(Outgoing + CodeOffset, (char *)&CmdStatus, sizeof(CmdStatus));
|
||||
}
|
||||
|
||||
@@ -2203,7 +2187,7 @@ BuslogicInit(int chip)
|
||||
chip = CHIP_BUSLOGIC_ISA;
|
||||
}
|
||||
bl->chip = chip;
|
||||
bl->Base = device_get_config_int("addr");
|
||||
bl->Base = device_get_config_hex16("addr");
|
||||
bl->PCIBase = 0;
|
||||
bl->MMIOBase = 0;
|
||||
bl->Irq = device_get_config_int("irq");
|
||||
@@ -2233,14 +2217,16 @@ BuslogicInit(int chip)
|
||||
if (scsi_hard_disks[i][j] != 0xff)
|
||||
{
|
||||
SCSIDevices[i][j].LunType = SCSI_DISK;
|
||||
pclog("Found SCSI disk: %02i:%02i\n", i, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i=0; i<CDROM_NUM; i++) {
|
||||
if (buslogic_dev_present(cdrom_drives[i].scsi_device_id,
|
||||
cdrom_drives[i].scsi_device_lun)) {
|
||||
SCSIDevices[cdrom_drives[i].scsi_device_id][cdrom_drives[i].scsi_device_lun].LunType = SCSI_CDROM;
|
||||
for (i=0; i<16; i++) {
|
||||
for (j=0; j<8; j++) {
|
||||
if (find_cdrom_for_scsi_id(i, j) != 0xff) {
|
||||
SCSIDevices[i][j].LunType = SCSI_CDROM;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2299,7 +2285,7 @@ BuslogicClose(void *p)
|
||||
|
||||
static device_config_t BuslogicConfig[] = {
|
||||
{
|
||||
"addr", "Address", CONFIG_SELECTION, "", 0x334,
|
||||
"base", "Address", CONFIG_HEX16, "", 0x334,
|
||||
{
|
||||
{
|
||||
"None", 0
|
||||
|
||||
Reference in New Issue
Block a user