summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/scsi.h
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-08-01 23:11:08 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-08-01 23:11:08 +0000
commit6d5941e08590e8e215d275858445cccaf57d7f4d (patch)
tree2f90e36dff3b1fdaf14cf1ef7694e3b187cd9f34 /src/emu/machine/scsi.h
parent9a456202dd524a09b1c8563cbeaef4ba8e60f273 (diff)
Disks opened by the romload module are no longer identified by index.
Instead, they are identified by the region they were loaded in. This generally means one disk per region. get_disk_handle() now takes a region name in place of an index. Updated all callers to do this. The SCSI modules in particular posed a challenge to make this work, so watch out for potential bugs there. Changed the IDE interfaces to default to choosing the region with the same tag as the device for its master disk (assuming no slave). Added support for specifying explicit master/slave disk regions as part of the configuration, though slave disks are still not supported yet. Change the laserdisc interface to no longer require a disk number or a custom sound device. Both are now assumed to be tagged the same as the laserdisc device. Updated all drivers accordingly.
Diffstat (limited to 'src/emu/machine/scsi.h')
-rw-r--r--src/emu/machine/scsi.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/emu/machine/scsi.h b/src/emu/machine/scsi.h
index 38464e0a6bc..bd742dad588 100644
--- a/src/emu/machine/scsi.h
+++ b/src/emu/machine/scsi.h
@@ -24,6 +24,12 @@ typedef struct
const SCSIClass *scsiClass;
} SCSIInstance;
+typedef struct
+{
+ SCSIInstance *instance;
+ const char *diskregion;
+} SCSIAllocInstanceParams;
+
// commands accepted by a SCSI device's dispatch handler
enum
{
@@ -44,7 +50,7 @@ enum
typedef struct scsiconfigitem
{
int scsiID;
- int diskID;
+ const char *diskregion;
const SCSIClass *scsiClass;
} SCSIConfigItem;
@@ -77,7 +83,7 @@ enum
#define SCSI_PHASE_MESSAGE_OUT ( 6 )
#define SCSI_PHASE_MESSAGE_IN ( 7 )
-extern void SCSIAllocInstance( const SCSIClass *scsiClass, SCSIInstance **instance, int diskId );
+extern void SCSIAllocInstance( const SCSIClass *scsiClass, SCSIInstance **instance, const char *diskregion );
extern void SCSIDeleteInstance( SCSIInstance *instance );
extern void SCSISetDevice( SCSIInstance *instance, void *device );
extern void SCSIGetDevice( SCSIInstance *instance, void **device );