]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
3100b9
authorToni Wilen <twilen@winuae.net>
Mon, 9 Feb 2015 17:36:27 +0000 (19:36 +0200)
committerToni Wilen <twilen@winuae.net>
Mon, 9 Feb 2015 17:36:27 +0000 (19:36 +0200)
19 files changed:
a2091.cpp
cfgfile.cpp
cpuboard.cpp
expansion.cpp
filesys.cpp
ide.cpp
idecontrollers.cpp
include/autoconf.h
include/options.h
include/rommgr.h
ncr9x_scsi.cpp
ncr_scsi.cpp
od-win32/resources/resource.h
od-win32/resources/winuae.rc
od-win32/win32.h
od-win32/win32gui.cpp
od-win32/winuaechangelog.txt
rommgr.cpp
scsi.cpp

index 0e0d8890b8f8602c2708a1d289d76f899080539d..4baf2c7b93ad88dfea547c627fec6a6592b88ffd 100644 (file)
--- a/a2091.cpp
+++ b/a2091.cpp
@@ -2997,6 +2997,7 @@ addrbank *a2091_init (int devnum)
        struct wd_state *wd = wda2091[devnum];
        int roms[6];
        int slotsize;
+       struct romconfig *rc = NULL;
 
        if (devnum > 0 && !wd->enabled)
                return &expamem_null;
@@ -3031,28 +3032,32 @@ addrbank *a2091_init (int devnum)
        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;
@@ -3106,6 +3111,7 @@ static addrbank *gvp_init(int devnum, bool series2)
        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;
@@ -3128,31 +3134,36 @@ static addrbank *gvp_init(int devnum, bool series2)
        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;
index 053a8519a1643dda22644d5592da2d863689a399..495b543e54d6e4640f6c26a92f552de42005ca26 100644 (file)
@@ -267,7 +267,8 @@ static const TCHAR *hdcontrollers[] = {
        _T("scsi%d_cdtv"),
 
        _T("scsram"),
-       _T("scide")
+       _T("scide"),
+       NULL
 };
 static const TCHAR *z3mapping[] = {
        _T("auto"),
@@ -907,6 +908,16 @@ static void write_filesys_config (struct uae_prefs *p, struct zfile *f)
                } 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);
@@ -988,6 +999,11 @@ static void cfgfile_write_board_rom(struct zfile *f, struct multipath *mp, struc
                                _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);
@@ -3630,6 +3646,41 @@ invalid_fs:
                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;
 }
@@ -3643,6 +3694,27 @@ bool cfgfile_board_enabled(struct uae_prefs *p, int romtype)
        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];
@@ -3690,6 +3762,15 @@ static bool cfgfile_read_board_rom(struct uae_prefs *p, const TCHAR *option, con
                        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) {
index cd0b2b39fa2136800e3be8a5502aee5f488c41e1..db4a55191fa22362dc16751e92d4508a3260544b 100644 (file)
@@ -1874,13 +1874,11 @@ addrbank *cpuboard_autoconfig_init(int devnum)
                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;
@@ -2078,16 +2076,11 @@ addrbank *cpuboard_autoconfig_init(int devnum)
                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"));
                        }
                }
        }
index bcd93152995b7294a39d35e0fc26086804ee04e7..0d45a0986aff25252beca55a830af25749864c15 100644 (file)
@@ -2097,70 +2097,71 @@ const struct expansionromtype expansionroms[] = {
        {
                _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
index 47a86a01b417cae91bb9cb1c431f7772c8c2330b..52ec4bc726d6fa0b50c5488fa56ece438d38f506 100644 (file)
@@ -794,44 +794,49 @@ static void allocuci (struct uae_prefs *p, int nr, int idx)
 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;
 }
diff --git a/ide.cpp b/ide.cpp
index f1b293bac65184129e39b7bc3173b2cabdeeeaeb..75f23b8c493785a8632aed6394fe25d7869eb287 100644 (file)
--- a/ide.cpp
+++ b/ide.cpp
@@ -6,7 +6,7 @@
 * (c) 2006 - 2015 Toni Wilen
 */
 
-#define IDE_LOG 2
+#define IDE_LOG 0
 
 #include "sysconfig.h"
 #include "sysdeps.h"
index a6efd3d9fe5a78bd1db3402429695a67f6543db6..7b51fa4c231bc946dc8626845f3cdd04c9d87031 100644 (file)
@@ -848,6 +848,7 @@ addrbank *alf_init(int devnum)
        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;
@@ -870,30 +871,34 @@ addrbank *alf_init(int devnum)
        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;
 }
@@ -992,11 +997,10 @@ int apollo_add_ide_unit(int ch, struct uaedev_config_info *ci)
        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];
@@ -1028,14 +1032,14 @@ addrbank *masoboshi_init(int 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);
index ef6f9a933d1219b21bd9e4f6ab08f7741cb5aa86..b38ec93617191bd50b5ec0743962d3f6b9220366 100644 (file)
@@ -116,6 +116,7 @@ struct expansionromtype
        int romtype;
        int parentromtype;
        int zorro;
+       bool autoboot_jumper;
        int deviceflags;
        int memory_mid, memory_pid;
        uae_u32 memory_serial;
index f78631e078fed60839b776253514c52c8ca8f2ea..bb373e74f84f64b7cba051f99ad62d59d738fcf0 100644 (file)
@@ -171,7 +171,7 @@ struct uaedev_config_info {
        int sectorsperblock;
        int forceload;
        int device_emu_unit;
-
+       bool inject_icons;
 };
 
 struct uaedev_config_data
@@ -283,6 +283,7 @@ struct romconfig
        TCHAR romfile[MAX_DPATH];
        TCHAR romident[256];
        uae_u32 board_ram_size;
+       bool autoboot_disabled;
 };
 #define MAX_BOARD_ROMS 2
 struct boardromconfig
index aca680562a91131b1fe724cda03e1649208ecd1a..4f4f40210b913b2e36660b12d83e59b767a01cc6 100644 (file)
@@ -121,6 +121,7 @@ extern struct romlist *romlist_getit (void);
 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);
index e08b506418d8796f43455139bfbd7edc4a32c442..39f806763a5b0e7ea02bc335819e96c15716bd94 100644 (file)
@@ -1257,6 +1257,7 @@ addrbank *ncr_oktagon_autoconfig_init(int devnum)
 {
        int roms[2];
        struct ncr9x_state *ncr = &ncr_oktagon2008_scsi[devnum];
+       struct romconfig *rc = NULL;
 
        xfree(ncr->rom);
        ncr->rom = NULL;
@@ -1281,37 +1282,39 @@ addrbank *ncr_oktagon_autoconfig_init(int devnum)
        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;
@@ -1340,24 +1343,10 @@ addrbank *ncr_dkb_autoconfig_init(int devnum)
        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);
index 1fd01ab53c9fdb790b6fb0a5dfca4e1efc236935..aabeb9ed45646bcf6143f3fc5ba60a062aead9ad 100644 (file)
@@ -839,6 +839,7 @@ addrbank *ncr710_a4091_autoconfig_init (int devnum)
 {
        struct ncr_state *ncr = ncra4091[devnum];
        int roms[3];
+       struct romconfig *rc = NULL;
 
        xfree(ncr->rom);
        ncr->rom = NULL;
index fa5063371262f9b0e7c11a9aaea89cc91494debb..1dbb306276b5b53c28b295fa002cc9c81b49e7d6 100644 (file)
 #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
index ffb071f572288012f09afed5571026c25b209e1c..94dcfc3927fde82bf26cc6e4f9199d1b5c46ba1b 100644 (file)
@@ -109,6 +109,7 @@ BEGIN
     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
@@ -475,12 +476,12 @@ BEGIN
     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
index 81457acd3a3473b11f5c1e8ba3a4625c2928c5a2..7d6dc9eebaf50221f75af9d5fb0e1e0d1d2a5c80 100644 (file)
 #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")
index 395752d3108f07e67c24f4ecfc0e4bd758f614b5..e5f7a42a5a6911706bbc0a706e2313ffacc2ffb5 100644 (file)
@@ -180,7 +180,7 @@ static void addaspectratios (HWND hDlg, int id)
        }
 }
 
-static int scsiromselected;
+static int scsiromselected = -1;
 
 #define Error(x) MessageBox (NULL, (x), _T("WinUAE Error"), MB_OK)
 
@@ -281,6 +281,36 @@ static void hide (HWND hDlg, DWORD id, int hide)
        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)
 {
@@ -2741,7 +2771,7 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs
                        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;
@@ -8588,6 +8618,8 @@ static void values_from_kickstartdlg (HWND hDlg)
        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);
        }
@@ -8620,6 +8652,8 @@ static void values_to_kickstartdlg (HWND hDlg)
        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,
@@ -8631,11 +8665,12 @@ static void values_to_kickstartdlg (HWND hDlg)
        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
@@ -8655,13 +8690,20 @@ static void init_kickstart (HWND hDlg)
        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;
@@ -8669,9 +8711,11 @@ static void init_kickstart (HWND hDlg)
                                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")))
@@ -8767,7 +8811,7 @@ static INT_PTR CALLBACK KickstartDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LP
                                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;
@@ -8776,6 +8820,7 @@ static INT_PTR CALLBACK KickstartDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LP
                                        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;
@@ -8784,6 +8829,10 @@ static INT_PTR CALLBACK KickstartDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LP
                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);
@@ -10468,34 +10517,6 @@ STATIC_INLINE bool is_hdf_rdb (void)
 
 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 ();
index d96ae82b236b929a3bc5053232171b74884f647c..1de11caed2c0940380306ad3fc85488ea10fdd0c 100644 (file)
@@ -1,4 +1,44 @@
 
+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.
@@ -32,7 +72,7 @@ Apollo:
   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.
 
index 8d1e50665204159944beaebac83d967e9811238b..fb372375adb75aa26c45887a5ddfdd248ba2746d 100644 (file)
@@ -1641,6 +1641,17 @@ struct boardromconfig *get_device_rom(struct uae_prefs *p, int romtype, int *ind
        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;
@@ -1676,5 +1687,5 @@ int is_device_rom(struct uae_prefs *p, int devnum, int romtype)
                        return 0;
                return 1;
        }
-       return 0;
+       return -1;
 }
index e959d0a6d4193bef7773b8ffa5696b1deea97d2d..75a7a859b64f6daae2ef2fcbe4d144aa29ea056e 100644 (file)
--- a/scsi.cpp
+++ b/scsi.cpp
@@ -567,11 +567,16 @@ void raw_scsi_set_signal_phase(struct raw_scsi *rs, bool busy, bool select, bool
                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:
@@ -1165,6 +1170,7 @@ addrbank *supra_init(int devnum)
 {
        struct ncr5380_scsi *scsi = &suprascsi[devnum];
        int roms[2];
+       struct romconfig *rc = NULL;
        
        if (devnum > 0 && !scsi->enabled)
                return &expamem_null;
@@ -1181,21 +1187,24 @@ addrbank *supra_init(int devnum)
        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;
 }