From 9fe942b3b4fd70e0fc2f2dafda1373fa06ce475c Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Wed, 31 Oct 2012 20:49:52 +0200 Subject: [PATCH] 2500b23 --- filesys.cpp | 31 ++++++++++++++++++++++--------- fpp.cpp | 8 ++++---- isofs.cpp | 2 +- memory.cpp | 2 +- od-win32/direct3d.cpp | 13 +++++++++---- od-win32/win32.h | 4 ++-- od-win32/win32gui.cpp | 3 ++- od-win32/winuaechangelog.txt | 7 +++++++ 8 files changed, 48 insertions(+), 22 deletions(-) diff --git a/filesys.cpp b/filesys.cpp index eded1b41..a56bce7e 100644 --- a/filesys.cpp +++ b/filesys.cpp @@ -62,7 +62,12 @@ 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 cbf5c893..845f7e75 100644 --- 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: diff --git a/isofs.cpp b/isofs.cpp index 1ee9266d..66fe7e60 100644 --- 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; } diff --git a/memory.cpp b/memory.cpp index e893d288..bb15f54c 100644 --- a/memory.cpp +++ b/memory.cpp @@ -6,7 +6,7 @@ * (c) 1995 Bernd Schmidt */ -#define DEBUG_STUPID 0 +#define DEBUG_STUPID 1 #include "sysconfig.h" #include "sysdeps.h" diff --git a/od-win32/direct3d.cpp b/od-win32/direct3d.cpp index 218c6d5f..0d1007f4 100644 --- a/od-win32/direct3d.cpp +++ b/od-win32/direct3d.cpp @@ -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; diff --git a/od-win32/win32.h b/od-win32/win32.h index 35eb8c33..5d15fed6 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -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("") diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index af31dfbe..f528867d 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -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) { diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index a7a7efae..b184e34c 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -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 -- 2.47.3