Implemented the National Semiconductors PC87307, PC87309, PC87332, and PC97307 Super I/O chips, fixed a number of bugs, and removed two machines from the Dev branch due to them now having the correct Super I/O chips.
This commit is contained in:
@@ -84,7 +84,8 @@ static SCSI_CARD scsi_cards[] = {
|
||||
};
|
||||
|
||||
|
||||
int scsi_card_available(int card)
|
||||
int
|
||||
scsi_card_available(int card)
|
||||
{
|
||||
if (scsi_cards[card].device)
|
||||
return(device_available(scsi_cards[card].device));
|
||||
@@ -93,19 +94,22 @@ int scsi_card_available(int card)
|
||||
}
|
||||
|
||||
|
||||
char *scsi_card_getname(int card)
|
||||
char *
|
||||
scsi_card_getname(int card)
|
||||
{
|
||||
return((char *) scsi_cards[card].name);
|
||||
}
|
||||
|
||||
|
||||
const device_t *scsi_card_getdevice(int card)
|
||||
const device_t *
|
||||
scsi_card_getdevice(int card)
|
||||
{
|
||||
return(scsi_cards[card].device);
|
||||
}
|
||||
|
||||
|
||||
int scsi_card_has_config(int card)
|
||||
int
|
||||
scsi_card_has_config(int card)
|
||||
{
|
||||
if (! scsi_cards[card].device) return(0);
|
||||
|
||||
@@ -113,13 +117,15 @@ int scsi_card_has_config(int card)
|
||||
}
|
||||
|
||||
|
||||
char *scsi_card_get_internal_name(int card)
|
||||
char *
|
||||
scsi_card_get_internal_name(int card)
|
||||
{
|
||||
return((char *) scsi_cards[card].internal_name);
|
||||
}
|
||||
|
||||
|
||||
int scsi_card_get_from_internal_name(char *s)
|
||||
int
|
||||
scsi_card_get_from_internal_name(char *s)
|
||||
{
|
||||
int c = 0;
|
||||
|
||||
@@ -133,21 +139,12 @@ int scsi_card_get_from_internal_name(char *s)
|
||||
}
|
||||
|
||||
|
||||
void scsi_card_init(void)
|
||||
void
|
||||
scsi_card_init(void)
|
||||
{
|
||||
int i;
|
||||
scsi_device_t *dev;
|
||||
|
||||
if (!scsi_cards[scsi_card_current].device)
|
||||
return;
|
||||
|
||||
for (i = 0; i < SCSI_ID_MAX; i++) {
|
||||
dev = &(scsi_devices[i]);
|
||||
|
||||
memset(dev, 0, sizeof(scsi_device_t));
|
||||
dev->type = SCSI_NONE;
|
||||
}
|
||||
|
||||
device_add(scsi_cards[scsi_card_current].device);
|
||||
|
||||
scsi_card_last = scsi_card_current;
|
||||
|
||||
@@ -170,3 +170,18 @@ scsi_device_close_all(void)
|
||||
dev->command_stop(dev->sc);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
scsi_device_init(void)
|
||||
{
|
||||
int i;
|
||||
scsi_device_t *dev;
|
||||
|
||||
for (i = 0; i < SCSI_ID_MAX; i++) {
|
||||
dev = &(scsi_devices[i]);
|
||||
|
||||
memset(dev, 0, sizeof(scsi_device_t));
|
||||
dev->type = SCSI_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1261,6 +1261,8 @@ scsi_disk_close(void)
|
||||
|
||||
for (c = 0; c < HDD_NUM; c++) {
|
||||
if (hdd[c].bus == HDD_BUS_SCSI) {
|
||||
memset(&scsi_devices[hdd[c].scsi_id], 0x00, sizeof(scsi_device_t));
|
||||
|
||||
hdd_image_close(c);
|
||||
|
||||
dev = hdd[c].priv;
|
||||
|
||||
@@ -2646,14 +2646,17 @@ ncr53c8xx_init(const device_t *info)
|
||||
|
||||
ncr53c8xx_pci_bar[0].addr_regs[0] = 1;
|
||||
ncr53c8xx_pci_bar[1].addr_regs[0] = 0;
|
||||
dev->chip = info->local;
|
||||
dev->chip = info->local & 0xff;
|
||||
|
||||
ncr53c8xx_pci_regs[0x04] = 3;
|
||||
|
||||
ncr53c8xx_mem_init(dev, 0x0fffff00);
|
||||
ncr53c8xx_mem_disable(dev);
|
||||
|
||||
dev->has_bios = device_get_config_int("bios");
|
||||
if (info->local & 0x8000)
|
||||
dev->has_bios = 0;
|
||||
else
|
||||
dev->has_bios = device_get_config_int("bios");
|
||||
if (dev->has_bios)
|
||||
rom_init(&dev->bios, NCR53C8XX_ROM, 0xc8000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
if (dev->chip >= CHIP_825) {
|
||||
@@ -2730,6 +2733,16 @@ const device_t ncr53c810_pci_device =
|
||||
ncr53c8xx_pci_config
|
||||
};
|
||||
|
||||
const device_t ncr53c810_onboard_pci_device =
|
||||
{
|
||||
"NCR 53c810 (SCSI) On-Board",
|
||||
DEVICE_PCI,
|
||||
0x8001,
|
||||
ncr53c8xx_init, ncr53c8xx_close, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
const device_t ncr53c825a_pci_device =
|
||||
{
|
||||
"NCR 53c825A (SCSI)",
|
||||
|
||||
Reference in New Issue
Block a user