]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
5100b1
authorToni Wilen <twilen@winuae.net>
Sun, 17 Sep 2023 15:08:51 +0000 (18:08 +0300)
committerToni Wilen <twilen@winuae.net>
Sun, 17 Sep 2023 15:08:51 +0000 (18:08 +0300)
expansion.cpp
idecontrollers.cpp
include/options.h
od-win32/darkmode.cpp
od-win32/machdep/maccess.h
od-win32/win32.h
od-win32/win32gui.cpp

index 93266a1e18ff8684b6d95a36d4d44b647190365c..42e6961c510d7831fa025030bb85d87b2881f5c3 100644 (file)
@@ -5066,8 +5066,8 @@ static const struct expansionboardsettings nexus_settings[] = {
 };
 static const struct expansionboardsettings buddha_settings[] = {
        {
-               _T("Model\0") _T("Buddha\0") _T("Catweasel Z2\0"),
-               _T("model\0") _T("buddha\0") _T("cwz2\0"),
+               _T("Model\0") _T("Buddha\0") _T("Buddha plus one\0") _T("Catweasel Z2\0"),
+               _T("model\0") _T("buddha\0") _T("buddhaplusone\0") _T("cwz2\0"),
                true, false, 0
        },
        {
index c65e4a0714ba3cde9dfac965f020123d4d6d5630..83ac7aa505bf351fa938b646cf3f623075d983af 100644 (file)
@@ -482,6 +482,11 @@ static int get_buddha_reg(uaecptr addr, struct ide_board *board, int *portnum)
        if (addr < 0x800 || addr >= 0xe00)
                return reg;
        *portnum = (addr - 0x800) / 0x200;
+       if ((board->aci->rc->device_settings & 3) == 1) {
+               if ((addr & 0xc0) == 0x80) {
+                       return IDE_DATA;
+               }
+       }
        reg = (addr >> 2) & 15;
        if (addr & 0x100)
                reg |= IDE_SECONDARY;
@@ -652,14 +657,15 @@ static uae_u32 ide_read_byte(struct ide_board *board, uaecptr addr)
                        if (board->ide[portnum])
                                v = get_ide_reg_multi(board, regnum, portnum, 1);
                } else if (addr >= 0xf00 && addr < 0x1000) {
-                       if ((addr & ~3) == 0xf00)
+                       if ((addr & ~3) == 0xf00) {
                                v = ide_irq_check(board->ide[0], false) ? 0x80 : 0x00;
-                       else if ((addr & ~3) == 0xf40)
+                       } else if ((addr & ~3) == 0xf40) {
                                v = ide_irq_check(board->ide[1], false) ? 0x80 : 0x00;
-                       else if ((addr & ~3) == 0xf80)
+                       } else if ((addr & ~3) == 0xf80 && (board->aci->rc->device_settings & 3) != 1) {
                                v = ide_irq_check(board->ide[2], false) ? 0x80 : 0x00;
-                       else
+                       } else {
                                v = 0;
+                       }
                } else if (addr >= 0x7fc && addr <= 0x7ff) {
                        v = board->userdata;
                } else {
@@ -2483,8 +2489,10 @@ bool buddha_init(struct autoconfig_info *aci)
        load_rom_rc(aci->rc, ROMTYPE_BUDDHA, 32768, 0, ide->rom, 65536, LOADROM_EVENONLY_ODDONE | LOADROM_FILL);
        for (int i = 0; i < 16; i++) {
                uae_u8 b = ert->autoconfig[i];
-               if (i == 1 && (aci->rc->device_settings & 1))
+               if (i == 1 && (aci->rc->device_settings & 3) == 2)
                        b = 42;
+               if (i == 9 && (aci->rc->device_settings & 3) == 1)
+                       b = 6;
                ew(ide, i * 4, b);
        }
        aci->addrbank = ide->bank;
@@ -2494,6 +2502,10 @@ bool buddha_init(struct autoconfig_info *aci)
 void buddha_add_ide_unit(int ch, struct uaedev_config_info *ci, struct romconfig *rc)
 {
        add_ide_standard_unit(ch, ci, rc, buddha_board, BUDDHA_IDE, false, false, 6);
+       if ((rc->device_settings & 3) == 1) {
+               // 3rd port has no interrupt
+               buddha_board[ci->controller_type_unit]->ide[2]->irq_inhibit = true;
+       }
 }
 
 void rochard_add_idescsi_unit(int ch, struct uaedev_config_info *ci, struct romconfig *rc)
index b83c90282356b5c1f85bba2d2e495ddc9cc8c551..6e82c899914ddfc4cd5dd7c74c49a069acaf5442 100644 (file)
@@ -15,7 +15,7 @@
 #include "traps.h"
 
 #define UAEMAJOR 5
-#define UAEMINOR 0
+#define UAEMINOR 1
 #define UAESUBREV 0
 
 #define MAX_AMIGADISPLAYS 4
index 637536c5113c290e0d7fd6eac0c8462e581368de..4b6467d6c3d99c66be9e21d522a916bb93986f5e 100644 (file)
@@ -149,7 +149,7 @@ static void GetDarkmodeFontColor(void)
 
 constexpr bool CheckBuildNumber(DWORD buildNumber)
 {
-       return buildNumber <= 22621;
+       return buildNumber <= 25999;
 }
 
 void InitDarkMode(int enable)
index e36c20c403df7986c1b249022de398cfdf26ea74..8ec4ea12d890097143efa7270e254b46be173192 100644 (file)
 #define ALIGN_POINTER_TO32(p) ((~(uae_u32)(p)) & 3)
 #endif
 
+#define do_get_mem_byte(a) ((uae_u32)*(uae_u8 *)(a))
+STATIC_INLINE void do_put_mem_byte(uae_u8 *a, uae_u8 v)
+{
+       *a = v;
+}
+
+#ifdef HAVE_MOVBE
+
+#include <immintrin.h>
+
+STATIC_INLINE uae_u64 do_get_mem_quad(uae_u64 *a)
+{
+       return _load_be_u64(a);
+}
+
+STATIC_INLINE uae_u32 do_get_mem_long(uae_u32 *a)
+{
+       return _load_be_u32(a);
+}
+
+STATIC_INLINE uae_u16 do_get_mem_word(uae_u16 *a)
+{
+       return _load_be_u16(a);
+}
+
+STATIC_INLINE void do_put_mem_quad(uae_u64 *a, uae_u64 v)
+{
+       _store_be_u64(a, v);
+}
+
+STATIC_INLINE void do_put_mem_long(uae_u32 *a, uae_u32 v)
+{
+       _store_be_u32(a, v);
+}
+
+STATIC_INLINE void do_put_mem_word(uae_u16 *a, uae_u16 v)
+{
+       _store_be_u16(a, v);
+}
+
+
+#else
+
 STATIC_INLINE uae_u64 do_get_mem_quad(uae_u64 *a)
 {
        return _byteswap_uint64(*a);
@@ -32,7 +75,6 @@ STATIC_INLINE uae_u16 do_get_mem_word(uae_u16 *a)
        return _byteswap_ushort(*a);
 }
 
-#define do_get_mem_byte(a) ((uae_u32)*(uae_u8 *)(a))
 
 STATIC_INLINE void do_put_mem_quad(uae_u64 *a, uae_u64 v)
 {
@@ -49,10 +91,8 @@ STATIC_INLINE void do_put_mem_word(uae_u16 *a, uae_u16 v)
        *a = _byteswap_ushort(v);
 }
 
-STATIC_INLINE void do_put_mem_byte(uae_u8 *a, uae_u8 v)
-{
-    *a = v;
-}
+
+#endif
 
 STATIC_INLINE uae_u64 do_byteswap_64(uae_u64 v)
 {
index bc7c77adaf4203875647459d34e324d3623ccc83..d6b6321dd83bfd2c5628389e7f06bceac87d08cb 100644 (file)
 #define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100)
 #define GETBDD(x) ((x) % 100)
 
-#define WINUAEPUBLICBETA 0
+#define WINUAEPUBLICBETA 1
 #define LANG_DLL 1
 #define LANG_DLL_FULL_VERSION_MATCH 1
 
 #if WINUAEPUBLICBETA
-#define WINUAEBETA _T("")
+#define WINUAEBETA _T("Beta 1")
 #else
 #define WINUAEBETA _T("")
 #endif
 
-#define WINUAEDATE MAKEBD(2023, 5, 31)
+#define WINUAEDATE MAKEBD(2023, 9, 17)
 
 //#define WINUAEEXTRA _T("AmiKit Preview")
 //#define WINUAEEXTRA _T("Amiga Forever Edition")
index 0d4e17a85a2a3531a678656de3a31b1dc56ac576..d6823bbd83c16b52e74d568781916037f45ae03a 100644 (file)
@@ -8022,10 +8022,10 @@ static INT_PTR CALLBACK AboutDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM
                        pages[ABOUT_ID] = hDlg;
                        currentpage = ABOUT_ID;
 
-                       font1 = CreateFont(getscaledfontsize(60), 0, 0, 0, 0,
+                       font1 = CreateFont(getscaledfontsize(-1) * 3, 0, 0, 0, 0,
                                0, FALSE, FALSE, DEFAULT_CHARSET, 0, 0,
                                PROOF_QUALITY, FF_DONTCARE, _T("Segoe UI"));
-                       font2 = CreateFont(getscaledfontsize(32), 0, 0, 0, 0,
+                       font2 = CreateFont(getscaledfontsize(-1) * 2, 0, 0, 0, 0,
                                0, FALSE, FALSE, DEFAULT_CHARSET, 0, 0,
                                PROOF_QUALITY, FF_DONTCARE, _T("Segoe UI"));
 
@@ -14991,7 +14991,7 @@ static void updatehdfinfo(HWND hDlg, bool force, bool defaults, bool realdrive)
                                }
                        }
                        if (i == 16) {
-                               hdf_read (&hfd, id, 0, 512);
+                               hdf_read (&hfd, id, 0, 512, &error);
                                current_hfdlg.dostype = (id[0] << 24) | (id[1] << 16) | (id[2] << 8) | (id[3] << 0);
                        }
                }
@@ -22297,25 +22297,29 @@ static int floppyslot_addfile2 (struct uae_prefs *prefs, const TCHAR *file, int
                return -1;
        return drv;
 }
-static int floppyslot_addfile (struct uae_prefs *prefs, const TCHAR *file, int drv, int firstdrv, int maxdrv)
-{
-       struct zdirectory *zd = zfile_opendir_archive (file, ZFD_ARCHIVE | ZFD_NORECURSE);
-       if (zd && zfile_readdir_archive (zd, NULL, true) > 1) {
-               TCHAR out[MAX_DPATH];
-               while (zfile_readdir_archive (zd, out, true)) {
-                       struct zfile *zf = zfile_fopen (out, _T("rb"), ZFD_NORMAL);
-                       if (zf) {
-                               int type = zfile_gettype (zf);
-                               if (type == ZFILE_DISKIMAGE) {
-                                       drv = floppyslot_addfile2 (prefs, out, drv, firstdrv, maxdrv);
-                                       if (drv < 0)
-                                               break;
+static int floppyslot_addfile (struct uae_prefs *prefs, const TCHAR *filepath, const TCHAR *file, int drv, int firstdrv, int maxdrv)
+{
+       if (!filepath[0]) {
+               struct zdirectory *zd = zfile_opendir_archive (file, ZFD_ARCHIVE | ZFD_NORECURSE);
+               if (zd && zfile_readdir_archive (zd, NULL, true) > 1) {
+                       TCHAR out[MAX_DPATH];
+                       while (zfile_readdir_archive (zd, out, true)) {
+                               struct zfile *zf = zfile_fopen (out, _T("rb"), ZFD_NORMAL);
+                               if (zf) {
+                                       int type = zfile_gettype (zf);
+                                       if (type == ZFILE_DISKIMAGE) {
+                                               drv = floppyslot_addfile2 (prefs, out, drv, firstdrv, maxdrv);
+                                               if (drv < 0)
+                                                       break;
+                                       }
                                }
                        }
+                       zfile_closedir_archive (zd);
+               } else {
+                       drv = floppyslot_addfile2 (prefs, file, drv, firstdrv, maxdrv);
                }
-               zfile_closedir_archive (zd);
        } else {
-               drv = floppyslot_addfile2 (prefs, file, drv, firstdrv, maxdrv);
+               drv = floppyslot_addfile2(prefs, filepath, drv, firstdrv, maxdrv);
        }
        return drv;
 }
@@ -22430,6 +22434,7 @@ int dragdrop (HWND hDlg, HDROP hd, struct uae_prefs *prefs, int currentpage)
                struct zfile *z;
                int type = -1, zip = 0;
                int mask;
+               TCHAR filepath[MAX_DPATH];
 
                DragQueryFile (hd, i, file, sizeof (file) / sizeof (TCHAR));
                my_resolvesoftlink (file, sizeof file / sizeof (TCHAR), true);
@@ -22447,6 +22452,7 @@ int dragdrop (HWND hDlg, HDROP hd, struct uae_prefs *prefs, int currentpage)
                        mask = ZFD_ALL;
                else
                        mask = ZFD_NORMAL;
+               filepath[0] = 0;
                if (type < 0) {
                        if (currentpage < 0) {
                                z = zfile_fopen (file, _T("rb"), 0);
@@ -22462,8 +22468,12 @@ int dragdrop (HWND hDlg, HDROP hd, struct uae_prefs *prefs, int        currentpage)
                                                zip = 1;
                                        } else {
                                                type = zfile_gettype (z);
-                                               if (type == ZFILE_ROM)
+                                               if (type == ZFILE_ROM) {
                                                        rd = getromdatabyzfile (z);
+                                               }
+                                               if (type > 0) {
+                                                       _tcscpy(filepath, z->name);
+                                               }
                                        }
                                        zfile_fclose (z);
                                        z = NULL;
@@ -22509,7 +22519,7 @@ int dragdrop (HWND hDlg, HDROP hd, struct uae_prefs *prefs, int currentpage)
                        } else if (harddrive) {
                                do_filesys_insert (file, cnt);
                        } else {
-                               drv = floppyslot_addfile (prefs, file, drv, firstdrv, i);
+                               drv = floppyslot_addfile (prefs, filepath, file, drv, firstdrv, i);
                                if (drv < 0)
                                        i = cnt;
                        }