struct wd_state *wd = wda2091[devnum];
int roms[6];
int slotsize;
+ struct romconfig *rc = NULL;
if (devnum > 0 && !wd->enabled)
return &expamem_null;
wd->rombank = 0;
slotsize = 65536;
wd->rom = xcalloc (uae_u8, slotsize);
+ memset(wd->rom, 0xff, slotsize);
wd->rom_size = 16384;
wd->rom_mask = wd->rom_size - 1;
- if (is_device_rom(&currprefs, devnum, ROMTYPE_A2091)) {
- struct zfile *z = read_device_rom(&currprefs, devnum, ROMTYPE_A2091, roms);
- if (z) {
- write_log (_T("A590/A2091 BOOT ROM '%s'\n"), zfile_getname (z));
- wd->rom_size = zfile_size (z);
- zfile_fread (wd->rom, wd->rom_size, 1, z);
- zfile_fclose (z);
- if (wd->rom_size == 32768) {
- wd->rombankswitcher = 1;
- for (int i = wd->rom_size - 1; i >= 0; i--) {
- wd->rom[i * 2 + 0] = wd->rom[i];
- wd->rom[i * 2 + 1] = 0xff;
+ rc = get_device_romconfig(&currprefs, devnum, ROMTYPE_A2091);
+ if (rc && !rc->autoboot_disabled) {
+ if (is_device_rom(&currprefs, devnum, ROMTYPE_A2091)) {
+ struct zfile *z = read_device_rom(&currprefs, devnum, ROMTYPE_A2091, roms);
+ if (z) {
+ write_log (_T("A590/A2091 BOOT ROM '%s'\n"), zfile_getname (z));
+ wd->rom_size = zfile_size (z);
+ zfile_fread (wd->rom, wd->rom_size, 1, z);
+ zfile_fclose (z);
+ if (wd->rom_size == 32768) {
+ wd->rombankswitcher = 1;
+ for (int i = wd->rom_size - 1; i >= 0; i--) {
+ wd->rom[i * 2 + 0] = wd->rom[i];
+ wd->rom[i * 2 + 1] = 0xff;
+ }
+ } else {
+ for (int i = 1; i < slotsize / wd->rom_size; i++)
+ memcpy (wd->rom + i * wd->rom_size, wd->rom, wd->rom_size);
}
+ wd->rom_mask = wd->rom_size - 1;
} else {
- for (int i = 1; i < slotsize / wd->rom_size; i++)
- memcpy (wd->rom + i * wd->rom_size, wd->rom, wd->rom_size);
+ romwarning (roms);
}
- wd->rom_mask = wd->rom_size - 1;
- } else {
- romwarning (roms);
}
}
return wd == &wd_a2091 ? &dmaca2091_bank : &dmaca2091_2_bank;
struct wd_state *wd = gvpscsi[devnum];
int roms[6];
bool isscsi = true;
+ struct romconfig *rc = NULL;
if (devnum > 0 && !wd->enabled && currprefs.cpuboard_type != BOARD_GVP_A530)
return &expamem_null;
memset(wd->rom, 0xff, wd->rom_size);
wd->rom_mask = 32768 - 1;
- if (is_device_rom(&currprefs, devnum, series2 ? ROMTYPE_GVPS2 : ROMTYPE_GVPS1)) {
- struct zfile *z = read_device_rom(&currprefs, devnum, series2 ? ROMTYPE_GVPS2 : ROMTYPE_GVPS1, roms);
- if (z) {
- write_log(_T("GVP BOOT ROM '%s'\n"), zfile_getname(z));
- int size = zfile_size(z);
- if (series2) {
- zfile_fread(wd->rom, 1, wd->rom_size, z);
- } else {
- xfree(wd->gdmac.buffer);
- wd->gdmac.buffer = xcalloc(uae_u8, GVP_SERIES_I_RAM_MASK + 1);
- for (int i = 0; i < 16384; i++) {
- uae_u8 b;
- zfile_fread(&b, 1, 1, z);
- wd->rom[i] = b;
+ rc = get_device_romconfig(&currprefs, devnum, series2 ? ROMTYPE_GVPS2 : ROMTYPE_GVPS1);
+ if (rc && !rc->autoboot_disabled) {
+ if (is_device_rom(&currprefs, devnum, series2 ? ROMTYPE_GVPS2 : ROMTYPE_GVPS1)) {
+ struct zfile *z = read_device_rom(&currprefs, devnum, series2 ? ROMTYPE_GVPS2 : ROMTYPE_GVPS1, roms);
+ if (z) {
+ write_log(_T("GVP BOOT ROM '%s'\n"), zfile_getname(z));
+ int size = zfile_size(z);
+ if (series2) {
+ zfile_fread(wd->rom, 1, wd->rom_size, z);
+ } else {
+ xfree(wd->gdmac.buffer);
+ wd->gdmac.buffer = xcalloc(uae_u8, GVP_SERIES_I_RAM_MASK + 1);
+ for (int i = 0; i < 16384; i++) {
+ uae_u8 b;
+ zfile_fread(&b, 1, 1, z);
+ wd->rom[i] = b;
+ }
}
+ zfile_fclose(z);
+ if (series2 && size > 16384) {
+ wd->rombankswitcher = 1;
+ }
+ } else {
+ isscsi = false;
+ if (!is_gvp_accelerator())
+ romwarning(roms);
}
- zfile_fclose(z);
- if (series2 && size > 16384) {
- wd->rombankswitcher = 1;
- }
- } else {
- isscsi = false;
- if (!is_gvp_accelerator())
- romwarning(roms);
}
+ } else {
+ isscsi = false;
}
wd->gdmac.version = GVP_SERIESII;
_T("scsi%d_cdtv"),
_T("scsram"),
- _T("scide")
+ _T("scide"),
+ NULL
};
static const TCHAR *z3mapping[] = {
_T("auto"),
} else {
cfgfile_write (f, tmp2, _T("%s,%s"), ci->type == UAEDEV_HDF ? _T("hdf") : _T("dir"), tmp3);
}
+ if (ci->type == UAEDEV_DIR) {
+ bool add_extra = false;
+ if (ci->inject_icons) {
+ add_extra = true;
+ }
+ if (add_extra) {
+ _stprintf(tmp2, _T("%s,inject_icons=%s"), ci->devname, ci->inject_icons ? _T("true") : _T("false"));
+ cfgfile_write(f, _T("filesystem_extra"), tmp2);
+ }
+ }
xfree (str1b);
xfree (str2b);
xfree (str1);
_stprintf(buf, _T("%s%s_rom"), name, i ? _T("_ext") : _T(""));
cfgfile_dwrite_str (f, buf, br->roms[i].romident);
}
+ if (br->roms[i].autoboot_disabled) {
+ _stprintf(buf, _T("%s%s_rom_options"), name, i ? _T("_ext") : _T(""));
+ cfgfile_dwrite_str (f, buf, _T("autoboot_disabled=true")); // ",another_option=xx"
+ }
+
if (br->roms[i].board_ram_size) {
_stprintf(buf, _T("%s%s_mem_size"), name, i ? _T("_ext") : _T(""));
cfgfile_write(f, buf, _T("%d"), br->roms[i].board_ram_size / 0x40000);
return cfgfile_parse_newfilesys (p, -1, 0, value, -1, false);
if (_tcscmp (option, _T("hardfile2")) == 0)
return cfgfile_parse_newfilesys (p, -1, 1, value, -1, false);
+ if (_tcscmp (option, _T("filesystem_extra")) == 0) {
+ int idx = 0;
+ TCHAR *s = value;
+ _tcscat(s, _T(","));
+ struct uaedev_config_info *ci = NULL;
+ for (;;) {
+ TCHAR *tmpp = _tcschr (s, ',');
+ if (tmpp == NULL)
+ return 1;
+ *tmpp++ = 0;
+ if (idx == 0) {
+ for (i = 0; i < p->mountitems; i++) {
+ if (p->mountconfig[i].ci.devname && !_tcscmp (p->mountconfig[i].ci.devname, s)) {
+ ci = &p->mountconfig[i].ci;
+ break;
+ }
+ }
+ if (!ci || ci->type != UAEDEV_DIR)
+ return 1;
+ } else {
+ bool b = true;
+ TCHAR *tmpp2 = _tcschr(s, '=');
+ if (tmpp2) {
+ *tmpp2++ = 0;
+ if (!strcasecmp(tmpp2, _T("false")))
+ b = false;
+ }
+ if (!strcasecmp(s, _T("inject_icons"))) {
+ ci->inject_icons = b;
+ }
+ }
+ idx++;
+ s = tmpp;
+ }
+ }
return 0;
}
return brc->roms[idx].romfile[0] != 0;
}
+static int cfgfile_option_bool(TCHAR *s, const TCHAR *option)
+{
+ _tcscat(s, _T(","));
+ for (;;) {
+ TCHAR *tmpp = _tcschr (s, ',');
+ if (tmpp == NULL)
+ return -1;
+ *tmpp++ = 0;
+ TCHAR *tmpp2 = _tcschr(s, '=');
+ if (tmpp2)
+ *tmpp2++ = 0;
+ if (!strcasecmp(s, option)) {
+ if (tmpp2 && !strcasecmp(tmpp2, _T("true")))
+ return 1;
+ if (tmpp2 && !strcasecmp(tmpp2, _T("false")))
+ return 0;
+ return 1;
+ }
+ }
+}
+
static bool cfgfile_read_board_rom(struct uae_prefs *p, const TCHAR *option, const TCHAR *value, struct multipath *mp)
{
TCHAR buf[256], buf2[MAX_DPATH], buf3[MAX_DPATH];
return true;
}
+ _stprintf(buf, _T("%s_rom_options"), ert->name);
+ if (cfgfile_string (option, value, buf, buf2, sizeof buf2 / sizeof (TCHAR))) {
+ if (cfgfile_option_bool(buf2, _T("autoboot_disabled")) == 1) {
+ brc = get_device_rom_new(p, ert->romtype, &idx);
+ brc->roms[idx].autoboot_disabled = true;
+ }
+ return true;
+ }
+
_stprintf(buf, _T("%s_mem_size"), ert->name);
if (cfgfile_intval (option, value, buf, &val, 0x40000)) {
if (val) {
return &expamem_null;
case BOARD_BLIZZARD_1230_IV:
roms[0] = 89;
- if (brc2)
- roms2[0] = 94;
+ roms2[0] = 94;
break;
case BOARD_BLIZZARD_1260:
roms[0] = 90;
- if (brc2)
- roms2[0] = 94;
+ roms2[0] = 94;
break;
case BOARD_BLIZZARD_2060:
roms[0] = 92;
zfile_fclose(autoconfig_rom);
autoconfig_rom = NULL;
if (roms2[0] != -1) {
- if (brc2)
+ if (brc2 && brc2->roms[idx2].romfile[0])
autoconfig_rom = board_rom_open(roms2, brc2->roms[idx2].romfile);
- if (!autoconfig_rom)
- autoconfig_rom = board_rom_open(roms2, defaultromname);
if (autoconfig_rom) {
memset(blizzardea_bank.baseaddr + 0x10000, 0xff, 65536);
zfile_fread(blizzardea_bank.baseaddr + 0x10000, 32768, 1, autoconfig_rom);
- } else {
- romwarning(roms2);
- write_log(_T("Blizzard SCSI Kit IV ROM not found\n"));
}
}
}
{
_T("cpuboard"), _T("Accelerator board"),
NULL, add_cpuboard_unit, ROMTYPE_CPUBOARD, 0, 0,
- EXPANSIONTYPE_SCSI | EXPANSIONTYPE_IDE
+ false, EXPANSIONTYPE_SCSI | EXPANSIONTYPE_IDE
},
{
_T("cpuboard_ext"), _T("Blizzard SCSI Kit IV"),
NULL, NULL, ROMTYPE_CPUBOARDEXT, ROMTYPE_CPUBOARD, 0,
- EXPANSIONTYPE_SCSI
+ false, EXPANSIONTYPE_SCSI
},
{
_T("a2091"), _T("A590/A2091"),
a2091_init, a2091_add_scsi_unit, ROMTYPE_A2091 | ROMTYPE_NONE, 0, 2,
- EXPANSIONTYPE_SCSI, commodore, commodore_a2091_ram, 0
+ true, EXPANSIONTYPE_SCSI, commodore, commodore_a2091_ram, 0
},
{
_T("a4091"), _T("A4091"),
ncr710_a4091_autoconfig_init, a4091_add_scsi_unit, ROMTYPE_A4091, 0, 3,
- EXPANSIONTYPE_SCSI
+ false, EXPANSIONTYPE_SCSI
},
{
_T("fastlane"), _T("Fastlane"),
ncr_fastlane_autoconfig_init, fastlane_add_scsi_unit, ROMTYPE_FASTLANE, 0, 3,
- EXPANSIONTYPE_SCSI
+ false, EXPANSIONTYPE_SCSI
},
{
_T("oktagon2008"), _T("Oktagon 2008"),
ncr_oktagon_autoconfig_init, oktagon_add_scsi_unit, ROMTYPE_OKTAGON, 0, 2,
- EXPANSIONTYPE_SCSI
+ false, EXPANSIONTYPE_SCSI
},
{
_T("gvp1"), _T("GVP Series I"),
gvp_init_s1, gvp_add_scsi_unit, ROMTYPE_GVPS1 | ROMTYPE_NONE, 0, 2,
- EXPANSIONTYPE_SCSI, 2017, 10, 0
+ true, EXPANSIONTYPE_SCSI, 2017, 10, 0
},
{
_T("gvp"), _T("GVP Series II"),
gvp_init_s2, gvp_add_scsi_unit, ROMTYPE_GVPS2 | ROMTYPE_NONE, 0, 2,
- EXPANSIONTYPE_SCSI, 2017, 10, 0
+ true, EXPANSIONTYPE_SCSI, 2017, 10, 0
},
{
_T("amax"), _T("AMAX ROM dongle"),
- NULL, NULL, ROMTYPE_AMAX | ROMTYPE_NONE, 0, 0 },
+ NULL, NULL, ROMTYPE_AMAX | ROMTYPE_NONE, 0, 0
+ },
{
_T("alfapower"), _T("AlfaPower/AT-Bus 2008"),
alf_init, alf_add_ide_unit, ROMTYPE_ALFA, 0, 2,
- EXPANSIONTYPE_IDE, 2092, 8, 0
+ false, EXPANSIONTYPE_IDE, 2092, 8, 0
},
{
_T("alfapowerplus"), _T("AlfaPower Plus"),
alf_init, alf_add_ide_unit, ROMTYPE_ALFAPLUS, 0, 2,
- EXPANSIONTYPE_IDE, 2092, 8, 0
+ false, EXPANSIONTYPE_IDE, 2092, 8, 0
},
{
_T("apollo"), _T("Apollo"),
apollo_init, apollo_add_scsi_unit, ROMTYPE_APOLLO, 0, 2,
- EXPANSIONTYPE_SCSI | EXPANSIONTYPE_IDE, 8738, 0, 0
+ false, EXPANSIONTYPE_SCSI | EXPANSIONTYPE_IDE, 8738, 0, 0
},
{
_T("masoboshi"), _T("Masoboshi"),
masoboshi_init, masoboshi_add_scsi_unit, ROMTYPE_MASOBOSHI | ROMTYPE_NONE, 0, 2,
- EXPANSIONTYPE_SCSI | EXPANSIONTYPE_IDE, 2157, 3, 0
+ true, EXPANSIONTYPE_SCSI | EXPANSIONTYPE_IDE, 2157, 3, 0
},
{
_T("suprabytesync"), _T("SupraDrive 500XP"),
supra_init, supra_add_scsi_unit, ROMTYPE_SUPRA | ROMTYPE_NONE, 0, 2,
- EXPANSIONTYPE_SCSI | EXPANSIONTYPE_IDE, 1056, 9, 0
+ true, EXPANSIONTYPE_SCSI | EXPANSIONTYPE_IDE, 1056, 9, 0
},
{
NULL
int add_cpuboard_unit(int unit, struct uaedev_config_info *uci)
{
bool added = false;
+ bool ide = uci->controller_type >= HD_CONTROLLER_TYPE_IDE_FIRST && uci->controller_type <= HD_CONTROLLER_TYPE_IDE_LAST;
+ if (!ide) {
#ifdef NCR
- if (currprefs.cpuboard_type == BOARD_WARPENGINE_A4000) {
- warpengine_add_scsi_unit(unit, uci);
- added = true;
- } else if (currprefs.cpuboard_type == BOARD_DKB1200) {
- cpuboard_dkb_add_scsi_unit(unit, uci);
- added = true;
- } else if (currprefs.cpuboard_type == BOARD_TEKMAGIC) {
- tekmagic_add_scsi_unit(unit, uci);
- added = true;
- } else if (currprefs.cpuboard_type == BOARD_CSMK3 || currprefs.cpuboard_type == BOARD_CSPPC) {
- cyberstorm_add_scsi_unit(unit, uci);
- added = true;
- } else if (currprefs.cpuboard_type == BOARD_BLIZZARDPPC) {
- blizzardppc_add_scsi_unit(unit, uci);
- added = true;
- } else if (currprefs.cpuboard_type == BOARD_BLIZZARD_2060 ||
- currprefs.cpuboard_type == BOARD_CSMK1 ||
- currprefs.cpuboard_type == BOARD_CSMK2) {
- cpuboard_ncr9x_add_scsi_unit(unit, uci);
+ if (currprefs.cpuboard_type == BOARD_WARPENGINE_A4000) {
+ warpengine_add_scsi_unit(unit, uci);
added = true;
- } else if (currprefs.cpuboard_type == BOARD_BLIZZARD_1230_IV ||
- currprefs.cpuboard_type == BOARD_BLIZZARD_1260) {
- if (cfgfile_board_enabled(&currprefs, ROMTYPE_CPUBOARDEXT)) {
- cpuboard_ncr9x_add_scsi_unit(unit, uci);
+ } else if (currprefs.cpuboard_type == BOARD_DKB1200) {
+ cpuboard_dkb_add_scsi_unit(unit, uci);
added = true;
+ } else if (currprefs.cpuboard_type == BOARD_TEKMAGIC) {
+ tekmagic_add_scsi_unit(unit, uci);
+ added = true;
+ } else if (currprefs.cpuboard_type == BOARD_CSMK3 || currprefs.cpuboard_type == BOARD_CSPPC) {
+ cyberstorm_add_scsi_unit(unit, uci);
+ added = true;
+ } else if (currprefs.cpuboard_type == BOARD_BLIZZARDPPC) {
+ blizzardppc_add_scsi_unit(unit, uci);
+ added = true;
+ } else if (currprefs.cpuboard_type == BOARD_BLIZZARD_2060 ||
+ currprefs.cpuboard_type == BOARD_CSMK1 ||
+ currprefs.cpuboard_type == BOARD_CSMK2) {
+ cpuboard_ncr9x_add_scsi_unit(unit, uci);
+ added = true;
+ } else if (currprefs.cpuboard_type == BOARD_BLIZZARD_1230_IV ||
+ currprefs.cpuboard_type == BOARD_BLIZZARD_1260) {
+ if (cfgfile_board_enabled(&currprefs, ROMTYPE_CPUBOARDEXT)) {
+ cpuboard_ncr9x_add_scsi_unit(unit, uci);
+ added = true;
+ }
}
- }
#endif
- if (currprefs.cpuboard_type == BOARD_APOLLO) {
- apollo_add_scsi_unit(unit, uci);
- added = true;
- } else if (currprefs.cpuboard_type == BOARD_GVP_A530) {
- gvp_add_scsi_unit(unit, uci);
- added = true;
- } else if (currprefs.cpuboard_type == BOARD_A3001_I || currprefs.cpuboard_type == BOARD_A3001_II) {
- gvp_add_ide_unit(unit, uci);
- added = true;
+ if (currprefs.cpuboard_type == BOARD_APOLLO) {
+ apollo_add_scsi_unit(unit, uci);
+ added = true;
+ } else if (currprefs.cpuboard_type == BOARD_GVP_A530) {
+ gvp_add_scsi_unit(unit, uci);
+ added = true;
+ }
+ } else {
+ if (currprefs.cpuboard_type == BOARD_A3001_I || currprefs.cpuboard_type == BOARD_A3001_II) {
+ gvp_add_ide_unit(unit, uci);
+ added = true;
+ }
}
return added;
}
* (c) 2006 - 2015 Toni Wilen
*/
-#define IDE_LOG 2
+#define IDE_LOG 0
#include "sysconfig.h"
#include "sysdeps.h"
struct ide_board *ide = &alf_board[devnum];
int roms[2];
bool alfplus = cfgfile_board_enabled(&currprefs, ROMTYPE_ALFAPLUS);
+ struct romconfig *rc = NULL;
if (devnum > 0 && !ide->enabled)
return &expamem_null;
memset(ide->rom, 0xff, ide->rom_size);
ide->rom_mask = ide->rom_size - 1;
- struct zfile *z = read_device_rom(&currprefs, devnum, alfplus ? ROMTYPE_ALFAPLUS : ROMTYPE_ALFA, roms);
for (int i = 0; i < 16; i++) {
uae_u8 b = alfplus ? alfplus_autoconfig[i] : alf_autoconfig[i];
ew(ide, i * 4, b);
}
- if (z) {
- write_log(_T("ALF BOOT ROM '%s'\n"), zfile_getname(z));
- for (int i = 0; i < 0x1000 / 2; i++) {
- uae_u8 b;
- zfile_fread(&b, 1, 1, z);
- ide->rom[ALF_ROM_OFFSET + i * 4 + 0] = b;
- zfile_fread(&b, 1, 1, z);
- ide->rom[ALF_ROM_OFFSET + i * 4 + 2] = b;
- }
- for (int i = 0; i < 32768 - 0x1000; i++) {
- uae_u8 b;
- zfile_fread(&b, 1, 1, z);
- ide->rom[0x2000 + i * 4 + 1] = b;
- zfile_fread(&b, 1, 1, z);
- ide->rom[0x2000 + i * 4 + 3] = b;
+
+ rc = get_device_romconfig(&currprefs, devnum, alfplus ? ROMTYPE_ALFAPLUS : ROMTYPE_ALFA);
+ if (rc && !rc->autoboot_disabled) {
+ struct zfile *z = read_device_rom(&currprefs, devnum, alfplus ? ROMTYPE_ALFAPLUS : ROMTYPE_ALFA, roms);
+ if (z) {
+ write_log(_T("ALF BOOT ROM '%s'\n"), zfile_getname(z));
+ for (int i = 0; i < 0x1000 / 2; i++) {
+ uae_u8 b;
+ zfile_fread(&b, 1, 1, z);
+ ide->rom[ALF_ROM_OFFSET + i * 4 + 0] = b;
+ zfile_fread(&b, 1, 1, z);
+ ide->rom[ALF_ROM_OFFSET + i * 4 + 2] = b;
+ }
+ for (int i = 0; i < 32768 - 0x1000; i++) {
+ uae_u8 b;
+ zfile_fread(&b, 1, 1, z);
+ ide->rom[0x2000 + i * 4 + 1] = b;
+ zfile_fread(&b, 1, 1, z);
+ ide->rom[0x2000 + i * 4 + 3] = b;
+ }
+ zfile_fclose(z);
+ } else {
+ romwarning(roms);
}
- zfile_fclose(z);
- } else {
- romwarning(roms);
}
return ide->bank;
}
return 1;
}
-static const uae_u8 masoboshi_fake_no_rom[] = { 0xcf, 0x1f, 0xff, 0xbf, 0xbf, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x9f, 0x2f };
-
addrbank *masoboshi_init(int devnum)
{
struct ide_board *ide;
+ struct romconfig *rc = NULL;
int roms[2];
ide = &masoboshi_board[devnum];
ide->rom[i * 2 + 1] = 0xff;
}
zfile_fclose(z);
- memcpy(ide->acmemory, ide->rom, sizeof ide->acmemory);
+ rc = get_device_romconfig(&currprefs, devnum, ROMTYPE_MASOBOSHI);
+ if (rc && rc->autoboot_disabled)
+ memcpy(ide->acmemory, ide->rom + 0x100, sizeof ide->acmemory);
+ else
+ memcpy(ide->acmemory, ide->rom + 0x000, sizeof ide->acmemory);
} else {
romwarning(roms);
}
- } else {
- for (int i = 0; i < sizeof masoboshi_fake_no_rom; i++) {
- ide->acmemory[i * 2 + 0] = masoboshi_fake_no_rom[i];
- }
}
// init SCSI part
ncr_masoboshi_autoconfig_init(devnum);
int romtype;
int parentromtype;
int zorro;
+ bool autoboot_jumper;
int deviceflags;
int memory_mid, memory_pid;
uae_u32 memory_serial;
int sectorsperblock;
int forceload;
int device_emu_unit;
-
+ bool inject_icons;
};
struct uaedev_config_data
TCHAR romfile[MAX_DPATH];
TCHAR romident[256];
uae_u32 board_ram_size;
+ bool autoboot_disabled;
};
#define MAX_BOARD_ROMS 2
struct boardromconfig
extern int configure_rom (struct uae_prefs *p, const int *rom, int msg);
int is_device_rom(struct uae_prefs *p, int devnum, int romtype);
struct zfile *read_device_rom(struct uae_prefs *p, int devnum, int romtype, int *roms);
+struct romconfig *get_device_romconfig(struct uae_prefs *p, int devnum, int romtype);
struct boardromconfig *get_device_rom(struct uae_prefs *p, int romtype, int *index);
void set_device_rom(struct uae_prefs *p, const TCHAR *path, int romtype);
const struct expansionromtype *get_device_expansion_rom(int romtype);
{
int roms[2];
struct ncr9x_state *ncr = &ncr_oktagon2008_scsi[devnum];
+ struct romconfig *rc = NULL;
xfree(ncr->rom);
ncr->rom = NULL;
memset(ncr->eeprom_data, 0xff, OKTAGON_EEPROM_SIZE);
memcpy(ncr->eeprom_data + 0x100, oktagon_eeprom, 16);
ncr->eeprom = eeprom_new(ncr->eeprom_data, OKTAGON_EEPROM_SIZE, NULL);
+ ncr->rom = xcalloc (uae_u8, OKTAGON_ROM_SIZE * 6);
+ memset(ncr->rom, 0xff, OKTAGON_ROM_SIZE * 6);
ncr9x_init ();
ncr9x_reset_board(ncr);
- struct zfile *z = read_device_rom(&currprefs, devnum, ROMTYPE_OKTAGON, roms);
- ncr->rom = xcalloc (uae_u8, OKTAGON_ROM_SIZE * 6);
- if (z) {
- // memory board at offset 0x100
- int autoconfig_offset = 0;
- write_log (_T("%s BOOT ROM '%s'\n"), ncr->name, zfile_getname (z));
- memset(ncr->rom, 0xff, OKTAGON_ROM_SIZE * 4);
- for (int i = 0; i < 0x1000 / 2; i++) {
- uae_u8 b;
- zfile_fread(&b, 1, 1, z);
- ncr->rom[OKTAGON_ROM_OFFSET + i * 4 + 0] = b;
- zfile_fread(&b, 1, 1, z);
- ncr->rom[OKTAGON_ROM_OFFSET + i * 4 + 2] = b;
- }
- for (int i = 0; i < OKTAGON_ROM_SIZE - 0x1000; i++) {
- uae_u8 b;
- zfile_fread(&b, 1, 1, z);
- ncr->rom[0x2000 + i * 4 + 1] = b;
- zfile_fread(&b, 1, 1, z);
- ncr->rom[0x2000 + i * 4 + 3] = b;
- }
-
- for (int i = 0; i < 16; i++) {
- uae_u8 b = oktagon_autoconfig[i];
- ew(ncr, i * 4, b);
+ rc = get_device_romconfig(&currprefs, devnum, ROMTYPE_OKTAGON);
+ if (rc && !rc->autoboot_disabled) {
+ struct zfile *z = read_device_rom(&currprefs, devnum, ROMTYPE_OKTAGON, roms);
+ if (z) {
+ // memory board at offset 0x100
+ write_log (_T("%s BOOT ROM '%s'\n"), ncr->name, zfile_getname (z));
+ memset(ncr->rom, 0xff, OKTAGON_ROM_SIZE * 4);
+ for (int i = 0; i < 0x1000 / 2; i++) {
+ uae_u8 b;
+ zfile_fread(&b, 1, 1, z);
+ ncr->rom[OKTAGON_ROM_OFFSET + i * 4 + 0] = b;
+ zfile_fread(&b, 1, 1, z);
+ ncr->rom[OKTAGON_ROM_OFFSET + i * 4 + 2] = b;
+ }
+ for (int i = 0; i < OKTAGON_ROM_SIZE - 0x1000; i++) {
+ uae_u8 b;
+ zfile_fread(&b, 1, 1, z);
+ ncr->rom[0x2000 + i * 4 + 1] = b;
+ zfile_fread(&b, 1, 1, z);
+ ncr->rom[0x2000 + i * 4 + 3] = b;
+ }
+ zfile_fclose(z);
}
- zfile_fclose(z);
+ }
+ for (int i = 0; i < 16; i++) {
+ uae_u8 b = oktagon_autoconfig[i];
+ ew(ncr, i * 4, b);
}
return ncr == &ncr_oktagon2008_scsi[0] ? &ncr_bank_oktagon : &ncr_bank_oktagon_2;
ncr9x_init ();
ncr9x_reset_board(ncr);
- int idx;
- struct boardromconfig *brc = get_device_rom(&currprefs, ROMTYPE_CPUBOARD, &idx);
- struct zfile *z = NULL;
- if (brc) {
- const TCHAR *romname = brc->roms[idx].romfile;
- z = read_rom_name (romname);
- if (!z) {
- struct romlist *rl = getromlistbyids(roms, romname);
- if (rl) {
- struct romdata *rd = rl->rd;
- z = read_rom (rd);
- }
- }
- }
+ struct zfile *z = read_device_rom(&currprefs, devnum, ROMTYPE_CPUBOARD, roms);
ncr->rom = xcalloc (uae_u8, DKB_ROM_SIZE * 2);
if (z) {
// memory board at offset 0x100
- int autoconfig_offset = 0;
int i;
write_log (_T("%s BOOT ROM '%s'\n"), ncr->name, zfile_getname (z));
memset(ncr->rom, 0xff, DKB_ROM_SIZE * 2);
{
struct ncr_state *ncr = ncra4091[devnum];
int roms[3];
+ struct romconfig *rc = NULL;
xfree(ncr->rom);
ncr->rom = NULL;
#define IDC_AVIOUTPUT_FILETEXT 1610
#define IDC_INPUTDEVICETEXT 1610
#define IDC_ALWAYSONTOP 1610
+#define IDC_SCSIROMFILEAUTOBOOT 1610
#define IDC_AVIOUTPUT_FILE 1611
#define IDC_INPUTLIST 1611
#define IDC_CATWEASEL 1611
LTEXT "Accelerator board ROM file:",IDC_STATIC,12,240,170,15,SS_CENTERIMAGE
COMBOBOX IDC_CPUBOARDROMFILE,12,256,171,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "...",IDC_CPUBOARDROMCHOOSER,187,255,10,15
+ CONTROL "Autoboot disabled",IDC_SCSIROMFILEAUTOBOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,239,104,12
END
IDD_DISPLAY DIALOGEX 0, 0, 396, 298
COMBOBOX IDC_PORT0_JOYS,45,19,342,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_PORT0_AF,45,37,86,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_PORT0_JOYSMODE,136,38,106,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- PUSHBUTTON "Remap [] Remap Port 1 configurarion.",IDC_PORT0_REMAP,352,37,36,14
+ PUSHBUTTON "Remap / Test [] Remap or test Port 1 configurarion.",IDC_PORT0_REMAP,310,37,78,14
RTEXT "Port 2:",IDC_STATIC,6,56,35,15,SS_CENTERIMAGE
COMBOBOX IDC_PORT1_JOYS,45,57,342,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_PORT1_AF,45,74,86,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_PORT1_JOYSMODE,136,74,106,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- PUSHBUTTON "Remap [] Remap Port 2 configuration.",IDC_PORT1_REMAP,352,74,36,14
+ PUSHBUTTON "Remap / Test [] Remap or test Port 2 configuration.",IDC_PORT1_REMAP,310,74,78,14
PUSHBUTTON "Swap ports [] Swap ports 1 and 2.",IDC_SWAP,45,100,78,14
LTEXT "Emulated parallel port joystick adapter",IDC_STATIC,10,124,179,15,SS_CENTERIMAGE
RTEXT "X-Arcade layout information []#1",IDC_STATIC,217,124,170,15,SS_NOTIFY | SS_CENTERIMAGE
#define LANG_DLL_FULL_VERSION_MATCH 1
#if WINUAEPUBLICBETA
-#define WINUAEBETA _T("8")
+#define WINUAEBETA _T("9")
#else
#define WINUAEBETA _T("")
#endif
-#define WINUAEDATE MAKEBD(2015, 2, 8)
+#define WINUAEDATE MAKEBD(2015, 2, 9)
//#define WINUAEEXTRA _T("AmiKit Preview")
//#define WINUAEEXTRA _T("Amiga Forever Edition")
}
}
-static int scsiromselected;
+static int scsiromselected = -1;
#define Error(x) MessageBox (NULL, (x), _T("WinUAE Error"), MB_OK)
ShowWindow (w, hide ? SW_HIDE : SW_SHOW);
}
+static int scsiromselect_table[32];
+
+static void gui_add_string(int *table, HWND hDlg, int item, int id, const TCHAR *str)
+{
+ while (*table >= 0)
+ table++;
+ *table++ = id;
+ *table = -1;
+ SendDlgItemMessage(hDlg, item, CB_ADDSTRING, 0, (LPARAM)str);
+}
+static void gui_set_string_cursor(int *table, HWND hDlg, int item, int id)
+{
+ int idx = 0;
+ while (*table >= 0) {
+ if (*table == id) {
+ SendDlgItemMessage(hDlg, item, CB_SETCURSEL, idx, 0);
+ return;
+ }
+ idx++;
+ table++;
+ }
+}
+static int gui_get_string_cursor(int *table, HWND hDlg, int item)
+{
+ int posn = SendDlgItemMessage (hDlg, item, CB_GETCURSEL, 0, 0);
+ if (posn < 0)
+ return CB_ERR;
+ return table[posn];
+}
+
static int stringboxdialogactive;
static INT_PTR CALLBACK StringBoxDialogProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
break;
case IDC_SCSIROMFILE:
{
- int val = SendDlgItemMessage (hDlg, IDC_SCSIROMSELECT, CB_GETCURSEL, 0, 0L);
+ int val = gui_get_string_cursor(scsiromselect_table, hDlg, IDC_SCSIROMSELECT);
if (val != CB_ERR) {
int index;
struct boardromconfig *brc;
if (tmp[0]) {
brc = get_device_rom_new(&workprefs, expansionroms[scsiromselected].romtype, &index);
getromfile(hDlg, IDC_SCSIROMFILE, brc->roms[index].romfile, MAX_DPATH / sizeof (TCHAR));
+ if (ischecked(hDlg, IDC_SCSIROMFILEAUTOBOOT))
+ brc->roms[index].autoboot_disabled = true;
} else {
clear_device_rom(&workprefs, expansionroms[scsiromselected].romtype);
}
brc = get_device_rom(&workprefs, expansionroms[scsiromselected].romtype, &index);
addromfiles (fkey, hDlg, IDC_SCSIROMFILE, brc ? brc->roms[index].romfile : NULL,
expansionroms[scsiromselected].romtype, 0);
+ CheckDlgButton(hDlg, IDC_SCSIROMFILEAUTOBOOT, brc && brc->roms[index].autoboot_disabled);
+ ew(hDlg, IDC_SCSIROMFILEAUTOBOOT, expansionroms[scsiromselected].autoboot_jumper);
brc = get_device_rom(&workprefs, ROMTYPE_CPUBOARD, &index);
addromfiles(fkey, hDlg, IDC_CPUBOARDROMFILE, brc ? brc->roms[index].romfile : NULL,
SetDlgItemText(hDlg, IDC_RTCFILE, workprefs.rtcfile);
CheckDlgButton(hDlg, IDC_KICKSHIFTER, workprefs.kickshifter);
CheckDlgButton(hDlg, IDC_MAPROM, workprefs.maprom);
- SendDlgItemMessage (hDlg, IDC_SCSIROMSELECT, CB_SETCURSEL, scsiromselected, 0);
+ gui_set_string_cursor(scsiromselect_table, hDlg, IDC_SCSIROMSELECT, scsiromselected);
}
static void init_kickstart (HWND hDlg)
{
+ static int first = -1;
#if !defined(AUTOCONFIG)
ew (hDlg, IDC_MAPROM), FALSE);
#endif
ew(hDlg, IDC_CPUBOARDROMFILE, workprefs.cpuboard_type != 0);
SendDlgItemMessage(hDlg, IDC_SCSIROMSELECT, CB_RESETCONTENT, 0, 0);
+ scsiromselect_table[0] = -1;
for (int i = 0; expansionroms[i].name; i++) {
- SendDlgItemMessage(hDlg, IDC_SCSIROMSELECT, CB_ADDSTRING, 0, (LPARAM)expansionroms[i].friendlyname);
+ if (expansionroms[i].romtype & ROMTYPE_CPUBOARD)
+ continue;
+ if (first < 0)
+ first = i;
+ gui_add_string(scsiromselect_table, hDlg, IDC_SCSIROMSELECT, i, expansionroms[i].friendlyname);
}
int found = -1;
for (int i = 0; expansionroms[i].name; i++) {
int romtype = expansionroms[i].romtype;
+ if (romtype & ROMTYPE_CPUBOARD)
+ continue;
if (cfgfile_board_enabled(&workprefs, romtype)) {
if (found == -1)
found = i;
found = -2;
}
}
+ if (scsiromselected < 0 && found < 0)
+ found = first;
if (found >= 0) {
scsiromselected = found;
- SendDlgItemMessage (hDlg, IDC_SCSIROMSELECT, CB_SETCURSEL, scsiromselected, 0);
+ gui_set_string_cursor(scsiromselect_table, hDlg, IDC_SCSIROMSELECT, scsiromselected);
}
if (!regexiststree(NULL, _T("DetectedROMs")))
values_from_kickstartdlg (hDlg);
break;
case IDC_SCSIROMSELECT:
- val = SendDlgItemMessage (hDlg, IDC_SCSIROMSELECT, CB_GETCURSEL, 0, 0L);
+ val = gui_get_string_cursor(scsiromselect_table, hDlg, IDC_SCSIROMSELECT);
if (val != CB_ERR) {
int index;
struct boardromconfig *brc;
brc = get_device_rom(&workprefs, expansionroms[scsiromselected].romtype, &index);
addromfiles (fkey, hDlg, IDC_SCSIROMFILE, brc ? brc->roms[index].romfile : NULL,
expansionroms[scsiromselected].romtype, 0);
+ ew(hDlg, IDC_SCSIROMFILEAUTOBOOT, expansionroms[scsiromselected].autoboot_jumper);
regclosetree(fkey);
}
break;
kickstartfilebuttons (hDlg, wParam, NULL);
switch (LOWORD (wParam))
{
+ case IDC_SCSIROMFILEAUTOBOOT:
+ values_from_kickstartdlg (hDlg);
+ break;
+
case IDC_FLASHFILE:
GetWindowText (GetDlgItem (hDlg, IDC_FLASHFILE), tmp, sizeof (tmp) / sizeof (TCHAR));
_tcscpy (workprefs.flashfile, tmp);
static int hdmenutable[256];
-static void gui_add_string(int *table, HWND hDlg, int item, int id, const TCHAR *str)
-{
- while (*table >= 0)
- table++;
- *table++ = id;
- *table = -1;
- SendDlgItemMessage(hDlg, item, CB_ADDSTRING, 0, (LPARAM)str);
-}
-static void gui_set_string_cursor(int *table, HWND hDlg, int item, int id)
-{
- int idx = 0;
- while (*table >= 0) {
- if (*table == id) {
- SendDlgItemMessage(hDlg, item, CB_SETCURSEL, idx, 0);
- return;
- }
- idx++;
- table++;
- }
-}
-static int gui_get_string_cursor(int *table, HWND hDlg, int item)
-{
- int posn = SendDlgItemMessage (hDlg, item, CB_GETCURSEL, 0, 0);
- if (posn < 0)
- return CB_ERR;
- return table[posn];
-}
-
static void sethardfile (HWND hDlg)
{
bool rdb = is_hdf_rdb ();
+Beta 9:
+
+- Fixed harddrive config parse crash. (b8)
+- Blizzard SCSI Kit was always enabled if compatible accelerator board was selected. (b8)
+- Accelerator board with SCSI and "IDE (auto)": HD was mounted as accelerator SCSI. (b8)
+- Accelerator board ROM selection is not anymore in SCSI/Boot ROM list.
+- Added autoboot disabled jumper option to harddrive controllers. Not all devices supported yet.
+ (Some only hardware disable rom chip, some change autoconfig data in hardware level)
+
+Beta 8:
+
+- 53c710 software reset bit emulated.
+- Cirrus Logic register memory banks should not be marked thread safe.
+- Show '?' instead of 'E' in harddrives list if hdf can't be opened because of access fault, for example if it
+ is already open and emulation is running and show '!' if open failed because of write protection.
+- Rewritten expansion board rom handling, expansion data is now fully parametrized, autoconfig emulation and
+ config file handling does not need code changes anymore when new board with boot rom is implemented.
+- Secondary IDE/SCSI boards temporarily removed.
+- Automatically disable 24-bit CPU addressing if selected accelerator board is 32-bit.
+- Existing Blizzard 1230IV/1240/1260+SCSI configurations need adjustment. SCSI Kit configuration has changed.
+- Do not initialize tablet if tablet options are not enabled.
+- 5380/53c80 SCSI chip emulation implemented. Surprisingly basic chip, even Apollo SCSI hardware is more complex,
+ driver needs even more bit-banging than Apollo..
+- SupraDrive 500XP (5380) emulation implemented.
+- Added GVP G-Force 030 board. Same as GVP A530 but supports more RAM, located at 0x01000000.
+- A2620/A2630 accelerator board RAM now adjusts 0x01000000 memory size.
+- Fixed GPV Series I autoconfig product id.
+- STOP instruction was 2 cycles too fast in 68000 cycle-exact mode.
+
+NOTE: Accelerator board ROM appears also in SCSI/Boot ROM list. It will be removed later.
+
+SupraDrive 500XP:
+
+- v3.8 ROM (AMAB6) added. (Anyone have AMAB5 or older? I'd like to know why older versions have so many
+ compatibility problems with modern drives. A2000 WordSync version also accepted.)
+- Uses MOVEP in main data transfer loop. (My crystall ball says WordSync version does not...)
+- Usual fake DMA, CPU used to transfer data, hardware automatically handles SCSI data handshake.
+- Any CPU access to "fake DMA" address space when SCSI chip is not in DMA mode: access never finishes.
+ This is also emulated, causes halt 6 state.
+
Beta 7:
- Fixed infinite recursion (and stack overflow) when pause when uncaptered is enabled and display mode changes.
Apollo 1240/1260 driver still have short "is there any IDE drives" detection code remaining.
- "Software" SCSI, hardware can only do bus arbitration in hardware, everything else is done by bit-banging
SCSI IO lines. Both SCSI and IDE also use non-DMA data transfers.
-- 128k Apollo ROMs (68060 f00000 ROM code and SCSI driver) are currrently supported. Non-accelerator
+- 128k Apollo ROMs (68060 f00000 ROM code and SCSI driver) are currently supported. Non-accelerator
(AT500/AT2000) ROMs don't seem to be available = can't test IDE emulation.
- 128k v5.60 ROM added. Seems to be last 1240/1260 ROM with SCSI.
return NULL;
}
+struct romconfig *get_device_romconfig(struct uae_prefs *p, int devnum, int romtype)
+{
+ int idx;
+ if (devnum)
+ return NULL;
+ struct boardromconfig *brc = get_device_rom(p, romtype, &idx);
+ if (brc)
+ return &brc->roms[idx];
+ return NULL;
+}
+
struct zfile *read_device_rom(struct uae_prefs *p, int devnum, int romtype, int *roms)
{
int idx;
return 0;
return 1;
}
- return 0;
+ return -1;
}
if (busy && !select) {
rs->bus_phase = SCSI_SIGNAL_PHASE_ARBIT;
rs->initiator_id = getbit(rs->data);
+#if RAW_SCSI_DEBUG
write_log(_T("raw_scsi: arbitration initiator id %d\n"), rs->initiator_id);
+#endif
} else if (!busy && select) {
rs->initiator_id = getbit(rs->data);
rs->bus_phase = SCSI_SIGNAL_PHASE_SELECT_1;
raw_scsi_set_signal_phase(rs, busy, select, atn);
+#if RAW_SCSI_DEBUG
+ write_log(_T("raw_scsi: selected initiator id %d\n"), rs->initiator_id);
+#endif
}
break;
case SCSI_SIGNAL_PHASE_ARBIT:
{
struct ncr5380_scsi *scsi = &suprascsi[devnum];
int roms[2];
+ struct romconfig *rc = NULL;
if (devnum > 0 && !scsi->enabled)
return &expamem_null;
scsi->type = NCR5380_SUPRA;
memset(scsi->rom, 0xff, 2 * 16384);
- struct zfile *z = read_device_rom(&currprefs, devnum, ROMTYPE_SUPRA, roms);
- for (int i = 0; i < 16; i++) {
- uae_u8 b = supra_autoconfig[i];
- ew(scsi, i * 4, b);
- }
- if (z) {
- write_log(_T("SUPRA BOOT ROM '%s'\n"), zfile_getname(z));
- for (int i = 0; i < 16384; i++) {
- uae_u8 b;
- zfile_fread(&b, 1, 1, z);
- scsi->rom[i * 2 + 0] = b;
+ rc = get_device_romconfig(&currprefs, devnum, ROMTYPE_SUPRA);
+ if (rc && !rc->autoboot_disabled) {
+ struct zfile *z = read_device_rom(&currprefs, devnum, ROMTYPE_SUPRA, roms);
+ for (int i = 0; i < 16; i++) {
+ uae_u8 b = supra_autoconfig[i];
+ ew(scsi, i * 4, b);
+ }
+ if (z) {
+ write_log(_T("SUPRA BOOT ROM '%s'\n"), zfile_getname(z));
+ for (int i = 0; i < 16384; i++) {
+ uae_u8 b;
+ zfile_fread(&b, 1, 1, z);
+ scsi->rom[i * 2 + 0] = b;
+ }
+ zfile_fclose(z);
+ } else {
+ romwarning(roms);
}
- zfile_fclose(z);
- } else {
- romwarning(roms);
}
return scsi->bank;
}