]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
2810b5
authorToni Wilen <twilen@winuae.net>
Tue, 3 Jun 2014 17:42:48 +0000 (20:42 +0300)
committerToni Wilen <twilen@winuae.net>
Tue, 3 Jun 2014 17:42:48 +0000 (20:42 +0300)
a2091.cpp
cd32_fmv.cpp
custom.cpp
expansion.cpp
include/rommgr.h
ncr_scsi.cpp
od-win32/fsdb_mywin32.cpp
od-win32/win32.cpp
od-win32/win32.h
od-win32/winuaechangelog.txt
rommgr.cpp

index 77d73fb50a6a7eb6565758fdba467ae0375f5f9e..b51db2a0e97e01ac7888f8729034125521ed03e0 100644 (file)
--- a/a2091.cpp
+++ b/a2091.cpp
@@ -1853,7 +1853,7 @@ void a2091_init (void)
                if (!z) {
                        rl = getromlistbyids (roms);
                        if (rl) {
-                               z = read_rom (&rl->rd);
+                               z = read_rom (rl->rd);
                        }
                }
                if (z) {
index 6836c0a90b3de25be8599eba902361be1a88d8e3..c882bf2d594330c302ecf567127741ec79b4f0a9 100644 (file)
@@ -390,7 +390,7 @@ void cd32_fmv_init (uaecptr start)
        if (!rl)
                return;
        rd = rl->rd;
-       z = read_rom (&rd);
+       z = read_rom (rd);
        if (z) {
                write_log (_T("CD32 FMV ROM %d.%d\n"), rd->ver, rd->rev);
                rom = mapped_malloc (fmv_size, _T("fast"));
index f1e1e3e315702c9df15de79021fd6d2e19143649..f3778f436b0aae46654b4e540852059b4450fa92 100644 (file)
@@ -941,6 +941,9 @@ static int toscr_delay[2], toscr_delay_adjusted[2];
 static int delay_cycles, delay_lastcycle[2];
 static bool bplcon1_written;
 
+#define PLANE_RESET_HPOS 8
+static int planesactiveatresetpoint;
+
 /* The number of bits left from the last fetched words.
 This is an optimization - conceptually, we have to make sure the result is
 the same as if toscr is called in each clock cycle.  However, to speed this
@@ -3469,7 +3472,7 @@ static void reset_decisions (void)
        }
 
        memset (outword, 0, sizeof outword);
-       //memset (fetched, 0, sizeof fetched); // This must remain between scanlines
+       // fetched must not be cleared (Sony VX-90 / Royal Amiga Force)
        todisplay_fetched[0] = todisplay_fetched[1] = false;
        memset (todisplay, 0, sizeof todisplay);
        memset (todisplay2, 0, sizeof todisplay2);
@@ -4142,9 +4145,11 @@ static bool hsyncdelay (void)
        return false;
 }
 
+#define CPU_ACCURATE (currprefs.cpu_model < 68020 || (currprefs.cpu_model == 68020 && currprefs.cpu_cycle_exact))
+
 // DFF006 = 0.W must be valid result but better do this only in 68000 modes (whdload black screen!)
 // HPOS is shifted by 3 cycles and VPOS increases when shifted HPOS==1
-#define HPOS_OFFSET ((currprefs.cpu_model < 68020 || (currprefs.cpu_model == 68020 && currprefs.cpu_cycle_exact)) ? HPOS_SHIFT : 0)
+#define HPOS_OFFSET (CPU_ACCURATE ? HPOS_SHIFT : 0)
 #define VPOS_INC_DELAY (HPOS_OFFSET ? 1 : 0)
 
 static uae_u16 VPOSR (void)
@@ -4152,7 +4157,13 @@ static uae_u16 VPOSR (void)
        unsigned int csbit = 0;
        uae_u16 vp = GETVPOS ();
        uae_u16 hp = GETHPOS ();
+       int lof = lof_store;
 
+       if (vp + 1 == maxvpos + lof_store && (hp == maxhpos - 1 || hp == maxhpos - 2)) {
+               // lof toggles 2 cycles before maxhpos, so do fake toggle here.
+               if ((bplcon0 & 4) && CPU_ACCURATE)
+                       lof = lof ? 0 : 1;
+       }
        if (hp + HPOS_OFFSET >= maxhpos + VPOS_INC_DELAY) {
                vp++;
                if (vp >= maxvpos + lof_store)
@@ -4177,7 +4188,7 @@ static uae_u16 VPOSR (void)
 
        if (!(currprefs.chipset_mask & CSMASK_ECS_AGNUS))
                vp &= 1;
-       vp |= (lof_store ? 0x8000 : 0) | csbit;
+       vp |= (lof ? 0x8000 : 0) | csbit;
        if (currprefs.chipset_mask & CSMASK_ECS_AGNUS)
                vp |= lol ? 0x80 : 0;
        hsyncdelay ();
@@ -4404,7 +4415,7 @@ static void compute_spcflag_copper (int hpos);
 static void COPJMP (int num, int vblank)
 {
        int oldstrobe = cop_state.strobe;
-       bool wasstopped = cop_state.state == COP_stop;
+       bool wasstopped = cop_state.state == COP_stop && !vblank;
 
 #if CUSTOM_DEBUG > 0
        if (dmaen (DMA_COPPER) && (cop_state.saved_i1 != 0xffff || cop_state.saved_i2 != 0xfffe))
@@ -4992,20 +5003,19 @@ static void BPL2MOD (int hpos, uae_u16 v)
 static void BPLxDAT (int hpos, int num, uae_u16 v)
 {
        // only BPL0DAT access can do anything visible
-       if (num == 0 && hpos >= 7) {
+       if (num == 0 && hpos >= 8) {
                decide_line (hpos);
                decide_fetch_safe (hpos);
        }
        flush_display (fetchmode);
        fetched[num] = v;
        fetched_aga[num] = v;
-       if (num == 0 && hpos >= 7) {
+       if (num == 0 && hpos >= 8) {
                bpl1dat_written = true;
                bpl1dat_written_at_least_once = true;
                if (thisline_decision.plfleft < 0) {
-                       thisline_decision.plfleft = (hpos + 3) & ~1;
+                       thisline_decision.plfleft = hpos;
                        reset_bpl_vars ();
-                       update_denise (hpos);
                }
                beginning_of_plane_block (hpos, fetchmode);
        }
@@ -5738,15 +5748,13 @@ static int customdelay[]= {
        /* BPLxPTH/BPLxPTL */
        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 16 */
        /* BPLCON0-3,BPLMOD1-2 */
-       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 16 */
+       0,0,0,0,0,0,0,0, /* 8 */
+       /* BPLxDAT */
+       1,1,1,1,1,1,1,1, /* 8 */
        /* SPRxPTH/SPRxPTL */
        1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 16 */
-
        /* SPRxPOS/SPRxCTL/SPRxDATA/SPRxDATB */
        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-//     1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,
-//     1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-
        /* COLORxx */
        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
        /* RESERVED */
index 5c05a8186d8293b91f6ad90b361296b2a09972e2..cea325b87710cd91ae7d509ddbc813e223f85fab 100644 (file)
@@ -470,7 +470,7 @@ static void expamem_init_cd32fmv (void)
                return;
        write_log (_T("CD32 FMV ROM '%s' %d.%d\n"), rl->path, rl->rd->ver, rl->rd->rev);
        rd = rl->rd;
-       z = read_rom (&rd);
+       z = read_rom (rd);
        if (z) {
                zfile_fread (expamem, 128, 1, z);
                zfile_fclose (z);
index 7ef239f6dd44c88818491d0391e99fffc3ea4b5f..b5928633c672ee9f6909ca968f3a7b02b7e426c9 100644 (file)
@@ -75,7 +75,7 @@ extern struct romlist *getromlistbyromdata (const struct romdata *rd);
 extern void romlist_add (const TCHAR *path, struct romdata *rd);
 extern TCHAR *romlist_get (const struct romdata *rd);
 extern void romlist_clear (void);
-extern struct zfile *read_rom (struct romdata **rd);
+extern struct zfile *read_rom (struct romdata *rd);
 extern struct zfile *read_rom_name (const TCHAR *filename);
 
 extern int load_keyring (struct uae_prefs *p, const TCHAR *path);
index 36160050808c20097f44b379dd58685720042d89..7ffd84e5a681bbb91a6e1a360702d0ccd8879dc6 100644 (file)
@@ -377,7 +377,7 @@ void ncr_autoconfig_init (void)
                struct romlist *rl = getromlistbyids(roms);
                if (rl) {
                        struct romdata *rd = rl->rd;
-                       z = read_rom (&rd);
+                       z = read_rom (rd);
                }
        }
        if (z) {
index b990c9ba0b23f2f03c9e603b03e79bb61518a181..29fb3f9f4796cffe75c6b33720ff49503988ac14 100644 (file)
@@ -767,6 +767,13 @@ void my_canonicalize_path(const TCHAR *path, TCHAR *out, int size)
 {
        TCHAR tmp[MAX_DPATH];
        int v;
+
+       // don't attempt to validate and canonicalize invalid or fake paths
+       if (path[0] == ':' || path[0] == 0 || _tcscmp(path, _T("\\")) == 0 || _tcscmp(path, _T("/")) == 0) {
+               _tcsncpy (out, path, size);
+               out[size - 1] = 0;
+               return;
+       }
        v = GetLongPathName (path, tmp, sizeof tmp / sizeof (TCHAR));
        if (!v || v > sizeof tmp / sizeof (TCHAR)) {
                _tcsncpy (out, path, size);
@@ -987,6 +994,7 @@ bool my_createshortcut(const TCHAR *source, const TCHAR *target, const TCHAR *de
 bool my_resolvesoftlink(TCHAR *linkfile, int size)
 {
        TCHAR tmp[MAX_DPATH];
+
        int v = my_resolvessymboliclink2(linkfile, size);
        if (v > 0)
                return true;
index 28924989aea997cada044bf7b293777e7121967c..74012d03ba4722a5c82a271c5b5a6bb444bbf1ce 100644 (file)
@@ -605,9 +605,9 @@ static void setcursorshape (void)
 
 static void releasecapture (void)
 {
+       //write_log (_T("releasecapture %d\n"), showcursor);
        if (!showcursor)
                return;
-       //write_log (_T("releasecapture\n"));
        ClipCursor (NULL);
        ReleaseCapture ();
        ShowCursor (TRUE);
@@ -723,6 +723,7 @@ static void setmouseactive2 (int active, bool allowpause)
        if (mouseactive) {
                if (focus) {
                        if (!showcursor) {
+                               //write_log(_T("setcapture\n"));
                                ShowCursor (FALSE);
                                SetCapture (hAmigaWnd);
                                updatewinrect (false);
@@ -1031,15 +1032,16 @@ int isfocus (void)
 
 static void activationtoggle (bool inactiveonly)
 {
-       if (isfullscreen () > 0)
-               minimizewindow ();
-       if (isfullscreen () < 0 && currprefs.win32_minimize_inactive)
-               minimizewindow ();
        if (mouseactive) {
-               setmouseactive (0);
+               if ((isfullscreen () > 0) || (isfullscreen () < 0 && currprefs.win32_minimize_inactive)) {
+                       disablecapture();
+                       minimizewindow();
+               } else {
+                       setmouseactive(0);
+               }
        } else {
                if (!inactiveonly)
-                       setmouseactive (1);
+                       setmouseactive(1);
        }
 }
 
index f670f1ae80bc8e135628ce006f898452c21c3fd2..71d0e320abb35662dca75283d09ce467df6f1c8a 100644 (file)
 #define LANG_DLL_FULL_VERSION_MATCH 0
 
 #if WINUAEPUBLICBETA
-#define WINUAEBETA _T("4")
+#define WINUAEBETA _T("5")
 #else
 #define WINUAEBETA _T("")
 #endif
-#define WINUAEDATE MAKEBD(2014, 5, 31)
+#define WINUAEDATE MAKEBD(2014, 6, 3)
 #define WINUAEEXTRA _T("")
 //#define WINUAEEXTRA _T("AmiKit Preview")
 //#define WINUAEEXTRA _T("Amiga Forever Edition")
index 5373834a1fbed7017d98de6fee834882acc963fc..18a5113d5dfddc6f5cb3a55fbd38483eb6b2b63d 100644 (file)
@@ -18,6 +18,17 @@ Things that may happen in 2015:
 
 - restore only single input target to default.
 
+Beta 5:
+
+- Relative path improvement broke CDFS CD mounting in some configurations.
+- Ungrab (b4) event didn't disable mouse capture when it was activated in fullscreen modes.
+- VPOS LOF bit toggles (if interlace) exactly 2 cycles before first refresh slot. Logic analyzer tested.
+- Copper vblank strobe also stopped the copper if DMA was disabled and second strobe register was accessed
+  previously. Broke in 280b1. (Sequential / Andromeda first screen)
+- More accurate BPL1DAT emulation.(Glitches appeared in Sequential / Andromeda magnet part's
+  left border when one pixel gap in Rink a Dink / Lemon rotozoomer part white border was fixed)
+- 8-bit split (odd/even) roms didn't load if merged parent was missing.
+
 Beta 4:
 
 - New relative path mode worked badly under Windows XP, possibly up to Windows 7 without SP1.
@@ -488,7 +499,7 @@ Huge changelog, mostly technical stuff.
 - It seems ECS Denise color palette is full white after power up but full black if OCS. (Small Intro / TWW)
 - Reading byte from CIA address that has valid CIA A/B select bit but bit 0 inverted (Active 8 bits of
   16-bit data bus not driven by CIAs) didn't read prefetch buffer contents in 68000 CE/prefetch mode.
-  (Copper Bandwaggon / New Age)
+  (Copper Bandwagon / New Age)
 - 68020 CE mode 6888x exceptions didn't skip instruction prefetch, broke for example KS 1.3 FPU detection.
 - 68020 CE last prefetch word load after branch or exception used incorrect (too fast) non-ce fetch call.
 
index fd09c08acc2cd3eb9941645a28cd40f3120cabca..2182d5c2fbefdf322b5b4cdf61ea3ce75b2af614 100644 (file)
@@ -397,10 +397,12 @@ static void romlist_cleanup (void)
                }
                i++;
        }
+#if 0
        for (i = 0; i < romlist_cnt; i++) {
                struct romlist *rll = &rl[i];
-               //write_log (_T("%s (%s)\n"), rll->rd->name, rll->path);
+               write_log (_T("%d: %08x %s (%s)\n"), rll->rd->id, rll->rd->group, rll->rd->name, rll->path);
        }
+#endif
 }
 
 struct romlist **getromlistbyident (int ver, int rev, int subver, int subrev, const TCHAR *model, int romflags, bool all)
@@ -1007,12 +1009,14 @@ void romwarning (const int *ids)
        i = 0;
        while (ids[i] >= 0) {
                struct romdata *rd = getromdatabyid (ids[i]);
-               getromname (rd, tmp1);
-               _tcscat (tmp2, _T("- "));
-               _tcscat (tmp2, tmp1);
-               _tcscat (tmp2, _T("\n"));
-               if (rd->type & (ROMTYPE_A2091BOOT | ROMTYPE_A4091BOOT))
-                       exp++;
+               if (!(rd->type & ROMTYPE_NONE)) {
+                       getromname (rd, tmp1);
+                       _tcscat (tmp2, _T("- "));
+                       _tcscat (tmp2, tmp1);
+                       _tcscat (tmp2, _T("\n"));
+                       if (rd->type & (ROMTYPE_A2091BOOT | ROMTYPE_A4091BOOT))
+                               exp++;
+               }
                i++;
        }
        translate_message (exp ? NUMSG_EXPROMNEED : NUMSG_ROMNEED, tmp3);
@@ -1097,10 +1101,10 @@ static int read_rom_file (uae_u8 *buf, const struct romdata *rd)
        return 1;
 }
 
-struct zfile *read_rom (struct romdata **prd)
+struct zfile *read_rom (struct romdata *prd)
 {
-       struct romdata *rd2 = *prd;
-       struct romdata *rd = *prd;
+       struct romdata *rd2 = prd;
+       struct romdata *rd = prd;
        TCHAR *name;
        int id = rd->id;
        uae_u32 crc32;
@@ -1115,7 +1119,6 @@ struct zfile *read_rom (struct romdata **prd)
                        break;
                rd2--;
        }
-       *prd = rd2;
        size = rd2->size;
        crc32 = rd2->crc32;
        name = rd->name;
@@ -1235,7 +1238,7 @@ struct zfile *read_rom_name (const TCHAR *filename)
        for (i = 0; i < romlist_cnt; i++) {
                if (!_tcsicmp (filename, rl[i].path)) {
                        struct romdata *rd = rl[i].rd;
-                       f = read_rom (&rd);
+                       f = read_rom (rd);
                        if (f)
                                return f;
                }
@@ -1292,7 +1295,7 @@ struct zfile *read_rom_name_guess (const TCHAR *filename)
                        continue;
                if (!_tcsicmp (name, n + j)) {
                        struct romdata *rd = rl[i].rd;
-                       f = read_rom (&rd);
+                       f = read_rom (rd);
                        if (f) {
                                write_log (_T("ROM %s not found, using %s\n"), filename, rl[i].path);
                                return f;