Merge pull request #2568 from jriwanek-forks/defines

Use defines instead of hardcodes for drive limits
This commit is contained in:
Miran Grča
2022-08-03 05:26:17 +02:00
committed by GitHub
9 changed files with 37 additions and 26 deletions

View File

@@ -19,6 +19,9 @@
#ifndef EMU_IDE_H
# define EMU_IDE_H
#define IDE_BUS_MAX 4
#define IDE_CHAN_MAX 2
#define HDC_PRIMARY_BASE 0x01F0
#define HDC_PRIMARY_SIDE 0x03F6
#define HDC_PRIMARY_IRQ 14

View File

@@ -21,7 +21,13 @@
#ifndef EMU_SCSI_H
# define EMU_SCSI_H
extern int scsi_card_current[4];
/* Configuration. */
#define SCSI_BUS_MAX 4 /* currently we support up to 4 controllers */
#define SCSI_ID_MAX 16 /* 16 on wide buses */
#define SCSI_LUN_MAX 8 /* always 8 */
extern int scsi_card_current[SCSI_BUS_MAX];
extern int scsi_card_available(int card);
#ifdef EMU_DEVICE_H

View File

@@ -21,10 +21,6 @@
# define SCSI_DEVICE_H
/* Configuration. */
#define SCSI_BUS_MAX 4 /* currently we support up to 4 controllers */
#define SCSI_ID_MAX 16 /* 16 on wide buses */
#define SCSI_LUN_MAX 8 /* always 8 */
#define SCSI_LUN_USE_CDB 0xff
@@ -361,8 +357,9 @@ typedef struct {
#define SCSI_REMOVABLE_DISK 0x8000
#define SCSI_REMOVABLE_CDROM 0x8005
#ifdef EMU_SCSI_H
extern scsi_device_t scsi_devices[SCSI_BUS_MAX][SCSI_ID_MAX];
#endif /* EMU_SCSI_H */
extern int cdrom_add_error_and_subchannel(uint8_t *b, int real_sector_type);
extern int cdrom_LBAtoMSF_accurate(void);