]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
imported winuaesrc1600b7.zip
authorToni Wilen <twilen@winuae.net>
Sat, 3 Jan 2009 11:35:49 +0000 (13:35 +0200)
committerToni Wilen <twilen@winuae.net>
Mon, 22 Feb 2010 19:44:18 +0000 (21:44 +0200)
25 files changed:
akiko.c
cfgfile.c
custom.c
drawing.c
filesys.c
filesys_bootrom.c
include/gfxfilter.h
include/inputdevice.h
include/options.h
inputdevice.c
jit/compemu_fpp.c
memory.c
od-win32/ahidsound.c
od-win32/direct3d.c
od-win32/picasso96_win.c
od-win32/picasso96_win.h
od-win32/resources/resource
od-win32/resources/winuae.rc
od-win32/win32.c
od-win32/win32.h
od-win32/win32_scale2x.c
od-win32/win32gfx.c
od-win32/win32gfx.h
od-win32/win32gui.c
od-win32/winuaechangelog.txt

diff --git a/akiko.c b/akiko.c
index fc6971cd6f813431a93aa462bfcaba5d8406a827..63220eddcdb7cd64b6306e3cecdab0fca2d2eca1 100755 (executable)
--- a/akiko.c
+++ b/akiko.c
@@ -997,11 +997,11 @@ static void cdrom_run_read (void)
 }
 
 static uae_sem_t akiko_sem;
+static int lastmediastate = 0;
 
 static void akiko_handler (void)
 {
     static int mediacheckcnt;
-    static int lastmediastate = -1;
 
     if (unitnum < 0)
        return;
@@ -1508,10 +1508,10 @@ static void akiko_cdrom_free (void)
     if (unitnum >= 0)
        sys_cddev_close ();
     unitnum = -1;
-    free (sector_buffer_1);
-    free (sector_buffer_2);
-    free (sector_buffer_info_1);
-    free (sector_buffer_info_2);
+    xfree (sector_buffer_1);
+    xfree (sector_buffer_2);
+    xfree (sector_buffer_info_1);
+    xfree (sector_buffer_info_2);
     sector_buffer_1 = 0;
     sector_buffer_2 = 0;
     sector_buffer_info_1 = 0;
@@ -1532,6 +1532,7 @@ void akiko_reset (void)
     cdrom_command_offset_complete = 0;
     cdrom_command_offset_todo = 0;
     cdrom_led = 0;
+    lastmediastate = 0;
 
     if (akiko_thread_running > 0) {
        akiko_thread_running = 0;
@@ -1558,7 +1559,7 @@ static void patchrom (void)
            p[i + 7] = 0x71;
            p[i + 8] = 0x4e;
            p[i + 9] = 0x71;
-           write_log ("extended rom delay loop patched at 0x%p\n", i + 6 + 0xe00000);
+           write_log ("extended rom delay loop patched at 0x%08x\n", i + 6 + 0xe00000);
            return;
        }
        if (!memcmp (p + i, patchdata2, sizeof(patchdata2)))
@@ -1577,16 +1578,16 @@ int akiko_init (void)
 {
     if (currprefs.cs_cd32cd && cdromok == 0) {
        unitnum = -1;
-       if (!device_func_init(DEVICE_TYPE_ANY)) {
+       if (!device_func_init (DEVICE_TYPE_ANY)) {
            write_log ("no CDROM support\n");
            return 0;
        }
        if (!sys_cddev_open ()) {
            cdromok = 1;
-           sector_buffer_1 = (uae_u8*)malloc (SECTOR_BUFFER_SIZE * 2048);
-           sector_buffer_2 = (uae_u8*)malloc (SECTOR_BUFFER_SIZE * 2048);
-           sector_buffer_info_1 = (uae_u8*)malloc (SECTOR_BUFFER_SIZE);
-           sector_buffer_info_2 = (uae_u8*)malloc (SECTOR_BUFFER_SIZE);
+           sector_buffer_1 = xmalloc (SECTOR_BUFFER_SIZE * 2048);
+           sector_buffer_2 = xmalloc (SECTOR_BUFFER_SIZE * 2048);
+           sector_buffer_info_1 = xmalloc (SECTOR_BUFFER_SIZE);
+           sector_buffer_info_2 = xmalloc (SECTOR_BUFFER_SIZE);
            sector_buffer_sector_1 = -1;
            sector_buffer_sector_2 = -1;
            patchrom ();
index 585f1e3217f06d5db12c645663211139ec262828..13e1214306ba472bae28e46c60c96e8f05bf1414 100755 (executable)
--- a/cfgfile.c
+++ b/cfgfile.c
@@ -161,6 +161,7 @@ static const char *scsimode[] = { "false", "true", "scsi", 0 };
 static const char *maxhoriz[] = { "lores", "hires", "superhires", 0 };
 static const char *maxvert[] = { "nointerlace", "interlace", 0 };
 static const char *abspointers[] = { "none", "mousehack", "tablet", 0 };
+static const char *autoscale[] = { "none", "scale", "resize", 0 };
 
 static const char *obsolete[] = {
     "accuracy", "gfx_opengl", "gfx_32bit_blits", "32bit_blits",
@@ -581,7 +582,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
     cfgfile_dwrite (f, "gfx_filter_blur=%d\n", p->gfx_filter_blur);
     cfgfile_dwrite (f, "gfx_filter_noise=%d\n", p->gfx_filter_noise);
     cfgfile_dwrite (f, "gfx_filter_keep_aspect=%s\n", p->gfx_filter_keep_aspect ? "true" : "false");
-    cfgfile_dwrite (f, "gfx_autoscale=%s\n", p->gfx_filter_autoscale ? "true" : "false");
+    cfgfile_dwrite (f, "gfx_filter_autoscale=%s\n", autoscale[p->gfx_filter_autoscale]);
     cfgfile_dwrite (f, "gfx_filter_aspect_ratio=%d:%d\n",
        p->gfx_filter_aspect >= 0 ? (p->gfx_filter_aspect >> 8) : -1,
        p->gfx_filter_aspect >= 0 ? (p->gfx_filter_aspect & 0xff) : -1);
@@ -905,7 +906,6 @@ static int cfgfile_parse_host (struct uae_prefs *p, char *option, char *value)
        || cfgfile_intval (option, value, "gfx_filter_blur", &p->gfx_filter_blur, 1)
        || cfgfile_intval (option, value, "gfx_filter_noise", &p->gfx_filter_noise, 1)
        || cfgfile_yesno  (option, value, "gfx_filter_keep_aspect", &p->gfx_filter_keep_aspect)
-       || cfgfile_yesno  (option, value, "gfx_filter_autoscale", &p->gfx_filter_autoscale)
        || cfgfile_intval (option, value, "gfx_luminance", &p->gfx_luminance, 1)
        || cfgfile_intval (option, value, "gfx_contrast", &p->gfx_contrast, 1)
        || cfgfile_intval (option, value, "gfx_gamma", &p->gfx_gamma, 1)
@@ -971,6 +971,7 @@ static int cfgfile_parse_host (struct uae_prefs *p, char *option, char *value)
        || cfgfile_strval (option, value, "gfx_color_mode", &p->color_mode, colormode2, 0)
        || cfgfile_strval (option, value, "gfx_max_horizontal", &p->gfx_max_horizontal, maxhoriz, 0)
        || cfgfile_strval (option, value, "gfx_max_vertical", &p->gfx_max_vertical, maxvert, 0)
+       || cfgfile_strval (option, value, "gfx_filter_autoscale", &p->gfx_filter_autoscale, autoscale, 0)
        || cfgfile_strval (option, value, "absolute_mouse", &p->input_tablet, abspointers, 0))
            return 1;
 
@@ -3011,7 +3012,7 @@ void default_prefs (struct uae_prefs *p, int type)
     p->gfx_filter_vert_zoom_mult = 0;
     p->gfx_filter_filtermode = 0;
     p->gfx_filter_scanlineratio = (1 << 4) | 1;
-    p->gfx_filter_keep_aspect = 1;
+    p->gfx_filter_keep_aspect = 0;
     p->gfx_filter_autoscale = 1;
 
     strcpy (p->df[0], "df0.adf");
index dd2e7aaf88d821f24318d290664cdbc5351e0448..855ac78f0b56f9b7fa4fdafb84d6f0dc68d773b0 100755 (executable)
--- a/custom.c
+++ b/custom.c
@@ -201,6 +201,10 @@ struct sprite {
 
 static struct sprite spr[MAX_SPRITES];
 
+uaecptr sprite_0;
+int sprite_0_width, sprite_0_height, sprite_0_doubled;
+uae_u32 sprite_0_colors[4];
+
 static int sprite_vblank_endline = VBLANK_SPRITE_PAL;
 
 static unsigned int sprctl[MAX_SPRITES], sprpos[MAX_SPRITES];
@@ -254,6 +258,7 @@ static int diwfirstword, diwlastword;
 static enum diw_states diwstate, hdiwstate, ddfstate;
 int first_planes_vpos, last_planes_vpos;
 int diwfirstword_total, diwlastword_total;
+int firstword_bplcon1;
 
 /* Sprite collisions */
 static unsigned int clxdat, clxcon, clxcon2, clxcon_bpl_enable, clxcon_bpl_match;
@@ -2184,6 +2189,10 @@ static int tospritexddf (int ddf)
 {
     return (ddf * 2) << sprite_buffer_res;
 }
+static int fromspritexdiw (int ddf)
+{
+    return coord_hw_to_window_x (ddf >> sprite_buffer_res) + (DIW_DDF_OFFSET << lores_shift);
+}
 
 static void calcsprite (void)
 {
@@ -2214,6 +2223,7 @@ static void decide_sprites (int hpos)
     int point = hpos * 2 - 3;
     int width = sprite_width;
     int sscanmask = 0x100 << sprite_buffer_res;
+    int gotdata = 0;
 
     if (thisline_decision.nr_planes == 0 && !(bplcon3 & 2))
        return;
@@ -2254,11 +2264,26 @@ static void decide_sprites (int hpos)
     for (i = 0; i < count; i++) {
        int nr = nrs[i] & (MAX_SPRITES - 1);
        record_sprite (next_lineno, nr, posns[i], sprdata[nr], sprdatb[nr], sprctl[nr]);
+       /* get left and right sprite edge if brdsprt enabled */
+       if (bplcon3 & 2) {
+           int j;
+           for (j = 0; j < sprite_width; j+= 16) {
+               int nx = fromspritexdiw (posns[i] + j);
+               if (sprdata[nr][j] || sprdata[nr][j]) {
+                   if (diwfirstword_total > nx)
+                       diwfirstword_total = nx;
+                   if (diwlastword_total < nx + 16)
+                       diwlastword_total = nx + 16;
+               }
+           }
+           gotdata = 1;
+       }
     }
     last_sprite_point = point;
 
-    if (bplcon3 & 2) {
-       if (vpos < first_planes_vpos || first_planes_vpos == 0)
+    /* get upper and lower sprite position if brdsprt enabled */
+    if (gotdata) {
+       if (vpos < first_planes_vpos)
            first_planes_vpos = vpos;
        if (vpos < plffirstline_total)
            plffirstline_total = vpos;
@@ -2501,7 +2526,7 @@ void compute_vsynctime (void)
 
 static void dumpsync (void)
 {
-    static int cnt = 10;
+    static int cnt = 100;
     if (cnt < 0)
        return;
     cnt--;
@@ -2529,10 +2554,12 @@ void init_hz (void)
     doublescan = 0;
     if ((beamcon0 & 0xA0) != (new_beamcon0 & 0xA0))
        hzc = 1;
+    if (beamcon0 != new_beamcon0) {
+       hack_vpos = 0;
+       write_log ("BEAMCON0 %04x -> %04x\n", beamcon0, new_beamcon0);
+    }
     if (beamcon0 & 0x80)
        hack_vpos = -1;
-    if (beamcon0 != new_beamcon0)
-       write_log ("BEAMCON0 %04x -> %04x\n", beamcon0, new_beamcon0);
     beamcon0 = new_beamcon0;
     isntsc = (beamcon0 & 0x20) ? 0 : 1;
     if (!(currprefs.chipset_mask & CSMASK_ECS_AGNUS))
@@ -2776,8 +2803,11 @@ static void VPOSW (uae_u16 v)
     if (lof != (v & 0x8000))
        lof_changed = 1;
     lof = v & 0x8000;
-    if ((v & 1) && vpos > 0)
+    if ((v & 1) && vpos > 0) {
        hack_vpos = vpos + 1;
+       if (hack_vpos > maxvpos)
+           hack_vpos = maxvpos;
+    }
 }
 
 STATIC_INLINE uae_u16 VHPOSR (void)
@@ -3176,14 +3206,6 @@ static void BPLCON0 (int hpos, uae_u16 v)
     decide_fetch (hpos);
     decide_blitter (hpos);
 
-    if (vpos > first_planes_vpos && vpos >= minfirstline && first_planes_vpos == 0) {
-       if (GET_PLANES (v) > 0)
-           first_planes_vpos = vpos;
-    }
-    if (GET_PLANES (v) == 0 && GET_PLANES (bplcon0) > 0 && vpos > last_planes_vpos) {
-       last_planes_vpos = vpos;
-    }
-
     // fake unused 0x0080 bit as an EHB bit (see below)
     if (isehb (v, bplcon2))
        v |= 0x80;
@@ -4167,6 +4189,29 @@ STATIC_INLINE void sync_copper_with_cpu (int hpos, int do_schedule)
        update_copper (hpos);
 }
 
+static void cursorsprite (void)
+{
+    if (!dmaen (DMA_SPRITE) || first_planes_vpos == 0)
+       return;
+    sprite_0 = spr[0].pt;
+    sprite_0_height = spr[0].vstop - spr[0].vstart;
+    sprite_0_colors[0] = 0;
+    sprite_0_doubled = 0;
+    if (sprres == 0)
+       sprite_0_doubled = 1;
+    if (currprefs.chipset_mask & CSMASK_AGA) {
+       int sbasecol = ((bplcon4 >> 4) & 15) << 4;
+       sprite_0_colors[1] = current_colors.color_regs_aga[sbasecol + 1];
+       sprite_0_colors[2] = current_colors.color_regs_aga[sbasecol + 2];
+       sprite_0_colors[3] = current_colors.color_regs_aga[sbasecol + 3];
+    } else {
+       sprite_0_colors[1] = xcolors[current_colors.color_regs_ecs[17]];
+       sprite_0_colors[2] = xcolors[current_colors.color_regs_ecs[18]];
+       sprite_0_colors[3] = xcolors[current_colors.color_regs_ecs[19]];
+    }
+    sprite_0_width = sprite_width;
+}
+
 STATIC_INLINE uae_u16 sprite_fetch (struct sprite *s, int dma, int hpos, int cycle, int mode)
 {
     uae_u16 data = last_custom_value;
@@ -4203,6 +4248,8 @@ STATIC_INLINE void do_sprites_1 (int num, int cycle, int hpos)
            write_log ("%d:%d:SPR%d START\n", vpos, hpos, num);
 #endif
        s->dmastate = 1;
+       if (num == 0 && cycle == 0)
+           cursorsprite ();
     }
     if (vpos == s->vstop || vpos == sprite_vblank_endline) {
 #if SPRITE_DEBUG > 0
@@ -4744,8 +4791,10 @@ static void hsync_handler (void)
        }
        hsync_record_line_state (next_lineno, nextline_how, thisline_changed);
        /* reset light pen latch */
-       if (vpos == sprite_vblank_endline)
+       if (vpos == sprite_vblank_endline) {
            lightpen_triggered = 0;
+           sprite_0 = 0;
+       }
        if (lightpen_cx > 0 && (bplcon0 & 8) && !lightpen_triggered && lightpen_cy == vpos) {
            vpos_lpen = vpos;
            hpos_lpen = lightpen_cx;
@@ -4943,22 +4992,31 @@ static void hsync_handler (void)
     hsync_counter++;
     //copper_check (2);
 
-    if (vpos == minfirstline) {
-       if (GET_PLANES (bplcon0) > 0)
-           first_planes_vpos = minfirstline;
-    } else if (vpos == maxvpos - 1) {
-       if (GET_PLANES (bplcon0) > 0)
+    if (GET_PLANES (bplcon0) > 0 && dmaen (DMA_BITPLANE)) {
+        if (vpos > last_planes_vpos)
+           last_planes_vpos = vpos;
+        if (vpos >= minfirstline && first_planes_vpos == 0) {
+           first_planes_vpos = vpos;
+        } else if (vpos == maxvpos - 1) {
            last_planes_vpos = vpos - 1;
+       }
     }
     if (vpos >= first_planes_vpos && vpos <= last_planes_vpos) {
        if (diwlastword > diwlastword_total)
            diwlastword_total = diwlastword;
-       if (diwfirstword < diwfirstword_total)
+       if (diwfirstword < diwfirstword_total) {
            diwfirstword_total = diwfirstword;
+           firstword_bplcon1 = bplcon1;
+       }
+    }
+    if ((plffirstline < plffirstline_total || (plffirstline_total == minfirstline && vpos > minfirstline)) && plffirstline < vpos / 2) {
+        firstword_bplcon1 = bplcon1;
+       if (plffirstline < minfirstline)
+           plffirstline_total = minfirstline;
+       else
+           plffirstline_total = plffirstline;
     }
-    if (plffirstline < plffirstline_total)
-       plffirstline_total = plffirstline;
-    if (plflastline > plflastline_total)
+    if (plflastline > plflastline_total && plflastline > plffirstline_total && plflastline > vpos / 2)
        plflastline_total = plflastline;
 
 
index 7a81580e7e6dad817c2173d7a640091a24c14113..bf99c24063c839855b1bf0bf60e9473d797ac627 100755 (executable)
--- a/drawing.c
+++ b/drawing.c
@@ -311,19 +311,29 @@ void notice_screen_contents_lost (void)
 extern int plffirstline_total, plflastline_total;
 extern int first_planes_vpos, last_planes_vpos;
 extern int diwfirstword_total, diwlastword_total;
+extern int firstword_bplcon1;
 
 #define MIN_DISPLAY_W 256
 #define MIN_DISPLAY_H 192
-#define MAX_DISPLAY_W 344
-#define MAX_DISPLAY_H 272
+#define MAX_DISPLAY_W 352
+#define MAX_DISPLAY_H 276
 
 static int gclow, gcloh, gclox, gcloy;
 
+static void reset_custom_limits (void)
+{
+    gclow = gcloh = gclox = gcloy = 0;
+}
+
 int get_custom_limits (int *pw, int *ph, int *pdx, int *pdy)
 {
     int w, h, dx, dy, y1, y2, dbl1, dbl2;
     int ret = 0;
 
+    if (!pw || !ph || !pdx || !pdy) {
+       reset_custom_limits ();
+       return 0;
+    }
     *pw = gclow;
     *ph = gcloh;
     *pdx = gclox;
@@ -334,41 +344,67 @@ int get_custom_limits (int *pw, int *ph, int *pdx, int *pdy)
 
     w = diwlastword_total - diwfirstword_total;
     dx = diwfirstword_total - visible_left_border;
-    y2 = plflastline_total > last_planes_vpos ? last_planes_vpos : plflastline_total;
-    y1 = plffirstline_total > first_planes_vpos ? plffirstline_total: first_planes_vpos;
-    if (y1 < minfirstline)
+
+    y2 = plflastline_total;
+    if (y2 > last_planes_vpos)
+       y2 = last_planes_vpos;
+    y1 = plffirstline_total;
+    if (first_planes_vpos > y1)
        y1 = first_planes_vpos;
+    if (minfirstline > y1)
+       y1 = minfirstline;
+
     h = y2 - y1;
-    dy = plffirstline_total - minfirstline;
-    if (dy < 0)
-       dy = first_planes_vpos - minfirstline;
+    dy = y1 - minfirstline;
+
+    if (first_planes_vpos == 0)
+       h = 0; // no planes enabled during frame
+
+    if (dx < 0)
+       dx = 1;
 
     dbl2 = dbl1 = currprefs.gfx_linedbl ? 1 : 0;
+    if (doublescan && !interlace_seen) {
+       dbl1--;
+       dbl2--;
+    }
+
     dy = xshift (dy, dbl2);
     h = xshift (h, dbl1);
 
     if (w == 0 || h == 0)
        return 0;
 
-    if ((w >> currprefs.gfx_resolution) < MIN_DISPLAY_W)
-       w = MIN_DISPLAY_W << currprefs.gfx_resolution;
-    if ((h >> dbl1) < MIN_DISPLAY_H)
-       h = MIN_DISPLAY_H << dbl1;
-
-    if ((w >> currprefs.gfx_resolution) > MAX_DISPLAY_W)
-       w = MAX_DISPLAY_W << currprefs.gfx_resolution;
-    if ((h >> dbl1) > MAX_DISPLAY_H)
-       h = MAX_DISPLAY_H << dbl1;
+    if (!doublescan) {
+       if ((w >> currprefs.gfx_resolution) < MIN_DISPLAY_W)
+           w = MIN_DISPLAY_W << currprefs.gfx_resolution;
+       if ((h >> dbl1) < MIN_DISPLAY_H) {
+           if (gcloh > MIN_DISPLAY_H)
+               h = gcloh;
+           else
+               h = MIN_DISPLAY_H << dbl1;
+       }
+       if ((w >> currprefs.gfx_resolution) > MAX_DISPLAY_W) {
+           dx += (w - (MAX_DISPLAY_W << currprefs.gfx_resolution)) / 2;
+           w = MAX_DISPLAY_W << currprefs.gfx_resolution;
+       }
+       if ((h >> dbl1) > MAX_DISPLAY_H) {
+           dy += (h - (MAX_DISPLAY_H << dbl1)) / 2;
+           h = MAX_DISPLAY_H << dbl1;
+       }
+    }
 
     if (gclow == w && gcloh == h && gclox == dx && gcloy == dy)
        return ret;
 
     if (w <= 0 || h <= 0 || dx <= 0 || dy <= 0)
        return ret;
-    if (dx > gfxvidinfo.width / 4)
-       return ret;
-    if (dy > gfxvidinfo.height / 4)
-       return ret;
+    if (!doublescan) {
+       if (dx > gfxvidinfo.width / 3)
+           return ret;
+       if (dy > gfxvidinfo.height / 3)
+           return ret;
+    }
     
     gclow = w;
     gcloh = h;
@@ -379,20 +415,32 @@ int get_custom_limits (int *pw, int *ph, int *pdx, int *pdy)
     *pdx = dx;
     *pdy = dy;
 
-    write_log ("%dx%d %dx%d\n", w, h, dx, dy);
+    write_log ("Display Size: %dx%d Offset: %dx%d\n", w, h, dx, dy);
+    write_log ("first: %d last: %d minv: %d maxv: %d min: %d\n",
+       plffirstline_total, plflastline_total,
+       first_planes_vpos, last_planes_vpos, minfirstline);
     return 1;
 }
 
 void get_custom_mouse_limits (int *pw, int *ph, int *pdx, int *pdy, int dbl)
 {
+    int delay1, delay2;
     int w, h, dx, dy, dbl1, dbl2, y1, y2;
 
     w = diwlastword_total - diwfirstword_total;
     dx = diwfirstword_total - visible_left_border;
-    y2 = plflastline_total > last_planes_vpos ? last_planes_vpos : plflastline_total;
-    y1 = plffirstline_total > first_planes_vpos ? plffirstline_total : first_planes_vpos;
+
+    y2 = plflastline_total;
+    if (y2 > last_planes_vpos)
+       y2 = last_planes_vpos;
+    y1 = plffirstline_total;
+    if (first_planes_vpos > y1)
+       y1 = first_planes_vpos;
+    if (minfirstline > y1)
+       y1 = minfirstline;
+
     h = y2 - y1;
-    dy = plffirstline_total - minfirstline;
+    dy = y1 - minfirstline;
 
     if (*pw > 0)
        w = *pw;
@@ -402,6 +450,13 @@ void get_custom_mouse_limits (int *pw, int *ph, int *pdx, int *pdy, int dbl)
     if (*ph > 0)
        h = *ph;
     
+    delay1 = (firstword_bplcon1 & 0x0f) | ((firstword_bplcon1 & 0x0c00) >> 6);
+    delay2 = ((firstword_bplcon1 >> 4) & 0x0f) | (((firstword_bplcon1 >> 4) & 0x0c00) >> 6);
+    if (delay1 == delay2)
+       ;//dx += delay1;
+
+    dx = xshift (dx, res_shift);
+
     dbl2 = dbl1 = currprefs.gfx_linedbl ? 1 : 0;
     if ((doublescan || interlace_seen) && !dbl) {
         dbl1--;
@@ -2268,7 +2323,7 @@ static const char *numbers = { /* ugly  0123456789CHD%+- */
 "+++++++---+++-++++++++++++++----+++++++++++++++++--+++--++++++++++++++++++++-++++++-++++------------------------"
 };
 
-STATIC_INLINE void putpixel (uae_u8 *buf, int bpp, int x, xcolnr c8)
+STATIC_INLINE void putpixel (uae_u8 *buf, int bpp, int x, xcolnr c8, int opaq)
 {
     if (x <= 0)
        return;
@@ -2279,7 +2334,7 @@ STATIC_INLINE void putpixel (uae_u8 *buf, int bpp, int x, xcolnr c8)
        break;
     case 2:
     {
-       uae_u16 *p = (uae_u16 *)buf + x;
+       uae_u16 *p = (uae_u16*)buf + x;
        *p = (uae_u16)c8;
        break;
     }
@@ -2288,8 +2343,20 @@ STATIC_INLINE void putpixel (uae_u8 *buf, int bpp, int x, xcolnr c8)
        break;
     case 4:
     {
-       uae_u32 *p = (uae_u32 *)buf + x;
-       *p = c8;
+       int i;
+       if (opaq || currprefs.gfx_filter == 0) {
+           uae_u32 *p = (uae_u32*)buf + x;
+           *p = c8;
+       } else {
+           for (i = 0; i < 4; i++) {
+               int v1 = buf[i + bpp * x];
+               int v2 = (c8 >> (i * 8)) & 255;
+               v1 = (v1 * 2 + v2 * 3) / 5;
+               if (v1 > 255)
+                   v1 = 255;
+               buf[i + bpp * x] = v1;
+           }
+       }
        break;
     }
     }
@@ -2308,16 +2375,16 @@ static void write_tdnumber (uae_u8 *buf, int bpp, int x, int y, int num, uae_u32
     numptr = numbers + num * TD_NUM_WIDTH + NUMBERS_NUM * TD_NUM_WIDTH * y;
     for (j = 0; j < TD_NUM_WIDTH; j++) {
        if (*numptr == 'x')
-           putpixel (buf, bpp, x + j, c1);
+           putpixel (buf, bpp, x + j, c1, 1);
        else if (*numptr == '+')
-           putpixel (buf, bpp, x + j, c2);
+           putpixel (buf, bpp, x + j, c2, 0);
        numptr++;
     }
 }
 
 void draw_status_line_single (uae_u8 *buf, int bpp, int y, int totalwidth, uae_u32 *rc, uae_u32 *gc, uae_u32 *bc)
 {
-    int x_start, j, led;
+    int x_start, j, led, border;
     uae_u32 c1, c2, cb;
 
     c1 = ledcolor (0xffffff, rc, gc, bc);
@@ -2416,14 +2483,19 @@ void draw_status_line_single (uae_u8 *buf, int bpp, int y, int totalwidth, uae_u
            am = 3;
        }
        c = ledcolor (on ? on_rgb : off_rgb, rc, gc, bc);
-       if (y == 0 || y == TD_TOTAL_HEIGHT - 1)
+       border = 0;
+       if (y == 0 || y == TD_TOTAL_HEIGHT - 1) {
            c = ledcolor (TD_BORDER, rc, gc, bc);
+           border = 1;
+       }
 
        x = x_start + pos * TD_WIDTH;
-       putpixel (buf, bpp, x - 1, cb);
+       if (!border)
+           putpixel (buf, bpp, x - 1, cb, 0);
        for (j = 0; j < TD_LED_WIDTH; j++)
-           putpixel (buf, bpp, x + j, c);
-       putpixel (buf, bpp, x + j, cb);
+           putpixel (buf, bpp, x + j, c, 0);
+       if (!border)
+           putpixel (buf, bpp, x + j, cb, 0);
 
        if (y >= TD_PADY && y - TD_PADY < TD_NUM_HEIGHT) {
            if (num3 >= 0) {
@@ -2492,7 +2564,7 @@ static void draw_lightpen_cursor (int x, int y, int line, int onscreen)
     for (i = 0; i < LIGHTPEN_WIDTH; i++) {
        int xx = x + i - LIGHTPEN_WIDTH / 2;
        if (*p != '-' && xx >= 0 && xx < gfxvidinfo.width)
-           putpixel(xlinebuffer, gfxvidinfo.pixbytes, xx, *p == 'x' ? xcolors[color1] : xcolors[color2]);
+           putpixel(xlinebuffer, gfxvidinfo.pixbytes, xx, *p == 'x' ? xcolors[color1] : xcolors[color2], 1);
        p++;
     }
 }
@@ -2846,7 +2918,7 @@ void reset_drawing (void)
     if (doublescan > 0 && sprite_buffer_res < RES_SUPERHIRES)
        sprite_buffer_res++;
 
-    gclow = gcloh = gclox = gcloy = 0;
+    reset_custom_limits ();
 }
 
 void drawing_init (void)
index e2b1c838cf48f8bd13f87190be95febda18d1760..ed8a5525659a4682a9ad1107b6fd295f82830ce3 100755 (executable)
--- a/filesys.c
+++ b/filesys.c
@@ -5404,9 +5404,10 @@ static uae_u32 REGPARAM2 filesys_dev_storeinfo (TrapContext *context)
 static uae_u32 REGPARAM2 mousehack_done (TrapContext *context)
 {
     int mode = m68k_dreg (&context->regs, 1);
-    uaecptr a2 = m68k_areg (&context->regs, 2);
-    uaecptr a3 = m68k_areg (&context->regs, 3);
-    input_mousehack_status (mode, a2, a3);
+    uaecptr diminfo = m68k_areg (&context->regs, 2);
+    uaecptr dispinfo = m68k_areg (&context->regs, 3);
+    uaecptr vp = m68k_areg (&context->regs, 4);
+    input_mousehack_status (mode, diminfo, dispinfo, vp);
     return 1;
 }
 
index 5ad240e087b1029f37423ab3631c2a9cd724cafd..06a8c5db5ed54db98c7f509647aa294e3364fce7 100755 (executable)
@@ -2,14 +2,14 @@
  db(0x60); db(0x00); db(0x09); db(0x6a); db(0x00); db(0x00); db(0x07); db(0x48);
  db(0x00); db(0x00); db(0x00); db(0x30); db(0x00); db(0x00); db(0x01); db(0x74);
  db(0x00); db(0x00); db(0x00); db(0x1c); db(0x00); db(0x00); db(0x02); db(0x30);
- db(0x00); db(0x00); db(0x0d); db(0x52); db(0x43); db(0xfa); db(0x11); db(0xef);
+ db(0x00); db(0x00); db(0x0d); db(0x52); db(0x43); db(0xfa); db(0x12); db(0x23);
  db(0x4e); db(0xae); db(0xff); db(0xa0); db(0x20); db(0x40); db(0x20); db(0x28);
  db(0x00); db(0x16); db(0x20); db(0x40); db(0x4e); db(0x90); db(0x4e); db(0x75);
  db(0x48); db(0xe7); db(0xff); db(0xfe); db(0x2c); db(0x78); db(0x00); db(0x04);
  db(0x30); db(0x3c); db(0xff); db(0xfc); db(0x61); db(0x00); db(0x0b); db(0x56);
- db(0x2a); db(0x50); db(0x43); db(0xfa); db(0x11); db(0xf8); db(0x70); db(0x24);
+ db(0x2a); db(0x50); db(0x43); db(0xfa); db(0x12); db(0x2c); db(0x70); db(0x24);
  db(0x7a); db(0x01); db(0x4e); db(0xae); db(0xfd); db(0xd8); db(0x4a); db(0x80);
- db(0x66); db(0x0c); db(0x43); db(0xfa); db(0x11); db(0xe8); db(0x70); db(0x00);
+ db(0x66); db(0x0c); db(0x43); db(0xfa); db(0x12); db(0x1c); db(0x70); db(0x00);
  db(0x7a); db(0x00); db(0x4e); db(0xae); db(0xfd); db(0xd8); db(0x28); db(0x40);
  db(0x4a); db(0xad); db(0x01); db(0x0c); db(0x67); db(0x5a); db(0x20); db(0x3c);
  db(0x00); db(0x00); db(0x02); db(0x2c); db(0x22); db(0x3c); db(0x00); db(0x01);
  db(0x0a); db(0xc4); db(0x4e); db(0x90); db(0x72); db(0x03); db(0x74); db(0xf6);
  db(0x20); db(0x7c); db(0x00); db(0x20); db(0x00); db(0x00); db(0x90); db(0x88);
  db(0x65); db(0x0a); db(0x67); db(0x08); db(0x78); db(0x00); db(0x22); db(0x44);
- db(0x4e); db(0xae); db(0xfd); db(0x96); db(0x41); db(0xfa); db(0x10); db(0xf3);
+ db(0x4e); db(0xae); db(0xfd); db(0x96); db(0x41); db(0xfa); db(0x11); db(0x27);
  db(0x43); db(0xfa); db(0x00); db(0x1c); db(0x70); db(0x0a); db(0x61); db(0x00);
  db(0x0b); db(0xa2); db(0x22); db(0x40); db(0x72); db(0x01); db(0x30); db(0x3c);
  db(0xff); db(0x48); db(0x61); db(0x00); db(0x0a); db(0x90); db(0x4e); db(0x90);
  db(0x4c); db(0xdf); db(0x7f); db(0xff); db(0x4e); db(0x75); db(0x2c); db(0x78);
  db(0x00); db(0x04); db(0x70); db(0x00); db(0x08); db(0xc0); db(0x00); db(0x11);
- db(0x4e); db(0xae); db(0xfe); db(0xc2); db(0x43); db(0xfa); db(0x10); db(0xef);
+ db(0x4e); db(0xae); db(0xfe); db(0xc2); db(0x43); db(0xfa); db(0x11); db(0x23);
  db(0x70); db(0x00); db(0x4e); db(0xae); db(0xfd); db(0xd8); db(0x4a); db(0x80);
- db(0x67); db(0xe4); db(0x2c); db(0x40); db(0x41); db(0xfa); db(0x10); db(0xc6);
+ db(0x67); db(0xe4); db(0x2c); db(0x40); db(0x41); db(0xfa); db(0x10); db(0xfa);
  db(0x22); db(0x08); db(0x74); db(0x0f); db(0x41); db(0xfa); db(0x00); db(0x22);
  db(0x26); db(0x08); db(0xe4); db(0x8b); db(0x28); db(0x3c); db(0x00); db(0x00);
  db(0x1f); db(0x40); db(0x4e); db(0xae); db(0xff); db(0x76); db(0x22); db(0x4e);
@@ -71,7 +71,7 @@
  db(0x70); db(0x01); db(0x4c); db(0xdf); db(0x04); db(0x00); db(0x4e); db(0x75);
  db(0x48); db(0xe7); db(0xc0); db(0xc0); db(0x70); db(0x1a); db(0x22); db(0x3c);
  db(0x00); db(0x01); db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a);
- db(0x22); db(0x40); db(0x41); db(0xfa); db(0x0f); db(0x8e); db(0x23); db(0x48);
+ db(0x22); db(0x40); db(0x41); db(0xfa); db(0x0f); db(0xc2); db(0x23); db(0x48);
  db(0x00); db(0x0a); db(0x41); db(0xfa); db(0xff); db(0x28); db(0x23); db(0x48);
  db(0x00); db(0x0e); db(0x41); db(0xfa); db(0xff); db(0x20); db(0x23); db(0x48);
  db(0x00); db(0x12); db(0x33); db(0x7c); db(0x02); db(0x14); db(0x00); db(0x08);
@@ -85,7 +85,7 @@
  db(0x01); db(0xa0); db(0x11); db(0xb1); db(0x00); db(0x00); db(0x00); db(0x0e);
  db(0x52); db(0x40); db(0x0c); db(0x40); db(0x00); db(0x8c); db(0x66); db(0xf2);
  db(0x20); db(0x0a); db(0xe4); db(0x88); db(0x21); db(0x40); db(0x00); db(0x36);
- db(0x22); db(0x48); db(0x41); db(0xfa); db(0x0f); db(0x1e); db(0x23); db(0x48);
+ db(0x22); db(0x48); db(0x41); db(0xfa); db(0x0f); db(0x52); db(0x23); db(0x48);
  db(0x00); db(0x0a); db(0x20); db(0x6b); db(0x01); db(0x98); db(0x41); db(0xe8);
  db(0x00); db(0x12); db(0x4e); db(0xae); db(0xff); db(0x10); db(0x4c); db(0xdf);
  db(0x4f); db(0x03); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x7f); db(0x7e);
  db(0x4e); db(0x75); db(0x7e); db(0x00); db(0x60); db(0xf4); db(0x48); db(0xe7);
  db(0x40); db(0xe2); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x41); db(0xee);
  db(0x01); db(0x50); db(0x20); db(0x50); db(0x4a); db(0x90); db(0x67); db(0x1a);
- db(0x22); db(0x68); db(0x00); db(0x0a); db(0x45); db(0xfa); db(0x0e); db(0x70);
+ db(0x22); db(0x68); db(0x00); db(0x0a); db(0x45); db(0xfa); db(0x0e); db(0xa4);
  db(0x10); db(0x19); db(0x12); db(0x1a); db(0xb0); db(0x01); db(0x66); db(0x06);
  db(0x4a); db(0x00); db(0x67); db(0x42); db(0x60); db(0xf2); db(0x20); db(0x50);
  db(0x60); db(0xe2); db(0x70); db(0x20); db(0x22); db(0x3c); db(0x00); db(0x01);
  db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x24); db(0x40);
  db(0x15); db(0x7c); db(0x00); db(0x08); db(0x00); db(0x08); db(0x41); db(0xfa);
- db(0x0e); db(0x46); db(0x25); db(0x48); db(0x00); db(0x0a); db(0x41); db(0xfa);
- db(0x0d); db(0xc2); db(0x25); db(0x48); db(0x00); db(0x0e); db(0x41); db(0xea);
+ db(0x0e); db(0x7a); db(0x25); db(0x48); db(0x00); db(0x0a); db(0x41); db(0xfa);
+ db(0x0d); db(0xf6); db(0x25); db(0x48); db(0x00); db(0x0e); db(0x41); db(0xea);
  db(0x00); db(0x12); db(0x20); db(0x88); db(0x58); db(0x90); db(0x21); db(0x48);
  db(0x00); db(0x08); db(0x41); db(0xee); db(0x01); db(0x50); db(0x22); db(0x4a);
  db(0x4e); db(0xae); db(0xff); db(0x0a); db(0x20); db(0x4a); db(0x20); db(0x08);
  db(0xff); db(0x3a); db(0x4a); db(0x80); db(0x67); db(0x3a); db(0x20); db(0x52);
  db(0x24); db(0x40); db(0x22); db(0x4a); db(0x12); db(0xd8); db(0x66); db(0xfc);
  db(0x13); db(0x7c); db(0x00); db(0x3a); db(0xff); db(0xff); db(0x42); db(0x11);
- db(0x2c); db(0x78); db(0x00); db(0x04); db(0x43); db(0xfa); db(0x09); db(0x3f);
+ db(0x2c); db(0x78); db(0x00); db(0x04); db(0x43); db(0xfa); db(0x09); db(0x73);
  db(0x70); db(0x00); db(0x4e); db(0xae); db(0xfd); db(0xd8); db(0x2c); db(0x40);
  db(0x22); db(0x0a); db(0x4e); db(0xae); db(0xff); db(0x52); db(0x22); db(0x4e);
  db(0x2c); db(0x78); db(0x00); db(0x04); db(0x4e); db(0xae); db(0xfe); db(0x62);
  db(0x22); db(0x4a); db(0x20); db(0x02); db(0x4e); db(0xae); db(0xff); db(0x2e);
  db(0x70); db(0x00); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x3f); db(0x3e);
  db(0x2c); db(0x01); db(0x7e); db(0x06); db(0x2c); db(0x78); db(0x00); db(0x04);
- db(0x43); db(0xfa); db(0x09); db(0x3a); db(0x70); db(0x24); db(0x4e); db(0xae);
+ db(0x43); db(0xfa); db(0x09); db(0x6e); db(0x70); db(0x24); db(0x4e); db(0xae);
  db(0xfd); db(0xd8); db(0x4a); db(0x80); db(0x66); db(0x0e); db(0x08); db(0x87);
- db(0x00); db(0x02); db(0x43); db(0xfa); db(0x09); db(0x28); db(0x70); db(0x00);
+ db(0x00); db(0x02); db(0x43); db(0xfa); db(0x09); db(0x5c); db(0x70); db(0x00);
  db(0x4e); db(0xae); db(0xfd); db(0xd8); db(0x28); db(0x40); db(0x20); db(0x3c);
  db(0x00); db(0x00); db(0x02); db(0x2c); db(0x22); db(0x3c); db(0x00); db(0x01);
  db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x20); db(0x40);
  db(0x22); db(0x4c); db(0x4e); db(0xae); db(0xfe); db(0x62); db(0x4c); db(0xdf);
  db(0x7c); db(0xfc); db(0x4e); db(0x75); db(0x2c); db(0x78); db(0x00); db(0x04);
  db(0x93); db(0xc9); db(0x4e); db(0xae); db(0xfe); db(0xda); db(0x20); db(0x40);
- db(0x4b); db(0xe8); db(0x00); db(0x5c); db(0x43); db(0xfa); db(0x08); db(0x8f);
+ db(0x4b); db(0xe8); db(0x00); db(0x5c); db(0x43); db(0xfa); db(0x08); db(0xc3);
  db(0x70); db(0x00); db(0x4e); db(0xae); db(0xfd); db(0xd8); db(0x24); db(0x40);
  db(0x20); db(0x3c); db(0x00); db(0x00); db(0x00); db(0xb9); db(0x22); db(0x3c);
  db(0x00); db(0x01); db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a);
  db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x00); db(0x22); db(0x2c); db(0x78);
  db(0x00); db(0x04); db(0x61); db(0x00); db(0xff); db(0x74); db(0x61); db(0x00);
  db(0xff); db(0xbe); db(0x67); db(0x1a); db(0x22); db(0x40); db(0x24); db(0x40);
- db(0x41); db(0xfa); db(0x05); db(0x5c); db(0x70); db(0x00); db(0x72); db(0x00);
+ db(0x41); db(0xfa); db(0x05); db(0x90); db(0x70); db(0x00); db(0x72); db(0x00);
  db(0x4e); db(0xae); db(0xfe); db(0x44); db(0x22); db(0x00); db(0x70); db(0x00);
  db(0x4a); db(0x81); db(0x66); db(0x02); db(0x20); db(0x0a); db(0x4a); db(0x80);
  db(0x4c); db(0xdf); db(0x44); db(0x00); db(0x4e); db(0x75); db(0x48); db(0xe7);
  db(0x00); db(0x22); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x61); db(0x00);
  db(0xff); db(0x40); db(0x61); db(0x00); db(0xff); db(0x8a); db(0x67); db(0x1a);
- db(0x24); db(0x40); db(0x22); db(0x40); db(0x41); db(0xfa); db(0x05); db(0x35);
+ db(0x24); db(0x40); db(0x22); db(0x40); db(0x41); db(0xfa); db(0x05); db(0x69);
  db(0x70); db(0x00); db(0x72); db(0x00); db(0x4e); db(0xae); db(0xfe); db(0x44);
  db(0x22); db(0x00); db(0x70); db(0x00); db(0x4a); db(0x81); db(0x66); db(0x02);
  db(0x20); db(0x0a); db(0x4a); db(0x80); db(0x4c); db(0xdf); db(0x44); db(0x00);
  db(0x00); db(0x36); db(0x22); db(0x4a); db(0x24); db(0x43); db(0x97); db(0xcb);
  db(0x24); db(0x09); db(0x4e); db(0xae); db(0xfe); db(0xe6); db(0x20); db(0x02);
  db(0x4c); db(0xdf); db(0x4c); db(0x1c); db(0x4e); db(0x75); db(0x41); db(0xfa);
- db(0x04); db(0xc8); db(0x43); db(0xfa); db(0x01); db(0x1e); db(0x70); db(0x13);
+ db(0x04); db(0xfc); db(0x43); db(0xfa); db(0x01); db(0x30); db(0x70); db(0x13);
  db(0x61); db(0x00); db(0xff); db(0x98); db(0x4e); db(0x75); db(0x22); db(0x6d);
- db(0x01); db(0x80); db(0x33); db(0x7c); db(0x00); db(0x0a); db(0x00); db(0x1c);
+ db(0x01); db(0x88); db(0x33); db(0x7c); db(0x00); db(0x0a); db(0x00); db(0x1c);
  db(0x13); db(0x7c); db(0x00); db(0x01); db(0x00); db(0x1e); db(0x4e); db(0xae);
- db(0xfe); db(0x38); db(0x22); db(0x6d); db(0x01); db(0x80); db(0x25); db(0x69);
+ db(0xfe); db(0x38); db(0x22); db(0x6d); db(0x01); db(0x88); db(0x25); db(0x69);
  db(0x00); db(0x20); db(0x00); db(0x0e); db(0x25); db(0x69); db(0x00); db(0x24);
- db(0x00); db(0x12); db(0x22); db(0x6d); db(0x01); db(0x7c); db(0x13); db(0x7c);
+ db(0x00); db(0x12); db(0x22); db(0x6d); db(0x01); db(0x84); db(0x13); db(0x7c);
  db(0x00); db(0x01); db(0x00); db(0x1e); db(0x4e); db(0xae); db(0xfe); db(0x38);
  db(0x4e); db(0x75); db(0x42); db(0xaa); db(0x00); db(0x0e); db(0x42); db(0xaa);
- db(0x00); db(0x12); db(0x22); db(0x6d); db(0x01); db(0x7c); db(0x13); db(0x7c);
+ db(0x00); db(0x12); db(0x22); db(0x6d); db(0x01); db(0x84); db(0x13); db(0x7c);
  db(0x00); db(0x01); db(0x00); db(0x1e); db(0x4e); db(0xae); db(0xfe); db(0x38);
  db(0x4e); db(0x75); db(0x00); db(0x00); db(0xff); db(0xff); db(0x00); db(0x00);
  db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00);
  db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00);
  db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x48); db(0xe7);
  db(0xf0); db(0xfe); db(0x2a); db(0x48); db(0x95); db(0xca); db(0x97); db(0xcb);
- db(0x2c); db(0x6d); db(0x00); db(0x18); db(0x20); db(0x6d); db(0x00); db(0x14);
- db(0x20); db(0x28); db(0x00); db(0x38); db(0x67); db(0x3e); db(0x20); db(0x40);
- db(0x41); db(0xe8); db(0x00); db(0x2c); db(0x4e); db(0xae); db(0xfc); db(0xe8);
- db(0x72); db(0xff); db(0xb2); db(0x80); db(0x67); db(0x2e); db(0x26); db(0x00);
- db(0x91); db(0xc8); db(0x43); db(0xed); db(0x00); db(0x28); db(0x70); db(0x00);
- db(0x30); db(0x3c); db(0x00); db(0x58); db(0x22); db(0x3c); db(0x80); db(0x00);
- db(0x10); db(0x00); db(0x24); db(0x03); db(0x4e); db(0xae); db(0xfd); db(0x0c);
- db(0x72); db(0xff); db(0x74); db(0xff); db(0x4a); db(0x80); db(0x6b); db(0x0c);
- db(0x45); db(0xed); db(0x00); db(0x28); db(0x22); db(0x2a); db(0x00); db(0x32);
- db(0x24); db(0x2a); db(0x00); db(0x36); db(0xb2); db(0xad); db(0x00); db(0x20);
- db(0x66); db(0x06); db(0xb4); db(0xad); db(0x00); db(0x24); db(0x67); db(0x34);
- db(0x2b); db(0x41); db(0x00); db(0x20); db(0x2b); db(0x42); db(0x00); db(0x24);
- db(0x91); db(0xc8); db(0x43); db(0xed); db(0x00); db(0x80); db(0x70); db(0x00);
- db(0x30); db(0x3c); db(0x00); db(0x58); db(0x22); db(0x3c); db(0x80); db(0x00);
- db(0x00); db(0x00); db(0x24); db(0x03); db(0x4e); db(0xae); db(0xfd); db(0x0c);
- db(0x4a); db(0x80); db(0x6b); db(0x04); db(0x47); db(0xed); db(0x00); db(0x80);
- db(0x30); db(0x3c); db(0xff); db(0x38); db(0x72); db(0x01); db(0x61); db(0x00);
- db(0xfd); db(0x84); db(0x4e); db(0x90); db(0x4c); db(0xdf); db(0x7f); db(0x0f);
- db(0x4e); db(0x75); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x3e); db(0x2e);
- db(0x00); db(0x14); db(0x70); db(0xff); db(0x4e); db(0xae); db(0xfe); db(0xb6);
- db(0x7c); db(0x00); db(0x01); db(0xc6); db(0x93); db(0xc9); db(0x4e); db(0xae);
- db(0xfe); db(0xda); db(0x28); db(0x40); db(0x70); db(0x14); db(0x22); db(0x4c);
- db(0x4e); db(0xae); db(0xfe); db(0xd4); db(0x70); db(0x00); db(0x30); db(0x3c);
- db(0x01); db(0x84); db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01);
- db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x2a); db(0x40); db(0x47); db(0xed);
- db(0x00); db(0x16); db(0x27); db(0x4e); db(0x00); db(0x10); db(0x27); db(0x4c);
- db(0x00); db(0x08); db(0x27); db(0x46); db(0x00); db(0x0c); db(0x70); db(0xff);
- db(0x37); db(0x40); db(0x00); db(0x00); db(0x43); db(0xed); db(0x00); db(0x00);
- db(0x13); db(0x7c); db(0x00); db(0x02); db(0x00); db(0x08); db(0x13); db(0x7c);
- db(0x00); db(0x05); db(0x00); db(0x09); db(0x41); db(0xfa); db(0x03); db(0x4a);
- db(0x23); db(0x48); db(0x00); db(0x0a); db(0x41); db(0xfa); db(0x02); db(0xf4);
- db(0x23); db(0x48); db(0x00); db(0x12); db(0x23); db(0x4d); db(0x00); db(0x0e);
- db(0x70); db(0x05); db(0x4e); db(0xae); db(0xff); db(0x58); db(0x20); db(0x06);
- db(0x4e); db(0xae); db(0xfe); db(0xc2); db(0x70); db(0x00); db(0x53); db(0xab);
- db(0x00); db(0x1c); db(0x6a); db(0x06); db(0x70); db(0x0a); db(0x27); db(0x40);
- db(0x00); db(0x1c); db(0x4a); db(0xab); db(0x00); db(0x14); db(0x66); db(0x18);
- db(0x4a); db(0xab); db(0x00); db(0x1c); db(0x66); db(0xe0); db(0x43); db(0xfa);
- db(0x03); db(0x69); db(0x70); db(0x00); db(0x4e); db(0xae); db(0xfd); db(0xd8);
- db(0x27); db(0x40); db(0x00); db(0x14); db(0x67); db(0x00); db(0xff); db(0xd0);
- db(0x4a); db(0xab); db(0x00); db(0x18); db(0x66); db(0x18); db(0x4a); db(0xab);
- db(0x00); db(0x1c); db(0x66); db(0xc2); db(0x43); db(0xfa); db(0x03); db(0x5d);
- db(0x70); db(0x00); db(0x4e); db(0xae); db(0xfd); db(0xd8); db(0x27); db(0x40);
- db(0x00); db(0x18); db(0x67); db(0x00); db(0xff); db(0xb2); db(0x4a); db(0xad);
- db(0x01); db(0x7c); db(0x66); db(0x30); db(0x4a); db(0xab); db(0x00); db(0x1c);
- db(0x66); db(0xa4); db(0x4e); db(0xae); db(0xff); db(0x7c); db(0x41); db(0xee);
- db(0x01); db(0x5e); db(0x43); db(0xfa); db(0x02); db(0xb2); db(0x4e); db(0xae);
- db(0xfe); db(0xec); db(0x24); db(0x00); db(0x4e); db(0xae); db(0xff); db(0x76);
- db(0x4a); db(0x82); db(0x67); db(0x8a); db(0x61); db(0x00); db(0xfd); db(0x2c);
- db(0x2b); db(0x40); db(0x01); db(0x7c); db(0x67); db(0x00); db(0x02); db(0x62);
- db(0x60); db(0x00); db(0xff); db(0x7c); db(0x4a); db(0xad); db(0x01); db(0x80);
- db(0x66); db(0x40); db(0x4a); db(0xab); db(0x00); db(0x1c); db(0x66); db(0x00);
- db(0xff); db(0x6e); db(0x4e); db(0xae); db(0xff); db(0x7c); db(0x41); db(0xee);
- db(0x01); db(0x5e); db(0x43); db(0xfa); db(0x02); db(0x87); db(0x4e); db(0xae);
- db(0xfe); db(0xec); db(0x24); db(0x00); db(0x4e); db(0xae); db(0xff); db(0x76);
- db(0x4a); db(0x82); db(0x67); db(0x00); db(0xff); db(0x52); db(0x61); db(0x00);
- db(0xfd); db(0x26); db(0x2b); db(0x40); db(0x01); db(0x80); db(0x67); db(0x00);
- db(0x02); db(0x28); db(0x30); db(0x3c); db(0xff); db(0x38); db(0x72); db(0x00);
- db(0x61); db(0x00); db(0xfc); db(0x42); db(0x4e); db(0x90); db(0x60); db(0x00);
- db(0xff); db(0x36); db(0x0c); db(0x47); db(0x00); db(0x24); db(0x65); db(0x06);
- db(0x20); db(0x4b); db(0x61); db(0x00); db(0xfe); db(0x1a); db(0x22); db(0x6d);
- db(0x01); db(0x7c); db(0x45); db(0xed); db(0x00); db(0xc6); db(0x33); db(0x7c);
- db(0x00); db(0x0b); db(0x00); db(0x1c); db(0x23); db(0x7c); db(0x00); db(0x00);
- db(0x00); db(0x16); db(0x00); db(0x24); db(0x23); db(0x4a); db(0x00); db(0x28);
- db(0x10); db(0x3a); db(0xfd); db(0xd0); db(0x6a); db(0x0a); db(0x0c); db(0x47);
- db(0x00); db(0x24); db(0x64); db(0x04); db(0x60); db(0x00); db(0x01); db(0x9e);
+ db(0x99); db(0xcc); db(0x2c); db(0x6d); db(0x00); db(0x18); db(0x20); db(0x6d);
+ db(0x00); db(0x14); db(0x20); db(0x28); db(0x00); db(0x3c); db(0x67); db(0x40);
+ db(0x20); db(0x40); db(0x41); db(0xe8); db(0x00); db(0x2c); db(0x28); db(0x48);
+ db(0x4e); db(0xae); db(0xfc); db(0xe8); db(0x72); db(0xff); db(0xb2); db(0x80);
+ db(0x67); db(0x2e); db(0x26); db(0x00); db(0x91); db(0xc8); db(0x43); db(0xed);
+ db(0x00); db(0x30); db(0x70); db(0x00); db(0x30); db(0x3c); db(0x00); db(0x58);
+ db(0x22); db(0x3c); db(0x80); db(0x00); db(0x10); db(0x00); db(0x24); db(0x03);
+ db(0x4e); db(0xae); db(0xfd); db(0x0c); db(0x72); db(0xff); db(0x74); db(0xff);
+ db(0x4a); db(0x80); db(0x6b); db(0x0c); db(0x45); db(0xed); db(0x00); db(0x30);
+ db(0x22); db(0x2a); db(0x00); db(0x32); db(0x24); db(0x2a); db(0x00); db(0x36);
+ db(0x20); db(0x2c); db(0x00); db(0x1c); db(0xb0); db(0xad); db(0x00); db(0x28);
+ db(0x66); db(0x0c); db(0xb2); db(0xad); db(0x00); db(0x20); db(0x66); db(0x06);
+ db(0xb4); db(0xad); db(0x00); db(0x24); db(0x67); db(0x38); db(0x2b); db(0x40);
+ db(0x00); db(0x28); db(0x2b); db(0x41); db(0x00); db(0x20); db(0x2b); db(0x42);
+ db(0x00); db(0x24); db(0x91); db(0xc8); db(0x43); db(0xed); db(0x00); db(0x88);
+ db(0x70); db(0x00); db(0x30); db(0x3c); db(0x00); db(0x58); db(0x22); db(0x3c);
+ db(0x80); db(0x00); db(0x00); db(0x00); db(0x24); db(0x03); db(0x4e); db(0xae);
+ db(0xfd); db(0x0c); db(0x4a); db(0x80); db(0x6b); db(0x04); db(0x47); db(0xed);
+ db(0x00); db(0x88); db(0x30); db(0x3c); db(0xff); db(0x38); db(0x72); db(0x01);
+ db(0x61); db(0x00); db(0xfd); db(0x72); db(0x4e); db(0x90); db(0x4c); db(0xdf);
+ db(0x7f); db(0x0f); db(0x4e); db(0x75); db(0x2c); db(0x78); db(0x00); db(0x04);
+ db(0x3e); db(0x2e); db(0x00); db(0x14); db(0x70); db(0xff); db(0x4e); db(0xae);
+ db(0xfe); db(0xb6); db(0x7c); db(0x00); db(0x01); db(0xc6); db(0x93); db(0xc9);
+ db(0x4e); db(0xae); db(0xfe); db(0xda); db(0x28); db(0x40); db(0x70); db(0x14);
+ db(0x22); db(0x4c); db(0x4e); db(0xae); db(0xfe); db(0xd4); db(0x70); db(0x00);
+ db(0x30); db(0x3c); db(0x01); db(0x8c); db(0x22); db(0x3c); db(0x00); db(0x01);
+ db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x2a); db(0x40);
+ db(0x47); db(0xed); db(0x00); db(0x16); db(0x27); db(0x4e); db(0x00); db(0x10);
+ db(0x27); db(0x4c); db(0x00); db(0x08); db(0x27); db(0x46); db(0x00); db(0x0c);
+ db(0x70); db(0xff); db(0x37); db(0x40); db(0x00); db(0x00); db(0x43); db(0xed);
+ db(0x00); db(0x00); db(0x13); db(0x7c); db(0x00); db(0x02); db(0x00); db(0x08);
+ db(0x13); db(0x7c); db(0x00); db(0x05); db(0x00); db(0x09); db(0x41); db(0xfa);
+ db(0x03); db(0x6c); db(0x23); db(0x48); db(0x00); db(0x0a); db(0x41); db(0xfa);
+ db(0x02); db(0xfe); db(0x23); db(0x48); db(0x00); db(0x12); db(0x23); db(0x4d);
+ db(0x00); db(0x0e); db(0x70); db(0x05); db(0x4e); db(0xae); db(0xff); db(0x58);
+ db(0x20); db(0x06); db(0x4e); db(0xae); db(0xfe); db(0xc2); db(0x70); db(0x00);
+ db(0x53); db(0xab); db(0x00); db(0x1c); db(0x6a); db(0x06); db(0x70); db(0x0a);
+ db(0x27); db(0x40); db(0x00); db(0x1c); db(0x4a); db(0xab); db(0x00); db(0x14);
+ db(0x66); db(0x18); db(0x4a); db(0xab); db(0x00); db(0x1c); db(0x66); db(0xe0);
+ db(0x43); db(0xfa); db(0x03); db(0x8b); db(0x70); db(0x00); db(0x4e); db(0xae);
+ db(0xfd); db(0xd8); db(0x27); db(0x40); db(0x00); db(0x14); db(0x67); db(0x00);
+ db(0xff); db(0xd0); db(0x4a); db(0xab); db(0x00); db(0x18); db(0x66); db(0x18);
+ db(0x4a); db(0xab); db(0x00); db(0x1c); db(0x66); db(0xc2); db(0x43); db(0xfa);
+ db(0x03); db(0x7f); db(0x70); db(0x00); db(0x4e); db(0xae); db(0xfd); db(0xd8);
+ db(0x27); db(0x40); db(0x00); db(0x18); db(0x67); db(0x00); db(0xff); db(0xb2);
+ db(0x4a); db(0xad); db(0x01); db(0x84); db(0x66); db(0x30); db(0x4a); db(0xab);
+ db(0x00); db(0x1c); db(0x66); db(0xa4); db(0x4e); db(0xae); db(0xff); db(0x7c);
+ db(0x41); db(0xee); db(0x01); db(0x5e); db(0x43); db(0xfa); db(0x02); db(0xd4);
+ db(0x4e); db(0xae); db(0xfe); db(0xec); db(0x24); db(0x00); db(0x4e); db(0xae);
+ db(0xff); db(0x76); db(0x4a); db(0x82); db(0x67); db(0x8a); db(0x61); db(0x00);
+ db(0xfd); db(0x1a); db(0x2b); db(0x40); db(0x01); db(0x84); db(0x67); db(0x00);
+ db(0x02); db(0x6c); db(0x60); db(0x00); db(0xff); db(0x7c); db(0x4a); db(0xad);
+ db(0x01); db(0x88); db(0x66); db(0x40); db(0x4a); db(0xab); db(0x00); db(0x1c);
+ db(0x66); db(0x00); db(0xff); db(0x6e); db(0x4e); db(0xae); db(0xff); db(0x7c);
+ db(0x41); db(0xee); db(0x01); db(0x5e); db(0x43); db(0xfa); db(0x02); db(0xa9);
+ db(0x4e); db(0xae); db(0xfe); db(0xec); db(0x24); db(0x00); db(0x4e); db(0xae);
+ db(0xff); db(0x76); db(0x4a); db(0x82); db(0x67); db(0x00); db(0xff); db(0x52);
+ db(0x61); db(0x00); db(0xfd); db(0x14); db(0x2b); db(0x40); db(0x01); db(0x88);
+ db(0x67); db(0x00); db(0x02); db(0x32); db(0x30); db(0x3c); db(0xff); db(0x38);
+ db(0x72); db(0x00); db(0x61); db(0x00); db(0xfc); db(0x30); db(0x4e); db(0x90);
+ db(0x60); db(0x00); db(0xff); db(0x36); db(0x0c); db(0x47); db(0x00); db(0x24);
+ db(0x65); db(0x06); db(0x20); db(0x4b); db(0x61); db(0x00); db(0xfe); db(0x08);
+ db(0x22); db(0x6d); db(0x01); db(0x84); db(0x45); db(0xed); db(0x00); db(0xce);
+ db(0x33); db(0x7c); db(0x00); db(0x0b); db(0x00); db(0x1c); db(0x23); db(0x7c);
+ db(0x00); db(0x00); db(0x00); db(0x16); db(0x00); db(0x24); db(0x23); db(0x4a);
+ db(0x00); db(0x28); db(0x10); db(0x3a); db(0xfd); db(0xbe); db(0x6a); db(0x08);
+ db(0x0c); db(0x47); db(0x00); db(0x24); db(0x65); db(0x00); db(0x01); db(0xaa);
  db(0x15); db(0x7c); db(0x00); db(0x13); db(0x00); db(0x04); db(0x42); db(0x6a);
- db(0x00); db(0x06); db(0x22); db(0x3a); db(0xfd); db(0xd8); db(0x02); db(0x41);
+ db(0x00); db(0x06); db(0x22); db(0x3a); db(0xfd); db(0xc8); db(0x02); db(0x41);
  db(0x00); db(0x07); db(0x70); db(0x07); db(0x90); db(0x41); db(0xe1); db(0x48);
  db(0xe9); db(0x48); db(0x35); db(0x40); db(0x00); db(0x08); db(0x41); db(0xed);
- db(0x00); db(0xdc); db(0x25); db(0x48); db(0x00); db(0x0a); db(0x0c); db(0x47);
- db(0x00); db(0x27); db(0x65); db(0x00); db(0x00); db(0xea); db(0x15); db(0x7c);
+ db(0x00); db(0xe4); db(0x25); db(0x48); db(0x00); db(0x0a); db(0x10); db(0x3a);
+ db(0xfd); db(0x8a); db(0x6b); db(0x00); db(0x00); db(0xf2); db(0x0c); db(0x47);
+ db(0x00); db(0x27); db(0x65); db(0x00); db(0x00); db(0xee); db(0x15); db(0x7c);
  db(0x00); db(0x03); db(0x00); db(0x05); db(0x42); db(0x90); db(0x42); db(0xa8);
  db(0x00); db(0x04); db(0x42); db(0xa8); db(0x00); db(0x08); db(0x42); db(0x68);
- db(0x00); db(0x0c); db(0x31); db(0x7a); db(0xfd); db(0x88); db(0x00); db(0x0e);
- db(0x42); db(0x68); db(0x00); db(0x10); db(0x31); db(0x7a); db(0xfd); db(0x80);
+ db(0x00); db(0x0c); db(0x31); db(0x7a); db(0xfd); db(0x70); db(0x00); db(0x0e);
+ db(0x42); db(0x68); db(0x00); db(0x10); db(0x31); db(0x7a); db(0xfd); db(0x68);
  db(0x00); db(0x12); db(0x42); db(0x68); db(0x00); db(0x14); db(0x31); db(0x7a);
- db(0xfd); db(0x6e); db(0x00); db(0x16); db(0x42); db(0x68); db(0x00); db(0x18);
- db(0x31); db(0x7a); db(0xfd); db(0x66); db(0x00); db(0x1a); db(0x43); db(0xed);
- db(0x00); db(0xfc); db(0x21); db(0x49); db(0x00); db(0x1c); db(0x22); db(0xfc);
- db(0x80); db(0x03); db(0xa0); db(0x06); db(0x30); db(0x3a); db(0xfd); db(0x6c);
+ db(0xfd); db(0x56); db(0x00); db(0x16); db(0x42); db(0x68); db(0x00); db(0x18);
+ db(0x31); db(0x7a); db(0xfd); db(0x4e); db(0x00); db(0x1a); db(0x43); db(0xed);
+ db(0x01); db(0x04); db(0x21); db(0x49); db(0x00); db(0x1c); db(0x22); db(0xfc);
+ db(0x80); db(0x03); db(0xa0); db(0x06); db(0x30); db(0x3a); db(0xfd); db(0x54);
  db(0x48); db(0xc0); db(0xe1); db(0x80); db(0x22); db(0xc0); db(0x22); db(0xfc);
- db(0x80); db(0x03); db(0xa0); db(0x07); db(0x22); db(0xfa); db(0xfd); db(0x5e);
- db(0x70); db(0x00); db(0x30); db(0x3a); db(0xfd); db(0x46); db(0x6b); db(0x08);
+ db(0x80); db(0x03); db(0xa0); db(0x07); db(0x22); db(0xfa); db(0xfd); db(0x46);
+ db(0x70); db(0x00); db(0x30); db(0x3a); db(0xfd); db(0x2e); db(0x6b); db(0x08);
  db(0x22); db(0xfc); db(0x80); db(0x03); db(0xa0); db(0x09); db(0x22); db(0xc0);
- db(0x30); db(0x3a); db(0xfd); db(0x3a); db(0x6b); db(0x08); db(0x22); db(0xfc);
+ db(0x30); db(0x3a); db(0xfd); db(0x22); db(0x6b); db(0x08); db(0x22); db(0xfc);
  db(0x80); db(0x03); db(0xa0); db(0x0a); db(0x22); db(0xc0); db(0x30); db(0x3a);
- db(0xfd); db(0x22); db(0x6b); db(0x14); db(0x22); db(0xfc); db(0x80); db(0x03);
- db(0xa0); db(0x02); db(0x22); db(0xc0); db(0x30); db(0x3a); db(0xfd); db(0x1a);
+ db(0xfd); db(0x0a); db(0x6b); db(0x14); db(0x22); db(0xfc); db(0x80); db(0x03);
+ db(0xa0); db(0x02); db(0x22); db(0xc0); db(0x30); db(0x3a); db(0xfd); db(0x02);
  db(0x22); db(0xfc); db(0x80); db(0x03); db(0xa0); db(0x01); db(0x22); db(0xc0);
- db(0x30); db(0x3a); db(0xfd); db(0x14); db(0x6b); db(0x10); db(0x22); db(0xfc);
- db(0x80); db(0x03); db(0xa0); db(0x03); db(0x30); db(0x3a); db(0xfd); db(0x0e);
+ db(0x30); db(0x3a); db(0xfc); db(0xfc); db(0x6b); db(0x10); db(0x22); db(0xfc);
+ db(0x80); db(0x03); db(0xa0); db(0x03); db(0x30); db(0x3a); db(0xfc); db(0xf6);
  db(0x48); db(0xc0); db(0xe1); db(0x80); db(0x22); db(0xc0); db(0x30); db(0x3a);
- db(0xfd); db(0x00); db(0x6b); db(0x10); db(0x22); db(0xfc); db(0x80); db(0x03);
- db(0xa0); db(0x04); db(0x30); db(0x3a); db(0xfc); db(0xfa); db(0x48); db(0xc0);
- db(0xe1); db(0x80); db(0x22); db(0xc0); db(0x30); db(0x3a); db(0xfc); db(0xec);
+ db(0xfc); db(0xe8); db(0x6b); db(0x10); db(0x22); db(0xfc); db(0x80); db(0x03);
+ db(0xa0); db(0x04); db(0x30); db(0x3a); db(0xfc); db(0xe2); db(0x48); db(0xc0);
+ db(0xe1); db(0x80); db(0x22); db(0xc0); db(0x30); db(0x3a); db(0xfc); db(0xd4);
  db(0x6b); db(0x10); db(0x22); db(0xfc); db(0x80); db(0x03); db(0xa0); db(0x05);
- db(0x30); db(0x3a); db(0xfc); db(0xe6); db(0x48); db(0xc0); db(0xe1); db(0x80);
- db(0x22); db(0xc0); db(0x70); db(0x00); db(0x30); db(0x3a); db(0xfc); db(0xe2);
+ db(0x30); db(0x3a); db(0xfc); db(0xce); db(0x48); db(0xc0); db(0xe1); db(0x80);
+ db(0x22); db(0xc0); db(0x70); db(0x00); db(0x30); db(0x3a); db(0xfc); db(0xca);
  db(0x6b); db(0x08); db(0x22); db(0xfc); db(0x80); db(0x03); db(0xa0); db(0x08);
- db(0x22); db(0xc0); db(0x42); db(0x91); db(0x60); db(0x2e); db(0x0c); db(0x47);
- db(0x00); db(0x24); db(0x65); db(0x00); db(0xfd); db(0xe2); db(0x15); db(0x7c);
- db(0x00); db(0x02); db(0x00); db(0x05); db(0x30); db(0xba); db(0xfc); db(0xa0);
- db(0x31); db(0x7a); db(0xfc); db(0x9e); db(0x00); db(0x02); db(0x31); db(0x7a);
- db(0xfc); db(0x9c); db(0x00); db(0x04); db(0x31); db(0x7a); db(0xfc); db(0x98);
- db(0x00); db(0x06); db(0x30); db(0x3a); db(0xfc); db(0xa6); db(0xe0); db(0x40);
- db(0x31); db(0x40); db(0x00); db(0x08); db(0x61); db(0x00); db(0xfc); db(0x64);
- db(0x10); db(0x3a); db(0xfc); db(0x78); db(0x6b); db(0x00); db(0xfd); db(0xb0);
- db(0x36); db(0x3c); db(0x00); db(0x68); db(0x74); db(0x01); db(0x28); db(0x3a);
- db(0xfc); db(0x8c); db(0x20); db(0x04); db(0xc0); db(0x82); db(0x22); db(0x2b);
- db(0x00); db(0x04); db(0xc2); db(0x82); db(0xb2); db(0x80); db(0x67); db(0x22);
- db(0x42); db(0x92); db(0x35); db(0x7c); db(0x02); db(0x00); db(0x00); db(0x04);
- db(0x42); db(0xaa); db(0x00); db(0x0a); db(0x32); db(0x03); db(0x4a); db(0x00);
- db(0x66); db(0x04); db(0x08); db(0xc1); db(0x00); db(0x07); db(0x35); db(0x41);
- db(0x00); db(0x06); db(0x42); db(0x6a); db(0x00); db(0x08); db(0x61); db(0x00);
- db(0xfc); db(0x22); db(0x52); db(0x43); db(0xd4); db(0x42); db(0x0c); db(0x42);
- db(0x00); db(0x08); db(0x66); db(0xc6); db(0x27); db(0x44); db(0x00); db(0x04);
- db(0x60); db(0x00); db(0xfd); db(0x64); db(0x42); db(0x92); db(0x35); db(0x7c);
- db(0x04); db(0x00); db(0x00); db(0x04); db(0x42); db(0x6a); db(0x00); db(0x06);
- db(0x42); db(0x6a); db(0x00); db(0x08); db(0x20); db(0x6b); db(0x00); db(0x14);
- db(0x30); db(0x3a); db(0xfc); db(0x38); db(0x32); db(0x28); db(0x00); db(0x30);
+ db(0x22); db(0xc0); db(0x42); db(0x91); db(0x60); db(0x32); db(0x42); db(0x6a);
+ db(0x00); db(0x08); db(0x0c); db(0x47); db(0x00); db(0x24); db(0x65); db(0x00);
+ db(0xfd); db(0xd8); db(0x15); db(0x7c); db(0x00); db(0x02); db(0x00); db(0x05);
+ db(0x30); db(0xba); db(0xfc); db(0x84); db(0x31); db(0x7a); db(0xfc); db(0x82);
+ db(0x00); db(0x02); db(0x31); db(0x7a); db(0xfc); db(0x80); db(0x00); db(0x04);
+ db(0x31); db(0x7a); db(0xfc); db(0x7c); db(0x00); db(0x06); db(0x30); db(0x3a);
+ db(0xfc); db(0x8a); db(0xe0); db(0x40); db(0x31); db(0x40); db(0x00); db(0x08);
+ db(0x61); db(0x00); db(0xfc); db(0x48); db(0x10); db(0x3a); db(0xfc); db(0x5c);
+ db(0x6b); db(0x00); db(0xfd); db(0xa6); db(0x36); db(0x3c); db(0x00); db(0x68);
+ db(0x74); db(0x01); db(0x28); db(0x3a); db(0xfc); db(0x70); db(0x20); db(0x04);
+ db(0xc0); db(0x82); db(0x22); db(0x2b); db(0x00); db(0x04); db(0xc2); db(0x82);
+ db(0xb2); db(0x80); db(0x67); db(0x22); db(0x42); db(0x92); db(0x35); db(0x7c);
+ db(0x02); db(0x00); db(0x00); db(0x04); db(0x42); db(0xaa); db(0x00); db(0x0a);
+ db(0x32); db(0x03); db(0x4a); db(0x00); db(0x66); db(0x04); db(0x08); db(0xc1);
+ db(0x00); db(0x07); db(0x35); db(0x41); db(0x00); db(0x06); db(0x42); db(0x6a);
+ db(0x00); db(0x08); db(0x61); db(0x00); db(0xfc); db(0x06); db(0x52); db(0x43);
+ db(0xd4); db(0x42); db(0x0c); db(0x42); db(0x00); db(0x08); db(0x66); db(0xc6);
+ db(0x27); db(0x44); db(0x00); db(0x04); db(0x60); db(0x00); db(0xfd); db(0x5a);
+ db(0x42); db(0x92); db(0x35); db(0x7c); db(0x04); db(0x00); db(0x00); db(0x04);
+ db(0x42); db(0x6a); db(0x00); db(0x06); db(0x42); db(0x6a); db(0x00); db(0x08);
+ db(0x20); db(0x6b); db(0x00); db(0x14); db(0x30); db(0x3a); db(0xfc); db(0x1c);
+ db(0x32); db(0x28); db(0x00); db(0x30); db(0xd2); db(0x41); db(0x90); db(0x41);
+ db(0x6a); db(0x02); db(0x70); db(0x00); db(0x35); db(0x40); db(0x00); db(0x0a);
+ db(0x30); db(0x3a); db(0xfc); db(0x0a); db(0x32); db(0x28); db(0x00); db(0x2e);
  db(0xd2); db(0x41); db(0x90); db(0x41); db(0x6a); db(0x02); db(0x70); db(0x00);
- db(0x35); db(0x40); db(0x00); db(0x0a); db(0x30); db(0x3a); db(0xfc); db(0x26);
- db(0x32); db(0x28); db(0x00); db(0x2e); db(0xd2); db(0x41); db(0x90); db(0x41);
- db(0x6a); db(0x02); db(0x70); db(0x00); db(0x35); db(0x40); db(0x00); db(0x0c);
- db(0x61); db(0x00); db(0xfb); db(0x9c); db(0x60); db(0x00); db(0xfd); db(0x20);
- db(0x4e); db(0x75); db(0x4a); db(0xa9); db(0x01); db(0x7c); db(0x67); db(0x14);
- db(0x4a); db(0xa9); db(0x01); db(0x80); db(0x67); db(0x0e); db(0x30); db(0x3a);
- db(0xfb); db(0xd4); db(0xb0); db(0x69); db(0x00); db(0x16); db(0x67); db(0x14);
- db(0x33); db(0x40); db(0x00); db(0x16); db(0x2c); db(0x69); db(0x00); db(0x26);
- db(0x20); db(0x29); db(0x00); db(0x22); db(0x22); db(0x69); db(0x00); db(0x1e);
- db(0x4e); db(0xae); db(0xfe); db(0xbc); db(0x41); db(0xf9); db(0x00); db(0xdf);
- db(0xf0); db(0x00); db(0x70); db(0x00); db(0x4e); db(0x75); db(0x69); db(0x6e);
- db(0x70); db(0x75); db(0x74); db(0x2e); db(0x64); db(0x65); db(0x76); db(0x69);
- db(0x63); db(0x65); db(0x00); db(0x74); db(0x69); db(0x6d); db(0x65); db(0x72);
- db(0x2e); db(0x64); db(0x65); db(0x76); db(0x69); db(0x63); db(0x65); db(0x00);
- db(0x55); db(0x41); db(0x45); db(0x20); db(0x74); db(0x61); db(0x62); db(0x6c);
- db(0x65); db(0x74); db(0x20); db(0x64); db(0x72); db(0x69); db(0x76); db(0x65);
- db(0x72); db(0x00); db(0x55); db(0x41); db(0x45); db(0x20); db(0x66); db(0x69);
- db(0x6c); db(0x65); db(0x73); db(0x79); db(0x73); db(0x74); db(0x65); db(0x6d);
- db(0x00); db(0x55); db(0x41); db(0x45); db(0x20); db(0x66); db(0x73); db(0x20);
- db(0x61); db(0x75); db(0x74); db(0x6f); db(0x6d); db(0x6f); db(0x75); db(0x6e);
- db(0x74); db(0x65); db(0x72); db(0x00); db(0x55); db(0x41); db(0x45); db(0x20);
- db(0x66); db(0x73); db(0x20); db(0x61); db(0x75); db(0x74); db(0x6f); db(0x6d);
- db(0x6f); db(0x75); db(0x6e); db(0x74); db(0x20); db(0x70); db(0x72); db(0x6f);
- db(0x63); db(0x65); db(0x73); db(0x73); db(0x00); db(0x64); db(0x6f); db(0x73);
- db(0x2e); db(0x6c); db(0x69); db(0x62); db(0x72); db(0x61); db(0x72); db(0x79);
- db(0x00); db(0x69); db(0x6e); db(0x74); db(0x75); db(0x69); db(0x74); db(0x69);
- db(0x6f); db(0x6e); db(0x2e); db(0x6c); db(0x69); db(0x62); db(0x72); db(0x61);
- db(0x72); db(0x79); db(0x00); db(0x67); db(0x72); db(0x61); db(0x70); db(0x68);
- db(0x69); db(0x63); db(0x73); db(0x2e); db(0x6c); db(0x69); db(0x62); db(0x72);
- db(0x61); db(0x72); db(0x79); db(0x00); db(0x65); db(0x78); db(0x70); db(0x61);
- db(0x6e); db(0x73); db(0x69); db(0x6f); db(0x6e); db(0x2e); db(0x6c); db(0x69);
- db(0x62); db(0x72); db(0x61); db(0x72); db(0x79); db(0x00); db(0x46); db(0x69);
- db(0x6c); db(0x65); db(0x53); db(0x79); db(0x73); db(0x74); db(0x65); db(0x6d);
- db(0x2e); db(0x72); db(0x65); db(0x73); db(0x6f); db(0x75); db(0x72); db(0x63);
- db(0x65); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x03); db(0xf2);
+ db(0x35); db(0x40); db(0x00); db(0x0c); db(0x61); db(0x00); db(0xfb); db(0x80);
+ db(0x60); db(0x00); db(0xfd); db(0x16); db(0x4e); db(0x75); db(0x4a); db(0xa9);
+ db(0x01); db(0x84); db(0x67); db(0x14); db(0x4a); db(0xa9); db(0x01); db(0x88);
+ db(0x67); db(0x0e); db(0x30); db(0x3a); db(0xfb); db(0xb8); db(0xb0); db(0x69);
+ db(0x00); db(0x16); db(0x67); db(0x14); db(0x33); db(0x40); db(0x00); db(0x16);
+ db(0x2c); db(0x69); db(0x00); db(0x26); db(0x20); db(0x29); db(0x00); db(0x22);
+ db(0x22); db(0x69); db(0x00); db(0x1e); db(0x4e); db(0xae); db(0xfe); db(0xbc);
+ db(0x53); db(0x69); db(0x00); db(0x42); db(0x6a); db(0x12); db(0x33); db(0x7c);
+ db(0x00); db(0x32); db(0x00); db(0x42); db(0x30); db(0x3c); db(0xff); db(0x38);
+ db(0x72); db(0x02); db(0x61); db(0x00); db(0xf9); db(0xc8); db(0x4e); db(0x90);
+ db(0x41); db(0xf9); db(0x00); db(0xdf); db(0xf0); db(0x00); db(0x70); db(0x00);
+ db(0x4e); db(0x75); db(0x69); db(0x6e); db(0x70); db(0x75); db(0x74); db(0x2e);
+ db(0x64); db(0x65); db(0x76); db(0x69); db(0x63); db(0x65); db(0x00); db(0x74);
+ db(0x69); db(0x6d); db(0x65); db(0x72); db(0x2e); db(0x64); db(0x65); db(0x76);
+ db(0x69); db(0x63); db(0x65); db(0x00); db(0x55); db(0x41); db(0x45); db(0x20);
+ db(0x74); db(0x61); db(0x62); db(0x6c); db(0x65); db(0x74); db(0x20); db(0x64);
+ db(0x72); db(0x69); db(0x76); db(0x65); db(0x72); db(0x00); db(0x55); db(0x41);
+ db(0x45); db(0x20); db(0x66); db(0x69); db(0x6c); db(0x65); db(0x73); db(0x79);
+ db(0x73); db(0x74); db(0x65); db(0x6d); db(0x00); db(0x55); db(0x41); db(0x45);
+ db(0x20); db(0x66); db(0x73); db(0x20); db(0x61); db(0x75); db(0x74); db(0x6f);
+ db(0x6d); db(0x6f); db(0x75); db(0x6e); db(0x74); db(0x65); db(0x72); db(0x00);
+ db(0x55); db(0x41); db(0x45); db(0x20); db(0x66); db(0x73); db(0x20); db(0x61);
+ db(0x75); db(0x74); db(0x6f); db(0x6d); db(0x6f); db(0x75); db(0x6e); db(0x74);
+ db(0x20); db(0x70); db(0x72); db(0x6f); db(0x63); db(0x65); db(0x73); db(0x73);
+ db(0x00); db(0x64); db(0x6f); db(0x73); db(0x2e); db(0x6c); db(0x69); db(0x62);
+ db(0x72); db(0x61); db(0x72); db(0x79); db(0x00); db(0x69); db(0x6e); db(0x74);
+ db(0x75); db(0x69); db(0x74); db(0x69); db(0x6f); db(0x6e); db(0x2e); db(0x6c);
+ db(0x69); db(0x62); db(0x72); db(0x61); db(0x72); db(0x79); db(0x00); db(0x67);
+ db(0x72); db(0x61); db(0x70); db(0x68); db(0x69); db(0x63); db(0x73); db(0x2e);
+ db(0x6c); db(0x69); db(0x62); db(0x72); db(0x61); db(0x72); db(0x79); db(0x00);
+ db(0x65); db(0x78); db(0x70); db(0x61); db(0x6e); db(0x73); db(0x69); db(0x6f);
+ db(0x6e); db(0x2e); db(0x6c); db(0x69); db(0x62); db(0x72); db(0x61); db(0x72);
+ db(0x79); db(0x00); db(0x46); db(0x69); db(0x6c); db(0x65); db(0x53); db(0x79);
+ db(0x73); db(0x74); db(0x65); db(0x6d); db(0x2e); db(0x72); db(0x65); db(0x73);
+ db(0x6f); db(0x75); db(0x72); db(0x63); db(0x65); db(0x00); db(0x00); db(0x00);
+ db(0x00); db(0x00); db(0x03); db(0xf2);
 
index 749f3b3b74cc6f44a3eb3b514c7c28f829bd559c..c49930c063f25e8225838638b7f78539caa60220 100755 (executable)
@@ -71,7 +71,7 @@ extern struct uae_filter uaefilters[];
 extern struct uae_filter *usedfilter;
 
 uae_u8 *getfilterrect1 (RECT *sr, RECT *dr, int dst_depth, int aw, int ah, int scale, int temp_width, int temp_height, uae_u8 *dptr, int pitch);
-void getfilterrect2 (RECT *sr, RECT *dr, int dst_width, int dst_height, int aw, int ah, int scale, int temp_width, int temp_height);
+void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height, int aw, int ah, int scale, int temp_width, int temp_height);
 void getfilteroffset (int *dx, int *dy, int *mx, int *my);
 
 #endif
index 0be34ec9de9237da470acdc8229ec8c4d695dcd5..fb1b18b6e95a3e0c04f0bf404193683050877b58 100755 (executable)
@@ -84,11 +84,12 @@ extern uae_u8 handle_joystick_buttons (uae_u8);
 extern int getbuttonstate (int joy, int button);
 extern int getjoystate (int joy);
 
-extern void togglemouse (void);
 extern int magicmouse_alive (void);
 extern int is_tablet (void);
 extern int inputdevice_is_tablet (void);
-extern void input_mousehack_status (int mode, uaecptr a2, uaecptr a3);
+extern void input_mousehack_status (int mode, uaecptr diminfo, uaecptr dispinfo, uaecptr vp);
+extern int mousehack_alive (void);
+extern void setmouseactive (int);
 
 extern void setmousebuttonstateall (int mouse, uae_u32 buttonbits, uae_u32 buttonmask);
 extern void setjoybuttonstateall (int joy, uae_u32 buttonbits, uae_u32 buttonmask);
index 221fe46f498766ffc12f75d7d9b051d5f429b7d8..30be49b3ea469720664f040b0ad986cd4f1dc72d 100755 (executable)
@@ -8,8 +8,8 @@
   */
 
 #define UAEMAJOR 1
-#define UAEMINOR 5
-#define UAESUBREV 4
+#define UAEMINOR 6
+#define UAESUBREV 0
 
 typedef enum { KBD_LANG_US, KBD_LANG_DK, KBD_LANG_DE, KBD_LANG_SE, KBD_LANG_FR, KBD_LANG_IT, KBD_LANG_ES } KbdLang;
 
index 7ae6764d7070b49e61fd8fde578fc06f9c1dd44e..6a1feede7f39193db6926536dd9b0ef116220f4f 100755 (executable)
@@ -831,12 +831,18 @@ void read_inputdevice_config (struct uae_prefs *pr, char *option, char *value)
     xfree (custom);
 }
 
-static int mouseedge_alive;
+static int mouseedge_alive, mousehack_alive_cnt;
 static int lastmx, lastmy;
 static uaecptr magicmouse_ibase, magicmouse_gfxbase;
 static int dimensioninfo_width, dimensioninfo_height, dimensioninfo_dbl;
+static int vp_xoffset, vp_yoffset;
 static int tablet_maxx, tablet_maxy, tablet_data;
 
+int mousehack_alive (void)
+{
+    return mousehack_alive_cnt > 0 ? mousehack_alive_cnt : 0;
+}
+
 static uaecptr get_base (const char *name)
 {
     uaecptr v = get_long (4);
@@ -929,9 +935,10 @@ static void mousehack_reset (void)
 {
     int off;
 
-    dimensioninfo_width = 0;
-    dimensioninfo_height = 0;
+    dimensioninfo_width = dimensioninfo_height = 0;
     dimensioninfo_dbl = 0;
+    mousehack_alive_cnt = 0;
+    vp_xoffset = vp_yoffset = 0;
     tablet_data = 0;
     if (!uae_boot_rom)
        return;
@@ -955,7 +962,7 @@ static void mousehack_enable (void)
     rtarea[off + MH_E] = mode;
 }
 
-void input_mousehack_status (int mode, uaecptr a2, uaecptr a3)
+void input_mousehack_status (int mode, uaecptr diminfo, uaecptr dispinfo, uaecptr vp)
 {
     if (mode == 0) {
        uae_u8 v = rtarea[12 + get_long (rtarea_base + 36)];
@@ -967,19 +974,31 @@ void input_mousehack_status (int mode, uaecptr a2, uaecptr a3)
        uae_u32 props = 0;
        dimensioninfo_width = -1;
        dimensioninfo_height = -1;
-       if (a2) {
-           x1 = get_word (a2 + 50);
-           y1 = get_word (a2 + 52);
-           x2 = get_word (a2 + 54);
-           y2 = get_word (a2 + 56);
+       vp_xoffset = 0;
+       vp_yoffset = 0;
+       if (diminfo) {
+           x1 = get_word (diminfo + 50);
+           y1 = get_word (diminfo + 52);
+           x2 = get_word (diminfo + 54);
+           y2 = get_word (diminfo + 56);
            dimensioninfo_width = x2 - x1 + 1;
            dimensioninfo_height = y2 - y1 + 1;
        }
-       if (a3)
-           props = get_long (a3 + 18);
+       if (vp) {
+           vp_xoffset = get_word (vp + 28);
+           vp_yoffset = get_word (vp + 30);
+       }
+       if (dispinfo)
+           props = get_long (dispinfo + 18);
        dimensioninfo_dbl = (props & 0x00020000) ? 1 : 0;
-       write_log ("%08x %dx%d %dx%d %s\n", props, x1, y1, x2, y2,
+       write_log ("%08x %08x %08x (%dx%d)-(%dx%d) d=%dx%d %s\n",
+           diminfo, props, vp, x1, y1, x2, y2, vp_xoffset, vp_yoffset,
            (props & 0x00020000) ? "dbl" : "");
+    } else if (mode == 2) {
+       if (mousehack_alive_cnt == 0)
+           mousehack_alive_cnt = -100;
+       else if (mousehack_alive_cnt > 0)
+           mousehack_alive_cnt = 100;
     }
 }
 
@@ -1123,11 +1142,15 @@ void inputdevice_tablet_info (int maxx, int maxy, int maxz, int maxax, int maxay
     p[MH_MAXAZ + 1] = maxaz;
 }
 
+
+void getgfxoffset (int *dx, int *dy, int*,int*);
+
 static void inputdevice_tablet_abs (int x, int y)
 {
     uae_u8 *p;
     uae_u8 tmp[4];
     uae_u32 off;
+    int fdy, fdx, fmx, fmy;
 
     mousehack_enable ();
     off = 12 + get_long (rtarea_base + 36);
@@ -1135,6 +1158,10 @@ static void inputdevice_tablet_abs (int x, int y)
 
     memcpy (tmp, p + MH_ABSX, 4);
 
+    getgfxoffset (&fdx, &fdy, &fmx, &fmy);
+    x -= fdx;
+    y -= fdy;
+
     p[MH_ABSX] = x >> 8;
     p[MH_ABSX + 1] = x;
     p[MH_ABSY] = y >> 8;
@@ -1146,7 +1173,6 @@ static void inputdevice_tablet_abs (int x, int y)
     tablet_data = 1;
 }
 
-void getgfxoffset (int *dx, int *dy, int*,int*);
 static void inputdevice_tablet_abs_v36 (int x, int y)
 {
     uae_u8 *p;
@@ -1164,9 +1190,12 @@ static void inputdevice_tablet_abs_v36 (int x, int y)
     getgfxoffset (&fdx, &fdy, &fmx, &fmy);
     x -= fdx;
     y -= fdy;
+    x += vp_xoffset;
+    y += vp_yoffset;
 
     diffx = diffy = 0;
     maxx = maxy = 0;
+
     if (picasso_on) {
        maxx = picasso96_state.Width;
        maxy = picasso96_state.Height;
@@ -2392,7 +2421,18 @@ void inputdevice_vsync (void)
 #endif
     if (mouseedge ())
        mouseedge_alive = 10;
-
+    if (mousehack_alive_cnt > 0) {
+       mousehack_alive_cnt--;
+       if (mousehack_alive_cnt == 0)
+           setmouseactive (-1);
+    } else if (mousehack_alive_cnt < 0) {
+       mousehack_alive_cnt++;
+       if (mousehack_alive_cnt == 0) {
+           mousehack_alive_cnt = 100;
+           setmouseactive (0);
+           setmouseactive (1);
+       }
+    }
     inputdevice_checkconfig ();
 }
 
@@ -3819,7 +3859,7 @@ void setmousestate (int mouse, int axis, int data, int isabs)
            lastmy = data;
        if (axis)
            mousehack_helper ();
-       if (currprefs.input_tablet == TABLET_MOUSEHACK)
+       if (currprefs.input_tablet == TABLET_MOUSEHACK && mousehack_alive ())
            return;
     }
     v = (int)(d > 0 ? d + 0.5 : d - 0.5);
index 20afbed7e7b903c870c0fe4310e86eb962adce1c..f3b28af78f05da92ac5ba59dbc591f1425ce95aa 100755 (executable)
@@ -1267,6 +1267,15 @@ void comp_fpp_opp (uae_u32 opcode, uae_u16 extra)
                    fmovs_rm(dreg,(uae_u32)temp_fp);
                }
                break;
+           case 0x44: /* FDMOVE */
+               if (prec || !currprefs.fpu_strict) {
+                   if (sreg != dreg) /* no <EA> */
+                       fmov_rr(dreg,sreg);
+               } else {
+                   fmov_mr((uae_u32)temp_fp,sreg);
+                   fmov_rm(dreg,(uae_u32)temp_fp);
+               }
+               break;
            case 0x41: /* FSSQRT */
                fsqrt_rr(dreg,sreg);
                if (!currprefs.fpu_strict) /* faster, but less strict rounding */
@@ -1277,15 +1286,6 @@ void comp_fpp_opp (uae_u32 opcode, uae_u16 extra)
 #endif
                fcuts_r(dreg);
                break;
-           case 0x44: /* FDMOVE */
-               if (prec || !currprefs.fpu_strict) {
-                   if (sreg != dreg) /* no <EA> */
-                       fmov_rr(dreg,sreg);
-               } else {
-                   fmov_mr((uae_u32)temp_fp,sreg);
-                   fmov_rm(dreg,(uae_u32)temp_fp);
-               }
-               break;
            case 0x45: /* FDSQRT */
                if (!currprefs.fpu_strict) { /* faster, but less strict rounding */
                    fsqrt_rr(dreg,sreg);
index f5277b5183d37bf2c9d19148ecbfdadabba59bad..c8f5171cd77d0f8e8815badb5a1b332bfb941bd4 100755 (executable)
--- a/memory.c
+++ b/memory.c
@@ -3005,7 +3005,6 @@ static shmpiece *find_shmpiece (uae_u8 *base)
        x = x->next;
     if (!x) {
        write_log ("NATMEM: Failure to find mapping at %08X, %p\n", base - NATMEM_OFFSET, base);
-       dumplist ();
        nocanbang ();
        return 0;
     }
index 8016ce1c33dc1b0320edef4c3fadc400792e8cc5..f7dc73fa0d75c2c2f960cca9bca1424c60dc83cc 100755 (executable)
@@ -456,7 +456,7 @@ uae_u32 REGPARAM2 ahi_demux (TrapContext *context)
     {
        uae_u32 src, num_vars;
        static int cap_pos, clipsize;
-       static LPTSTR clipdat;
+       static char *clipdat;
 
        case 0:
            cap_pos = 0;
@@ -627,7 +627,7 @@ uae_u32 REGPARAM2 ahi_demux (TrapContext *context)
 
        case 100: // open dll
        {
-           char *dlldir = "winuae_dll";
+           char *dlldir = TEXT ("winuae_dll");
            char *dllname;
            uaecptr dllptr;
            HMODULE h = NULL;
index a31410c8fd3b36b8d8a2e3a8ec94ad2882f0b9e0..ada703795ab393cb9f77b38b1f2596104321f96a 100755 (executable)
@@ -583,7 +583,7 @@ static LPDIRECT3DTEXTURE9 createtext (int *ww, int *hh, D3DFORMAT format)
 
     w = *ww;
     h = *hh;
-    if (tex_pow2) {
+    if (!tex_pow2) {
        if (w < 256)
            w = 256;
        else if (w < 512)
@@ -688,7 +688,6 @@ static int createsltexture (void)
 static void setupscenescaled (void)
 {
     HRESULT hr;
-    RECT sr, dr;
     int v;
 
     // Set up the texture
@@ -711,22 +710,36 @@ static void setupscenescaled (void)
     hr = IDirect3DDevice9_SetSamplerState (d3ddev, 0, D3DSAMP_MINFILTER, v);
     hr = IDirect3DDevice9_SetSamplerState (d3ddev, 0, D3DSAMP_MAGFILTER, v);
     hr = IDirect3DDevice9_SetSamplerState (d3ddev, 0, D3DSAMP_MIPFILTER, D3DTEXF_NONE);
+}
+
+static void setupscenecoords (void)
+{
+    RECT sr, dr, zr;
+    float w, h;
+    float dw, dh;
+
+//    write_log ("%dx%d %dx%d %dx%d\n", twidth, theight, tin_w, tin_h, window_w, window_h);
+
+    getfilterrect2 (&dr, &sr, &zr, window_w, window_h, tin_w, tin_h, 1, tin_w, tin_h);
+//    write_log ("(%d %d %d %d) - (%d %d %d %d) (%d %d)\n",
+//     dr.left, dr.top, dr.right, dr.bottom, sr.left, sr.top, sr.right, sr.bottom, zr.left, zr.top);
+    dw = dr.right - dr.left;
+    dh = dr.bottom - dr.top;
+    w = sr.right - sr.left;
+    h = sr.bottom - sr.top;
+//    write_log ("%.1fx%.1f %.1fx%.1f\n", dw, dh, w, h);
+
+    MatrixOrthoOffCenterLH (&m_matProj, 0, w, 0, h, 0.0f, 1.0f);
 
-    getfilterrect2 (&sr, &dr, window_w, window_h, tin_w, tin_h, 1, tin_w, tin_h);
-    // Projection is screenspace coords
-    MatrixOrthoOffCenterLH (&m_matProj, 0.0f, (float)dr.right - dr.left, 0.0f, (float)dr.bottom - dr.top, 0.0f, 1.0f);
-    //MatrixOrthoOffCenterLH (&m_matProj, 0.0f, (float)Viewport.Width, 0.0f, (float)Viewport.Height, 0.0f, 1.0f);
-    // View matrix does offset
-    // A -0.5f modifier is applied to vertex coordinates to match texture
-    // and screen coords. Some drivers may compensate for this
-    // automatically, but on others texture alignment errors are introduced
-    // More information on this can be found in the Direct3D 9 documentation
     MatrixTranslation (&m_matView,
-       (float)window_w / 2 - 0.5f - dr.left - (window_w - tin_w) / 2,
-       (float)window_h / 2 + 0.5f - dr.top - (window_h - tin_h) / 2,
-       0.0f);
-//    MatrixTranslation (&m_matView, (float)Viewport.Width / 2 - 0.5f , (float)Viewport.Height / 2 + 0.5f, 0.0f);
-    MatrixScaling (&m_matWorld, tin_w, tin_h, 1.0f);
+       -0.5f + dw * tin_w / window_w / 2 - zr.left, // - (tin_w - 2 * zr.left - w),
+        0.5f + dh * tin_h / window_h / 2 - zr.top - (tin_h - 2 * zr.top - h), // <- ???
+       0);
+
+    MatrixScaling (&m_matWorld,
+       dw * tin_w / window_w,
+       dh * tin_h / window_h,
+       1.0f);
 }
 
 static void createvertex (void)
@@ -940,6 +953,7 @@ static int restoredeviceobjects (void)
     hr = IDirect3DDevice9_SetRenderState (d3ddev, D3DRS_ZENABLE, FALSE);
 
     setupscenescaled ();
+    setupscenecoords ();
     settransform ();
 
     return 1;
@@ -987,7 +1001,7 @@ const char *D3D_init (HWND ahwnd, int w_w, int w_h, int t_w, int t_h, int depth)
        strcpy (errmsg, "Direct3D: DirectX 9 or newer required");
        return errmsg;
     } else {
-       typedef HRESULT (WINAPI *LPDIRECT3DCREATE9EX)(UINT, void**);
+       typedef HRESULT (WINAPI *LPDIRECT3DCREATE9EX)(UINT, IDirect3D9Ex**);
         LPDIRECT3DCREATE9EX d3dexp  = (LPDIRECT3DCREATE9EX)GetProcAddress (d3dDLL, "Direct3DCreate9Ex");
        if (d3dexp)
            d3d_ex = TRUE;
@@ -1092,7 +1106,6 @@ const char *D3D_init (HWND ahwnd, int w_w, int w_h, int t_w, int t_h, int depth)
     if(d3dCaps.PixelShaderVersion >= D3DPS_VERSION(2,0)) {
        if((d3dCaps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT) && tex_dynamic) {
            psEnabled = TRUE;
-           tex_square = TRUE;
            tex_pow2 = TRUE;
        } else {
            psEnabled = FALSE;
@@ -1194,8 +1207,9 @@ static void D3D_render2 (int clear)
 
     if (clear) {
        setupscenescaled ();
-       settransform ();
     }
+    setupscenecoords ();
+    settransform ();
     hr = IDirect3DDevice9_BeginScene (d3ddev);
     if (clear)
        hr = IDirect3DDevice9_Clear (d3ddev, 0L, NULL, D3DCLEAR_TARGET, 0x00000000, 1.0f, 0L );
index 2e9783bd8351dce45d00857b2fbbf9612456add5..5bdd3866654b45a583f76c511378df39bc0c421b 100755 (executable)
@@ -32,6 +32,7 @@
 
 #define MULTIDISPLAY 0
 #define P96DX 0
+#define WINCURSOR 0
 
 #include "sysconfig.h"
 #include "sysdeps.h"
@@ -47,6 +48,8 @@
 #include "autoconf.h"
 #include "traps.h"
 #include "native2amiga.h"
+#include "drawing.h"
+#include "inputdevice.h"
 
 #if defined(PICASSO96)
 
@@ -687,6 +690,9 @@ void picasso_handle_vsync (void)
     rp_vsync ();
 #endif
 
+    if (!picasso_on)
+       createwindowscursor (0, 0, 0, 0, 0, 1);
+
     if (currprefs.chipset_refreshrate >= 100) {
        vsynccnt++;
        if (vsynccnt < 2)
@@ -1469,44 +1475,86 @@ static void putmousepixel (uae_u8 *d, int bpp, int idx)
     }
 }
 
-static void putwinmousepixel (HDC andDC, HDC xorDC, int x, int y, int c)
+static void putwinmousepixel (HDC andDC, HDC xorDC, int x, int y, int c, uae_u32 *ct)
 {
     if (c == 0) {
         SetPixel (andDC, x, y, RGB (255, 255, 255));
         SetPixel (xorDC, x, y, RGB (0, 0, 0));
     } else {
-        uae_u32 val = cursorrgbn[c];
+        uae_u32 val = ct[c];
         SetPixel (andDC, x, y, RGB (0, 0, 0));
         SetPixel (xorDC, x, y, RGB ((val >> 16) & 0xff, (val >> 8) & 0xff, val & 0xff));
     }
 }
 
 static int wincursorcnt;
-void picasso_setwincursor (void)
-{
-    if (wincursor) {
-       SetCursor (wincursor);
-    } else {
-       SetCursor (NULL);
-    }
-}
+static int tmp_sprite_w, tmp_sprite_h, tmp_sprite_hires, tmp_sprite_doubled;
+static uae_u8 *tmp_sprite_data;
+static uae_u32 tmp_sprite_colors[4];
 
-static int createwindowscursor (uaecptr src, int w, int h, int hiressprite, int doubledsprite)
+extern uaecptr sprite_0;
+extern int sprite_0_width, sprite_0_height, sprite_0_doubled;
+extern uae_u32 sprite_0_colors[4];
+
+int createwindowscursor (uaecptr src, int w, int h, int hiressprite, int doubledsprite, int chipset)
 {
     HBITMAP andBM, xorBM;
     HBITMAP andoBM, xoroBM;
     HDC andDC, xorDC, DC, mainDC;
     ICONINFO ic;
-    int x, y, yy;
-    int ret, isdata;
+    int x, y, yy, w2, h2;
+    int ret, isdata, datasize;
+    HCURSOR oldwincursor = wincursor;
+    uae_u8 *realsrc;
+    uae_u32 *ct;
 
     ret = 0;
-    if (wincursor)
-       DestroyIcon (wincursor);
-    wincursor = NULL;
     wincursor_shown = 0;
+
     if (isfullscreen () > 0 || currprefs.input_tablet == 0 || currprefs.input_magic_mouse == 0)
-       return 0;
+       goto exit;
+
+    if (chipset) {
+       if (!sprite_0 || !mousehack_alive ()) {
+           if (wincursor)
+               SetCursor (normalcursor);
+           goto exit;
+       }
+       w2 = w = sprite_0_width;
+       h2 = h = sprite_0_height;
+       hiressprite = sprite_0_width / 16;
+       doubledsprite = sprite_0_doubled;
+       if (doubledsprite) {
+           h2 *= 2;
+           w2 *= 2;
+       }
+       src = sprite_0;
+       ct = sprite_0_colors;
+    } else {
+       h2 = h;
+       w2 = w;
+       ct = cursorrgbn;
+    }
+    datasize = h * ((w + 15) / 16) * 4;
+    realsrc = get_real_address (src);
+
+    if (w > 64 || h > 64)
+       goto exit;
+
+    if (wincursor && tmp_sprite_data) {
+       if (w == tmp_sprite_w && h == tmp_sprite_h &&
+           !memcmp (tmp_sprite_data, realsrc, datasize) && !memcmp (tmp_sprite_colors, ct, sizeof (uae_u32)*4)
+           && hiressprite == tmp_sprite_hires && doubledsprite == tmp_sprite_doubled
+       ) {
+           if (GetCursor () == wincursor)
+               return 1;
+       }
+    }
+    write_log ("wincursor: %dx%d hires=%d doubled=%d\n", w2, h2, hiressprite, doubledsprite);
+
+    xfree (tmp_sprite_data);
+    tmp_sprite_data = NULL;
+    tmp_sprite_w = tmp_sprite_h = 0;
 
     DC = mainDC = andDC = xorDC = NULL;
     andBM = xorBM = NULL;
@@ -1518,42 +1566,42 @@ static int createwindowscursor (uaecptr src, int w, int h, int hiressprite, int
     xorDC = CreateCompatibleDC (DC);
     if (!mainDC || !andDC || !xorDC)
        goto end;
-    andBM = CreateCompatibleBitmap (DC, w, h);
-    xorBM = CreateCompatibleBitmap (DC, w, h);
+    andBM = CreateCompatibleBitmap (DC, w2, h2);
+    xorBM = CreateCompatibleBitmap (DC, w2, h2);
     if (!andBM || !xorBM)
        goto end;
     andoBM = SelectObject (andDC, andBM);
     xoroBM = SelectObject (xorDC, xorBM);
 
     isdata = 0;
-    for (y = 0, yy = 0; y < h; yy++) {
+    for (y = 0, yy = 0; y < h2; yy++) {
        int dbl;
        uaecptr img = src + yy * 4 * hiressprite;
        for (dbl = 0; dbl < (doubledsprite ? 2 : 1); dbl++) {
            x = 0;
-           while (x < w) {
+           while (x < w2) {
                uae_u32 d1 = get_long (img);
                uae_u32 d2 = get_long (img + 2 * hiressprite);
                int bits;
-               int maxbits = w - x;
+               int maxbits = w2 - x;
 
                if (maxbits > 16 * hiressprite)
                    maxbits = 16 * hiressprite;
-               for (bits = 0; bits < maxbits && x < w; bits++) {
+               for (bits = 0; bits < maxbits && x < w2; bits++) {
                    uae_u8 c = ((d2 & 0x80000000) ? 2 : 0) + ((d1 & 0x80000000) ? 1 : 0);
                    d1 <<= 1;
                    d2 <<= 1;
-                   putwinmousepixel (andDC, xorDC, x, y, c);
+                   putwinmousepixel (andDC, xorDC, x, y, c, ct);
                    if (c > 0)
                        isdata = 1;
                    x++;
-                   if (doubledsprite && x < w) {
-                       putwinmousepixel (andDC, xorDC, x, y, c);
+                   if (doubledsprite && x < w2) {
+                       putwinmousepixel (andDC, xorDC, x, y, c, ct);
                        x++;
                    }
                }
            }
-           if (y <= h)
+           if (y <= h2)
                y++;
        }
     }
@@ -1575,6 +1623,13 @@ end:
        ic.hbmColor = xorBM;
        ic.hbmMask = andBM;
        wincursor = CreateIconIndirect (&ic);
+       tmp_sprite_w = w;
+       tmp_sprite_h = h;
+       tmp_sprite_data = xmalloc (datasize);
+       tmp_sprite_hires = hiressprite;
+       tmp_sprite_doubled = doubledsprite;
+       memcpy (tmp_sprite_data, realsrc, datasize);
+       memcpy (tmp_sprite_colors, ct, sizeof (uae_u32) * 4);
     }
 
     DeleteObject (andBM);
@@ -1582,14 +1637,36 @@ end:
     
     if (wincursor) {
        SetCursor (wincursor);
+#if WINCURSOR > 0
        wincursor_shown = 1;
+#endif
     }
 
     if (!ret)
        write_log ("RTG Windows color cursor creation failed\n");
+
+exit:
+    if (wincursor == oldwincursor)
+       SetCursor (normalcursor);
+    if (oldwincursor)
+       DestroyIcon (oldwincursor);
+    oldwincursor = NULL;
+
     return ret;
 }
 
+int picasso_setwincursor (void)
+{
+    if (wincursor) {
+       SetCursor (wincursor);
+       return 1;
+    } else if (!picasso_on) {
+       if (createwindowscursor (0, 0, 0, 0, 0, 1))
+           return 1;
+    }
+    return 0;
+}
+
 static uae_u32 setspriteimage (uaecptr bi)
 {
     DDSURFACEDESC2 desc;
@@ -1636,7 +1713,7 @@ static uae_u32 setspriteimage (uaecptr bi)
     }
 
     createwindowscursor (get_long (bi + PSSO_BoardInfo_MouseImage) + 4 * hiressprite,
-       w, h, hiressprite, doubledsprite);
+       w, h, hiressprite, doubledsprite, 0);
 
     tmpbuf = xmalloc (w * h * bpp);
     for (y = 0, yy = 0; y < h; y++, yy++) {
@@ -4231,12 +4308,12 @@ static uaecptr inituaegfxfuncs (uaecptr start, uaecptr ABI)
 
     /* GetCompatibleFormats
        ; all formats can coexist without any problems, since we don't support planar stuff in UAE
-       move.l  #~RGBFF_PLANAR,d0
+       move.l  #RGBMASK_8BIT | RGBMASK_15BIT | RGBMASK_16BIT | RGBMASK_24BIT | RGBMASK_32BIT,d0
        rts
     */
     PUTABI (PSSO_BoardInfo_GetCompatibleFormats);
     dw (0x203c);
-    dl (0xfffffffe);
+    dl (RGBMASK_8BIT | RGBMASK_15BIT | RGBMASK_16BIT | RGBMASK_24BIT | RGBMASK_32BIT);
     dw (RTS);
 
     /* CalculateBytesPerRow (optimized) */
index d9957dfd6bb5980a232ec01f4e1c1fa1b6ad2b66..6eec673d58b79e184d95b278b61a4247fc9c535a 100755 (executable)
@@ -559,7 +559,7 @@ extern void init_hz_p96 (void);
 extern void picasso_handle_hsync (void);
 extern int picasso_palette (void);
 extern void picasso_reset (void);
-extern void picasso_setwincursor (void);
+extern int picasso_setwincursor (void);
 
 /* This structure describes the UAE-side framebuffer for the Picasso
  * screen.  */
@@ -583,6 +583,7 @@ extern void gfx_unlock_picasso (void);
 extern void picasso_clip_mouse (int *, int *);
 extern void picasso_putcursor (int,int,int,int);
 extern void picasso_clearcursor (void);
+extern int createwindowscursor (uaecptr src, int w, int h, int hiressprite, int doubledsprite, int chipset);
 
 extern int p96refresh_active;
 extern int p96hsync_counter;
index 8435e167b924abcf43a4f03208fa52d8dea4a17c..d3f77dc96009877b7a826965975aca9c2af71bbf 100755 (executable)
 #define IDC_FILTERVZMULT                1635
 #define IDC_SOUNDPRIMARY                1636
 #define IDC_MINIMIZED_PRI               1636
+#define IDC_FILTERFILTER2               1636
+#define IDC_FILTERAUTOSCALE             1636
 #define IDC_VOLUME_BOOTPRI_TEXT         1637
 #define IDC_VOLUME_BOOTPRI              1638
 #define IDC_KBLED1                      1639
 #define IDC_SCSIMODE2                   1706
 #define IDC_LANGUAGE                    1706
 #define IDC_CREATE_NAME                 1707
-#define IDC_FILTERAUTORES               1708
 #define IDC_SOUND_AUTO                  1709
 #define IDC_FILTERKEEPASPECT            1709
 #define IDC_CS_RTC                      1710
index cda98441ea909c50342ce2fa22fac0968bc8fe17..bf961dfa0605c1f22397aa440edb424589310858 100755 (executable)
@@ -378,13 +378,13 @@ BEGIN
     RTEXT           "Port 1:",IDC_STATIC,11,49,25,15,SS_CENTERIMAGE\r
     LTEXT           "X-Arcade layout information []#1",IDC_STATIC,16,68,106,15,SS_NOTIFY | SS_CENTERIMAGE\r
     GROUPBOX        "Mouse and Joystick settings",IDC_STATIC,4,15,292,76\r
-    GROUPBOX        "Mouse extra settings",IDC_STATIC,4,92,292,79\r
+    GROUPBOX        "Mouse extra settings",IDC_STATIC,4,92,292,67\r
     RTEXT           "Mouse speed:",IDC_STATIC,17,106,56,10,SS_CENTERIMAGE\r
     EDITTEXT        IDC_INPUTSPEEDM,87,106,25,12,ES_NUMBER\r
-    CONTROL         "Drawing tablet support",IDC_PORT_TABLET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,167,113,110,10\r
+    CONTROL         "Install virtual mouse driver",IDC_PORT_TABLET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,167,123,120,10\r
     CONTROL         "Full tablet input emulation",IDC_PORT_TABLET_FULL,\r
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,167,127,110,10\r
-    CONTROL         "Magic Mouse",IDC_PORT_MOUSETRICK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,21,122,119,10\r
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,167,137,121,10\r
+    CONTROL         "Magic Mouse",IDC_PORT_MOUSETRICK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,167,109,119,10\r
 END\r
 \r
 IDD_CONTRIBUTORS DIALOGEX 0, 0, 411, 242\r
@@ -679,41 +679,42 @@ BEGIN
     PUSHBUTTON      "Swap 1<>2",IDC_INPUTSWAP,249,226,45,14\r
 END\r
 \r
-IDD_FILTER DIALOGEX 0, 0, 296, 224\r
+IDD_FILTER DIALOGEX 0, 0, 296, 241\r
 STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
 FONT 8, "MS Sans Serif", 0, 0, 0x1\r
 BEGIN\r
-    GROUPBOX        "Filter Settings",-1,0,0,294,186\r
+    GROUPBOX        "Filter Settings",-1,0,1,294,199\r
     COMBOBOX        IDC_FILTERMODE,20,15,103,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
     COMBOBOX        IDC_FILTERFILTER,132,15,83,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
     PUSHBUTTON      "Reset to defaults",IDC_FILTERDEFAULT,221,15,67,14\r
-    RTEXT           "Horiz. size:",-1,7,44,54,10,SS_CENTERIMAGE\r
-    CONTROL         "Slider1",IDC_FILTERHZ,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,37,152,19\r
-    EDITTEXT        IDC_FILTERHZV,253,39,34,12,ES_CENTER | ES_READONLY\r
-    RTEXT           "Vert. size:",-1,7,64,54,10,SS_CENTERIMAGE\r
-    CONTROL         "Slider1",IDC_FILTERVZ,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,57,152,19\r
-    EDITTEXT        IDC_FILTERVZV,253,59,34,12,ES_CENTER | ES_READONLY\r
-    RTEXT           "Horiz. position:",-1,5,84,55,10,SS_CENTERIMAGE\r
-    CONTROL         "Slider1",IDC_FILTERHO,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,77,151,19\r
-    EDITTEXT        IDC_FILTERHOV,253,79,34,12,ES_CENTER | ES_READONLY\r
-    RTEXT           "Vert. position:",-1,5,103,55,10,SS_CENTERIMAGE\r
-    CONTROL         "Slider1",IDC_FILTERVO,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,97,151,19\r
-    EDITTEXT        IDC_FILTERVOV,253,99,34,12,ES_CENTER | ES_READONLY\r
-    RTEXT           "Extra settings:",-1,27,137,57,10,SS_CENTERIMAGE\r
-    CONTROL         "Slider1",IDC_FILTERXL,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,157,151,19\r
-    EDITTEXT        IDC_FILTERXLV,253,159,34,12,ES_CENTER | ES_READONLY\r
-    COMBOBOX        IDC_FILTERSLR,253,134,33,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    GROUPBOX        "Presets",-1,0,187,296,36\r
-    COMBOBOX        IDC_FILTERPRESETS,8,201,119,150,CBS_DROPDOWN | CBS_SORT | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    PUSHBUTTON      "Load",IDC_FILTERPRESETLOAD,132,200,47,14\r
-    PUSHBUTTON      "Save",IDC_FILTERPRESETSAVE,184,200,47,14\r
-    PUSHBUTTON      "Delete",IDC_FILTERPRESETDELETE,236,200,47,14\r
-    COMBOBOX        IDC_FILTERHZMULT,67,43,27,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_FILTERVZMULT,67,63,27,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    CONTROL         "Autoscale",IDC_FILTERAUTORES,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,9,168,83,10\r
-    COMBOBOX        IDC_FILTERXTRA,105,134,138,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_FILTERASPECT,20,118,73,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    CONTROL         "Keep aspect ratio",IDC_FILTERKEEPASPECT,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,9,153,85,10\r
+    RTEXT           "Horiz. size:",-1,7,61,54,10,SS_CENTERIMAGE\r
+    CONTROL         "Slider1",IDC_FILTERHZ,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,54,152,19\r
+    EDITTEXT        IDC_FILTERHZV,253,56,34,12,ES_CENTER | ES_READONLY\r
+    RTEXT           "Vert. size:",-1,7,81,54,10,SS_CENTERIMAGE\r
+    CONTROL         "Slider1",IDC_FILTERVZ,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,74,152,19\r
+    EDITTEXT        IDC_FILTERVZV,253,76,34,12,ES_CENTER | ES_READONLY\r
+    RTEXT           "Horiz. position:",-1,5,101,55,10,SS_CENTERIMAGE\r
+    CONTROL         "Slider1",IDC_FILTERHO,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,94,151,19\r
+    EDITTEXT        IDC_FILTERHOV,253,96,34,12,ES_CENTER | ES_READONLY\r
+    RTEXT           "Vert. position:",-1,5,120,55,10,SS_CENTERIMAGE\r
+    CONTROL         "Slider1",IDC_FILTERVO,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,114,151,19\r
+    EDITTEXT        IDC_FILTERVOV,253,116,34,12,ES_CENTER | ES_READONLY\r
+    RTEXT           "Extra settings:",-1,27,154,57,10,SS_CENTERIMAGE\r
+    CONTROL         "Slider1",IDC_FILTERXL,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,174,151,19\r
+    EDITTEXT        IDC_FILTERXLV,253,176,34,12,ES_CENTER | ES_READONLY\r
+    COMBOBOX        IDC_FILTERSLR,253,151,33,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
+    GROUPBOX        "Presets",-1,0,203,296,36\r
+    COMBOBOX        IDC_FILTERPRESETS,8,217,119,150,CBS_DROPDOWN | CBS_SORT | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
+    PUSHBUTTON      "Load",IDC_FILTERPRESETLOAD,132,216,47,14\r
+    PUSHBUTTON      "Save",IDC_FILTERPRESETSAVE,184,216,47,14\r
+    PUSHBUTTON      "Delete",IDC_FILTERPRESETDELETE,236,216,47,14\r
+    COMBOBOX        IDC_FILTERHZMULT,67,60,27,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
+    COMBOBOX        IDC_FILTERVZMULT,67,80,27,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
+    COMBOBOX        IDC_FILTERXTRA,105,151,138,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
+    COMBOBOX        IDC_FILTERASPECT,20,135,73,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
+    CONTROL         "Keep aspect ratio",IDC_FILTERKEEPASPECT,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,9,170,85,10\r
+    RTEXT           "Automatic scaling:",-1,9,38,79,10,SS_CENTERIMAGE\r
+    COMBOBOX        IDC_FILTERAUTOSCALE,105,36,140,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
 END\r
 \r
 IDD_HARDDRIVE DIALOGEX 0, 0, 380, 76\r
@@ -807,7 +808,7 @@ BEGIN
     PUSHBUTTON      "Reset to defaults",IDC_PATHS_DEFAULT,14,184,92,14\r
     PUSHBUTTON      "Rescan ROMs",IDC_ROM_RESCAN,14,200,92,14\r
     PUSHBUTTON      "Clear registry",IDC_RESETREGISTRY,111,200,92,14\r
-    COMBOBOX        IDC_PATHS_DEFAULTTYPE,112,184,163,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
+    COMBOBOX        IDC_PATHS_DEFAULTTYPE,111,184,163,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
     PUSHBUTTON      "Clear disk history",IDC_RESETDISKHISTORY,14,216,92,14\r
     CONTROL         "Cache Configuration files",IDC_PATHS_CONFIGCACHE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,177,34,117,10\r
 END\r
@@ -958,8 +959,8 @@ IDI_PATHS               ICON                    "paths.ico"
 //\r
 \r
 VS_VERSION_INFO VERSIONINFO\r
- FILEVERSION 1,5,3,0\r
- PRODUCTVERSION 1,5,3,0\r
+ FILEVERSION 1,6,0,0\r
+ PRODUCTVERSION 1,6,0,0\r
  FILEFLAGSMASK 0x3fL\r
 #ifdef _DEBUG\r
  FILEFLAGS 0x1L\r
@@ -975,12 +976,12 @@ BEGIN
         BLOCK "040904b0"\r
         BEGIN\r
             VALUE "FileDescription", "WinUAE"\r
-            VALUE "FileVersion", "1.5.3"\r
+            VALUE "FileVersion", "1.6.0"\r
             VALUE "InternalName", "WinUAE"\r
-            VALUE "LegalCopyright", "© 1996-2008 under the GNU Public License (GPL)"\r
+            VALUE "LegalCopyright", "© 1996-2009 under the GNU Public License (GPL)"\r
             VALUE "OriginalFilename", "WinUAE.exe"\r
             VALUE "ProductName", "WinUAE"\r
-            VALUE "ProductVersion", "1.5.3"\r
+            VALUE "ProductVersion", "1.6.0"\r
         END\r
     END\r
     BLOCK "VarFileInfo"\r
@@ -1103,6 +1104,11 @@ BEGIN
     BEGIN\r
         BOTTOMMARGIN, 180\r
     END\r
+\r
+    IDD_FILTER, DIALOG\r
+    BEGIN\r
+        BOTTOMMARGIN, 237\r
+    END\r
 END\r
 #endif    // APSTUDIO_INVOKED\r
 \r
index e9f6f8b793ad20b621e22ae44864cd30663534b5..f32a15e577441534399ea3dfcca24cf00ed4a3a8 100755 (executable)
@@ -109,6 +109,7 @@ static HWND TaskbarRestartHWND;
 static int forceroms;
 static int start_data = 0;
 static void *tablet;
+HCURSOR normalcursor;
 
 char VersionStr[256];
 char BetaStr[64];
@@ -343,13 +344,15 @@ static void setcursor (int oldx, int oldy)
     mouseposx = oldx - x;
     mouseposy = oldy - y;
 
-    if (currprefs.input_magic_mouse && currprefs.input_tablet > 0) {
+    if (currprefs.input_magic_mouse && currprefs.input_tablet > 0 && mousehack_alive () && isfullscreen () <= 0) {
        mouseposx = mouseposy = 0;
        return;
     }
-//  write_log ("%d %d %d %d %d - %d %d %d %d %d\n",
-//     x, amigawin_rect.left, amigawin_rect.right, mouseposx, oldx,
-//     y, amigawin_rect.top, amigawin_rect.bottom, mouseposy, oldy);
+#if 0
+    write_log ("%d %d %d %d %d - %d %d %d %d %d\n",
+       x, amigawin_rect.left, amigawin_rect.right, mouseposx, oldx,
+       y, amigawin_rect.top, amigawin_rect.bottom, mouseposy, oldy);
+#endif
     if (oldx >= 30000 || oldy >= 30000 || oldx <= -30000 || oldy <= -30000) {
        mouseposx = mouseposy = 0;
        oldx = oldy = 0;
@@ -477,6 +480,12 @@ void setpriority (struct threadpriorities *pri)
        write_log ("priority set failed, %08X\n", GetLastError ());
 }
 
+static void setcursorshape (void)
+{
+    if (!picasso_setwincursor ())
+       SetCursor (normalcursor);
+}
+
 static void releasecapture (void)
 {
     if (!showcursor)
@@ -494,8 +503,15 @@ void setmouseactive (int active)
     if (mouseactive == active && active >= 0)
        return;
 
+    if (active > 0) {
+       HANDLE c = GetCursor ();
+       if (c != normalcursor)
+           return;
+    }
+
     if (active < 0)
        active = 1;
+
     mouseactive = active;
 
     mouseposx = mouseposy = 0;
@@ -503,8 +519,11 @@ void setmouseactive (int active)
     releasecapture ();
     recapture = 0;
 
-    if (currprefs.input_magic_mouse && currprefs.input_tablet > 0)
-       return;
+    if (isfullscreen () <= 0 && currprefs.input_magic_mouse && currprefs.input_tablet > 0) {
+       if (mousehack_alive ())
+           return;
+       SetCursor (normalcursor);
+    }
 
     if (mouseactive > 0)
        focus = 1;
@@ -748,7 +767,7 @@ static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
     return 0;
     case WM_LBUTTONDOWN:
     case WM_LBUTTONDBLCLK:
-       if (!mouseactive && isfullscreen() <= 0 && !gui_active) {
+       if (!mouseactive && isfullscreen() <= 0 && !gui_active && !mousehack_alive ()) {
            setmouseactive (1);
        } else if (dinput_winmouse () >= 0) {
            setmousebuttonstate (dinput_winmouse (), 0, 1);
@@ -799,7 +818,6 @@ static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
     case WM_MOUSEWHEEL:
        if (dinput_winmouse () >= 0) {
            int val = ((short)HIWORD (wParam));
-           //write_log ("dinput_winmouse=%d dinput_wheelbuttonstart=%d wheel=%d\n", dinput_winmouse(), dinput_wheelbuttonstart(), val);
            setmousestate (dinput_winmouse (), 2, val, 0);
            if (val < 0)
                setmousebuttonstate (dinput_winmouse (), dinput_wheelbuttonstart () + 0, -1);
@@ -807,7 +825,6 @@ static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
                setmousebuttonstate (dinput_winmouse (), dinput_wheelbuttonstart () + 1, -1);
            return TRUE;
        }
-       //write_log ("dinput_winmouse() = %d\n", dinput_winmouse());
     return 0;
     case WM_MOUSEHWHEEL:
        if (dinput_winmouse () >= 0) {
@@ -861,6 +878,7 @@ static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
 #endif
        DragAcceptFiles (hWnd, TRUE);
        tablet = open_tablet (hWnd);
+       normalcursor = LoadCursor (NULL, IDC_ARROW);
     return 0;
 
     case WM_DESTROY:
@@ -896,15 +914,9 @@ static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
 
     case WM_SETCURSOR:
     {
-       static HCURSOR oldcursor;
-       if ((HWND)wParam == hAmigaWnd && currprefs.input_tablet > 0 && currprefs.input_magic_mouse) {
-           if (oldcursor == NULL)
-               oldcursor = LoadCursor (NULL, IDC_ARROW);
-           if (picasso_on) {
-               picasso_setwincursor ();
-               return 1;
-           } else {
-               SetCursor (oldcursor);
+       if ((HWND)wParam == hAmigaWnd && currprefs.input_tablet > 0 && currprefs.input_magic_mouse && isfullscreen () <= 0) {
+           if (mousehack_alive ()) {
+               setcursorshape ();
                return 1;
            }
        }
@@ -1183,6 +1195,8 @@ static int canstretch (void)
 {
     if (isfullscreen () != 0)
        return 0;
+    if (currprefs.gfx_filter_autoscale == 2)
+       return 0;
     if (!WIN32GFX_IsPicassoScreen ())
        return 1;
     if (currprefs.win32_rtgallowscaling)
@@ -1844,7 +1858,7 @@ void logging_init(void)
        SystemInfo.wProcessorLevel, SystemInfo.wProcessorRevision,
        SystemInfo.dwNumberOfProcessors);
     write_log ("\n(c) 1995-2001 Bernd Schmidt   - Core UAE concept and implementation."
-              "\n(c) 1998-2008 Toni Wilen      - Win32 port, core code updates."
+              "\n(c) 1998-2009 Toni Wilen      - Win32 port, core code updates."
               "\n(c) 1996-2001 Brian King      - Win32 port, Picasso96 RTG, and GUI."
               "\n(c) 1996-1999 Mathias Ortmann - Win32 port and bsdsocket support."
               "\n(c) 2000-2001 Bernd Meyer     - JIT engine."
@@ -2786,9 +2800,11 @@ static void WIN32_HandleRegistryStuff(void)
     char version[100];
 
     hWinUAEKey = NULL;
-    /* Create/Open the hWinUAEKey which points our config-info */
-    RegCreateKeyEx (HKEY_CURRENT_USER, "Software\\Arabuusimiehet\\WinUAE", 0, "", REG_OPTION_NON_VOLATILE,
-         KEY_WRITE | KEY_READ, NULL, &hWinUAEKey, &disposition);
+    if (getregmode () == 0 || WINUAEPUBLICBETA > 0) {
+       /* Create/Open the hWinUAEKey which points our config-info */
+       RegCreateKeyEx (HKEY_CURRENT_USER, "Software\\Arabuusimiehet\\WinUAE", 0, "", REG_OPTION_NON_VOLATILE,
+           KEY_WRITE | KEY_READ, NULL, &hWinUAEKey, &disposition);
+    }
     initpath ("FloppyPath", start_path_data);
     initpath ("KickstartPath", start_path_data);
     initpath ("hdfPath", start_path_data);
@@ -3297,7 +3313,7 @@ static void makeverstr(char *s)
 static int multi_display = 1;
 static char *inipath = NULL;
 
-static int process_arg(char **xargv)
+static int process_arg (char **xargv)
 {
     int i, argc, xargc;
     char **argv;
@@ -3563,7 +3579,7 @@ static int PASCAL WinMain2 (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR
            write_log ("%d:%s: %s\n", i, record_devices[i].type == SOUND_DEVICE_DS ? "DS" : "AL", record_devices[i].name);
        }
        write_log ("done\n");
-       memset (&devmode, 0, sizeof(devmode));
+       memset (&devmode, 0, sizeof (devmode));
        devmode.dmSize = sizeof (DEVMODE);
        if (EnumDisplaySettings (NULL, ENUM_CURRENT_SETTINGS, &devmode)) {
            default_freq = devmode.dmDisplayFrequency;
index 07aeca93558000c7fb235d907299b5176bc26d8b..1e82db7628ebfb19913091d9c8f764077fee4d9d 100755 (executable)
@@ -17,8 +17,8 @@
 
 #define WINUAEPUBLICBETA 1
 
-#define WINUAEBETA "6"
-#define WINUAEDATE MAKEBD(2008, 12, 26)
+#define WINUAEBETA "7"
+#define WINUAEDATE MAKEBD(2009, 1, 3)
 #define WINUAEEXTRA ""
 #define WINUAEREV ""
 
index bff1ed4156d6d2b65938f590298e297ded17c453..d021fef18f7f47e3360327eab76707c5960f9891 100755 (executable)
@@ -49,8 +49,8 @@ static uae_u32 rc[256], gc[256], bc[256];
 
 void getfilteroffset (int *dx, int *dy, int *mx, int *my)
 {
-    *dx = (dst_width - amiga_width * 1000 / filterxmult) / 2;
-    *dy = (dst_height - amiga_height * 1000 / filterymult) / 2;
+    *dx = filteroffsetx;
+    *dy = filteroffsety;
     *mx = filterxmult;
     *my = filterymult;
 }
@@ -86,20 +86,26 @@ uae_u8 *getfilterrect1 (RECT *sr, RECT *dr, int dst_depth, int aw, int ah, int s
     return dptr;
 }
 
-void getfilterrect2 (RECT *sr, RECT *dr, int dst_width, int dst_height, int aw, int ah, int scale, int temp_width, int temp_height)
+static void sizeoffset (RECT *dr, RECT *zr, int w, int h)
+{
+    dr->right -= w;
+    dr->bottom -= h;
+    OffsetRect (zr, w / 2, h / 2);
+}
+
+void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height, int aw, int ah, int scale, int temp_width, int temp_height)
 {
     int aws, ahs;
     int xs, ys;
     int xmult, ymult;
-    int v, xy;
-
-    xy = 1;
+    int v;
 
     ah = vblscale (ah);
     aws = aw * scale;
     ahs = ah * scale;
 
     SetRect (sr, 0, 0, dst_width, dst_height);
+    SetRect (zr, 0, 0, 0, 0);
     dr->left = (temp_width - aws) /2;
     dr->top =  (temp_height - ahs) / 2;
     dr->left -= (dst_width - aws) / 2;
@@ -107,34 +113,64 @@ void getfilterrect2 (RECT *sr, RECT *dr, int dst_width, int dst_height, int aw,
     dr->right = dr->left + dst_width;
     dr->bottom = dr->top + dst_height;
 
-
     xmult = currprefs.gfx_filter_horiz_zoom_mult;
     ymult = currprefs.gfx_filter_vert_zoom_mult;
     if (currprefs.gfx_filter_autoscale) {
-       int w, h, x, y, v;
+       int cw, ch, cx, cy, cv;
        int extraw = currprefs.gfx_filter_horiz_zoom;
        int extrah = currprefs.gfx_filter_vert_zoom;
        static int oxmult, oymult;
+
+       filterxmult = 1000 / scale;
+       filterymult = 1000 / scale;
+       filteroffsetx = 0;
+       filteroffsety = 0;
+
        xmult = 1000;
        ymult = 1000;
-       v = get_custom_limits (&w, &h, &x, &y);
-       if (v) {
+        cv = get_custom_limits (&cw, &ch, &cx, &cy);
+       if (cv) {
            int diff;
+
+           extraw = amiga_width * extraw / 2000;
+           extrah = amiga_height * extrah / 2000;
+
+           if (currprefs.gfx_filter_autoscale == 2 && isfullscreen () == 0) {
+               int ww;
+               SetRect (sr, 0, 0, cw * scale, ch * scale);
+               dr->left = (temp_width - aws) /2;
+               dr->top =  (temp_height - ahs) / 2;
+               dr->right = dr->left + cw * scale;
+               dr->bottom = dr->top + ch * scale;
+               OffsetRect (zr, cx * scale, cy * scale);
+               ww = dr->right - dr->left;
+               changed_prefs.gfx_size_win.width = ww;
+               changed_prefs.gfx_size_win.height = dr->bottom - dr->top;
+               fixup_prefs_dimensions (&changed_prefs);
+               OffsetRect (zr, -(changed_prefs.gfx_size_win.width - ww + 1) / 2, 0);
+               filteroffsetx = -zr->left / scale;
+               filteroffsety = -zr->top / scale;
+               return;
+           }
+
            dr->left = (temp_width - aws) /2;
            dr->top =  (temp_height - ahs) / 2;
            dr->right = dr->left + dst_width * scale;
            dr->bottom = dr->top + dst_height * scale;
-           OffsetRect (dr, x * scale, y * scale);
-           dr->right -= (dst_width - w) * scale;
-           dr->bottom -= (dst_height - h) * scale;
-           dr->left -= dst_width * extraw / 1000;
-           dr->top -= dst_width * extrah / 1000;
-           dr->right += dst_width * extraw / 1000;
-           dr->bottom += dst_width * extrah / 1000;
+
+           OffsetRect (zr, cx * scale, cy * scale);
            
+           sizeoffset (dr, zr, extraw, extrah);
+
+           dr->right -= (dst_width - cw) * scale;
+           dr->bottom -= (dst_height - ch) * scale;
+
+           filteroffsetx = -zr->left / scale;
+           filteroffsety = -zr->top / scale;
+
            if (currprefs.gfx_filter_keep_aspect || currprefs.gfx_filter_aspect > 0) {
-               int xratio = dst_width * 256 / w;
-               int yratio = dst_height * 256 / h;
+               int xratio = dst_width * 256 / cw;
+               int yratio = dst_height * 256 / ch;
                int diffx = dr->right - dr->left;
                int diffy = dr->bottom - dr->top;
                
@@ -146,21 +182,23 @@ void getfilterrect2 (RECT *sr, RECT *dr, int dst_width, int dst_height, int aw,
 
                if (xratio > yratio) {
                    diff = diffx - diffx * yratio / xratio;
-                   dr->right += diff / 2;
-                   dr->left -= diff / 2;
+                   sizeoffset (dr, zr, -diff, 0);
+                   filteroffsetx += (diff * cw / dst_width) / 2;
                } else {
                    diff = diffx - diffx * xratio / yratio;
-                   dr->bottom += diff / 2;
-                   dr->top -= diff / 2;
+                   sizeoffset (dr, zr, 0, -diff);
+                   filteroffsety += diff / 2;
                }
            }
            diff = dr->right - dr->left;
-           filterxmult = diff * 1000 / dst_width;
+           filterxmult = diff * 1000 / (dst_width * scale);
            diff = dr->bottom - dr->top;
-           filterymult = diff * 1000 / dst_height;
+           filterymult = diff * 1000 / (dst_height * scale);
            return;
        }
-    } else if (currprefs.gfx_filter_keep_aspect && !xmult && !ymult) {
+    }
+    
+    if (currprefs.gfx_filter_keep_aspect && !xmult && !ymult) {
         xmult = aws * 1000 / dst_width;
         ymult = ahs * 1000 / dst_height;
        if (xmult < ymult)
@@ -189,23 +227,20 @@ void getfilterrect2 (RECT *sr, RECT *dr, int dst_width, int dst_height, int aw,
            ymult = ymult * dstratio / srcratio;
     }
 
-    if (xy) {
-       v = currprefs.gfx_filter ? currprefs.gfx_filter_horiz_offset : 0;
-       OffsetRect (dr, (int)(-v * aws / 1000.0), 0);
-       v = currprefs.gfx_filter ? currprefs.gfx_filter_vert_offset : 0;
-       OffsetRect (dr, 0, (int)(-v * ahs / 1000.0));
-    }
+    v = currprefs.gfx_filter ? currprefs.gfx_filter_horiz_offset : 0;
+    OffsetRect (zr, (int)(-v * aws / 1000.0), 0);
+    v = currprefs.gfx_filter ? currprefs.gfx_filter_vert_offset : 0;
+    OffsetRect (zr, 0, (int)(-v * ahs / 1000.0));
 
     xs = dst_width - dst_width * xmult / 1000;
-    dr->left += xs / 2;
-    dr->right -= xs / 2;
-
     ys = dst_height - dst_height * ymult / 1000;
-    dr->top += ys / 2;
-    dr->bottom -= ys / 2;
+    sizeoffset (dr, zr, xs, ys);
 
     filterxmult = xmult;
     filterymult = ymult;
+    filteroffsetx = (dst_width - amiga_width * 1000 / filterxmult) / 2;
+    filteroffsety = (dst_height - amiga_height * 1000 / filterymult) / 2;
+
 }
 
 static void statusline (void)
@@ -296,9 +331,6 @@ void S2X_init (int dw, int dh, int aw, int ah, int mult, int ad, int dd)
     amiga_depth = ad;
     scale = mult;
 
-    filteroffsetx = (dst_width - amiga_width) / 2;
-    filteroffsety = (dst_height - amiga_height) / 2;
-
     temp_width = dst_width * 3;
     if (temp_width > dxcaps.maxwidth)
        temp_width = dxcaps.maxwidth;
@@ -329,7 +361,7 @@ void S2X_render (void)
     int aw, ah, aws, ahs;
     uae_u8 *dptr, *enddptr, *sptr, *endsptr;
     int ok = 0;
-    RECT sr, dr;
+    RECT sr, dr, zr;
     DDSURFACEDESC2 desc;
     DWORD pitch;
 
@@ -482,10 +514,12 @@ endfail:
 end:
     unlocksurface (tempsurf);
 
-    getfilterrect2 (&sr, &dr, dst_width, dst_height, amiga_width, amiga_height, scale, temp_width, temp_height);
-    if (dr.left >= 0 && dr.top >= 0 && dr.right < temp_width && dr.bottom < temp_height) {
-       if (dr.left < dr.right && dr.top < dr.bottom)
-           DirectDraw_BlitRect (NULL, &sr, tempsurf, &dr);
+    getfilterrect2 (&dr, &sr, &zr, dst_width, dst_height, amiga_width, amiga_height, scale, temp_width, temp_height);
+    //write_log ("(%d %d %d %d) - (%d %d %d %d) (%d %d)\n", dr.left, dr.top, dr.right, dr.bottom, sr.left, sr.top, sr.right, sr.bottom, zr.left, zr.top);
+    OffsetRect (&sr, zr.left, zr.top);
+    if (sr.left >= 0 && sr.top >= 0 && sr.right < temp_width && sr.bottom < temp_height) {
+       if (sr.left < sr.right && sr.top < sr.bottom)
+           DirectDraw_BlitRect (NULL, &dr, tempsurf, &sr);
     }
     statusline ();
 }
index 3818da2e9c72e70f1c1116adcf51bb842b286b5e..b82c01ac3161303a4a906f03d1df352d4c4df757 100755 (executable)
@@ -240,7 +240,10 @@ void getgfxoffset (int *dxp, int *dyp, int *mxp, int *myp)
         dy = picasso_offset_y;
        *mxp = picasso_offset_mx;
        *myp = picasso_offset_my;
-    } else if (currentmode->flags & DM_W_FULLSCREEN) {
+    }
+    *dxp = dx;
+    *dyp = dy;
+    if (currentmode->flags & DM_W_FULLSCREEN) {
        if (scalepicasso && screen_is_picasso)
            return;
        if (usedfilter && !screen_is_picasso)
@@ -1050,7 +1053,7 @@ int check_prefs_changed_gfx (void)
 
     c |= currprefs.gfx_size_fs.width != changed_prefs.gfx_size_fs.width ? 16 : 0;
     c |= currprefs.gfx_size_fs.height != changed_prefs.gfx_size_fs.height ? 16 : 0;
-    c |= currprefs.gfx_size_win.width != changed_prefs.gfx_size_win.width ? 16 : 0;
+    c |= ((currprefs.gfx_size_win.width + 7) & ~7) != ((changed_prefs.gfx_size_win.width + 7) & ~7) ? 16 : 0;
     c |= currprefs.gfx_size_win.height != changed_prefs.gfx_size_win.height ? 16 : 0;
 #if 0
     c |= currprefs.gfx_size_win.x != changed_prefs.gfx_size_win.x ? 16 : 0;
@@ -1139,6 +1142,7 @@ int check_prefs_changed_gfx (void)
        currprefs.gfx_filter_contrast = changed_prefs.gfx_filter_contrast;
        currprefs.gfx_filter_saturation = changed_prefs.gfx_filter_saturation;
        currprefs.gfx_filter_gamma = changed_prefs.gfx_filter_gamma;
+       currprefs.gfx_filter_autoscale = changed_prefs.gfx_filter_autoscale;
        //currprefs.gfx_filter_ = changed_prefs.gfx_filter_;
 
        currprefs.gfx_lores_mode = changed_prefs.gfx_lores_mode;
@@ -1190,14 +1194,15 @@ int check_prefs_changed_gfx (void)
        currprefs.gfx_xcenter != changed_prefs.gfx_xcenter ||
        currprefs.gfx_ycenter != changed_prefs.gfx_ycenter)
     {
-       currprefs.gfx_filter_autoscale = changed_prefs.gfx_filter_autoscale;
        currprefs.gfx_xcenter_pos = changed_prefs.gfx_xcenter_pos;
        currprefs.gfx_ycenter_pos = changed_prefs.gfx_ycenter_pos;
        currprefs.gfx_xcenter_size = changed_prefs.gfx_xcenter_size;
        currprefs.gfx_ycenter_size = changed_prefs.gfx_ycenter_size;
        currprefs.gfx_xcenter = changed_prefs.gfx_xcenter;
        currprefs.gfx_ycenter = changed_prefs.gfx_ycenter;
+       currprefs.gfx_filter_autoscale = changed_prefs.gfx_filter_autoscale;
 
+       get_custom_limits (NULL, NULL, NULL, NULL);
        fixup_prefs_dimensions (&changed_prefs);
 
        return 1;
@@ -1510,8 +1515,6 @@ static int reopen (int full)
     currprefs.gfx_pvsync = changed_prefs.gfx_pvsync;
     currprefs.gfx_refreshrate = changed_prefs.gfx_refreshrate;
 
-
-
     if (!quick)
        return 1;
     
@@ -2317,7 +2320,7 @@ static BOOL doInit (void)
 #endif
 #ifdef D3D
     if (currentmode->flags & DM_D3D) {
-       const char *err = D3D_init (hAmigaWnd, currentmode->current_width, currentmode->current_height,
+       const char *err = D3D_init (hAmigaWnd, currentmode->native_width, currentmode->native_height,
            currentmode->amiga_width, currentmode->amiga_height, currentmode->current_depth);
        if (err) {
            D3D_free ();
index c70bc4c69860e63e4824d731015cd553e79a6924..ec56b4a173565b8d693b39b4e8756b6e80716d83 100755 (executable)
@@ -22,6 +22,7 @@ void WIN32GFX_WindowSize (void);;
 
 RGBFTYPE WIN32GFX_FigurePixelFormats (RGBFTYPE colortype);
 int WIN32GFX_AdjustScreenmode (struct MultiDisplay *md, uae_u32 *pwidth, uae_u32 *pheight, uae_u32 *ppixbits);
+extern HCURSOR normalcursor;
 
 extern HWND hStatusWnd;
 extern uae_u32 default_freq;
index c0735f3d2d54a3563138ffaf700d246e56098928..0242ad0d595e8c57a5b5b2365432067766d6d241 100755 (executable)
@@ -1203,11 +1203,11 @@ void gui_display (int shortcut)
     setmouseactive (0);
 
     w = h = -1;
-    if (!WIN32GFX_IsPicassoScreen() && currprefs.gfx_afullscreen && (currprefs.gfx_size.width < gui_width || currprefs.gfx_size.height < gui_height)) {
+    if (!WIN32GFX_IsPicassoScreen () && currprefs.gfx_afullscreen && (currprefs.gfx_size.width < gui_width || currprefs.gfx_size.height < gui_height)) {
        w = currprefs.gfx_size.width;
        h = currprefs.gfx_size.height;
     }
-    if (WIN32GFX_IsPicassoScreen() && currprefs.gfx_pfullscreen && (picasso96_state.Width < gui_width || picasso96_state.Height < gui_height)) {
+    if (WIN32GFX_IsPicassoScreen () && currprefs.gfx_pfullscreen && (picasso96_state.Width < gui_width || picasso96_state.Height < gui_height)) {
        w = currprefs.gfx_size.width;
        h = currprefs.gfx_size.height;
     }
@@ -9884,7 +9884,12 @@ static void values_to_hw3ddlg (HWND hDlg)
        (workprefs.gfx_filter_aspect == 15 * 256 + 9) ? 2 :
        (workprefs.gfx_filter_aspect == 16 * 256 + 9) ? 3 :
        (workprefs.gfx_filter_aspect == 16 * 256 + 10) ? 4 : 0, 0);
-    CheckDlgButton (hDlg, IDC_FILTERAUTORES, workprefs.gfx_filter_autoscale);
+
+    SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_RESETCONTENT, 0, 0L);
+    SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_ADDSTRING, 0, (LPARAM)"Disabled");
+    SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_ADDSTRING, 0, (LPARAM)"Automatic scaling");
+    SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_ADDSTRING, 0, (LPARAM)"Automatic resize");
+    SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_SETCURSEL, workprefs.gfx_filter_autoscale, 0);
 
     SendDlgItemMessage (hDlg, IDC_FILTERHZ, TBM_SETRANGE, TRUE, MAKELONG (-999, +999));
     SendDlgItemMessage (hDlg, IDC_FILTERHZ, TBM_SETPAGESIZE, 0, 1);
@@ -10206,6 +10211,8 @@ static void filter_handle (HWND hDlg)
                hw3d_changed = 1;
            }
        }
+       if (workprefs.gfx_filter == 0)
+           workprefs.gfx_filter_autoscale = 0;
     }
     enable_for_hw3ddlg (hDlg);
     updatedisplayarea ();
@@ -10269,13 +10276,6 @@ static INT_PTR CALLBACK hw3dDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM
                filter_preset (hDlg, wParam);
                recursive++;
                break;
-               case IDC_FILTERAUTORES:
-               workprefs.gfx_filter_autoscale = IsDlgButtonChecked (hDlg, IDC_FILTERAUTORES);
-               if (workprefs.gfx_filter_autoscale && workprefs.gfx_filter == 0)
-                   workprefs.gfx_filter = 1;
-               values_to_hw3ddlg (hDlg);
-               enable_for_hw3ddlg (hDlg);
-               break;
                case IDC_FILTERKEEPASPECT:
                currprefs.gfx_filter_keep_aspect = workprefs.gfx_filter_keep_aspect = IsDlgButtonChecked (hDlg, IDC_FILTERKEEPASPECT);
                updatedisplayarea ();
@@ -10285,6 +10285,16 @@ static INT_PTR CALLBACK hw3dDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM
                if (HIWORD (wParam) == CBN_SELCHANGE || HIWORD (wParam) == CBN_KILLFOCUS)  {
                    switch (LOWORD (wParam))
                    {
+                       case IDC_FILTERAUTOSCALE:
+                       item = SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_GETCURSEL, 0, 0L);
+                       if (item != CB_ERR) {
+                           workprefs.gfx_filter_autoscale = item;
+                           if (workprefs.gfx_filter_autoscale && workprefs.gfx_filter == 0)
+                               workprefs.gfx_filter = 1;
+                           values_to_hw3ddlg (hDlg);
+                           enable_for_hw3ddlg (hDlg);
+                       }
+                       break;
                        case IDC_FILTERXTRA:
                        values_to_hw3ddlg (hDlg);
                        break;
@@ -10301,6 +10311,7 @@ static INT_PTR CALLBACK hw3dDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM
                        case IDC_FILTERMODE:
                        case IDC_FILTERFILTER:
                        filter_handle (hDlg);
+                       values_to_hw3ddlg (hDlg);
                        break;
                        case IDC_FILTERHZMULT:
                        currprefs.gfx_filter_horiz_zoom_mult = workprefs.gfx_filter_horiz_zoom_mult = getfiltermult (hDlg, IDC_FILTERHZMULT);
index fea3d1d463b76fc5280ffc3696aa5f04899741ac..8150100ae8da2832c5eebc1d7fb3c9f9877cb5e4 100755 (executable)
@@ -1,4 +1,46 @@
 
+Beta 7:
+
+- version number bumped to 1.6.0
+- added "resize" autoscale method. Resizes windowed mode window
+  to current detected Amiga display size. (1:1 pixel mapping, no
+  blurriness)
+- PAL/NTSC switching in KS3.x early boot screen was ignored until
+  following reboot (old bug)
+- do not report no_cd-status when loading CD32 statefile without CD
+  installed
+- doublescan modes autoscale/resize better
+- improved Amiga display size detection
+- autoscale option saved to configuration file
+- do not capture mouse if mouse pointer is not in normal mode, prevents
+  annoying accidental capture when dragging/resizing
+- very large overscanned modes are centered in autoscale modes,
+  previously right border was simply clipped
+- tablet+magic mouse cursor positioning will be even more broken now
+- do not create registry key if ini mode is enabled (release versions
+  only)
+- renamed "Drawing tablet support" to "Install virtual mouse driver"
+  (which is not much better but at least a bit less confusing..)
+- mouse autocaptures in "sync mode" if native side mouse driver does
+  not get "heartbeat" signal from Amiga-side driver (for example
+  when running game that takes over the system). Current timeout is
+  2 seconds.
+- native mode mouse cursor shape copied to Windows cursor (yes, I am
+  going really too far now..) in mousesync mode. Just experimenting..
+- left mousebutton didn't always work in mouse sync modes
+- fullscreen and full window should work correctly again
+  (hint: full window + autoscale + correct aspect = useful if you
+  don't mind blurriness, scale2x/pal filter may also help)
+- on screen leds' background is translucent (32-bit screen + filtered
+  only)
+- NOTE: D3D/OGL filters do not yet work correctly in autoscale,
+  autoresize or mouse sync modes (=mouse driver + magic mouse)
+- NOTE2: screen dragging does weird things with autoscale/mouse sync
+  (mouse sync issue when two different screens are visible should be
+  fixable)
+- NOTE3: both real and "fake" cursor is temporarily visible in mouse
+  sync modes. They should always be in 100% sync and have identical
+  shape. (but aren't, still work to do..)
 
 Beta 6:
 
@@ -9,6 +51,11 @@ Beta 6:
 - autoscale saved to config file
 - non-filtered mode is back but enabling autoscale will automatically
   enable null filter if current selection was no filter
+- filter aspect ratio setting in autoscale mode was wrong
+- filter aspect ratio now set by default
+- detected screen size logged
+- loading new statefile didn't always trigger scale update
+
 
 Beta 5: WARNING: big changes. 1.6 version change expected.