]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
2500b23
authorToni Wilen <twilen@winuae.net>
Wed, 31 Oct 2012 18:49:52 +0000 (20:49 +0200)
committerToni Wilen <twilen@winuae.net>
Wed, 31 Oct 2012 18:49:52 +0000 (20:49 +0200)
filesys.cpp
fpp.cpp
isofs.cpp
memory.cpp
od-win32/direct3d.cpp
od-win32/win32.h
od-win32/win32gui.cpp
od-win32/winuaechangelog.txt

index eded1b41e038cdf381b613aaf78dd8179345f90f..a56bce7e9af5942326f0458274b720d2bc790763 100644 (file)
 int log_filesys = 0;
 
 #if TRACING_ENABLED
+#if 0
+#define TRACE(x) if (log_filesys > 0 && (unit->volflags & MYVOLUMEINFO_CDFS)) { write_log x; }
+#else
 #define TRACE(x) if (log_filesys > 0) { write_log x; }
+#endif
+#define TRACEI(x) if (log_filesys > 0) { write_log x; }
 #define TRACE2(x) if (log_filesys >= 2) { write_log x; }
 #define TRACE3(x) if (log_filesys >= 3) { write_log x; }
 #define DUMPLOCK(u,x) dumplock(u,x)
@@ -1806,7 +1811,7 @@ static void recycle_aino (Unit *unit, a_inode *new_aino)
                /* Still in use */
                return;
 
-       TRACE2((_T("Recycling; cache size %d, total_locked %d\n"),
+       TRACE3((_T("Recycling; cache size %d, total_locked %d\n"),
                unit->aino_cache_size, unit->total_locked_ainos));
        if (unit->aino_cache_size > 5000 + unit->total_locked_ainos) {
                /* Reap a few. */
@@ -2630,9 +2635,11 @@ static uae_u32 REGPARAM2 startup_handler (TrapContext *context)
 
        put_byte (unit->volume + 44, 0);
        if (!uinfo->wasisempty && !uinfo->unknown_media) {
+               int isvirtual = unit->volflags & (MYVOLUMEINFO_ARCHIVE | MYVOLUMEINFO_CDFS);
                /* Set volume if non-empty */
                set_volume_name (unit, ctime);
-               fsdb_clean_dir (&unit->rootnode);
+               if (!isvirtual)
+                       fsdb_clean_dir (&unit->rootnode);
        }
 
        put_long (unit->volume + 8, unit->port);
@@ -2662,10 +2669,16 @@ static void
        } else if (unit->volflags & MYVOLUMEINFO_CDFS) {
                struct isofs_info ii;
                ret = isofs_mediainfo (unit->ui.cdfs_superblock, &ii) ? 0 : 1;
-               fsu.fsu_blocks = ii.blocks;
-               fsu.fsu_bavail = 0;
-               blocksize = ii.blocksize;
-               nr = unit->unit - cd_unit_offset;
+               if (!ret) {
+                       if (ii.media) {
+                               fsu.fsu_blocks = ii.blocks;
+                               fsu.fsu_bavail = 0;
+                               blocksize = ii.blocksize;
+                               nr = unit->unit - cd_unit_offset;
+                       } else {
+                               ret = ERROR_NO_DISK;
+                       }
+               }
        } else {
                ret = get_fs_usage (unit->ui.rootdir, 0, &fsu);
                if (ret)
@@ -3956,7 +3969,7 @@ static void populate_directory (Unit *unit, a_inode *base)
                base->locked_children++;
                unit->total_locked_ainos++;
        }
-       TRACE2((_T("Populating directory, child %p, locked_children %d\n"),
+       TRACE3((_T("Populating directory, child %p, locked_children %d\n"),
                base->child, base->locked_children));
        for (;;) {
                uae_u64 uniq = 0;
@@ -5849,7 +5862,7 @@ static uae_u32 REGPARAM2 filesys_diagentry (TrapContext *context)
        uaecptr start = resaddr;
        uaecptr residents, tmp;
 
-       TRACE ((_T("filesystem: diagentry called\n")));
+       TRACEI ((_T("filesystem: diagentry called\n")));
 
        filesys_configdev = m68k_areg (regs, 3);
        init_filesys_diagentry ();
@@ -6809,7 +6822,7 @@ void filesys_install (void)
 {
        uaecptr loop;
 
-       TRACE ((_T("Installing filesystem\n")));
+       TRACEI ((_T("Installing filesystem\n")));
 
        uae_sem_init (&singlethread_int_sem, 0, 1);
        uae_sem_init (&test_sem, 0, 1);
diff --git a/fpp.cpp b/fpp.cpp
index cbf5c893f33deece057d263c772285f8f73ff13c..845f7e757a58aa0b069a18f4d5a78ac97c3653bd 100644 (file)
--- a/fpp.cpp
+++ b/fpp.cpp
@@ -232,7 +232,7 @@ static int get_fpu_version (void)
 
 #define fp_round_to_minus_infinity(x) fp_floor(x)
 #define fp_round_to_plus_infinity(x) fp_ceil(x)
-#define fp_round_to_zero(x) ((int)(x))
+#define fp_round_to_zero(x)    ((x) >= 0.0 ? floor(x) : ceil(x))
 #define fp_round_to_nearest(x) ((int)((x) + 0.5))
 
 STATIC_INLINE tointtype toint (fptype src, fptype minval, fptype maxval)
@@ -1456,8 +1456,8 @@ static void fpuop_arithmetic2 (uae_u32 opcode, uae_u16 extra)
 
                                __asm {
                                        fld  LDPTR src
-                                               frndint
-                                               fstp LDPTR tmp_fp
+                                       frndint
+                                       fstp LDPTR tmp_fp
                                }
                                regs.fp[reg] = tmp_fp;
                        }
@@ -1487,7 +1487,7 @@ static void fpuop_arithmetic2 (uae_u32 opcode, uae_u16 extra)
                        regs.fp[reg] = sinh (src);
                        break;
                case 0x03: /* FINTRZ */
-                       regs.fp[reg] = fp_round_to_zero(src);
+                       regs.fp[reg] = fp_round_to_zero (src);
                        break;
                case 0x04: /* FSQRT */
                case 0x41:
index 1ee9266dfdffebd99f6d5b51e8ab8a841c4a82d5..66fe7e60f6950437c8ee25b31cc1336e2fd22373 100644 (file)
--- a/isofs.cpp
+++ b/isofs.cpp
@@ -2159,7 +2159,7 @@ static struct inode *isofs_find_entry(struct inode *dir, char *tmpname, TCHAR *t
                match = 0;
                if (dlen > 0 && (!sbi->s_hide || (!(de->flags[-sbi->s_high_sierra] & 1))) && (sbi->s_showassoc || (!(de->flags[-sbi->s_high_sierra] & 4)))) {
                        if (jname)
-                               match = _tcsicmp(jname, nameu);
+                               match = _tcsicmp(jname, nameu) == 0;
                        else
                                match = isofs_cmp(name, dpnt, dlen) == 0;
                }
index e893d288ed8bfc78057922814378e86b4bafdcd8..bb15f54c9d638635a56c51e8173993dadb4cc4a2 100644 (file)
@@ -6,7 +6,7 @@
 * (c) 1995 Bernd Schmidt
 */
 
-#define DEBUG_STUPID 0
+#define DEBUG_STUPID 1
 
 #include "sysconfig.h"
 #include "sysdeps.h"
index 218c6d5f085eab19d2c0ffa5be14a5c2450e58bc..0d1007f43b39e4fab908afacc9c5680bef7a4e06 100644 (file)
@@ -1512,7 +1512,8 @@ static int createmasktexture (const TCHAR *filename)
        }
        masktexture_w = dinfo.Width;
        masktexture_h = dinfo.Height;
-       if (0 && txdesc.Width == masktexture_w && txdesc.Height == masktexture_h && psEnabled) {
+#if 0
+       if (txdesc.Width == masktexture_w && txdesc.Height == masktexture_h && psEnabled) {
                // texture size == image size, no need to tile it (Wrap sampler does the rest)
                if (masktexture_w < window_w || masktexture_h < window_h) {
                        maskwidth = window_w;
@@ -1522,9 +1523,13 @@ static int createmasktexture (const TCHAR *filename)
                        tx = NULL;
                }
        } else {
-               maskwidth = window_w;
-               maskheight = window_h;
+#endif
+               // both must be divisible by mask size
+               maskwidth = ((window_w + masktexture_w - 1) / masktexture_w) * masktexture_w;
+               maskheight = ((window_h + masktexture_h - 1) / masktexture_h) * masktexture_h;
+#if 0
        }
+#endif
        if (tx) {
                masktexture = createtext (maskwidth, maskheight, D3DFMT_X8R8G8B8);
                if (FAILED (hr)) {
@@ -1567,7 +1572,7 @@ static int createmasktexture (const TCHAR *filename)
                masktexture_w = maskdesc.Width;
                masktexture_h = maskdesc.Height;
        }
-       write_log (_T("%s: mask %d*%d (%d*%d) ('%s') texture allocated\n"), D3DHEAD, masktexture_w, masktexture_h, txdesc.Width, txdesc.Height, filename);
+       write_log (_T("%s: mask %d*%d (%d*%d) %d*%d ('%s') texture allocated\n"), D3DHEAD, masktexture_w, masktexture_h, txdesc.Width, txdesc.Height, maskdesc.Width, maskdesc.Height, filename);
        maskmult_x = (float)window_w / masktexture_w;
        maskmult_y = (float)window_h / masktexture_h;
 
index 35eb8c3385129c1288cd9b4221467c81d316bea4..5d15fed67d268f5ece59b5e41007638da3bfb7a8 100644 (file)
@@ -19,8 +19,8 @@
 #define LANG_DLL 1
 
 //#define WINUAEBETA _T("")
-#define WINUAEBETA _T("22")
-#define WINUAEDATE MAKEBD(2012, 10, 28)
+#define WINUAEBETA _T("23")
+#define WINUAEDATE MAKEBD(2012, 10, 31)
 #define WINUAEEXTRA _T("")
 //#define WINUAEEXTRA _T("AmiKit Preview")
 #define WINUAEREV _T("")
index af31dfbedc912d7ce2fc70865f6570fa0da059d2..f528867d981995f3247c1fb4827de7ba07d72364 100644 (file)
@@ -9103,7 +9103,7 @@ struct hfdlg_vals
        bool original;
 };
 
-static struct hfdlg_vals empty_hfdlg = { _T(""), _T(""), _T(""), 32, 2, 1, 0, 512, 1, 0, 0, 0, 1, 0, 1 };
+static struct hfdlg_vals empty_hfdlg = { _T(""), _T(""), _T(""), 32, 2, 1, 0, 0, 512, 1, 0, 0, 0, 1, 0, 1 };
 static struct hfdlg_vals current_hfdlg;
 static int archivehd;
 
@@ -9541,6 +9541,7 @@ static INT_PTR CALLBACK HardfileSettingsProc (HWND hDlg, UINT msg, WPARAM wParam
                        break;
                case IDC_FILESYS_SELECTOR:
                        DiskSelection (hDlg, IDC_PATH_FILESYS, 12, &workprefs, 0);
+                       GetDlgItemText (hDlg, IDC_PATH_FILESYS, current_hfdlg.fsfilename, sizeof current_hfdlg.fsfilename / sizeof (TCHAR));
                        break;
                case IDOK:
                        if (_tcslen (current_hfdlg.filename) == 0) {
index a7a7efae4b848fb5347b8467c934dcae66717fb9..b184e34c20c20771802dbac2c315b64da0906283 100644 (file)
@@ -1,6 +1,13 @@
 
 - restore only single input target to default.
 
+Beta 23:
+
+- CDFS: Joliet CDs didn't work and caused crashes. Directory listing worked but it was only possible to open non-existing files :)
+- CDFS: ACTION_DISK_INFO never returned no disk status.
+- Filesystem path selection and default RDB settings broke in b22.
+- FPU FINTRZ didn't work correctly if input value was outside of signed 32-bit range. (Bug since the beginning?)
+
 Beta 22:
 
 - "Generic" Amiga model incorrectly enabled A3000 DMAC emulation which caused most programs that require UAE Boot ROM in