From: Toni Wilen Date: Thu, 4 Apr 2024 16:56:00 +0000 (+0300) Subject: Apollo 630 accelerator X-Git-Tag: 5300~47 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=7e17649cf8be863d64e40f629205e1328911d68b;p=francis%2Fwinuae.git Apollo 630 accelerator --- diff --git a/cpuboard.cpp b/cpuboard.cpp index 403a4691..dde8f32e 100644 --- a/cpuboard.cpp +++ b/cpuboard.cpp @@ -324,9 +324,13 @@ static bool is_fusionforty(struct uae_prefs *p) { return ISCPUBOARDP(p, BOARD_RCS, BOARD_RCS_SUB_FUSIONFORTY); } -static bool is_apollo(struct uae_prefs *p) +static bool is_apollo12xx(struct uae_prefs *p) { - return ISCPUBOARDP(p, BOARD_ACT, BOARD_ACT_SUB_APOLLO); + return ISCPUBOARDP(p, BOARD_ACT, BOARD_ACT_SUB_APOLLO_12xx); +} +static bool is_apollo630(struct uae_prefs *p) +{ + return ISCPUBOARDP(p, BOARD_ACT, BOARD_ACT_SUB_APOLLO_630); } static bool is_kupke(struct uae_prefs *p) { @@ -1653,7 +1657,7 @@ void cpuboard_map(void) map_banks(&blizzardio_bank, 0x021d0000 >> 16, 65536 >> 16, 0); map_banks(&blizzardram_bank, blizzardram_bank.start >> 16, cpuboard_size >> 16, 0); } - if (is_apollo(&currprefs)) { + if (is_apollo12xx(&currprefs)) { map_banks(&blizzardf0_bank, 0xf00000 >> 16, 131072 >> 16, 0); } if (is_a1230s1(&currprefs)) { @@ -1684,7 +1688,8 @@ void cpuboard_map(void) } } - if (is_mtec_ematrix530(&currprefs) || is_sx32pro(&currprefs) || is_apollo(&currprefs) || is_dce_typhoon2(&currprefs)) { + if (is_mtec_ematrix530(&currprefs) || is_sx32pro(&currprefs) || is_apollo12xx(&currprefs) || + is_apollo630(&currprefs) || is_dce_typhoon2(&currprefs)) { if (cpuboardmem1_bank.allocated_size) { uae_u32 max = 0x08000000; // don't cross 0x08000000 @@ -1853,13 +1858,13 @@ static void cpuboard_init_2(void) cpuboardmem1_bank.reserved_size = 0; cpuboardmem2_bank.reserved_size = 0; - if (is_kupke(&currprefs) || is_mtec_ematrix530(&currprefs) || is_sx32pro(&currprefs) || is_dce_typhoon2(&currprefs)) { + if (is_kupke(&currprefs) || is_mtec_ematrix530(&currprefs) || is_sx32pro(&currprefs) || is_dce_typhoon2(&currprefs) || is_apollo630(&currprefs)) { // plain 64k autoconfig, nothing else. blizzardea_bank.reserved_size = 65536; blizzardea_bank.mask = blizzardea_bank.reserved_size - 1; mapped_malloc(&blizzardea_bank); - if (is_mtec_ematrix530(&currprefs) || is_sx32pro(&currprefs) || is_dce_typhoon2(&currprefs)) { + if (is_mtec_ematrix530(&currprefs) || is_sx32pro(&currprefs) || is_dce_typhoon2(&currprefs) || is_apollo630(&currprefs)) { if (cpuboard_size == 2 * 1024 * 1024 || cpuboard_size == 8 * 1024 * 1024 || cpuboard_size == 32 * 1024 * 1024 || is_sx32pro(&currprefs)) { cpuboardmem1_bank.start = 0x18000000; cpuboardmem1_bank.reserved_size = cpuboard_size / 2; @@ -1957,7 +1962,7 @@ static void cpuboard_init_2(void) blizzardf0_bank.mask = blizzardf0_bank.reserved_size - 1; mapped_malloc(&blizzardf0_bank); - } else if (is_apollo(&currprefs)) { + } else if (is_apollo12xx(&currprefs)) { blizzardf0_bank.start = 0x00f00000; blizzardf0_bank.reserved_size = 131072; @@ -2496,6 +2501,7 @@ bool cpuboard_autoconfig_init(struct autoconfig_info *aci) const TCHAR *boardname; struct uae_prefs *p = aci->prefs; uae_u32 romtype = 0, romtype2 = 0; + uae_u8 autoconfig_data[16] = { 0 }; boardname = cpuboards[p->cpuboard_type].subtypes[p->cpuboard_subtype].name; aci->label = boardname; @@ -2544,8 +2550,11 @@ bool cpuboard_autoconfig_init(struct autoconfig_info *aci) case BOARD_ACT: switch(p->cpuboard_subtype) { - case BOARD_ACT_SUB_APOLLO: - romtype = ROMTYPE_CB_APOLLO; + case BOARD_ACT_SUB_APOLLO_12xx: + romtype = ROMTYPE_CB_APOLLO_12xx; + break; + case BOARD_ACT_SUB_APOLLO_630: + romtype = ROMTYPE_CB_APOLLO_630; break; } break; @@ -2799,6 +2808,19 @@ bool cpuboard_autoconfig_init(struct autoconfig_info *aci) blizzardea_bank.baseaddr[i * 2 + 0] = b; blizzardea_bank.baseaddr[i * 2 + 1] = 0xff; } + } else if (is_apollo630(p)) { + static const uae_u8 apollo_autoconfig_630[16] = { 0xd1, 0x23, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00 }; + earom_size = 65536; + for (int i = 0; i < 16384; i++) { + uae_u8 b = 0xff; + zfile_fread(&b, 1, 1, autoconfig_rom); + blizzardea_bank.baseaddr[i * 2 + 0x8000] = b; + blizzardea_bank.baseaddr[i * 2 + 0x8001] = 0xff; + } + memcpy(autoconfig_data, apollo_autoconfig_630, sizeof(apollo_autoconfig_630)); + if (!(aci->prefs->cpuboard_settings & 1)) { + autoconfig_data[6 + 3] |= 1; // memory enable + } } else if (is_mtec_ematrix530(p) || is_dce_typhoon2(p)) { earom_size = 65536; for (int i = 0; i < 32768; i++) { @@ -2846,7 +2868,7 @@ bool cpuboard_autoconfig_init(struct autoconfig_info *aci) blizzardea_bank.baseaddr[i * 2 + 0] = b; blizzardea_bank.baseaddr[i * 2 + 1] = 0xff; } - } else if (is_apollo(p)) { + } else if (is_apollo12xx(p)) { f0rom_size = 131072; zfile_fread(blizzardf0_bank.baseaddr, 1, 131072, autoconfig_rom); autoconf = false; @@ -3039,6 +3061,12 @@ bool cpuboard_autoconfig_init(struct autoconfig_info *aci) aci->addrbank = &expamem_none; } else if (!autoconf) { aci->zorro = 0; + } else if (autoconfig_data[0]) { + aci->addrbank = &blizzarde8_bank; + memcpy(aci->autoconfig_bytes, autoconfig_data, sizeof aci->autoconfig_bytes); + aci->autoconfigp = aci->autoconfig_bytes; + aci->zorro = 2; + aci->autoconfig_automatic = true; } else { aci->addrbank = &blizzarde8_bank; memcpy(aci->autoconfig_raw, blizzardea_bank.baseaddr, sizeof aci->autoconfig_raw); diff --git a/expansion.cpp b/expansion.cpp index ec9fd196..8f8f714a 100644 --- a/expansion.cpp +++ b/expansion.cpp @@ -6879,7 +6879,7 @@ static const struct cpuboardsubtype csa_sub[] = { } }; -static const struct expansionboardsettings apollo_settings[] = { +static const struct expansionboardsettings apollo12xx_settings[] = { { _T("SCSI module installed"), _T("scsi") @@ -6892,18 +6892,38 @@ static const struct expansionboardsettings apollo_settings[] = { NULL } }; +static const struct expansionboardsettings apollo630_settings[] = { + { + _T("Memory disable"), + _T("memory") + }, + { + NULL + } +}; static const struct cpuboardsubtype apollo_sub[] = { { _T("Apollo 1240/1260"), _T("Apollo"), - ROMTYPE_CB_APOLLO, 0, 4, + ROMTYPE_CB_APOLLO_12xx, 0, 4, apollo_add_scsi_unit, EXPANSIONTYPE_SCSI, BOARD_MEMORY_CUSTOM_32, 64 * 1024 * 1024, 0, - apollo_init_cpu, NULL, 2, 0, - apollo_settings + apollo_init_cpu_12xx, NULL, 2, 0, + apollo12xx_settings + }, + { + _T("Apollo 630"), + _T("Apollo630"), + ROMTYPE_CB_APOLLO_630, 0, 4, + NULL, 0, + BOARD_MEMORY_CUSTOM_32, + 128 * 1024 * 1024, + 0, + NULL, NULL, 0, 0, + apollo630_settings }, { NULL diff --git a/idecontrollers.cpp b/idecontrollers.cpp index fbd5910f..3a58bd02 100644 --- a/idecontrollers.cpp +++ b/idecontrollers.cpp @@ -2263,17 +2263,17 @@ void alf_add_ide_unit(int ch, struct uaedev_config_info *ci, struct romconfig *r // prod 0x33 = IDE only const uae_u8 apollo_autoconfig[16] = { 0xd1, 0x22, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, APOLLO_ROM_OFFSET >> 8, APOLLO_ROM_OFFSET & 0xff }; -const uae_u8 apollo_autoconfig_cpuboard[16] = { 0xd2, 0x23, 0x40, 0x00, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, APOLLO_ROM_OFFSET >> 8, APOLLO_ROM_OFFSET & 0xff }; -const uae_u8 apollo_autoconfig_cpuboard_060[16] = { 0xd2, 0x23, 0x40, 0x00, 0x22, 0x22, 0x00, 0x00, 0x00, 0x02, APOLLO_ROM_OFFSET >> 8, APOLLO_ROM_OFFSET & 0xff }; +const uae_u8 apollo_autoconfig_cpuboard_12xx[16] = { 0xd2, 0x23, 0x40, 0x00, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, APOLLO_ROM_OFFSET >> 8, APOLLO_ROM_OFFSET & 0xff }; +const uae_u8 apollo_autoconfig_cpuboard_12xx_060[16] = { 0xd2, 0x23, 0x40, 0x00, 0x22, 0x22, 0x00, 0x00, 0x00, 0x02, APOLLO_ROM_OFFSET >> 8, APOLLO_ROM_OFFSET & 0xff }; -static bool apollo_init(struct autoconfig_info *aci, bool cpuboard) +static bool apollo_init(struct autoconfig_info *aci, int cpuboard_model) { const uae_u8 *autoconfig = apollo_autoconfig; - if (cpuboard) { + if (cpuboard_model == 1200) { if (currprefs.cpu_model == 68060) - autoconfig = apollo_autoconfig_cpuboard_060; + autoconfig = apollo_autoconfig_cpuboard_12xx_060; else - autoconfig = apollo_autoconfig_cpuboard; + autoconfig = apollo_autoconfig_cpuboard_12xx; } ide_add_reset(); @@ -2287,7 +2287,7 @@ static bool apollo_init(struct autoconfig_info *aci, bool cpuboard) if (!ide) return false; - if (cpuboard) { + if (cpuboard_model) { // bit 0: scsi enable // bit 1: memory disable ide->userdata = currprefs.cpuboard_settings & 1; @@ -2308,13 +2308,13 @@ static bool apollo_init(struct autoconfig_info *aci, bool cpuboard) ide->keepautoconfig = false; for (int i = 0; i < 16; i++) { uae_u8 b = autoconfig[i]; - if (cpuboard && i == 9 && (currprefs.cpuboard_settings & 2)) + if (cpuboard_model && i == 9 && (currprefs.cpuboard_settings & 2)) b |= 1; // memory disable (serial bit 0) ew(ide, i * 4, b); } - if (cpuboard) { + if (cpuboard_model == 1200) { ide->mask = 131072 - 1; - struct zfile *z = read_device_from_romconfig(aci->rc, ROMTYPE_APOLLO); + struct zfile *z = read_device_from_romconfig(aci->rc, ROMTYPE_CB_APOLLO_12xx); if (z) { int len = zfile_size32(z); // skip 68060 $f0 ROM block @@ -2337,11 +2337,11 @@ static bool apollo_init(struct autoconfig_info *aci, bool cpuboard) bool apollo_init_hd(struct autoconfig_info *aci) { - return apollo_init(aci, false); + return apollo_init(aci, 0); } -bool apollo_init_cpu(struct autoconfig_info *aci) +bool apollo_init_cpu_12xx(struct autoconfig_info *aci) { - return apollo_init(aci, true); + return apollo_init(aci, 1200); } void apollo_add_ide_unit(int ch, struct uaedev_config_info *ci, struct romconfig *rc) diff --git a/include/cpuboard.h b/include/cpuboard.h index 12c8f175..be7c0b35 100644 --- a/include/cpuboard.h +++ b/include/cpuboard.h @@ -50,7 +50,8 @@ void cpuboard_gvpmaprom(int); #define ISCPUBOARD(type,subtype) (cpuboards[currprefs.cpuboard_type].id == type && (type < 0 || currprefs.cpuboard_subtype == subtype)) #define BOARD_ACT 1 -#define BOARD_ACT_SUB_APOLLO 0 +#define BOARD_ACT_SUB_APOLLO_12xx 0 +#define BOARD_ACT_SUB_APOLLO_630 1 #define BOARD_COMMODORE 2 #define BOARD_COMMODORE_SUB_A26x0 0 diff --git a/include/idecontrollers.h b/include/idecontrollers.h index afabe2aa..18111528 100644 --- a/include/idecontrollers.h +++ b/include/idecontrollers.h @@ -14,7 +14,7 @@ bool alf_init(struct autoconfig_info *aci); void apollo_add_ide_unit(int ch, struct uaedev_config_info *ci, struct romconfig *rc); bool apollo_init_hd(struct autoconfig_info *aci); -bool apollo_init_cpu(struct autoconfig_info *aci); +bool apollo_init_cpu_12xx(struct autoconfig_info *aci); void masoboshi_add_idescsi_unit (int ch, struct uaedev_config_info *ci, struct romconfig *rc); bool masoboshi_init(struct autoconfig_info *aci); diff --git a/include/rommgr.h b/include/rommgr.h index ab66690b..5600195b 100644 --- a/include/rommgr.h +++ b/include/rommgr.h @@ -22,7 +22,7 @@ extern int decode_cloanto_rom_do(uae_u8 *mem, int size, int real_size); #define ROMTYPE_CPUBOARD 0x00040000 #define ROMTYPE_CB_A3001S1 0x00040001 -#define ROMTYPE_CB_APOLLO 0x00040002 +#define ROMTYPE_CB_APOLLO_12xx 0x00040002 #define ROMTYPE_CB_FUSION 0x00040003 #define ROMTYPE_CB_DKB 0x00040004 #define ROMTYPE_CB_WENGINE 0x00040005 @@ -56,6 +56,7 @@ extern int decode_cloanto_rom_do(uae_u8 *mem, int size, int real_size); #define ROMTYPE_CB_A1230S1 0x00040021 #define ROMTYPE_CB_DRACO 0x00040022 #define ROMTYPE_CB_CASAB 0x00040023 +#define ROMTYPE_CB_APOLLO_630 0x00040024 #define ROMTYPE_FREEZER 0x00080000 #define ROMTYPE_AR 0x00080001 diff --git a/rommgr.cpp b/rommgr.cpp index 89c113f5..94d47261 100644 --- a/rommgr.cpp +++ b/rommgr.cpp @@ -97,7 +97,7 @@ struct romdata *getromdatabypath (const TCHAR *path) return NULL; } -#define NEXT_ROM_ID 313 +#define NEXT_ROM_ID 314 #if NEXT_ROM_ID >= MAX_ROMMGR_ROMS #error Increase MAX_ROMMGR_ROMS! @@ -582,8 +582,10 @@ static struct romdata roms[] = { ALTROMPN(113, 1, 2, 32768, ROMTYPE_QUAD | ROMTYPE_ODD | ROMTYPE_8BIT, _T("U27"), 0x38373cf6, 0xfe8aa931, 0xada6b6f3, 0x6b48ca3c, 0x9b86677d, 0xbee4da59) ALTROMPN(113, 1, 3, 32768, ROMTYPE_QUAD | ROMTYPE_EVEN | ROMTYPE_8BIT, _T("U25"), 0xc9e990d3, 0xb251ef73, 0x1374e796, 0xa87cbc7e, 0x9263320a, 0x28a71d2b) ALTROMPN(113, 1, 4, 32768, ROMTYPE_QUAD | ROMTYPE_ODD | ROMTYPE_8BIT, _T("U26"), 0x2e117fe0, 0xbb2de2da, 0x6db4e92c, 0x636fefe6, 0x13a32699, 0xcea31011) - { _T("Apollo 1240/1260"), 5, 60, 5, 60, _T("APOLLO12XX\0"), 131072, 119, 0, 0, ROMTYPE_CB_APOLLO, 0, 0, NULL, + { _T("Apollo 1240/1260"), 5, 60, 5, 60, _T("APOLLO12XX\0"), 131072, 119, 0, 0, ROMTYPE_CB_APOLLO_12xx, 0, 0, NULL, 0xcd009ad9, 0x1c3b4851,0xc5a221e3,0xa7ca24fc,0xc1df4a5b,0x9f2343ad }, + { _T("Apollo 630"), 5, 61, 5, 61, _T("APOLLO630\0"), 16384, 313, 0, 0, ROMTYPE_CB_APOLLO_630, 0, 0, NULL, + 0x286cf453, 0xe0597cb6,0x5a6471b3,0xfd674e7b,0xc9e2423d,0x43e51ffc }, { _T("GVP A3001 Series I"), 3, 3, 3, 3, _T("A3001SI\0"), 8192, 114, 0, 0, ROMTYPE_CB_A3001S1, 0, 0, NULL, 0xaaff7c65, 0x424cf3da,0xcc9da794,0x0ba74446,0x69dd1691,0x44ae87ee, NULL, NULL }, { _T("Kupke Golem 030"), 0, 0, 0, 0, _T("GOLEM030\0"), 8192, 126, 0, 0, ROMTYPE_CB_GOLEM030, 0, 0, NULL,