Blizzard 1230 MK II + SCSI Kit and Blizzard 1230 MK III.

This commit is contained in:
Toni Wilen 2016-06-21 16:37:20 +03:00
parent daba05262b
commit 9624684ab1
5 changed files with 155 additions and 14 deletions

View File

@ -142,9 +142,11 @@
#define BLIZZARD_RAM_BASE_68 0x68000000
#define BLIZZARD_RAM_256M_BASE_40 0x40000000
#define BLIZZARD_RAM_256M_BASE_70 0x70000000
#define BLIZZARD_MAPROM_BASE 0x4ff80000
#define BLIZZARD_MAPROM_ENABLE 0x80ffff00
#define BLIZZARD_BOARD_DISABLE 0x80fa0000
#define BLIZZARD_MAPROM_BASE 0x4ff80000
#define BLIZZARDMK2_MAPROM_BASE 0x0ff80000
#define BLIZZARDMK3_MAPROM_BASE 0x1ef80000
#define BLIZZARD_MAPROM_ENABLE 0x80ffff00
#define BLIZZARD_BOARD_DISABLE 0x80fa0000
#define CSMK2_BOARD_DISABLE 0x83000000
@ -240,7 +242,7 @@ static bool mapromconfigured(void)
{
if (currprefs.maprom)
return true;
if (currprefs.cpuboard_settings)
if (currprefs.cpuboard_settings & 1)
return true;
return false;
}
@ -250,6 +252,14 @@ void cpuboard_set_flash_unlocked(bool unlocked)
flash_unlocked = unlocked;
}
static bool is_blizzard1230mk2(void)
{
return ISCPUBOARD(BOARD_BLIZZARD, BOARD_BLIZZARD_SUB_1230II);
}
static bool is_blizzard1230mk3(void)
{
return ISCPUBOARD(BOARD_BLIZZARD, BOARD_BLIZZARD_SUB_1230III);
}
static bool is_blizzard(void)
{
return ISCPUBOARD(BOARD_BLIZZARD, BOARD_BLIZZARD_SUB_1230IV) || ISCPUBOARD(BOARD_BLIZZARD, BOARD_BLIZZARD_SUB_1260);
@ -671,6 +681,8 @@ static uae_u32 REGPARAM2 blizzardea_bget(uaecptr addr)
v = cpuboard_ncr710_io_bget(addr);
} else if (is_blizzard2060() && addr >= BLIZZARD_2060_SCSI_OFFSET) {
v = cpuboard_ncr9x_scsi_get(addr);
} else if (is_blizzard1230mk2() && addr >= 0x10000 && (currprefs.cpuboard_settings & 2)) {
v = cpuboard_ncr9x_scsi_get(addr);
} else if (is_blizzard()) {
if (addr & BLIZZARD_SCSI_KIT_SCSI_OFFSET)
v = cpuboard_ncr9x_scsi_get(addr);
@ -742,6 +754,8 @@ static void REGPARAM2 blizzardea_bput(uaecptr addr, uae_u32 b)
if (is_tekmagic()) {
cpuboard_non_byte_ea = true;
cpuboard_ncr710_io_bput(addr, b);
} else if (is_blizzard1230mk2() && addr >= 0x10000 && (currprefs.cpuboard_settings & 2)) {
cpuboard_ncr9x_scsi_put(addr, b);
} else if (is_blizzard2060() && addr >= BLIZZARD_2060_SCSI_OFFSET) {
cpuboard_ncr9x_scsi_put(addr, b);
} else if ((is_blizzard()) && addr >= BLIZZARD_SCSI_KIT_SCSI_OFFSET) {
@ -824,7 +838,12 @@ static void blizzard_copymaprom(void)
if (!maprom_state) {
reload_roms();
} else {
uae_u8 *src = get_real_address(BLIZZARD_MAPROM_BASE);
uae_u8 *src = NULL;
if (is_blizzard()) {
src = get_real_address(BLIZZARD_MAPROM_BASE);
} else if (is_blizzard1230mk2() || is_blizzard1230mk3()) {
src = blizzardmaprom_bank.baseaddr;
}
if (src) {
uae_u8 *dst = kickmem_bank.baseaddr;
protect_roms(false);
@ -832,6 +851,9 @@ static void blizzard_copymaprom(void)
protect_roms(true);
set_roms_modified();
}
if (is_blizzard1230mk2() && cpuboard_size >= 64 * 1024 * 1024) {
map_banks(&blizzardmaprom_bank, BLIZZARDMK2_MAPROM_BASE >> 16, 524288 >> 16, 0);
}
}
}
static void cyberstorm_copymaprom(void)
@ -1056,7 +1078,7 @@ static void REGPARAM2 blizzardio_bput(uaecptr addr, uae_u32 v)
write_log(_T("CSMKII: MAPROM enabled\n"));
cyberstormmk2_copymaprom();
}
} else if (is_blizzard()) {
} else if (is_blizzard() || is_blizzard1230mk2() || is_blizzard1230mk3()) {
if ((addr & 65535) == (BLIZZARD_MAPROM_ENABLE & 65535)) {
if (v != 0x42 || maprom_state || !mapromconfigured())
return;
@ -1311,6 +1333,16 @@ void cpuboard_map(void)
{
if (!currprefs.cpuboard_type)
return;
if (is_blizzard1230mk2() || is_blizzard1230mk3()) {
map_banks(&blizzardram_bank, blizzardram_bank.start >> 16, cpuboard_size >> 16, 0);
map_banks(&blizzardio_bank, BLIZZARD_MAPROM_ENABLE >> 16, 65536 >> 16, 0);
if (is_blizzard1230mk2 () && cpuboard_size < 64 * 1024 * 1024) {
map_banks(&blizzardmaprom_bank, BLIZZARDMK2_MAPROM_BASE >> 16, 524288 >> 16, 0);
}
if (is_blizzard1230mk3()) {
map_banks(&blizzardmaprom_bank, BLIZZARDMK3_MAPROM_BASE >> 16, 524288 >> 16, 0);
}
}
if (is_blizzard() || is_blizzardppc()) {
if (cpuboard_size) {
if (cpuboard_size < 256 * 1024 * 1024) {
@ -1560,6 +1592,55 @@ void cpuboard_init(void)
blizzardea_bank.mask = blizzardea_bank.allocated - 1;
mapped_malloc(&blizzardea_bank);
} else if (is_blizzard1230mk2()) {
blizzardea_bank.allocated = 2 * 65536;
blizzardea_bank.mask = blizzardea_bank.allocated - 1;
mapped_malloc(&blizzardea_bank);
blizzardram_bank.start = 0x0e000000 - cpuboard_size / 2;
blizzardram_bank.allocated = cpuboard_size;
blizzardram_bank.mask = blizzardram_bank.allocated - 1;
if (cpuboard_size) {
blizzardram_bank.label = _T("*");
mapped_malloc(&blizzardram_bank);
}
blizzardmaprom_bank.baseaddr = blizzardram_bank.baseaddr + cpuboard_size - 524288;
blizzardmaprom_bank.start = BLIZZARDMK2_MAPROM_BASE;
blizzardmaprom_bank.allocated = 524288;
blizzardmaprom_bank.mask = 524288 - 1;
blizzardmaprom_bank.flags |= ABFLAG_INDIRECT | ABFLAG_NOALLOC;
mapped_malloc(&blizzardmaprom_bank);
blizzardmaprom_bank_mapped = true;
maprom_base = blizzardram_bank.allocated - 524288;
} else if (is_blizzard1230mk3()) {
blizzardea_bank.allocated = 2 * 65536;
blizzardea_bank.mask = blizzardea_bank.allocated - 1;
mapped_malloc(&blizzardea_bank);
blizzardram_bank.start = 0x1e000000 - cpuboard_size / 2;
blizzardram_bank.allocated = cpuboard_size;
blizzardram_bank.mask = blizzardram_bank.allocated - 1;
if (cpuboard_size) {
blizzardram_bank.label = _T("*");
mapped_malloc(&blizzardram_bank);
}
blizzardmaprom_bank.baseaddr = blizzardram_bank.baseaddr + cpuboard_size - 524288;
blizzardmaprom_bank.start = BLIZZARDMK3_MAPROM_BASE;
blizzardmaprom_bank.allocated = 524288;
blizzardmaprom_bank.mask = 524288 - 1;
blizzardmaprom_bank.flags |= ABFLAG_INDIRECT | ABFLAG_NOALLOC;
mapped_malloc(&blizzardmaprom_bank);
blizzardmaprom_bank_mapped = true;
maprom_base = blizzardram_bank.allocated - 524288;
} else if (is_blizzard() || is_blizzardppc()) {
retry:
cpuboard_size = currprefs.cpuboardmem1_size;
@ -2161,6 +2242,12 @@ addrbank *cpuboard_autoconfig_init(struct romconfig *rc)
case BOARD_BLIZZARD:
switch(currprefs.cpuboard_subtype)
{
case BOARD_BLIZZARD_SUB_1230II:
roms[0] = 163;
break;
case BOARD_BLIZZARD_SUB_1230III:
roms[0] = 162;
break;
case BOARD_BLIZZARD_SUB_1230IV:
roms[0] = 89;
roms2[0] = 94;
@ -2374,7 +2461,7 @@ addrbank *cpuboard_autoconfig_init(struct romconfig *rc)
}
fixserial(blizzardf0_bank.baseaddr, f0rom_size);
flashrom = flash_new(blizzardf0_bank.baseaddr, f0rom_size, f0rom_size, flashtype, flashrom_file, 0);
} else {
} else if (is_blizzard()) {
// 1230 MK IV / 1240/60
f0rom_size = 65536;
earom_size = 131072;
@ -2398,6 +2485,16 @@ addrbank *cpuboard_autoconfig_init(struct romconfig *rc)
zfile_fread(blizzardea_bank.baseaddr + 0x10000, 32768, 1, autoconfig_rom);
}
}
} else if (is_blizzard1230mk3() || is_blizzard1230mk2()) {
earom_size = 131072;
for (int i = 0; i < 32768; i++) {
uae_u8 b = 0xff;
zfile_fread(&b, 1, 1, autoconfig_rom);
blizzardea_bank.baseaddr[i * 2 + 0] = b;
blizzardea_bank.baseaddr[i * 2 + 1] = 0xff;
}
zfile_fclose(autoconfig_rom);
autoconfig_rom = NULL;
}
protect_roms(true);
zfile_fclose(autoconfig_rom);

View File

@ -3449,6 +3449,20 @@ static const struct expansionboardsettings blizzardboard_settings[] = {
}
};
static const struct expansionboardsettings blizzardboard_settings_mk2[] = {
{
_T("MapROM"),
_T("maprom")
},
{
_T("SCSI Kit II"),
_T("scsikitii")
},
{
NULL
}
};
static const struct cpuboardsubtype gvpboard_sub[] = {
{
_T("A3001 Series I"),
@ -3505,6 +3519,28 @@ static const struct cpuboardsubtype gvpboard_sub[] = {
}
};
static const struct cpuboardsubtype blizzardboard_sub[] = {
{
_T("Blizzard 1230 II"),
_T("Blizzard1230II"),
ROMTYPE_CB_B1230MK2, 0,
cpuboard_ncr9x_add_scsi_unit, EXPANSIONTYPE_SCSI,
BOARD_MEMORY_BLIZZARD_12xx,
64 * 1024 * 1024,
0,
NULL, NULL, 0, 0,
blizzardboard_settings_mk2
},
{
_T("Blizzard 1230 III"),
_T("Blizzard1230III"),
ROMTYPE_CB_B1230MK3, 0,
NULL, 0,
BOARD_MEMORY_BLIZZARD_12xx,
32 * 1024 * 1024,
0,
NULL, NULL, 0, 0,
blizzardboard_settings
},
{
_T("Blizzard 1230 IV"),
_T("Blizzard1230IV"),

View File

@ -74,10 +74,12 @@ void blizzardppc_irq(int level);
#define BOARD_MTEC_SUB_EMATRIX530 0
#define BOARD_BLIZZARD 9
#define BOARD_BLIZZARD_SUB_1230IV 0
#define BOARD_BLIZZARD_SUB_1260 1
#define BOARD_BLIZZARD_SUB_2060 2
#define BOARD_BLIZZARD_SUB_PPC 3
#define BOARD_BLIZZARD_SUB_1230II 0
#define BOARD_BLIZZARD_SUB_1230III 1
#define BOARD_BLIZZARD_SUB_1230IV 2
#define BOARD_BLIZZARD_SUB_1260 3
#define BOARD_BLIZZARD_SUB_2060 4
#define BOARD_BLIZZARD_SUB_PPC 5
#define BOARD_CYBERSTORM 10
#define BOARD_CYBERSTORM_SUB_MK1 0

View File

@ -38,6 +38,8 @@ extern int decode_cloanto_rom_do (uae_u8 *mem, int size, int real_size);
#define ROMTYPE_CB_DBK_WF 0x00040012
#define ROMTYPE_CB_EMATRIX 0x00040013
#define ROMTYPE_CB_SX32PRO 0x00040014
#define ROMTYPE_CB_B1230MK2 0x00040015
#define ROMTYPE_CB_B1230MK3 0x00040016
#define ROMTYPE_FREEZER 0x00080000
#define ROMTYPE_AR 0x00080001

View File

@ -95,7 +95,7 @@ struct romdata *getromdatabypath (const TCHAR *path)
return NULL;
}
#define NEXT_ROM_ID 162
#define NEXT_ROM_ID 164
#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 },
@ -322,8 +322,12 @@ static struct romdata roms[] = {
{ _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 },
{ _T("Blizzard 1230-II"), 0, 0, 0, 0, _T("B1230MKII\0"), 32768, 163, 0, 0, ROMTYPE_CB_B1230MK2, 0, 0, NULL,
0xf307cd34, 0xd2f0bfe5, 0x6e84e9f2, 0x2dc11583, 0x30702fd7, 0xd59584ee },
{ _T("Blizzard 1230-III"), 0, 0, 0, 0, _T("B1230MKIII\0"), 16384, 162, 0, 0, ROMTYPE_CB_B1230MK3, 0, 0, NULL,
0x6850607d, 0xfc37c96c, 0xfd22f442, 0xd7d64d21, 0x06683603, 0x2111fbae },
{ _T("Blizzard 1230-IV"), 0, 0, 0, 0, _T("B1230MKIV\0"), 32768, 89, 0, 0, ROMTYPE_CB_BLIZ1230, 0, 0, NULL,
0x3078dbdc, 0x4d3e7fd0, 0xa1a4c3ae, 0xe17c5de3, 0xcbe1af03, 0x447aff92 },
{ _T("Blizzard 1240/1260"), 0, 0, 0, 0, _T("B1240\0B1260\0"), 32768, 90, 0, 0, ROMTYPE_CB_BLIZ1260, 0, 0, NULL,
0xf88ae0f1, 0xf69aca4b,0xb13e3389,0x04676f0c,0x8616f8db,0x074c313d },
{ _T("Blizzard 2060"), 8, 5, 8, 5, _T("B2060\0"), 65536, 92, 0, 0, ROMTYPE_CB_BLIZ2060, 0, 0, NULL,