From: Toni Wilen Date: Tue, 3 Jun 2014 17:42:48 +0000 (+0300) Subject: 2810b5 X-Git-Tag: 2810~4 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=12696a5bf47467358eda8a1b468ae4939d5c7329;p=francis%2Fwinuae.git 2810b5 --- diff --git a/a2091.cpp b/a2091.cpp index 77d73fb5..b51db2a0 100644 --- 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) { diff --git a/cd32_fmv.cpp b/cd32_fmv.cpp index 6836c0a9..c882bf2d 100644 --- a/cd32_fmv.cpp +++ b/cd32_fmv.cpp @@ -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")); diff --git a/custom.cpp b/custom.cpp index f1e1e3e3..f3778f43 100644 --- a/custom.cpp +++ b/custom.cpp @@ -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 */ diff --git a/expansion.cpp b/expansion.cpp index 5c05a818..cea325b8 100644 --- a/expansion.cpp +++ b/expansion.cpp @@ -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); diff --git a/include/rommgr.h b/include/rommgr.h index 7ef239f6..b5928633 100644 --- a/include/rommgr.h +++ b/include/rommgr.h @@ -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); diff --git a/ncr_scsi.cpp b/ncr_scsi.cpp index 36160050..7ffd84e5 100644 --- a/ncr_scsi.cpp +++ b/ncr_scsi.cpp @@ -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) { diff --git a/od-win32/fsdb_mywin32.cpp b/od-win32/fsdb_mywin32.cpp index b990c9ba..29fb3f9f 100644 --- a/od-win32/fsdb_mywin32.cpp +++ b/od-win32/fsdb_mywin32.cpp @@ -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; diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index 28924989..74012d03 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -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); } } diff --git a/od-win32/win32.h b/od-win32/win32.h index f670f1ae..71d0e320 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -20,11 +20,11 @@ #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") diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 5373834a..18a5113d 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -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. diff --git a/rommgr.cpp b/rommgr.cpp index fd09c08a..2182d5c2 100644 --- a/rommgr.cpp +++ b/rommgr.cpp @@ -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;