From a964ea6106b3e13745578e6c6f56f8a397d54d4d Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 5 Jan 2019 15:37:42 +0200 Subject: [PATCH] Harms Professional 3000 accelerator board. --- cpuboard.cpp | 48 +++++++++++++++++++++++++++++++++++++++++++++--- expansion.cpp | 23 +++++++++++++++++++++++ include/rommgr.h | 1 + rommgr.cpp | 6 +++++- 4 files changed, 74 insertions(+), 4 deletions(-) diff --git a/cpuboard.cpp b/cpuboard.cpp index 4b8019b3..e9b41cf0 100644 --- a/cpuboard.cpp +++ b/cpuboard.cpp @@ -300,6 +300,10 @@ static bool is_a2630(struct uae_prefs *p) { return ISCPUBOARDP(p, BOARD_COMMODORE, BOARD_COMMODORE_SUB_A26x0); } +static bool is_harms_3kp(struct uae_prefs *p) +{ + return ISCPUBOARDP(p, BOARD_HARMS, BOARD_HARMS_SUB_3KPRO); +} static bool is_dkb_12x0(struct uae_prefs *p) { return ISCPUBOARDP(p, BOARD_DKB, BOARD_DKB_SUB_12x0); @@ -1841,6 +1845,17 @@ static void cpuboard_init_2(void) blizzardea_bank.mask = blizzardea_bank.reserved_size - 1; mapped_malloc(&blizzardea_bank); + } else if (is_harms_3kp(&currprefs)) { + + blizzardf0_bank.start = 0x00f00000; + blizzardf0_bank.reserved_size = 65536; + blizzardf0_bank.mask = blizzardf0_bank.reserved_size - 1; + mapped_malloc(&blizzardf0_bank); + + blizzardea_bank.reserved_size = 65536; + blizzardea_bank.mask = blizzardea_bank.reserved_size - 1; + mapped_malloc(&blizzardea_bank); + } else if (is_dkb_12x0(&currprefs)) { blizzardram_bank.start = 0x10000000; @@ -2090,7 +2105,7 @@ void cpuboard_init(void) void cpuboard_overlay_override(void) { - if (is_a2630(&currprefs)) { + if (is_a2630(&currprefs) || is_harms_3kp(&currprefs)) { if (!(a2630_io & 2)) map_banks(&blizzardf0_bank, 0xf80000 >> 16, f0rom_size >> 16, 0); if (mem25bit_bank.allocated_size) @@ -2223,10 +2238,13 @@ bool cpuboard_io_special(int addr, uae_u32 *val, int size, bool write) addr &= 65535; if (write) { uae_u16 w = *val; - if (is_a2630(&currprefs)) { + if (is_a2630(&currprefs) || is_harms_3kp(&currprefs)) { if ((addr == 0x0040 && size == 2) || (addr == 0x0041 && size == 1)) { write_log(_T("A2630 write %04x s=%d PC=%08x\n"), w, size, M68K_GETPC); a2630_io = w; + if (is_harms_3kp(&currprefs)) { + w |= 2; + } // bit 0: unmap 0x000000 // bit 1: unmap 0xf80000 if (w & 2) { @@ -2253,7 +2271,7 @@ bool cpuboard_io_special(int addr, uae_u32 *val, int size, bool write) } return false; } else { - if (is_a2630(&currprefs)) { + if (is_a2630(&currprefs) || is_harms_3kp(&currprefs)) { // osmode (j304) if (addr == 0x0c && (a2630_io & 4) == 0) { (*val) |= 0x80; @@ -2427,6 +2445,15 @@ bool cpuboard_autoconfig_init(struct autoconfig_info *aci) } break; + case BOARD_HARMS: + switch(p->cpuboard_subtype) + { + case BOARD_HARMS_SUB_3KPRO: + romtype = ROMTYPE_CB_HARMS3KP; + break; + } + break; + case BOARD_ACT: switch(p->cpuboard_subtype) { @@ -2710,6 +2737,13 @@ bool cpuboard_autoconfig_init(struct autoconfig_info *aci) autoconf_stop = true; aci->start = 0xf00000; aci->size = f0rom_size; + } else if (is_harms_3kp(p)) { + f0rom_size = 65536; + zfile_fread(blizzardf0_bank.baseaddr, 1, f0rom_size, autoconfig_rom); + autoconf = false; + autoconf_stop = true; + aci->start = 0xf00000; + aci->size = f0rom_size; } else if (is_kupke(p)) { earom_size = 65536; for (int i = 0; i < 8192; i++) { @@ -2921,6 +2955,14 @@ bool cpuboard_autoconfig_init(struct autoconfig_info *aci) map_banks(&blizzardf0_bank, 0xf80000 >> 16, f0rom_size >> 16, 0); if (!(a2630_io & 1)) map_banks(&blizzardf0_bank, 0x000000 >> 16, f0rom_size >> 16, 0); + } else if (is_harms_3kp(p)) { + if (!(a2630_io & 2)) { + map_banks(&blizzardf0_bank, 0xf80000 >> 16, f0rom_size >> 16, 0); + map_banks(&blizzardf0_bank, 0xf70000 >> 16, f0rom_size >> 16, 0); + } + if (!(a2630_io & 1)) { + map_banks(&blizzardf0_bank, 0x000000 >> 16, f0rom_size >> 16, 0); + } } else if (is_fusionforty(p)) { map_banks(&blizzardf0_bank, 0x00f40000 >> 16, f0rom_size >> 16, 0); map_banks(&blizzardf0_bank, 0x05000000 >> 16, f0rom_size >> 16, 0); diff --git a/expansion.cpp b/expansion.cpp index c29bdfdb..c03485ff 100644 --- a/expansion.cpp +++ b/expansion.cpp @@ -6223,6 +6223,24 @@ static const struct cpuboardsubtype dceboard_sub[] = { } }; +static const struct cpuboardsubtype harms_sub[] = { + { + _T("Professional 3000"), + _T("harms3kp"), + ROMTYPE_CB_HARMS3KP, 0, + NULL, 0, + BOARD_MEMORY_25BITMEM, + 128 * 1024 * 1024, + 0, + NULL, NULL, 0, 0, + NULL, //a26x0board_settings, + cpuboard_io_special + }, + { + NULL + } +}; + static const struct cpuboardsubtype dummy_sub[] = { { NULL } }; @@ -6308,6 +6326,11 @@ const struct cpuboardtype cpuboards[] = { _T("Hardital"), hardital_sub, 0 }, + { + BOARD_HARMS, + _T("Harms"), + harms_sub, 0 + }, { NULL } diff --git a/include/rommgr.h b/include/rommgr.h index ed54078a..c7ddb6e8 100644 --- a/include/rommgr.h +++ b/include/rommgr.h @@ -50,6 +50,7 @@ extern int decode_cloanto_rom_do (uae_u8 *mem, int size, int real_size); #define ROMTYPE_CB_TYPHOON2 0x0004001d #define ROMTYPE_CB_QUIKPAK 0x0004001e #define ROMTYPE_CB_12GAUGE 0x0004001f +#define ROMTYPE_CB_HARMS3KP 0x00040020 #define ROMTYPE_FREEZER 0x00080000 #define ROMTYPE_AR 0x00080001 diff --git a/rommgr.cpp b/rommgr.cpp index 4d2a1365..4c136eca 100644 --- a/rommgr.cpp +++ b/rommgr.cpp @@ -95,7 +95,7 @@ struct romdata *getromdatabypath (const TCHAR *path) return NULL; } -#define NEXT_ROM_ID 246 +#define NEXT_ROM_ID 249 #define ALTROM(id,grp,num,size,flags,crc32,a,b,c,d,e) \ { _T("X"), 0, 0, 0, 0, 0, size, id, 0, 0, flags, (grp << 16) | num, 0, NULL, crc32, a, b, c, d, e }, @@ -413,6 +413,10 @@ static struct romdata roms[] = { 0xa2ba67d1, 0x2015685f, 0xaadfbaf6, 0x8b19b07e, 0x5f4e888f, 0x738b99d7, NULL, NULL }, { _T("GVP A1230 Turbo+ Series II"), 0, 0, 0, 0, _T("A1230SII\0"), 16384, 230, 0, 0, ROMTYPE_CB_A1230S2, 0, 0, NULL, 0x96bd351f, 0xb7648daf, 0x52d0732d, 0x897548f3, 0x29ebf624, 0x101474d5, NULL, NULL }, + { _T("Harms 3000 Professional"), 0, 0, 0, 00, _T("HARMS3000PRO\0"), 65536, 248, 0, 0, ROMTYPE_CB_HARMS3KP, 0, 0, NULL, + 0x80da32b5,0x0a3ded88,0x20a24238,0xd3e43baf,0x7163226c,0x861e2d88, NULL, NULL }, + ALTROMPN(248, 1, 1, 32768, ROMTYPE_ODD | ROMTYPE_8BIT, NULL, 0xc22c5ee5, 0xc211f305, 0xacb2ce10, 0x32b1b296, 0xc5780dde, 0x78dba814) + ALTROMPN(248, 1, 2, 32768, ROMTYPE_EVEN | ROMTYPE_8BIT, NULL, 0xe1062444, 0x7c0dd74f, 0x2bc0a94d, 0xd85aa85f, 0x771b8658, 0x697533cd) { _T("A2620/A2630 -07"), 0, 0, 0, 0, _T("A2620\0A2630\0"), 65536, 105, 0, 0, ROMTYPE_CB_A26x0, 0, 0, _T("390282-07/390283-07"), 0x169d80e9, 0x41f518cb,0x41c1dc1f,0xcc636383,0x20676af5,0x4969010c, NULL, NULL }, -- 2.47.3