]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Accelerator ROM and SCSI/IDE mounting logging.
authorToni Wilen <twilen@winuae.net>
Sat, 28 Mar 2015 14:11:31 +0000 (16:11 +0200)
committerToni Wilen <twilen@winuae.net>
Sat, 28 Mar 2015 14:11:31 +0000 (16:11 +0200)
cpuboard.cpp
filesys.cpp

index 6133268ec7d61b2bdcb495fdbdcb8e002d2a34e2..7a3bfc95eb7fadf7a4d093379bf1e6895b01c72f 100644 (file)
@@ -1613,6 +1613,43 @@ void cpuboard_clear(void)
                memset(blizzardf0_bank.baseaddr + 0x40000, 0, 0x10000);
 }
 
+static uaecptr cpuboardfakeres_init, cpuboardfakeres_name, cpuboardfakeres_id, base;
+
+#if 0
+uaecptr cpuboardfakeresident_startup (uaecptr resaddr)
+{
+       if (!cpuboardfakeres_name)
+               return resaddr;
+       put_word (resaddr + 0x0, 0x4AFC);
+       put_long (resaddr + 0x2, resaddr);
+       put_long (resaddr + 0x6, resaddr + 0x1A);
+       put_word (resaddr + 0xA, 0x0201);
+       put_word (resaddr + 0xC, 0x0078);
+       put_long (resaddr + 0xE, cpuboardfakeres_name);
+       put_long (resaddr + 0x12, cpuboardfakeres_id);
+       put_long (resaddr + 0x16, cpuboardfakeres_init);
+       resaddr += 0x1A;
+       return resaddr;
+}
+
+void cpuboardfakeres_install (void)
+{
+       cpuboardfakeres_name = NULL;
+       if (ISCPUBOARD(BOARD_CYBERSTORM, BOARD_CYBERSTORM_SUB_PPC)) {
+               cpuboardfakeres_name = ds (_T("CyberstormMK3.IDTag"));
+       } else if (ISCPUBOARD(BOARD_CYBERSTORM, BOARD_CYBERSTORM_SUB_MK3)) {
+               cpuboardfakeres_name = ds (_T("CyberstormPPC.IDTag"));
+       }
+       if (cpuboardfakeres_name) {
+               cpuboardfakeres_init = here();
+               dw(0x4e71);
+               dw(0x7000);
+               dw(0x4e75);
+               cpuboardfakeres_id = cpuboardfakeres_name;
+       }
+}
+#endif
+
 bool is_ppc_cpu(struct uae_prefs *p)
 {
        return is_ppc();
@@ -1814,8 +1851,11 @@ static struct zfile *flashfile_open(const TCHAR *name)
                        }
                }
        }
-       if (f)
-               write_log(_T("Accelerator board flash file '%s' loaded, %s.\n"), name, rw ? _T("RW") : _T("RO"));
+       if (f) {
+               write_log(_T("CPUBoard '%s' flash file '%s' loaded, %s.\n"),
+               cpuboards[currprefs.cpuboard_type].subtypes[currprefs.cpuboard_subtype].name,
+               name, rw ? _T("RW") : _T("RO"));
+       }
        return f;
 }
 
@@ -1856,6 +1896,9 @@ addrbank *cpuboard_autoconfig_init(struct romconfig *rc)
        const TCHAR *romname = NULL;
        bool isflashrom = false;
        struct romdata *rd = NULL;
+       const TCHAR *boardname;
+       
+       boardname = cpuboards[currprefs.cpuboard_type].subtypes[currprefs.cpuboard_subtype].name;
 
        int idx, idx2;
        brc = get_device_rom(&currprefs, ROMTYPE_CPUBOARD, 0, &idx);
@@ -2022,22 +2065,22 @@ addrbank *cpuboard_autoconfig_init(struct romconfig *rc)
                }
                if (!autoconfig_rom) {
                        romwarning(roms);
-                       write_log(_T("Couldn't open CPU board rom '%s'\n"), defaultromname);
+                       write_log(_T("Couldn't open CPUBoard '%s' rom '%s'\n"), boardname, defaultromname);
                        return &expamem_null;
                }
        }
 
        if (!autoconfig_rom && roms[0] != -1) {
                romwarning(roms);
-               write_log (_T("ROM id %d not found for CPU board emulation\n"), roms[0]);
+               write_log (_T("ROM id %d not found for CPUBoard '%s' emulation\n"), roms[0], boardname);
                return &expamem_null;
        }
        if (!autoconfig_rom) {
-               write_log(_T("Couldn't open CPU board rom '%s'\n"), defaultromname);
+               write_log(_T("Couldn't open CPUBoard '%s' rom '%s'\n"), boardname, defaultromname);
                return &expamem_null;
        }
 
-       write_log(_T("CPUBoard ROM '%s' %lld loaded\n"), zfile_getname(autoconfig_rom), zfile_size(autoconfig_rom));
+       write_log(_T("CPUBoard '%s' ROM '%s' %lld loaded\n"), boardname, zfile_getname(autoconfig_rom), zfile_size(autoconfig_rom));
 
        protect_roms(false);
        cpuboard_non_byte_ea = true;
index d7b90c180773a79447686e4b4edba670d36c13ef..cdb9d685619b2c69cf24f76bbf0195fae2f42211 100644 (file)
@@ -802,6 +802,11 @@ void add_cpuboard_unit(int unit, struct uaedev_config_info *uci, struct romconfi
        cpuboard_hd = 0;
        if (cbt->subtypes) {
                if (cbt->subtypes[currprefs.cpuboard_subtype].add && (cbt->subtypes[currprefs.cpuboard_subtype].deviceflags & flags)) {
+                       if (unit >= 0) {
+                               write_log(_T("Adding CPUBoard '%s' HD unit %d ('%s')\n"),
+                                       cbt->subtypes[currprefs.cpuboard_subtype].name,
+                                       unit, uci->rootdir);
+                       }
                        cbt->subtypes[currprefs.cpuboard_subtype].add(unit, uci, rc);
                        cpuboard_hd = 1;
                }
@@ -817,6 +822,7 @@ static void add_cpuboard_unit_init(void)
                        if (cbt->subtypes) {
                                if (cbt->subtypes[currprefs.cpuboard_subtype].add) {
                                        struct uaedev_config_info ci = { 0 };
+                                       write_log(_T("Initializing CPUBoard '%s' HD controller\n"), cbt->subtypes[currprefs.cpuboard_subtype].name);
                                        cbt->subtypes[currprefs.cpuboard_subtype].add(-1, &ci, rc);
                                }
                        }
@@ -845,15 +851,19 @@ static bool iscdtvscsi(void)
 static void add_mainboard_unit_init(void)
 {
        if (ismainboardide()) {
+               write_log(_T("Initializing mainboard IDE\n"));
                gayle_add_ide_unit(-1, NULL);
        }
        if (isa3000scsi()) {
+               write_log(_T("Initializing A3000 mainboard SCSI\n"));
                a3000_add_scsi_unit(-1, NULL, NULL);
        }
        if (isa4000tscsi()) {
+               write_log(_T("Initializing A4000T mainboard SCSI\n"));
                a4000t_add_scsi_unit(-1, NULL, NULL);
        }
        if (iscdtvscsi()) {
+               write_log(_T("Initializing CDTV SCSI expansion\n"));
                cdtv_add_scsi_unit(-1, NULL, NULL);
        }
 }
@@ -863,6 +873,8 @@ static bool add_ide_unit(int type, int unit, struct uaedev_config_info *uci)
        bool added = false;
        if (type == HD_CONTROLLER_TYPE_IDE_MB) {
                if (ismainboardide()) {
+                       write_log(_T("Adding mainboard IDE HD unit %d ('%s')\n"),
+                               unit, uci->rootdir);
                        gayle_add_ide_unit(unit, uci);
                        added = true;
                }
@@ -874,6 +886,8 @@ static bool add_ide_unit(int type, int unit, struct uaedev_config_info *uci)
                                        cpuboard_hd = 1;
                                        if (ert->add) {
                                                struct romconfig *rc = get_device_romconfig(&currprefs, ert->romtype, uci->controller_type_unit);
+                                               write_log(_T("Adding IDE HD '%s' unit %d ('%s')\n"),
+                                                       ert->name, unit, uci->rootdir);
                                                ert->add(unit, uci, rc);
                                        }
                                        if (cpuboard_hd)
@@ -891,6 +905,8 @@ static bool add_scsi_unit(int type, int unit, struct uaedev_config_info *uci)
        if (type == HD_CONTROLLER_TYPE_SCSI_A3000) {
 #ifdef A2091
                if (isa3000scsi()) {
+                       write_log(_T("Adding A3000 mainboard SCSI HD unit %d ('%s')\n"),
+                               unit, uci->rootdir);
                        a3000_add_scsi_unit (unit, uci, NULL);
                        added = true;
                }
@@ -898,6 +914,8 @@ static bool add_scsi_unit(int type, int unit, struct uaedev_config_info *uci)
        } else if (type == HD_CONTROLLER_TYPE_SCSI_A4000T) {
 #ifdef NCR
                if (isa4000tscsi()) {
+                       write_log(_T("Adding A4000T mainboard SCSI HD unit %d ('%s')\n"),
+                               unit, uci->rootdir);
                        a4000t_add_scsi_unit (unit, uci, NULL);
                        added = true;
                }
@@ -905,6 +923,8 @@ static bool add_scsi_unit(int type, int unit, struct uaedev_config_info *uci)
        } else if (type == HD_CONTROLLER_TYPE_SCSI_CDTV) {
 #ifdef CDTV
                if (iscdtvscsi()) {
+                       write_log(_T("Adding CDTV SCSI expansion HD unit %d ('%s')\n"),
+                               unit, uci->rootdir);
                        cdtv_add_scsi_unit (unit, uci, NULL);
                        added = true;
                }
@@ -917,6 +937,8 @@ static bool add_scsi_unit(int type, int unit, struct uaedev_config_info *uci)
                                        cpuboard_hd = 1;
                                        if (ert->add) {
                                                struct romconfig *rc = get_device_romconfig(&currprefs, ert->romtype, uci->controller_type_unit);
+                                               write_log(_T("Adding SCSI HD '%s' unit %d ('%s')\n"),
+                                                       ert->name, unit, uci->rootdir);
                                                ert->add(unit, uci, rc);
                                        }
                                        if (cpuboard_hd)