From: Toni Wilen Date: Fri, 25 Apr 2014 16:35:33 +0000 (+0300) Subject: 2800b18 X-Git-Tag: 2800~1 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=2ff0a769e3077f9d9d7e1cff0b2f92521adca790;p=francis%2Fwinuae.git 2800b18 --- diff --git a/cfgfile.cpp b/cfgfile.cpp index debae792..d09c3c9c 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -1183,6 +1183,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type) cfgfile_dwrite (f, _T("gfx_autoresolution_delay"), _T("%d"), p->gfx_autoresolution_delay); cfgfile_dwrite (f, _T("gfx_autoresolution_min_vertical"), vertmode[p->gfx_autoresolution_minv + 1]); cfgfile_dwrite (f, _T("gfx_autoresolution_min_horizontal"), horizmode[p->gfx_autoresolution_minh + 1]); + cfgfile_write_bool (f, _T("gfx_autoresolution_vga"), p->gfx_autoresolution_vga); cfgfile_write (f, _T("gfx_backbuffers"), _T("%d"), p->gfx_apmode[0].gfx_backbuffers); cfgfile_write (f, _T("gfx_backbuffers_rtg"), _T("%d"), p->gfx_apmode[1].gfx_backbuffers); @@ -2054,6 +2055,7 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value) || cfgfile_yesno (option, value, _T("gfx_blacker_than_black"), &p->gfx_blackerthanblack) || cfgfile_yesno (option, value, _T("gfx_black_frame_insertion"), &p->lightboost_strobo) || cfgfile_yesno (option, value, _T("gfx_flickerfixer"), &p->gfx_scandoubler) + || cfgfile_yesno (option, value, _T("gfx_autoresolution_vga"), &p->gfx_autoresolution_vga) || cfgfile_yesno (option, value, _T("magic_mouse"), &p->input_magic_mouse) || cfgfile_yesno (option, value, _T("warp"), &p->turbo_emulation) || cfgfile_yesno (option, value, _T("headless"), &p->headless) @@ -5194,6 +5196,7 @@ void default_prefs (struct uae_prefs *p, int type) p->gfx_autoresolution_minh = 0; p->color_mode = 2; p->gfx_blackerthanblack = 0; + p->gfx_autoresolution_vga = true; p->gfx_apmode[0].gfx_backbuffers = 2; p->gfx_apmode[1].gfx_backbuffers = 1; diff --git a/custom.cpp b/custom.cpp index 03c8d3d7..8e92d8c0 100644 --- a/custom.cpp +++ b/custom.cpp @@ -3773,7 +3773,7 @@ void compute_framesync (void) memset (line_decisions, 0, sizeof line_decisions); memset (line_drawinfo, 0, sizeof line_drawinfo); for (int i = 0; i < sizeof (line_decisions) / sizeof *line_decisions; i++) { - line_decisions[i].plfleft = -1; + line_decisions[i].plfleft = -2; } compute_vsynctime (); @@ -8238,7 +8238,7 @@ writeonly: v = last_custom_value1; line_cyclebased = vpos; if (!noput) { - int r; + int r, c, bmdma; uae_u16 l; // last chip bus value (read or write) is written to register @@ -8259,9 +8259,13 @@ writeonly: // - if last cycle was DMA cycle: DMA cycle data // - if last cycle was not DMA cycle: FFFF or some ANDed old data. // - if (is_bitplane_dma (hpos) || (cycle_line[hpos] & CYCLE_MASK) < CYCLE_CPU) { + c = cycle_line[hpos] & CYCLE_MASK; + bmdma = is_bitplane_dma(hpos); + if (bmdma || (c > CYCLE_REFRESH && c < CYCLE_CPU)) { v = last_custom_value1; } else { + // refresh checked because refresh cycles do not always + // set last_custom_value1 for performance reasons. v = 0xffff; } #if CUSTOM_DEBUG > 0 diff --git a/drawing.cpp b/drawing.cpp index 5ea62f40..7e374480 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -2430,11 +2430,6 @@ static void pfield_draw_line (struct vidbuffer *vb, int lineno, int gfx_ypos, in break; } -#if 0 - if (border && dp_for_drawing->plfleft < -1) - border = -1; // blank last "missing" line -#endif - dh = dh_line; xlinebuffer = gfxvidinfo.drawbuffer.linemem; if (xlinebuffer == 0 && do_double @@ -2525,10 +2520,18 @@ static void pfield_draw_line (struct vidbuffer *vb, int lineno, int gfx_ypos, in } #endif - if (!dosprites && dip_for_drawing->nr_color_changes == 0) { - fill_line_border (); + if (!dosprites && (dip_for_drawing->nr_color_changes == 0 || (dip_for_drawing->nr_color_changes == 1 && curr_color_changes[dip_for_drawing->first_color_change].regno == -1))) { + if (dp_for_drawing->plfleft < -1) { + // blanked border line + int tmp = hposblank; + hposblank = 1; + fill_line_border (); + hposblank = tmp; + } else { + // normal border line + fill_line_border (); + } do_flush_line (vb, gfx_ypos); - if (do_double) { if (dh == dh_buf) { xlinebuffer = row_map[follow_ypos] - linetoscr_x_adjust_bytes; @@ -2693,7 +2696,7 @@ static void init_drawing_frame (void) } } - if (programmedmode && gfxvidinfo.gfx_resolution_reserved >= RES_HIRES && gfxvidinfo.gfx_vresolution_reserved >= VRES_DOUBLE) { + if (currprefs.gfx_autoresolution_vga && programmedmode && gfxvidinfo.gfx_resolution_reserved >= RES_HIRES && gfxvidinfo.gfx_vresolution_reserved >= VRES_DOUBLE) { if (largest_res == RES_SUPERHIRES && (gfxvidinfo.gfx_resolution_reserved < RES_SUPERHIRES || gfxvidinfo.gfx_vresolution_reserved < 1)) { // enable full doubling/superhires support if programmed mode. It may be "half-width" only and may fit in normal display window. gfxvidinfo.gfx_resolution_reserved = RES_SUPERHIRES; diff --git a/gfxboard.cpp b/gfxboard.cpp index b0a65a71..3eba35e0 100644 --- a/gfxboard.cpp +++ b/gfxboard.cpp @@ -11,7 +11,7 @@ #define MEMLOGR 0 #define MEMLOGW 0 #define MEMLOGINDIRECT 0 -#define MEMDEBUG 1 +#define MEMDEBUG 0 #define MEMDEBUGMASK 0x7fffff #define MEMDEBUGTEST 0x1ff000 #define PICASSOIV_DEBUG_IO 0 diff --git a/include/options.h b/include/options.h index 47107464..b555e95d 100644 --- a/include/options.h +++ b/include/options.h @@ -344,6 +344,7 @@ struct uae_prefs { struct wh gfx_size; struct wh gfx_size_win_xtra[6]; struct wh gfx_size_fs_xtra[6]; + bool gfx_autoresolution_vga; int gfx_autoresolution; int gfx_autoresolution_delay; int gfx_autoresolution_minv, gfx_autoresolution_minh; diff --git a/memory.cpp b/memory.cpp index 3fd47b13..8f573ad6 100644 --- a/memory.cpp +++ b/memory.cpp @@ -197,7 +197,9 @@ static void gary_wait(uaecptr addr, int size) static bool gary_nonrange(uaecptr addr) { - if (addr <= 0xb80000) + if (currprefs.cs_fatgaryrev < 0) + return false; + if (addr < 0xb80000) return false; if (addr >= 0xd00000 && addr < 0xdc0000) return true; @@ -240,11 +242,16 @@ uae_u32 dummy_get (uaecptr addr, int size, bool inst) addr &= 0x00ffffff; if (addr >= 0x10000000) return v; - if (currprefs.cpu_model == 68000) { + if ((currprefs.cpu_model <= 68010) || (currprefs.cpu_model == 68020 && (currprefs.chipset_mask & CSMASK_AGA) && currprefs.address_space_24)) { if (size == 4) { - v = (regs.db << 16) | regs.db; + v = regs.db & 0xffff; + if (addr & 1) + v = (v << 8) | (v >> 8); + v = (v << 16) | v; } else if (size == 2) { v = regs.db & 0xffff; + if (addr & 1) + v = (v << 8) | (v >> 8); } else { v = regs.db; v = (addr & 1) ? (v & 0xff) : ((v >> 8) & 0xff); diff --git a/newcpu.cpp b/newcpu.cpp index 5a51818b..4cd7485a 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -5841,8 +5841,10 @@ uae_u32 get_word_ce020_prefetch (int o) regs.prefetch020[0] = regs.prefetch020[1]; fill_icache020 (pc + 2 + 4, mem_access_delay_longi_read_ce020); regs.prefetch020[1] = regs.cacheholdingdata020; + regs.db = regs.prefetch020[0] >> 16; } else { v = regs.prefetch020[0] >> 16; + regs.db = regs.prefetch020[0]; } do_cycles_ce020 (2); return v; @@ -5858,8 +5860,10 @@ uae_u32 get_word_020_prefetch (int o) regs.prefetch020[0] = regs.prefetch020[1]; fill_icache020 (pc + 2 + 4, get_longi); regs.prefetch020[1] = regs.cacheholdingdata020; + regs.db = regs.prefetch020[0] >> 16; } else { v = regs.prefetch020[0] >> 16; + regs.db = regs.prefetch020[0]; } return v; } diff --git a/od-win32/resources/resource.h b/od-win32/resources/resource.h index 5e619358..cdb18826 100644 --- a/od-win32/resources/resource.h +++ b/od-win32/resources/resource.h @@ -466,6 +466,8 @@ #define IDC_AUTORESOLUTIONSELECT 1178 #define IDC_LORES_SMOOTHED 1179 #define IDC_FLICKERFIXER 1180 +#define IDC_PROGRAMMED_AUTO 1181 +#define IDC_AUTORESOLUTIONVGA 1181 #define IDC_RATE2ENABLE 1182 #define IDC_FRAMERATE 1185 #define IDC_XSIZE 1187 diff --git a/od-win32/resources/winuae.rc b/od-win32/resources/winuae.rc index 271e8a14..ae9cf77a 100644 --- a/od-win32/resources/winuae.rc +++ b/od-win32/resources/winuae.rc @@ -1,7 +1,7 @@ // Microsoft Visual C++ generated resource script. // -#include "resource.h" #include "winres.h" +#include "resource.h" ///////////////////////////////////////////////////////////////////////////// // English resources @@ -131,9 +131,9 @@ BEGIN RTEXT "RTG:",IDC_STATIC,8,115,49,15,SS_CENTERIMAGE COMBOBOX IDC_SCREENMODE_RTG,61,118,71,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_SCREENMODE_RTG2,142,118,127,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - CONTROL "Blacker than black",IDC_BLACKER_THAN_BLACK,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,11,140,142,10 - CONTROL "Filtered low resolution",IDC_LORES_SMOOTHED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,159,140,116,10 - CONTROL "Remove interlace artifacts",IDC_FLICKERFIXER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,154,142,10 + CONTROL "Blacker than black [] Borderblanked black is blacker than display area black.",IDC_BLACKER_THAN_BLACK,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,11,140,139,10 + CONTROL "Filtered low resolution [] When scaling hires to lores or superhires to hires, show average color of pixel instead of dropping every other pixel.",IDC_LORES_SMOOTHED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,155,140,123,10 + CONTROL "Remove interlace artifacts [] Emulates interlace mode internally as progressive, removing all interlace artifacts. Not compatible with all software.",IDC_FLICKERFIXER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,154,139,10 RTEXT "Resolution:",IDC_STATIC,24,170,110,8,SS_CENTERIMAGE COMBOBOX IDC_LORES,142,169,127,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP RTEXT "Resolution autoswitch:",IDC_STATIC,92,190,110,8,SS_CENTERIMAGE @@ -163,6 +163,8 @@ BEGIN CONTROL "Double, frames",IDC_LM_IDOUBLED,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,299,251,90,10 CONTROL "Double, fields",IDC_LM_IDOUBLED2,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,299,264,90,10 CONTROL "Double, fields+",IDC_LM_IDOUBLED3,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,299,277,90,10 + CONTROL "VGA mode resolution autoswitch [] Automatically selects between hires and superhires in programmed display modes, keeping correct aspect ratio.",IDC_AUTORESOLUTIONVGA, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,155,154,124,10 END IDD_MEMORY DIALOGEX 0, 0, 396, 206 diff --git a/od-win32/win32.h b/od-win32/win32.h index 665b4291..e5060cb9 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -19,11 +19,11 @@ #define LANG_DLL 1 #if WINUAEPUBLICBETA -#define WINUAEBETA _T("17") +#define WINUAEBETA _T("18") #else #define WINUAEBETA _T("") #endif -#define WINUAEDATE MAKEBD(2014, 4, 22) +#define WINUAEDATE MAKEBD(2014, 4, 25) #define WINUAEEXTRA _T("") //#define WINUAEEXTRA _T("AmiKit Preview") //#define WINUAEEXTRA _T("Amiga Forever Edition") diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index cb25f4a4..0709571e 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -5950,6 +5950,13 @@ static void enable_for_displaydlg (HWND hDlg) ew (hDlg, IDC_FRAMERATE, !workprefs.cpu_cycle_exact); ew (hDlg, IDC_LORES, !workprefs.gfx_autoresolution); + ew(hDlg, IDC_AUTORESOLUTIONVGA, workprefs.gfx_resolution >= RES_HIRES && workprefs.gfx_vresolution >= VRES_DOUBLE); + if (workprefs.gfx_resolution < RES_HIRES || workprefs.gfx_vresolution < VRES_DOUBLE) { + workprefs.gfx_autoresolution_vga = false; + CheckDlgButton (hDlg, IDC_AUTORESOLUTIONVGA, workprefs.gfx_autoresolution_vga); + } + + bool isdouble = workprefs.gfx_vresolution > 0; ew (hDlg, IDC_LM_NORMAL, !workprefs.gfx_autoresolution); @@ -6442,6 +6449,7 @@ static void values_to_displaydlg (HWND hDlg) else SendDlgItemMessage(hDlg, IDC_AUTORESOLUTIONSELECT, CB_SETCURSEL, 5, 0); + CheckDlgButton (hDlg, IDC_AUTORESOLUTIONVGA, workprefs.gfx_autoresolution_vga); CheckDlgButton (hDlg, IDC_BLACKER_THAN_BLACK, workprefs.gfx_blackerthanblack); CheckDlgButton (hDlg, IDC_LORES_SMOOTHED, workprefs.gfx_lores_mode); CheckDlgButton (hDlg, IDC_FLICKERFIXER, workprefs.gfx_scandoubler); @@ -6565,6 +6573,7 @@ static void values_from_displaydlg (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l workprefs.gfx_lores_mode = ischecked (hDlg, IDC_LORES_SMOOTHED); workprefs.gfx_scandoubler = ischecked (hDlg, IDC_FLICKERFIXER); workprefs.gfx_blackerthanblack = ischecked (hDlg, IDC_BLACKER_THAN_BLACK); + workprefs.gfx_autoresolution_vga = ischecked (hDlg, IDC_AUTORESOLUTIONVGA); int vres = workprefs.gfx_vresolution; int viscan = workprefs.gfx_iscanlines; diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index fcaf0f68..4f6ccaac 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -11,6 +11,20 @@ - restore only single input target to default. +Beta 18: + +- 0xFFFF was not returned when reading write-only or non-existing custom register and previous cycle was + idle cycle. Not exactly 100% correct but more compatible with programs that accidentally read wrong + custom registers. +- Cirrus Logic emulation had some useless logging enabled. +- Added GUI option to enable/disable new automatic programmed mode resolution selection to Display + panel, enabled by default. (For example if you want to use superhires all the time and use filter + panel to scale the display back to correct aspect ratio) +- Unexpanded A1200 also reads last fetched opcode word when accessing non-existing memory, similar + to unexpanded A500. (more compatible and cycle-exact only) +- Last possible displayable line was incorrectly drawn in border color in some situations when short + field mode was active. + Beta 17: - Debugger breakpoints work again. (b14)