]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
2800b18
authorToni Wilen <twilen@winuae.net>
Fri, 25 Apr 2014 16:35:33 +0000 (19:35 +0300)
committerToni Wilen <twilen@winuae.net>
Fri, 25 Apr 2014 16:35:33 +0000 (19:35 +0300)
12 files changed:
cfgfile.cpp
custom.cpp
drawing.cpp
gfxboard.cpp
include/options.h
memory.cpp
newcpu.cpp
od-win32/resources/resource.h
od-win32/resources/winuae.rc
od-win32/win32.h
od-win32/win32gui.cpp
od-win32/winuaechangelog.txt

index debae7927c0895555b20480af59e57b8b8e425a7..d09c3c9c0d83555eb569a574de211e702db49459 100644 (file)
@@ -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;
 
index 03c8d3d700cbecd63b6f2570f6cdff2726b23ead..8e92d8c0f997482cf7fa86fc1778f1bc8a38a524 100644 (file)
@@ -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
index 5ea62f4059939274ab429aabdc95c05a5e7e1efb..7e37448069ff8bb4d6a1eddbb951b95a96e3fbc3 100644 (file)
@@ -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;
index b0a65a715c50ff686d861343e3d18750f977f24f..3eba35e034780bbcc6bcb7ce3a96f66cc96723aa 100644 (file)
@@ -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
index 47107464209188bb8a5c35fb3c4883f33034c447..b555e95d2d847430befcd5e180317e3ec162f3f7 100644 (file)
@@ -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;
index 3fd47b13e3306a2b5e209f05f6b40d3c591f0423..8f573ad6b83082283019c1b9fc85dbc15877ca5d 100644 (file)
@@ -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);
index 5a51818b20c8ab39770f95f65f3cccc37093b240..4cd7485a7a580df40eec5d9f6d22eedc0f163a2c 100644 (file)
@@ -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;
 }
index 5e619358ad9ec4fc943a374edcb2c4823bc3b897..cdb18826516aafbf1ea03279a2114303cf8e3f78 100644 (file)
 #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
index 271e8a14cb4ecc2b5c7f6a4e82fd3f3d425ae841..ae9cf77a2f32a1fa52ddaad380273619b047a5b6 100644 (file)
@@ -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
index 665b4291c0341e414dc3c5ba33c0cafc3f0a8069..e5060cb9aefb480117fd5b979e3c34cf03b97ef8 100644 (file)
 #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")
index cb25f4a4e8534ed7ca96e64845bdb08e632b0a81..0709571ec1774c51452f8d7fc42d8875a4a4efa2 100644 (file)
@@ -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;
index fcaf0f687d8773d4a0339f5bf23d9e1c2cb0a327..4f6ccaac25d35d5e8ac2a900f97a762463e0d959 100644 (file)
 
 - 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)