The AHA-154x code is now converted to use the abstraction layer;

Moved SCSI device array building to scsi_card_init() in scsi.c.
This commit is contained in:
OBattler
2017-08-22 21:28:22 +02:00
parent 644e57c9e3
commit 47ba911525
6 changed files with 132 additions and 253 deletions

View File

@@ -8,13 +8,14 @@
*
* Handling of the SCSI controllers.
*
* NOTE: THIS IS CURRENTLY A MESS, but will be cleaned up as I go.
* Version: @(#)scsi.c 1.0.1 2017/08/22
*
* Version: @(#)scsi.c 1.0.0 2017/06/14
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Original Buslogic version by SA1988 and Miran Grca.
* Copyright 2017 Fred N. van Kempen.
* Authors: TheCollector1995, <mariogplayer@gmail.com>
* Miran Grca, <mgrca8@gmail.com>
* Fred N. van Kempen, <decwiz@yahoo.com>
* Copyright 2008-2017 TheCollector1995.
* Copyright 2016-2017 Miran Grca.
* Copyright 2017-2017 Fred N. van Kempen.
*/
#include <stdlib.h>
#include <string.h>
@@ -108,6 +109,30 @@ int scsi_card_get_from_internal_name(char *s)
void scsi_card_init()
{
int i, j;
pclog("Building SCSI hard disk map...\n");
build_scsi_hd_map();
pclog("Building SCSI CD-ROM map...\n");
build_scsi_cdrom_map();
for (i=0; i<16; i++)
{
for (j=0; j<8; j++)
{
if (scsi_hard_disks[i][j] != 0xff) {
SCSIDevices[i][j].LunType = SCSI_DISK;
}
else if (scsi_cdrom_drives[i][j] != 0xff) {
SCSIDevices[i][j].LunType = SCSI_CDROM;
}
else
{
SCSIDevices[i][j].LunType = SCSI_NONE;
}
}
}
if (scsi_cards[scsi_card_current].device)
device_add(scsi_cards[scsi_card_current].device);