]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
2810b6
authorToni Wilen <twilen@winuae.net>
Sat, 7 Jun 2014 17:39:25 +0000 (20:39 +0300)
committerToni Wilen <twilen@winuae.net>
Sat, 7 Jun 2014 17:39:25 +0000 (20:39 +0300)
custom.cpp
drawing.cpp
od-win32/resources/resource.h
od-win32/resources/winuae.rc
od-win32/win32.h
od-win32/win32gfx.cpp
od-win32/win32gui.cpp
od-win32/winuaechangelog.txt
zfile.cpp

index f3778f436b0aae46654b4e540852059b4450fa92..a24fbc72d46ddb91115834ecb8446f9b5e46cdde 100644 (file)
@@ -345,7 +345,6 @@ struct copper {
        int vcmp, hcmp;
 
        int strobe; /* COPJMP1 / COPJMP2 accessed */
-       int last_write, last_write_hpos;
        int moveaddr, movedata, movedelay;
 };
 
@@ -5978,8 +5977,6 @@ static void update_copper (int until_hpos)
                                if (cop_state.ignore_next)
                                        reg = 0x1fe;
 
-                               cop_state.last_write = reg;
-                               cop_state.last_write_hpos = old_hpos;
                                if (reg == 0x88) {
                                        cop_state.strobe = 1;
                                        cop_state.state = COP_strobe_delay1;
@@ -7774,7 +7771,6 @@ static void hsync_handler_post (bool onvsync)
        plfstrt_sprite = 0xff;
        /* See if there's a chance of a copper wait ending this line.  */
        cop_state.hpos = 0;
-       cop_state.last_write = 0;
        compute_spcflag_copper (maxhpos);
 
        serial_hsynchandler ();
@@ -8021,6 +8017,9 @@ void custom_reset (bool hardreset, bool keyboardreset)
        memset (&spixstate, 0, sizeof spixstate);
 
        cop_state.state = COP_stop;
+       cop_state.movedelay = 0;
+       cop_state.strobe = 0;
+       cop_state.ignore_next = 0;
        diwstate = DIW_waiting_start;
 
        dmal = 0;
index c43fe5a0edb4f6d876330e05aed8bb261fd91f27..77fd02d6d49dd8113b9445373adcf2fd279a6814 100644 (file)
@@ -746,7 +746,7 @@ static int linetoscr_diw_start, linetoscr_diw_end;
 static int native_ddf_left, native_ddf_right;
 
 static int pixels_offset;
-static int src_pixel, ham_src_pixel;
+static int src_pixel;
 /* How many pixels in window coordinates which are to the left of the left border.  */
 static int unpainted;
 
@@ -874,7 +874,6 @@ static void pfield_init_linetoscr (bool border)
 #endif
 
        unpainted = visible_left_border < playfield_start ? 0 : visible_left_border - playfield_start;
-       ham_src_pixel = MAX_PIXELS_PER_LINE + res_shift_from_window (playfield_start - native_ddf_left);
        unpainted = res_shift_from_window (unpainted);
 
        int first_x = sprite_first_x;
@@ -1666,7 +1665,7 @@ static void init_ham_decoding (void)
 {
        int unpainted_amiga = unpainted;
 
-       ham_decode_pixel = ham_src_pixel;
+       ham_decode_pixel = src_pixel;
        ham_lastcolor = color_reg_get (&colors_for_drawing, 0);
 
        if (!bplham) {
@@ -1780,8 +1779,12 @@ static void decode_ham (int pix, int stoppos, bool blank)
        }
 }
 
-static void decode_ham_border(int pix, int stoppos, bool blank)
+static void erase_ham_right_border(int pix, int stoppos, bool blank)
 {
+       if (stoppos < playfield_end)
+               return;
+       // erase right border in HAM modes or old HAM data may be visible
+       // if DDFSTOP < DIWSTOP (Uridium II title screen)
        int todraw_amiga = res_shift_from_window (stoppos - pix);
        while (todraw_amiga-- > 0)
                ham_linebuf[ham_decode_pixel++] = 0;
@@ -2366,18 +2369,21 @@ static void do_color_changes (line_draw_func worker_border, line_draw_func worke
                if (lastpos >= endpos)
                        break;
        }
+#if 1
        if (vp < visible_top_start || vp >= visible_bottom_stop) {
                // outside of visible area
                // Just overwrite with black. Above code needs to run because of custom registers,
                // not worth the trouble for separate code path just for max 10 lines or so
                (*worker_border) (visible_left_border, visible_left_border + gfxvidinfo.drawbuffer.inwidth, true);
        }
-
+#endif
 }
 
-STATIC_INLINE bool have_color_changes(struct draw_info *di)
+STATIC_INLINE bool is_color_changes(struct draw_info *di)
 {
-       return (di->nr_color_changes == 0 || (di->nr_color_changes == 1 && curr_color_changes[di->first_color_change].regno == -1));
+       int regno = curr_color_changes[di->first_color_change].regno;
+       int changes = di->nr_color_changes;
+       return changes > 1 || (changes == 1 && regno != 0xffff && regno != -1);
 }
 
 enum double_how {
@@ -2391,6 +2397,7 @@ static void pfield_draw_line (struct vidbuffer *vb, int lineno, int gfx_ypos, in
        static int warned = 0;
        int border = 0;
        int do_double = 0;
+       bool have_color_changes;
        enum double_how dh;
 
        dp_for_drawing = line_decisions + lineno;
@@ -2443,10 +2450,12 @@ static void pfield_draw_line (struct vidbuffer *vb, int lineno, int gfx_ypos, in
                break;
        }
 
+       have_color_changes = is_color_changes(dip_for_drawing);
+
        dh = dh_line;
        xlinebuffer = gfxvidinfo.drawbuffer.linemem;
        if (xlinebuffer == 0 && do_double
-               && (border == 0 || dip_for_drawing->nr_color_changes > 0))
+               && (border == 0 || have_color_changes))
                xlinebuffer = gfxvidinfo.drawbuffer.emergmem, dh = dh_emerg;
        if (xlinebuffer == 0)
                xlinebuffer = row_map[gfx_ypos], dh = dh_buf;
@@ -2460,22 +2469,18 @@ static void pfield_draw_line (struct vidbuffer *vb, int lineno, int gfx_ypos, in
 
                adjust_drawing_colors (dp_for_drawing->ctable, dp_for_drawing->ham_seen || bplehb || ecsshres);
 
-               /* The problem is that we must call decode_ham() BEFORE we do the
-               sprites. */
+               /* The problem is that we must call decode_ham() BEFORE we do the sprites. */
                if (dp_for_drawing->ham_seen) {
+                       int ohposblank = hposblank;
                        init_ham_decoding ();
-                       if (!have_color_changes(dip_for_drawing)) {
-                               /* The easy case: need to do HAM decoding only once for the
-                               * full line. */
-                               decode_ham (visible_left_border, visible_right_border, false);
-                       } else /* Argh. */ {
-                               int ohposblank = hposblank;
-                               do_color_changes (decode_ham_border, decode_ham, lineno);
-                               hposblank = ohposblank;
-                               // reset colors to state before above do_color_changes()
-                               adjust_drawing_colors (dp_for_drawing->ctable, (dp_for_drawing->ham_seen || bplehb) ? -1 : 0);
+                       do_color_changes (dummy_worker, decode_ham, lineno);
+                       if (have_color_changes) {
+                               // do_color_changes() did color changes, reset colors back to original state
+                               adjust_drawing_colors (dp_for_drawing->ctable, -1);
                                pfield_expand_dp_bplcon ();
                        }
+                       hposblank = ohposblank;
+                       ham_decode_pixel = src_pixel;
                        bplham = dp_for_drawing->ham_at_start;
                }
 
@@ -2533,7 +2538,7 @@ static void pfield_draw_line (struct vidbuffer *vb, int lineno, int gfx_ypos, in
                }
 #endif
 
-               if (!dosprites && have_color_changes(dip_for_drawing)) {
+               if (!dosprites && !have_color_changes) {
                        if (dp_for_drawing->plfleft < -1) {
                                // blanked border line
                                int tmp = hposblank;
@@ -2544,6 +2549,7 @@ static void pfield_draw_line (struct vidbuffer *vb, int lineno, int gfx_ypos, in
                                // normal border line
                                fill_line_border ();
                        }
+
                        do_flush_line (vb, gfx_ypos);
                        if (do_double) {
                                if (dh == dh_buf) {
@@ -2577,7 +2583,6 @@ static void pfield_draw_line (struct vidbuffer *vb, int lineno, int gfx_ypos, in
 
                if (dh == dh_emerg)
                        memcpy (row_map[gfx_ypos], xlinebuffer + linetoscr_x_adjust_bytes, gfxvidinfo.drawbuffer.pixbytes * gfxvidinfo.drawbuffer.inwidth);
-
                do_flush_line (vb, gfx_ypos);
                if (do_double) {
                        if (dh == dh_emerg)
index fa5c7d77c68279345b8a18fb53ae31d15504871e..58e39ebf9912db2ac364d4cb6ef79ee13bceabc8 100644 (file)
 #define IDS_SLIRP_INBOUND               399
 #define IDS_FILTER_PAL_EXTRA            400
 #define IDS_FILTER_3D_EXTRA             401
+#define IDS_ALWAYS_ON                   402
+#define IDS_DISPLAY_ATTRIBUTES          403
 #define IDS_QS_MODELS                   1000
 #define IDS_QS_MODEL_A500               1001
 #define IDS_QS_MODEL_A500P              1002
index 12ece70f8855a379cbea76c8933c00906da26983..a3efc44b37b8e224ce60817599917c22e40ac363 100644 (file)
@@ -1912,6 +1912,8 @@ STRINGTABLE
 BEGIN
     IDS_FILTER_PAL_EXTRA    "Brightness\nContrast\nSaturation\nGamma\nScanlines\nBlurriness\nNoise\n"
     IDS_FILTER_3D_EXTRA     "Point/Bilinear\nScanline opacity\nScanline level\n"
+    IDS_ALWAYS_ON           "Always on"
+    IDS_DISPLAY_ATTRIBUTES  "Brightness\nContrast\nGamma"
 END
 
 #endif    // English resources
index 71d0e320abb35662dca75283d09ce467df6f1c8a..5d6c0d4adbfb86bde32233c08620ec8c08306b07 100644 (file)
 #define LANG_DLL_FULL_VERSION_MATCH 0
 
 #if WINUAEPUBLICBETA
-#define WINUAEBETA _T("5")
+#define WINUAEBETA _T("6")
 #else
 #define WINUAEBETA _T("")
 #endif
-#define WINUAEDATE MAKEBD(2014, 6, 3)
+#define WINUAEDATE MAKEBD(2014, 6, 7)
 #define WINUAEEXTRA _T("")
 //#define WINUAEEXTRA _T("AmiKit Preview")
 //#define WINUAEEXTRA _T("Amiga Forever Edition")
index 09f3150995936e0211d3855b7556f7260e5242f0..b3478055a6ef9382b2339f5a730f881591f40bc1 100644 (file)
@@ -1752,22 +1752,27 @@ int check_prefs_changed_gfx (void)
        for (int j = 0; j < 2; j++) {
                struct gfx_filterdata *gf = &currprefs.gf[j];
                struct gfx_filterdata *gfc = &changed_prefs.gf[j];
+
+               c |= gf->gfx_filter != gfc->gfx_filter ? (2|8) : 0;
+
                for (int i = 0; i <= 2 * MAX_FILTERSHADERS; i++) {
                        c |= _tcscmp (gf->gfx_filtershader[i], gfc->gfx_filtershader[i]) ? (2|8) : 0;
                        c |= _tcscmp (gf->gfx_filtermask[i], gfc->gfx_filtermask[i]) ? (2|8) : 0;
                }
-
-               c |= gf->gfx_filter != gfc->gfx_filter ? (2|8) : 0;
                c |= _tcscmp (gf->gfx_filteroverlay, gfc->gfx_filteroverlay) ? (2|8) : 0;
-               c |= gf->gfx_filter_filtermode != gfc->gfx_filter_filtermode ? (2|8) : 0;
-               c |= gf->gfx_filter_bilinear != gfc->gfx_filter_bilinear ? (2|8) : 0;
+
+               c |= gf->gfx_filter_scanlines != gfc->gfx_filter_scanlines ? (1|8) : 0;
+               c |= gf->gfx_filter_scanlinelevel != gfc->gfx_filter_scanlinelevel ? (1|8) : 0;
+               c |= gf->gfx_filter_scanlineratio != gfc->gfx_filter_scanlineratio ? (1|8) : 0;
+
                c |= gf->gfx_filter_horiz_zoom_mult != gfc->gfx_filter_horiz_zoom_mult ? (1) : 0;
                c |= gf->gfx_filter_vert_zoom_mult != gfc->gfx_filter_vert_zoom_mult ? (1) : 0;
+
+               c |= gf->gfx_filter_filtermode != gfc->gfx_filter_filtermode ? (2|8) : 0;
+               c |= gf->gfx_filter_bilinear != gfc->gfx_filter_bilinear ? (2|8) : 0;
                c |= gf->gfx_filter_noise != gfc->gfx_filter_noise ? (1) : 0;
                c |= gf->gfx_filter_blur != gfc->gfx_filter_blur ? (1) : 0;
-               c |= gf->gfx_filter_scanlines != gfc->gfx_filter_scanlines ? (1|8) : 0;
-               c |= gf->gfx_filter_scanlinelevel != gfc->gfx_filter_scanlinelevel ? (1|8) : 0;
-               c |= gf->gfx_filter_scanlineratio != gfc->gfx_filter_scanlineratio ? (1|8) : 0;
+
                c |= gf->gfx_filter_aspect != gfc->gfx_filter_aspect ? (1) : 0;
                c |= gf->gfx_filter_keep_aspect != gfc->gfx_filter_keep_aspect ? (1) : 0;
                c |= gf->gfx_filter_keep_autoscale_aspect != gfc->gfx_filter_keep_autoscale_aspect ? (1) : 0;
@@ -1853,30 +1858,7 @@ int check_prefs_changed_gfx (void)
                for (int j = 0; j < 2; j++) {
                        struct gfx_filterdata *gf = &currprefs.gf[j];
                        struct gfx_filterdata *gfc = &changed_prefs.gf[j];
-                       for (int i = 0; i <= 2 * MAX_FILTERSHADERS; i++) {
-                               _tcscpy (gf->gfx_filtershader[i], gfc->gfx_filtershader[i]);
-                               _tcscpy (gf->gfx_filtermask[i], gfc->gfx_filtermask[i]);
-                       }
-                       gf->gfx_filter = gfc->gfx_filter;
-                       gf->gfx_filter_scanlines = gfc->gfx_filter_scanlines;
-                       gf->gfx_filter_scanlinelevel = gfc->gfx_filter_scanlinelevel;
-                       gf->gfx_filter_scanlineratio = gfc->gfx_filter_scanlineratio;
-                       _tcscpy (gf->gfx_filteroverlay, gfc->gfx_filteroverlay);
-                       gf->gfx_filter_filtermode = gfc->gfx_filter_filtermode;
-                       gf->gfx_filter_bilinear = gfc->gfx_filter_bilinear;
-                       gf->gfx_filter_horiz_zoom_mult = gfc->gfx_filter_horiz_zoom_mult;
-                       gf->gfx_filter_vert_zoom_mult = gfc->gfx_filter_vert_zoom_mult;
-                       gf->gfx_filter_noise = gfc->gfx_filter_noise;
-                       gf->gfx_filter_blur = gfc->gfx_filter_blur;
-                       gf->gfx_filter_aspect = gfc->gfx_filter_aspect;
-                       gf->gfx_filter_keep_aspect = gfc->gfx_filter_keep_aspect;
-                       gf->gfx_filter_keep_autoscale_aspect = gfc->gfx_filter_keep_autoscale_aspect;
-                       gf->gfx_filter_luminance = gfc->gfx_filter_luminance;
-                       gf->gfx_filter_contrast = gfc->gfx_filter_contrast;
-                       gf->gfx_filter_saturation = gfc->gfx_filter_saturation;
-                       gf->gfx_filter_gamma = gfc->gfx_filter_gamma;
-                       gf->gfx_filter_autoscale = gfc->gfx_filter_autoscale;
-                       //gf->gfx_filter_ = gfc->gfx_filter_;
+                       memcpy(gf, gfc, sizeof(struct gfx_filterdata));
                }
 
                currprefs.rtg_horiz_zoom_mult = changed_prefs.rtg_horiz_zoom_mult;
index d9aad4cfda6822068d5cb16a9cb6ab45b1525a6d..c649a23d4fecc79545553e077861bb14db9f5b90 100644 (file)
@@ -6169,10 +6169,21 @@ static void handle_da (HWND hDlg)
 void init_da (HWND hDlg)
 {
        int *p;
+       TCHAR tmp[MAX_DPATH], *p1, *p2;
+
+       WIN32GUI_LoadUIString(IDS_DISPLAY_ATTRIBUTES, tmp, sizeof tmp / sizeof (TCHAR));
        SendDlgItemMessage(hDlg, IDC_DA_MODE, CB_RESETCONTENT, 0, 0);
-       SendDlgItemMessage(hDlg, IDC_DA_MODE, CB_ADDSTRING, 0, (LPARAM)_T("Brightness"));
-       SendDlgItemMessage(hDlg, IDC_DA_MODE, CB_ADDSTRING, 0, (LPARAM)_T("Contrast"));
-       SendDlgItemMessage(hDlg, IDC_DA_MODE, CB_ADDSTRING, 0, (LPARAM)_T("Gamma"));
+       _tcscat (tmp, _T("\n"));
+       p1 = tmp;
+       for (;;) {
+               p2 = _tcschr (p1, '\n');
+               if (p2 && _tcslen (p2) > 0) {
+                       *p2++ = 0;
+                       SendDlgItemMessage (hDlg, IDC_DA_MODE, CB_ADDSTRING, 0, (LPARAM)p1);
+                       p1 = p2;
+               } else
+                       break;
+       }
        if (da_mode_selected == CB_ERR)
                da_mode_selected = 0;
        SendDlgItemMessage (hDlg, IDC_DA_MODE, CB_SETCURSEL, da_mode_selected, 0);
@@ -6432,8 +6443,12 @@ static void values_to_displaydlg (HWND hDlg)
        SendDlgItemMessage (hDlg, IDC_LORES, CB_SETCURSEL, workprefs.gfx_resolution, 0);
 
        SendDlgItemMessage(hDlg, IDC_AUTORESOLUTIONSELECT, CB_RESETCONTENT, 0, 0);
-       SendDlgItemMessage(hDlg, IDC_AUTORESOLUTIONSELECT, CB_ADDSTRING, 0, (LPARAM)_T("Disabled"));
-       SendDlgItemMessage(hDlg, IDC_AUTORESOLUTIONSELECT, CB_ADDSTRING, 0, (LPARAM)_T("Always on"));
+
+
+       WIN32GUI_LoadUIString(IDS_DISABLED, buffer, sizeof buffer / sizeof (TCHAR));
+       SendDlgItemMessage(hDlg, IDC_AUTORESOLUTIONSELECT, CB_ADDSTRING, 0, (LPARAM)buffer);
+       WIN32GUI_LoadUIString(IDS_ALWAYS_ON, buffer, sizeof buffer / sizeof (TCHAR));
+       SendDlgItemMessage(hDlg, IDC_AUTORESOLUTIONSELECT, CB_ADDSTRING, 0, (LPARAM)buffer);
        SendDlgItemMessage(hDlg, IDC_AUTORESOLUTIONSELECT, CB_ADDSTRING, 0, (LPARAM)_T("10%"));
        SendDlgItemMessage(hDlg, IDC_AUTORESOLUTIONSELECT, CB_ADDSTRING, 0, (LPARAM)_T("33%"));
        SendDlgItemMessage(hDlg, IDC_AUTORESOLUTIONSELECT, CB_ADDSTRING, 0, (LPARAM)_T("66%"));
index 18a5113d5dfddc6f5cb3a55fbd38483eb6b2b63d..4d7adbd176e518941655474f4aaeb850fbd7a813 100644 (file)
@@ -18,6 +18,15 @@ Things that may happen in 2015:
 
 - restore only single input target to default.
 
+Beta 6:
+
+- b2 HAM update was incomplete and broken, nr_color_changes check was not fully working. (b2)
+- Display panel missing translations added (autoresolution and brightness/contrast/gamma)
+- Some file operations (zipped files, possibly something else too) didn't support recently introduced
+  relative "..\" path part update.
+- Copper emulation state was not fully reset when restoring state file, in some situations copper
+  may have modified restored custom register in next cycle after state was restored.
+
 Beta 5:
 
 - Relative path improvement broke CDFS CD mounting in some configurations.
index 8514957a47c06693b4ac1cf4a7c12014824a4a3f..3230da747e519ddbb8d3ad8074c40e84cefdbe7a 100644 (file)
--- a/zfile.cpp
+++ b/zfile.cpp
@@ -1630,7 +1630,7 @@ static struct zfile *openzip (const TCHAR *pname)
        _tcscpy (name, pname);
        i = _tcslen (name) - 2;
        while (i > 0) {
-               if (name[i] == '/' || name[i] == '\\' && i > 4) {
+               if ((name[i] == '/' || name[i] == '\\') && i > 4) {
                        v = name[i];
                        name[i] = 0;
                        for (j = 0; plugins_7z[j]; j++) {
@@ -2592,7 +2592,7 @@ static struct zvolume *zvolume_alloc_2 (const TCHAR *name, struct zfile *z, unsi
        root->volume = zv;
        root->type = ZNODE_DIR;
        i = 0;
-       if (name[0] != '/' && name[0] != '\\' && _tcsncmp (name, _T(".\\"), 2) != 0) {
+       if (name[0] != '/' && name[0] != '\\' && _tcsncmp(name, _T(".\\"), 2) != 0 && _tcsncmp(name, _T("..\\"), 3) != 0) {
                if (_tcschr (name, ':') == 0) {
                        for (i = _tcslen (name) - 1; i > 0; i--) {
                                if (name[i] == FSDB_DIR_SEPARATOR) {