From: Toni Wilen Date: Sat, 28 Mar 2015 14:09:05 +0000 (+0200) Subject: SCSI/IDE ROM handling updates. More SupraDrive ROMs added. X-Git-Tag: 3100~64 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=2824a057c509ec57f14964476c4e26a2d43e7528;p=francis%2Fwinuae.git SCSI/IDE ROM handling updates. More SupraDrive ROMs added. --- diff --git a/expansion.cpp b/expansion.cpp index 7470d4bd..1de654b2 100644 --- a/expansion.cpp +++ b/expansion.cpp @@ -2228,6 +2228,16 @@ static const struct expansionsubromtype supra_sub[] = { } }; +static const struct expansionboardsettings adscsi2000_settings[] = { + { + _T("Cache (B)"), + _T("B") + }, + { + NULL + } +}; + const struct expansionromtype expansionroms[] = { { _T("cpuboard"), _T("Accelerator"), _T("Accelerator"), @@ -2257,7 +2267,9 @@ const struct expansionromtype expansionroms[] = { _T("a4091"), _T("A4091"), _T("Commodore"), ncr710_a4091_autoconfig_init, a4091_add_scsi_unit, ROMTYPE_A4091, 0, 0, 3, false, NULL, 0, - false, EXPANSIONTYPE_SCSI + false, EXPANSIONTYPE_SCSI, + 0, 0, 0, + true }, { _T("fastlane"), _T("Fastlane"), _T("Phase 5"), @@ -2265,25 +2277,25 @@ const struct expansionromtype expansionroms[] = { NULL, 0, false, EXPANSIONTYPE_SCSI }, - { - _T("oktagon2008"), _T("Oktagon 2008"), _T("BSC/Alfa Data"), - ncr_oktagon_autoconfig_init, oktagon_add_scsi_unit, ROMTYPE_OKTAGON, 0, 0, 2, false, - NULL, 0, - false, EXPANSIONTYPE_SCSI - }, { _T("gvp1"), _T("Series I"), _T("GVP"), - gvp_init_s1, gvp_add_scsi_unit, ROMTYPE_GVPS1 | ROMTYPE_NONE, ROMTYPE_GVPS12, 0, 2, false, + gvp_init_s1, gvp_s1_add_scsi_unit, ROMTYPE_GVPS1 | ROMTYPE_NONE, ROMTYPE_GVPS12, 0, 2, false, gvp1_sub, 1, true, EXPANSIONTYPE_SCSI }, { _T("gvp"), _T("Series II"), _T("GVP"), - gvp_init_s2, gvp_add_scsi_unit, ROMTYPE_GVPS2 | ROMTYPE_NONE, ROMTYPE_GVPS12, 0, 2, false, + gvp_init_s2, gvp_s2_add_scsi_unit, ROMTYPE_GVPS2 | ROMTYPE_NONE, ROMTYPE_GVPS12, 0, 2, false, NULL, 0, true, EXPANSIONTYPE_SCSI, 2017, 10, 0 }, + { + _T("oktagon2008"), _T("Oktagon 2008"), _T("BSC/Alfa Data"), + ncr_oktagon_autoconfig_init, oktagon_add_scsi_unit, ROMTYPE_OKTAGON, 0, 0, 2, false, + NULL, 0, + false, EXPANSIONTYPE_SCSI + }, { _T("alfapower"), _T("AlfaPower/AT-Bus 2008"), _T("BSC/Alfa Data"), alf_init, alf_add_ide_unit, ROMTYPE_ALFA, 0, 0, 2, false, @@ -2330,6 +2342,15 @@ const struct expansionromtype expansionroms[] = { NULL, 0, true, EXPANSIONTYPE_IDE }, + { + _T("adscsi2000"), _T("AdSCSI Advantage 2000"), _T("ICD"), + adscsi_init, adscsi_add_scsi_unit, ROMTYPE_ADSCSI, 0, 0, 2, false, + NULL, 0, + false, EXPANSIONTYPE_SCSI, + 0, 0, 0, + true, + adscsi2000_settings + }, { _T("mtecat"), _T("AT 500"), _T("M-Tec"), mtec_init, mtec_add_ide_unit, ROMTYPE_MTEC, 0, 0, 2, false, @@ -2349,6 +2370,7 @@ const struct expansionromtype expansionroms[] = { NULL, 0, false, EXPANSIONTYPE_SCSI, 1010, 0, 0, + false, NULL, { 0xc1, 2, 0x00, 0x00, 0x03, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, }, @@ -2371,12 +2393,6 @@ const struct expansionromtype expansionroms[] = { false, EXPANSIONTYPE_SCSI, 8498, 27, 0, }, - { - _T("adscsi2000"), _T("AdSCSI Advantage 2000"), _T("ICD"), - adscsi_init, adscsi_add_scsi_unit, ROMTYPE_ADSCSI, 0, 0, 2, false, - NULL, 0, - false, EXPANSIONTYPE_SCSI - }, #if 0 { _T("kronos"), _T("Kronos"), _T("C-Ltd"), @@ -2396,7 +2412,7 @@ const struct expansionromtype expansionroms[] = { } }; -static const struct cpuboardsettings blizzardboard_settings[] = { +static const struct expansionboardsettings blizzardboard_settings[] = { { _T("MapROM"), _T("maprom") @@ -2431,7 +2447,7 @@ static const struct cpuboardsubtype gvpboard_sub[] = { _T("A530"), _T("GVPA530"), ROMTYPE_GVPS2, 0, - gvp_add_scsi_unit, EXPANSIONTYPE_SCSI, + gvp_s2_add_scsi_unit, EXPANSIONTYPE_SCSI, BOARD_MEMORY_Z2, 8 * 1024 * 1024, 0, @@ -2441,7 +2457,7 @@ static const struct cpuboardsubtype gvpboard_sub[] = { _T("G-Force 030"), _T("GVPGFORCE030"), ROMTYPE_GVPS2, ROMTYPE_GVPS12, - gvp_add_scsi_unit, EXPANSIONTYPE_SCSI, + gvp_s2_add_scsi_unit, EXPANSIONTYPE_SCSI, BOARD_MEMORY_25BITMEM, 128 * 1024 * 1024, 0, @@ -2557,7 +2573,7 @@ static const struct cpuboardsubtype warpengine_sub[] = { NULL } }; -static const struct cpuboardsettings a26x0board_settings[] = { +static const struct expansionboardsettings a26x0board_settings[] = { { _T("OSMODE (J304)"), _T("j304") diff --git a/include/autoconf.h b/include/autoconf.h index 7a70d40d..c5bbc2dc 100644 --- a/include/autoconf.h +++ b/include/autoconf.h @@ -108,6 +108,11 @@ typedef void(*DEVICE_ADD)(int, struct uaedev_config_info*, struct romconfig*); typedef bool(*E8ACCESS)(int, uae_u32*, int, bool); #define EXPANSIONTYPE_SCSI 1 #define EXPANSIONTYPE_IDE 2 +struct expansionboardsettings +{ + const TCHAR *name; + const TCHAR *configname; +}; struct expansionsubromtype { const TCHAR *name; @@ -134,14 +139,11 @@ struct expansionromtype int deviceflags; int memory_mid, memory_pid; uae_u32 memory_serial; + bool id_jumper; + const struct expansionboardsettings *settings; uae_u8 autoconfig[16]; }; extern const struct expansionromtype expansionroms[]; -struct cpuboardsettings -{ - const TCHAR *name; - const TCHAR *configname; -}; struct cpuboardsubtype { const TCHAR *name; @@ -155,7 +157,7 @@ struct cpuboardsubtype DEVICE_INIT init, init2; int initzorro; int initflag; - const struct cpuboardsettings *settings; + const struct expansionboardsettings *settings; E8ACCESS e8; }; struct cpuboardtype diff --git a/rommgr.cpp b/rommgr.cpp index 1238e945..1664ab13 100644 --- a/rommgr.cpp +++ b/rommgr.cpp @@ -95,7 +95,7 @@ struct romdata *getromdatabypath (const TCHAR *path) return NULL; } -#define NEXT_ROM_ID 134 +#define NEXT_ROM_ID 137 static struct romheader romheaders[] = { { _T("Freezer Cartridges"), 1 }, @@ -319,6 +319,12 @@ static struct romdata roms[] = { 0x54cb9e85, 0x3CE66919,0xF6FD6797,0x4923A12D,0x91B730F1,0xFFB4A7BA }, { _T("SupraDrive AMAB6"), 3, 8, 3, 8, _T("SUPRA\0"), 16384, 121, 0, 0, ROMTYPE_SUPRA, 0, 0, _T("AMAB6"), 0xf40bd349, 0x82168556,0x07525067,0xe9263431,0x1fb9c347,0xe737f247 }, + { _T("SupraDrive AMAB5"), 3, 0, 3, 0, _T("SUPRA\0"), 16384, 134, 0, 0, ROMTYPE_SUPRA, 0, 0, _T("AMAB5"), + 0x75e1b343, 0xf15de74b,0x4e2a9c99,0xa6dc4f6c,0x33f64c76,0x8c043d1c }, + { _T("SupraDrive AMAB4"), 0, 0, 0, 0, _T("SUPRA\0"), 8192, 135, 0, 0, ROMTYPE_SUPRA, 0, 0, _T("AMAB4"), + 0xde7f3f1c, 0xc0acbfc8,0x6641a6c1,0x024870cc,0x519f8c4c,0xbdfe8c64 }, + { _T("SupraDrive AMAB3"), 0, 0, 0, 0, _T("SUPRA\0"), 8192, 136, 0, 0, ROMTYPE_SUPRA, 0, 0, _T("AMAB3"), + 0x3ead39aa, 0x02fe79ee,0xef423098,0xec6add8c,0xb92f849f,0xc64bcd41 }, { _T("Blizzard 1230-IV"), 0, 0, 0, 0, _T("B1230\0"), 32768, 89, 0, 0, ROMTYPE_CB_BLIZ1230, 0, 0, NULL, 0x3078dbdc, 0x4d3e7fd0,0xa1a4c3ae,0xe17c5de3,0xcbe1af03,0x447aff92 }, @@ -1627,6 +1633,16 @@ const struct expansionromtype *get_device_expansion_rom(int romtype) return NULL; } +static void device_rom_defaults(struct boardromconfig *brc, int romtype, int devnum) +{ + memset(brc, 0, sizeof boardromconfig); + brc->device_type = romtype; + brc->device_num = devnum; + for (int i = 0; i < MAX_BOARD_ROMS; i++) { + brc->roms[i].device_id = 7; + } +} + struct boardromconfig *get_device_rom_new(struct uae_prefs *p, int romtype, int devnum, int *index) { int idx2; @@ -1654,9 +1670,7 @@ struct boardromconfig *get_device_rom_new(struct uae_prefs *p, int romtype, int for (int i = 0; i < MAX_EXPANSION_BOARDS; i++) { brc = &p->expansionboard[i]; if (brc->device_type == 0) { - memset(brc, 0, sizeof boardromconfig); - brc->device_type = romtype; - brc->device_num = devnum; + device_rom_defaults(brc, romtype, devnum); return brc; } }