]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
imported winuaesrc1450b7.zip
authorToni Wilen <twilen@winuae.net>
Wed, 31 Oct 2007 17:37:27 +0000 (19:37 +0200)
committerToni Wilen <twilen@winuae.net>
Mon, 22 Feb 2010 19:36:39 +0000 (21:36 +0200)
14 files changed:
cdtv.c
custom.c
drawing.c
include/custom.h
include/drawing.h
inputdevice.c
od-win32/resources/resource
od-win32/resources/resource.h
od-win32/resources/winuae.rc
od-win32/sysconfig.h
od-win32/win32.c
od-win32/win32.h
od-win32/win32gui.c
od-win32/winuaechangelog.txt

diff --git a/cdtv.c b/cdtv.c
index 42c7f20f57558e25258779e621729a7e26c45668..4f04f80e55944a5378126b724b84693df63b00bd 100644 (file)
--- a/cdtv.c
+++ b/cdtv.c
@@ -53,6 +53,8 @@
 #define AUDIO_STATUS_PLAY_ERROR     0x14
 #define AUDIO_STATUS_NO_STATUS      0x15
 
+#define MODEL_NAME "MATSHITA0.97" /* also MATSHITA0.96 exists */
+
 static smp_comm_pipe requests;
 static volatile int thread_alive;
 
@@ -500,6 +502,12 @@ static void cdrom_command_thread(uae_u8 b)
            cd_finished = 1;
        }
        break;
+       case 0x83:
+        if (cdrom_command_cnt_in == 7) {
+           memcpy (cdrom_command_output, MODEL_NAME, strlen (MODEL_NAME)); 
+           cdrom_command_accepted(strlen (MODEL_NAME), s, &cdrom_command_cnt_in);
+           cd_finished = 1;
+       }
        case 0x84:
        if (cdrom_command_cnt_in == 7) {
            cdrom_command_accepted(cdrom_modeset(cdrom_command_input), s, &cdrom_command_cnt_in);
index 091c96eaf6ed902d48ee65ea01b4d198d53a0539..f4103d9f80b05cf0a07adc8847ea7c9f28db2f0f 100644 (file)
--- a/custom.c
+++ b/custom.c
@@ -523,7 +523,8 @@ static void remember_ctable_for_border (void)
  * checked.  */
 static void decide_diw (int hpos)
 {
-    int pix_hpos = coord_diw_to_window_x (hpos == 227 ? 455 : hpos * 2); /* (227.5*2 = 455) */
+     /* Last hpos = hpos + 0.5, eg. normal PAL end hpos is 227.5 * 2 = 455 */
+    int pix_hpos = coord_diw_to_window_x (hpos == maxhpos ? hpos * 2 + 1 : hpos * 2);
     if (hdiwstate == DIW_waiting_start && thisline_decision.diwfirstword == -1
        && pix_hpos >= diwfirstword && last_diw_pix_hpos < diwfirstword)
     {
@@ -1665,13 +1666,18 @@ static int expand_sprres (uae_u16 con0, uae_u16 con3)
     int res;
 
     switch ((con3 >> 6) & 3) {
+    default:
+       res = RES_LORES;
+    break;
+#ifdef ECS_DENISE
     case 0: /* ECS defaults (LORES,HIRES=LORES sprite,SHRES=HIRES sprite) */
        if ((currprefs.chipset_mask & CSMASK_ECS_DENISE) && GET_RES (con0) == RES_SUPERHIRES)
            res = RES_HIRES;
        else
            res = RES_LORES;
        break;
-    /* AGA */
+#endif
+#ifdef AGA
     case 1:
        res = RES_LORES;
        break;
@@ -1682,6 +1688,7 @@ static int expand_sprres (uae_u16 con0, uae_u16 con3)
        res = RES_SUPERHIRES;
        break;
     }
+#endif
     return res;
 }
 
@@ -2869,8 +2876,8 @@ static void BPLCON0 (int hpos, uae_u16 v)
     bplcon0 = v;
     record_register_change (hpos, 0x100, v);
 
-#ifdef AGA
-    if (currprefs.chipset_mask & CSMASK_AGA) {
+#ifdef ECS_DENISE
+    if (currprefs.chipset_mask & CSMASK_ECS_DENISE) {
        decide_sprites (hpos);
        sprres = expand_sprres (bplcon0, bplcon3);
     }
@@ -3174,8 +3181,13 @@ STATIC_INLINE void SPRxCTLPOS (int num)
     sprxp = (sprpos[num] & 0xFF) * 2 + (sprctl[num] & 1);
     sprxp <<= sprite_buffer_res;
     /* Quite a bit salad in this register... */
+#ifdef ECS_DENISE
+    if (currprefs.chipset_mask & CSMASK_ECS_DENISE) {
+       sprxp |= ((sprctl[num] >> 3) & 2) >> (2 - sprite_buffer_res);
+    }
+#endif
 #ifdef AGA
-    if (currprefs.chipset_mask & CSMASK_AGA) {
+    else if (currprefs.chipset_mask & CSMASK_AGA) {
        sprxp |= ((sprctl[num] >> 3) & 3) >> (2 - sprite_buffer_res);
        s->dblscan = sprpos[num] & 0x80;
     }
@@ -3821,11 +3833,12 @@ STATIC_INLINE void do_sprites_1 (int num, int cycle, int hpos)
     if (vpos == sprite_vblank_endline)
        spr_arm (num, 0);
 
+#ifdef AGA
     if (s->dblscan && (fmode & 0x8000) && (vpos & 1) != (s->vstart & 1) && s->dmastate) {
        spr_arm (num, 1);
        return;
     }
-
+#endif
 #if SPRITE_DEBUG > 3
     if (vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY)
        write_log ("%d:%d:slot%d:%d\n", vpos, hpos, num, cycle);
index 78285a81e992293790e70db561c0bfe29d5c1b5c..1095b3b5052147b8c54b1539b8727eeb244e6c22 100644 (file)
--- a/drawing.c
+++ b/drawing.c
@@ -193,7 +193,7 @@ static int first_block_line, last_block_line;
 /* These are generated by the drawing code from the line_decisions array for
    each line that needs to be drawn.  These are basically extracted out of
    bit fields in the hardware registers.  */
-static int bplehb, bplham, bpldualpf, bpldualpfpri, bpldualpf2of, bplplanecnt, bplres, issprites;
+static int bplehb, bplham, bpldualpf, bpldualpfpri, bpldualpf2of, bplplanecnt, bplres, ecsshres, issprites;
 static int plf1pri, plf2pri;
 static uae_u32 plf_sprite_mask;
 static int sbasecol[2] = { 16, 16 };
@@ -325,7 +325,7 @@ void record_diw_line (int plfstrt, int first, int last)
 static int playfield_start, playfield_end;
 static int real_playfield_start, real_playfield_end;
 
-static int pixels_offset, sprite_pixels_offset;
+static int pixels_offset;
 static int src_pixel;
 /* How many pixels in window coordinates which are to the left of the left border.  */
 static int unpainted;
@@ -397,9 +397,6 @@ static void pfield_init_linetoscr (void)
     res_shift = lores_shift - bplres;
     ddf_left -= DISPLAY_LEFT_SHIFT;
     pixels_offset = MAX_PIXELS_PER_LINE - (ddf_left << bplres);
-    sprite_pixels_offset = MAX_PIXELS_PER_LINE - (ddf_left << sprite_buffer_res);
-    if (sprite_pixels_offset > pixels_offset)
-       sprite_pixels_offset = pixels_offset;
     ddf_left <<= bplres;
 
     unpainted = visible_left_border < playfield_start ? 0 : visible_left_border - playfield_start;
@@ -553,10 +550,130 @@ static int linetoscr_double_offset;
 
 #include "linetoscr.c"
 
+#ifdef ECS_DENISE
+/* ECS SuperHires special cases */
+static int NOINLINE linetoscr_16_sh (int spix, int dpix, int stoppos)
+{
+    uae_u16 *buf = (uae_u16 *) xlinebuffer;
+
+    while (dpix < stoppos) {
+       uae_u16 spix_val1, spix_val2;
+       uae_u16 v;
+       int off;
+       spix_val1 = pixdata.apixels[spix++];
+       spix_val2 = pixdata.apixels[spix++];
+       off = ((spix_val2 & 3) * 4) + (spix_val1 & 3) + ((spix_val1 | spix_val2) & 16);
+       v = (colors_for_drawing.color_regs_ecs[off] & 0xccc) << 0;
+       v |= v >> 2;
+       buf[dpix++] = xcolors[v];
+       v = (colors_for_drawing.color_regs_ecs[off] & 0x333) << 2;
+       v |= v >> 2;
+       buf[dpix++] = xcolors[v];
+    }
+    return spix;
+}
+static int NOINLINE linetoscr_32_sh (int spix, int dpix, int stoppos)
+{
+    uae_u32 *buf = (uae_u32 *) xlinebuffer;
+
+    while (dpix < stoppos) {
+       uae_u32 spix_val1, spix_val2;
+       uae_u16 v;
+       int off;
+       spix_val1 = pixdata.apixels[spix++];
+       spix_val2 = pixdata.apixels[spix++];
+       off = ((spix_val2 & 3) * 4) + (spix_val1 & 3) + ((spix_val1 | spix_val2) & 16);
+       v = (colors_for_drawing.color_regs_ecs[off] & 0xccc) << 0;
+       v |= v >> 2;
+       buf[dpix++] = xcolors[v];
+       v = (colors_for_drawing.color_regs_ecs[off] & 0x333) << 2;
+       v |= v >> 2;
+       buf[dpix++] = xcolors[v];
+    }
+    return spix;
+}
+static int NOINLINE linetoscr_32_shrink1_sh (int spix, int dpix, int stoppos)
+{
+    uae_u32 *buf = (uae_u32 *) xlinebuffer;
+
+    while (dpix < stoppos) {
+       uae_u32 spix_val1, spix_val2;
+       uae_u16 v;
+       int off;
+       spix_val1 = pixdata.apixels[spix++];
+       spix_val2 = pixdata.apixels[spix++];
+       off = ((spix_val2 & 3) * 4) + (spix_val1 & 3) + ((spix_val1 | spix_val2) & 16);
+       v = (colors_for_drawing.color_regs_ecs[off] & 0xccc) << 0;
+       v |= v >> 2;
+       buf[dpix++] = xcolors[v];
+    }
+    return spix;
+}
+static int NOINLINE linetoscr_32_shrink2_sh (int spix, int dpix, int stoppos)
+{
+    uae_u32 *buf = (uae_u32 *) xlinebuffer;
+
+    while (dpix < stoppos) {
+       uae_u32 spix_val1, spix_val2, dpix_val1, dpix_val2;
+       uae_u16 v;
+       int off;
+       spix_val1 = pixdata.apixels[spix++];
+       spix_val2 = pixdata.apixels[spix++];
+       off = ((spix_val2 & 3) * 4) + (spix_val1 & 3) + ((spix_val1 | spix_val2) & 16);
+       v = (colors_for_drawing.color_regs_ecs[off] & 0xccc) << 0;
+       v |= v >> 2;
+       dpix_val1 = xcolors[v];
+       v = (colors_for_drawing.color_regs_ecs[off] & 0x333) << 2;
+       v |= v >> 2;
+       dpix_val2 = xcolors[v];
+       buf[dpix++] = merge_2pixel32 (dpix_val1, dpix_val2);
+    }
+    return spix;
+}
+static int NOINLINE linetoscr_16_shrink1_sh (int spix, int dpix, int stoppos)
+{
+    uae_u16 *buf = (uae_u16 *) xlinebuffer;
+
+    while (dpix < stoppos) {
+       uae_u16 spix_val1, spix_val2;
+       uae_u16 v;
+       int off;
+       spix_val1 = pixdata.apixels[spix++];
+       spix_val2 = pixdata.apixels[spix++];
+       off = ((spix_val2 & 3) * 4) + (spix_val1 & 3) + ((spix_val1 | spix_val2) & 16);
+       v = (colors_for_drawing.color_regs_ecs[off] & 0xccc) << 0;
+       v |= v >> 2;
+       buf[dpix++] = xcolors[v];
+    }
+    return spix;
+}
+static int NOINLINE linetoscr_16_shrink2_sh (int spix, int dpix, int stoppos)
+{
+    uae_u16 *buf = (uae_u16 *) xlinebuffer;
+
+    while (dpix < stoppos) {
+       uae_u16 spix_val1, spix_val2, dpix_val1, dpix_val2;
+       uae_u16 v;
+       int off;
+       spix_val1 = pixdata.apixels[spix++];
+       spix_val2 = pixdata.apixels[spix++];
+       off = ((spix_val2 & 3) * 4) + (spix_val1 & 3) + ((spix_val1 | spix_val2) & 16);
+       v = (colors_for_drawing.color_regs_ecs[off] & 0xccc) << 0;
+       v |= v >> 2;
+       dpix_val1 = xcolors[v];
+       v = (colors_for_drawing.color_regs_ecs[off] & 0x333) << 2;
+       v |= v >> 2;
+       dpix_val2 = xcolors[v];
+       buf[dpix++] = merge_2pixel16 (dpix_val1, dpix_val2);
+    }
+    return spix;
+}
+#endif
+
 static void pfield_do_linetoscr (int start, int stop)
 {
     xlinecheck(start, stop);
-    if (issprites && ((currprefs.chipset_mask & CSMASK_AGA) || sprite_buffer_res > 0)) {
+    if (issprites && (currprefs.chipset_mask & CSMASK_AGA)) {
        if (res_shift == 0) {
            switch (gfxvidinfo.pixbytes) {
            case 1: src_pixel = linetoscr_8_aga_spr (src_pixel, start, stop); break;
@@ -627,6 +744,28 @@ static void pfield_do_linetoscr (int start, int stop)
            }
        }
     } else
+#endif
+#ifdef ECS_DENISE
+    if (ecsshres) {
+       if (res_shift == 0) {
+           switch (gfxvidinfo.pixbytes) {
+           case 2: src_pixel = linetoscr_16_sh (src_pixel, start, stop); break;
+           case 4: src_pixel = linetoscr_32_sh (src_pixel, start, stop); break;
+           }
+       } else if (res_shift < 0) {
+           if (currprefs.gfx_lores_mode) {
+               switch (gfxvidinfo.pixbytes) {
+               case 2: src_pixel = linetoscr_16_shrink2_sh (src_pixel, start, stop); break;
+               case 4: src_pixel = linetoscr_32_shrink2_sh (src_pixel, start, stop); break;
+               }
+           } else {
+               switch (gfxvidinfo.pixbytes) {
+               case 2: src_pixel = linetoscr_16_shrink1_sh (src_pixel, start, stop); break;
+               case 4: src_pixel = linetoscr_32_shrink1_sh (src_pixel, start, stop); break;
+               }
+           }
+       }
+    } else
 #endif
     if (1) {
        if (res_shift == 0) {
@@ -1065,6 +1204,8 @@ static void NOINLINE draw_sprites_ham_sp_hi_nat (struct sprite_entry *e) { draw_
 static void NOINLINE draw_sprites_normal_sp_hi_at (struct sprite_entry *e) { draw_sprites_1 (e, 0, 0, 1, 0, 1); }
 static void NOINLINE draw_sprites_normal_dp_hi_at (struct sprite_entry *e) { draw_sprites_1 (e, 0, 1, 1, 0, 1); }
 static void NOINLINE draw_sprites_ham_sp_hi_at (struct sprite_entry *e) { draw_sprites_1 (e, 1, 0, 1, 0, 1); }
+/* shres bitplane, lores sprites (emulation restriction, real ECS SHRES uses hires), ECS DENISE only */
+static void NOINLINE draw_sprites_normal_sp_shi_nat (struct sprite_entry *e) { draw_sprites_2 (e, 0, 0, 2, 0, 1, 0, 0, 0); }
 
 #ifdef AGA
 /* not very optimized */
@@ -1087,8 +1228,9 @@ STATIC_INLINE void draw_sprites_aga (struct sprite_entry *e)
 
 STATIC_INLINE void draw_sprites_ecs (struct sprite_entry *e)
 {
-    if (e->has_attached)
-       if (bplres == 1)
+    int res = bplres;
+    if (e->has_attached) {
+       if (res == 1)
            if (dp_for_drawing->ham_seen)
                draw_sprites_ham_sp_hi_at (e);
            else
@@ -1104,8 +1246,8 @@ STATIC_INLINE void draw_sprites_ecs (struct sprite_entry *e)
                    draw_sprites_normal_dp_lo_at (e);
                else
                    draw_sprites_normal_sp_lo_at (e);
-    else
-       if (bplres == 1)
+    } else {
+       if (res == 1)
            if (dp_for_drawing->ham_seen)
                draw_sprites_ham_sp_hi_nat (e);
            else
@@ -1113,7 +1255,7 @@ STATIC_INLINE void draw_sprites_ecs (struct sprite_entry *e)
                    draw_sprites_normal_dp_hi_nat (e);
                else
                    draw_sprites_normal_sp_hi_nat (e);
-       else
+       else if (bplres == 0)
            if (dp_for_drawing->ham_seen)
                draw_sprites_ham_sp_lo_nat (e);
            else
@@ -1121,6 +1263,11 @@ STATIC_INLINE void draw_sprites_ecs (struct sprite_entry *e)
                    draw_sprites_normal_dp_lo_nat (e);
                else
                    draw_sprites_normal_sp_lo_nat (e);
+#ifdef ECS_DENISE
+       else if (res == 2) /* ECS SHRES = hardware limits to non-attached */
+           draw_sprites_normal_sp_shi_nat (e);
+#endif
+    }
 }
 
 #ifdef AGA
@@ -1438,6 +1585,9 @@ static void pfield_expand_dp_bplcon (void)
     bplplanecnt = dp_for_drawing->nr_planes;
     bplham = dp_for_drawing->ham_seen;
     issprites = dip_for_drawing->nr_sprites;
+#ifdef ECS_DENISE
+    ecsshres = bplres == RES_SUPERHIRES && (currprefs.chipset_mask & CSMASK_ECS_DENISE) && !(currprefs.chipset_mask & CSMASK_AGA);
+#endif
 
     if (bplres > 0)
        frame_res = 1;
@@ -1467,6 +1617,7 @@ static void pfield_expand_dp_bplcon (void)
     brdsprt = !brdblank && (currprefs.chipset_mask & CSMASK_AGA) && (dp_for_drawing->bplcon0 & 1) && (dp_for_drawing->bplcon3 & 0x02);
 #endif
 }
+
 static void pfield_expand_dp_bplcon2 (int regno, int v)
 {
     regno -= 0x1000;
@@ -1669,7 +1820,7 @@ static void pfield_draw_line (int lineno, int gfx_ypos, int follow_ypos)
        pfield_init_linetoscr ();
        pfield_doline (lineno);
 
-       adjust_drawing_colors (dp_for_drawing->ctable, dp_for_drawing->ham_seen || bplehb);
+       adjust_drawing_colors (dp_for_drawing->ctable, dp_for_drawing->ham_seen || bplehb || ecsshres);
 
        /* The problem is that we must call decode_ham() BEFORE we do the
           sprites. */
@@ -1685,6 +1836,7 @@ static void pfield_draw_line (int lineno, int gfx_ypos, int follow_ypos)
            }
            bplham = dp_for_drawing->ham_at_start;
        }
+
        if (plf2pri > 5 && bplplanecnt == 5 && !(currprefs.chipset_mask & CSMASK_AGA))
            weird_bitplane_fix ();
 
@@ -1696,7 +1848,7 @@ static void pfield_draw_line (int lineno, int gfx_ypos, int follow_ypos)
 #endif
            for (i = 0; i < dip_for_drawing->nr_sprites; i++) {
 #ifdef AGA
-               if ((currprefs.chipset_mask & CSMASK_AGA) || sprite_buffer_res > RES_LORES)
+               if (currprefs.chipset_mask & CSMASK_AGA)
                    draw_sprites_aga (curr_sprite_entries + dip_for_drawing->first_sprite_entry + i);
                else
 #endif
@@ -1813,7 +1965,7 @@ static void center_image (void)
     } else {
        visible_left_border = max_diwlastword - gfxvidinfo.width;
        if (doublescan)
-           visible_left_border = max_diwlastword / 2 - gfxvidinfo.width;
+           visible_left_border = (max_diwlastword - 48) / 2 - gfxvidinfo.width;
     }
     if (visible_left_border > max_diwlastword - 32)
        visible_left_border = max_diwlastword - 32;
@@ -1884,7 +2036,7 @@ static void init_drawing_frame (void)
                    changed_prefs.gfx_resolution = (m & 2) == 0 ? 0 : 1;
                    changed_prefs.gfx_linedbl = (m & 1) == 0 ? 0 : 1;
                    if (currprefs.gfx_autoresolution) {
-                       changed_prefs.gfx_filter_horiz_zoom_mult = 1000 / (changed_prefs.gfx_resolution);
+                       changed_prefs.gfx_filter_horiz_zoom_mult = 1000 >> changed_prefs.gfx_resolution;
                        changed_prefs.gfx_filter_vert_zoom_mult = (changed_prefs.gfx_linedbl + 1) * 500;
                    } else {
                        *dst = *src;
index ff03c98c34e9ca17c0fb29db79f59890c019e5dd..a47b76c7ff9246eac0be9a64177bb58646540ed8 100644 (file)
@@ -89,7 +89,7 @@ extern uae_u16 INTREQR (void);
 #define MAXVPOS 312
 #else
 #define MAXHPOS 256
-#define MAXVPOS 576
+#define MAXVPOS 592
 #endif
 
 /* PAL/NTSC values */
index 083fe5d23f188df324a9a0c39e03b67b7efa51d8..c510c284fba5b294e77581ce99ed4043546d4480 100644 (file)
@@ -166,7 +166,7 @@ struct color_change {
 
 /* No divisors for MAX_PIXELS_PER_LINE; we support AGA and may one day
    want to use SHRES sprites.  */
-#define MAX_SPR_PIXELS (((MAXVPOS + 1)*2 + 1) * MAX_PIXELS_PER_LINE)
+#define MAX_SPR_PIXELS (((MAXVPOS + 1) * 2 + 1) * MAX_PIXELS_PER_LINE)
 
 struct sprite_entry
 {
index a30f0e50aa328e566c3c504c098d24e9fd8f5e16..6da3569493ed40ef71dc7175ce77bc2a37bd0880 100644 (file)
@@ -1741,26 +1741,33 @@ int handle_input_event (int nr, int state, int max, int autofire)
        case 4: /* ->Parallel port joystick adapter port #2 */
            joy = ie->unit - 1;
            if (ie->type & 4) {
+
                if (state)
                    joybutton[joy] |= 1 << ie->data;
                else
                    joybutton[joy] &= ~(1 << ie->data);
+
            } else if (ie->type & 8) {
+
                /* real mouse / analog stick mouse emulation */
                int delta;
                int deadzone = currprefs.input_joymouse_deadzone * max / 100;
                if (max) {
-                   if (state < deadzone && state > -deadzone) {
+                   if (state <= deadzone && state >= -deadzone) {
                        state = 0;
+                       mouse_deltanoreset[joy][ie->data] = 0;
                    } else if (state < 0) {
                        state += deadzone;
+                       mouse_deltanoreset[joy][ie->data] = 1;
                    } else {
                        state -= deadzone;
+                       mouse_deltanoreset[joy][ie->data] = 1;
                    }
                    max -= deadzone;
                    delta = state * currprefs.input_joymouse_multiplier / max;
                } else {
                    delta = state;
+                   mouse_deltanoreset[joy][ie->data] = 0;
                }
                mouse_delta[joy][ie->data] += delta;
 
@@ -1789,9 +1796,10 @@ int handle_input_event (int nr, int state, int max, int autofire)
                    mouse_deltanoreset[joy][0] = 0;
 
            } else if (ie->type & 128) { /* analog (paddle) */
+
                int deadzone = currprefs.input_joymouse_deadzone * max / 100;
                if (max) {
-                   if (state < deadzone && state > -deadzone) {
+                   if (state <= deadzone && state >= -deadzone) {
                        state = 0;
                    } else if (state < 0) {
                        state += deadzone;
@@ -1802,7 +1810,9 @@ int handle_input_event (int nr, int state, int max, int autofire)
                }
                state = state / 256 + 128;
                joydirpot[joy][ie->data] = state;
+
            } else {
+
                int left = oleft[joy], right = oright[joy], top = otop[joy], bot = obot[joy];
                if (ie->type & 16) {
                    /* button to axis mapping */
@@ -1828,6 +1838,7 @@ int handle_input_event (int nr, int state, int max, int autofire)
                if (right) joydir[joy] |= DIR_RIGHT;
                if (top) joydir[joy] |= DIR_UP;
                if (bot) joydir[joy] |= DIR_DOWN;
+
            }
        break;
        case 0: /* ->KEY */
index 53226b340487b478844215b3b04531bfedefdd64..d5da9321c441ec7fff86b7d7c13ee21506238bf5 100644 (file)
 #define IDC_PORT1_JOYS                  1027
 #define IDC_SCREENMODE_RTG              1027
 #define IDC_MBMEM1                      1028
-#define IDC_SCREENMODE_RTG2             1028
 #define IDC_SLOWMEM                     1030
 #define IDC_MBMEM2                      1031
 #define IDC_PARALLEL                    1033
 #define IDC_FS_RW                       1777
 #define IDC_DF3ENABLE                   1778
 #define IDC_HDF_RW                      1778
+#define IDC_HDFINFO                     1779
 #define ID__FLOPPYDRIVES                40004
 #define ID_FLOPPYDRIVES_DF0             40005
 #define ID_ST_CONFIGURATION             40010
 #define _APS_3D_CONTROLS                     1
 #define _APS_NEXT_RESOURCE_VALUE        334
 #define _APS_NEXT_COMMAND_VALUE         40029
-#define _APS_NEXT_CONTROL_VALUE         1779
+#define _APS_NEXT_CONTROL_VALUE         1780
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
 #endif
index 247d6943bbd4352554d2c3acba6bdd9b82dce23d..ce69f5067b26c4e3f54dece823c4df2a03165a7c 100644 (file)
 #define IDC_FS_RW                       1777
 #define IDC_DF3ENABLE                   1778
 #define IDC_HDF_RW                      1778
+#define IDC_HDFINFO                     1779
 #define ID__FLOPPYDRIVES                40004
 #define ID_FLOPPYDRIVES_DF0             40005
 #define ID_ST_CONFIGURATION             40010
index 104f21ddbb762a3c221b7c860c9cfa94cf234b2b..b1cb98fda3e929107dec305cc60e85db673ddfb4 100644 (file)
@@ -1,6 +1,6 @@
 // Microsoft Visual C++ generated resource script.\r
 //\r
-#include "resource.h"\r
+#include "resource."\r
 \r
 #define APSTUDIO_READONLY_SYMBOLS\r
 /////////////////////////////////////////////////////////////////////////////\r
@@ -427,12 +427,12 @@ BEGIN
     CONTROL         "uaenet.device",IDC_SANA2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,92,94,10\r
 END\r
 \r
-IDD_HARDFILE DIALOGEX 0, 0, 299, 224\r
+IDD_HARDFILE DIALOGEX 0, 0, 299, 249\r
 STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU\r
 CAPTION "Hardfile Settings"\r
 FONT 8, "MS Sans Serif", 0, 0, 0x0\r
 BEGIN\r
-    GROUPBOX        "Settings",IDC_STATIC,10,5,280,127\r
+    GROUPBOX        "Settings",IDC_STATIC,10,5,280,146\r
     RTEXT           "Path:",IDC_HARDFILE_DIR_TEXT,26,18,22,10\r
     EDITTEXT        IDC_PATH_NAME,52,15,213,15,ES_AUTOHSCROLL\r
     PUSHBUTTON      "...",IDC_SELECTOR,271,15,11,15\r
@@ -453,20 +453,21 @@ BEGIN
     EDITTEXT        IDC_SECTORS,155,111,35,15,ES_NUMBER\r
     RTEXT           "Block size:",IDC_BLOCKSIZE_TEXT,197,116,35,10\r
     EDITTEXT        IDC_BLOCKSIZE,237,111,35,15,ES_NUMBER\r
-    GROUPBOX        "New hard disk image file",IDC_STATIC,10,134,280,62\r
-    PUSHBUTTON      "Create",IDC_HF_CREATE,50,149,80,14\r
-    EDITTEXT        IDC_HF_SIZE,146,149,61,15,ES_NUMBER\r
-    PUSHBUTTON      "OK",IDOK,102,205,50,14\r
-    PUSHBUTTON      "Cancel",IDCANCEL,158,205,50,14\r
-    EDITTEXT        IDC_HF_DOSTYPE,146,172,61,15\r
-    COMBOBOX        IDC_HF_TYPE,50,172,80,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
+    GROUPBOX        "New hard disk image file",IDC_STATIC,10,156,280,62\r
+    PUSHBUTTON      "Create",IDC_HF_CREATE,50,171,80,14\r
+    EDITTEXT        IDC_HF_SIZE,146,171,61,15,ES_NUMBER\r
+    PUSHBUTTON      "OK",IDOK,102,226,50,14\r
+    PUSHBUTTON      "Cancel",IDCANCEL,158,226,50,14\r
+    EDITTEXT        IDC_HF_DOSTYPE,146,194,61,15\r
+    COMBOBOX        IDC_HF_TYPE,50,194,80,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
     COMBOBOX        IDC_HDF_CONTROLLER,73,112,41,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    RTEXT           "DOS type",IDC_STATIC,214,174,32,10,SS_CENTERIMAGE\r
-    RTEXT           "MB",IDC_STATIC,214,152,13,10,SS_CENTERIMAGE\r
-    RTEXT           "Type:",IDC_STATIC,18,160,25,10,SS_CENTERIMAGE\r
+    RTEXT           "DOS type",IDC_STATIC,214,196,32,10,SS_CENTERIMAGE\r
+    RTEXT           "MB",IDC_STATIC,214,174,13,10,SS_CENTERIMAGE\r
+    RTEXT           "Type:",IDC_STATIC,18,182,25,10,SS_CENTERIMAGE\r
     RTEXT           "HD Controller:",IDC_STATIC,13,113,52,10,SS_CENTERIMAGE\r
     CONTROL         "Autoboot",IDC_HDF_AUTOBOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,136,73,53,10\r
     CONTROL         "Do not mount",IDC_HDF_DONOTMOUNT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,217,74,67,10\r
+    EDITTEXT        IDC_HDFINFO,16,131,268,12,ES_CENTER | ES_READONLY\r
 END\r
 \r
 IDD_FILESYS DIALOGEX 15, 25, 299, 111\r
@@ -995,7 +996,7 @@ GUIDELINES DESIGNINFO
 BEGIN\r
     IDD_HARDFILE, DIALOG\r
     BEGIN\r
-        BOTTOMMARGIN, 212\r
+        BOTTOMMARGIN, 224\r
     END\r
 END\r
 #endif    // APSTUDIO_INVOKED\r
index 4de5b6f6c40fc9e27a463b034f1ca0503e223b1d..ff35aa8a410d933b98a4dd0e03e313b4a1e0bc2c 100644 (file)
@@ -25,7 +25,8 @@
 #define CATWEASEL /* Catweasel MK2/3 support */
 #define AHI /* AHI sound emulation */
 #define ENFORCER /* UAE Enforcer */
-#define AGA /* AGA chipset emulation */
+#define ECS_DENISE /* ECS DENISE new features */
+#define AGA /* AGA chipset emulation (ECS_DENISE must be enabled) */
 #define CD32 /* CD32 emulation */
 #define CDTV /* CDTV emulation */
 #define D3D /* D3D display filter support */
index 834afda10ebc86b59c3e3b2947621074a16ff2b8..87c6ffc7af0c18725cecbc2254e72c3ac3b37253 100644 (file)
@@ -781,7 +781,7 @@ static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
                if (!minimized)
                    winuae_active (hWnd, minimized);
                if (is3dmode() && normal_display_change_starting == 0)
-                   normal_display_change_starting = 1;
+                   normal_display_change_starting = 10;
            }
        }
        recursive--;
@@ -975,7 +975,7 @@ static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
                setmousestate (dinput_winmouse (), 0, mx, 0);
                setmousestate (dinput_winmouse (), 1, my, 0);
            }
-       } else if ((!mouseactive && isfullscreen() <= 0)) {
+       } else if (!mouseactive && isfullscreen() <= 0) {
            setmousestate (0, 0, mx, 1);
            setmousestate (0, 1, my, 1);
        }
@@ -3462,26 +3462,27 @@ end:
 
 typedef BOOL (CALLBACK* SETPROCESSDPIAWARE)(void);
 typedef BOOL (CALLBACK* CHANGEWINDOWMESSAGEFILTER)(UINT, DWORD);
-#define MSGFLT_ADD 1
 
 int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
 {
     SETPROCESSDPIAWARE pSetProcessDPIAware;
     DWORD_PTR sys_aff;
+    HANDLE thread;
+    CHANGEWINDOWMESSAGEFILTER pChangeWindowMessageFilter;
 
     original_affinity = 1;
     GetProcessAffinityMask (GetCurrentProcess(), &original_affinity, &sys_aff);
-#if 0
-    HANDLE thread;
 
     thread = GetCurrentThread();
     original_affinity = SetThreadAffinityMask(thread, 1);
-    CHANGEWINDOWMESSAGEFILTER pChangeWindowMessageFilter;
     pChangeWindowMessageFilter = (CHANGEWINDOWMESSAGEFILTER)GetProcAddress(
        GetModuleHandle("user32.dll"), "ChangeWindowMessageFilter");
+#if 0
+#define MSGFLT_ADD 1
     if (pChangeWindowMessageFilter)
        pChangeWindowMessageFilter(WM_DROPFILES, MSGFLT_ADD);
 #endif
+
     pSetProcessDPIAware = (SETPROCESSDPIAWARE)GetProcAddress(
        GetModuleHandle("user32.dll"), "SetProcessDPIAware");
     if (pSetProcessDPIAware)
index f5f57388e88a57d07a08a70120eb8ecb799dfc01..d4302f8f0d4715fdbfbf51e73dffb775a81d4b69 100644 (file)
@@ -15,9 +15,9 @@
 #define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100)
 #define GETBDD(x) ((x) % 100)
 
-#define WINUAEBETA 6
+#define WINUAEBETA 7
 #define WINUAEPUBLICBETA 1
-#define WINUAEDATE MAKEBD(2007, 10, 28)
+#define WINUAEDATE MAKEBD(2007, 10, 31)
 #define WINUAEEXTRA ""
 #define WINUAEREV ""
 
index 983490b391f77c1526fc39403492acdaaf5c5a55..15969a9a9d186b6ffb101fde2012c9e6f96d8d14 100644 (file)
@@ -1500,7 +1500,7 @@ static int CalculateHardfileSize (HWND hDlg)
     BOOL Translated = FALSE;
     UINT mbytes = 0;
 
-    mbytes = GetDlgItemInt( hDlg, IDC_HF_SIZE, &Translated, FALSE );
+    mbytes = GetDlgItemInt(hDlg, IDC_HF_SIZE, &Translated, FALSE);
     if (mbytes <= 0)
        mbytes = 0;
     if( !Translated )
@@ -5967,9 +5967,9 @@ static INT_PTR CALLBACK SoundDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM
 
 struct fsvdlg_vals
 {
-    char volume[4096];
-    char device[4096];
-    char rootdir[4096];
+    char volume[MAX_DPATH];
+    char device[MAX_DPATH];
+    char rootdir[MAX_DPATH];
     int bootpri;
     int autoboot;
     int donotmount;
@@ -5982,10 +5982,10 @@ static struct fsvdlg_vals current_fsvdlg;
 
 struct hfdlg_vals
 {
-    char volumename[4096];
-    char devicename[4096];
-    char filename[4096];
-    char fsfilename[4096];
+    char volumename[MAX_DPATH];
+    char devicename[MAX_DPATH];
+    char filename[MAX_DPATH];
+    char fsfilename[MAX_DPATH];
     int sectors;
     int reserved;
     int surfaces;
@@ -6184,10 +6184,58 @@ static void hardfile_testrdb (HWND hDlg)
     sethardfile (hDlg);
 }
 
+static void updatehdfinfo (HWND hDlg, int force)
+{
+    static uae_u64 bsize;
+    static uae_u8 id[4];
+    int blocks, cyls, i;
+    char tmp[200], idtmp[5], tmp2[200];
+
+    if (force) {
+       struct zfile *zf = zfile_fopen (current_hfdlg.filename, "rb");
+       if (zf) {
+           memset (id, 0, sizeof (id));
+           zfile_fread (id, 1, sizeof (id), zf);
+           zfile_fseek (zf, 0, SEEK_END);
+           bsize = zfile_ftell (zf);
+           zfile_fclose (zf);
+       }
+    }
+    cyls = 0;
+    if (current_hfdlg.blocksize * current_hfdlg.sectors * current_hfdlg.surfaces)
+        cyls = bsize / (current_hfdlg.blocksize * current_hfdlg.sectors * current_hfdlg.surfaces);
+    blocks = cyls * (current_hfdlg.sectors * current_hfdlg.surfaces);
+    for (i = 0; i < 4; i++) {
+       unsigned char c = id[i];
+       if (c < 32 || c > 126)
+           c = '.';
+       idtmp[i] = c;
+       idtmp[i + 1] = 0;
+    }
+
+    tmp[0] = 0;
+    if (bsize) {
+       sprintf (tmp2, " %s [%02X%02X%02X%02X]", idtmp, id[0], id[1], id[2], id[3]);
+       if (!cyls || !blocks)
+           sprintf (tmp, "%dMB", bsize / (1024 * 1024));
+       else
+           sprintf (tmp, "%d cyls, %d blocks, %.1fMB/%.1fMB",
+               cyls, blocks,
+               (double)blocks * 1.0 * current_hfdlg.blocksize / (1024.0 * 1024.0),
+               (double)bsize / (1024.0 * 1024.0));
+       if (cyls > 65535)
+           strcat (tmp, " [Too many cyls]");
+       strcat (tmp, tmp2);
+    }
+    SetDlgItemText (hDlg, IDC_HDFINFO, tmp);
+}
+
+
 static INT_PTR CALLBACK HardfileSettingsProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
 {
     static int recursive = 0;
     LRESULT res, posn;
+    char tmp[MAX_DPATH];
 
     switch (msg) {
     case WM_INITDIALOG:
@@ -6195,6 +6243,7 @@ static INT_PTR CALLBACK HardfileSettingsProc (HWND hDlg, UINT msg, WPARAM wParam
        inithardfile (hDlg);
        sethardfile (hDlg);
        sethfdostype (hDlg, 0);
+       updatehdfinfo (hDlg, 1);
        recursive--;
        return TRUE;
 
@@ -6235,6 +6284,7 @@ static INT_PTR CALLBACK HardfileSettingsProc (HWND hDlg, UINT msg, WPARAM wParam
                GetDlgItemText (hDlg, IDC_PATH_NAME, current_hfdlg.filename, sizeof current_hfdlg.filename);
                hardfile_testrdb (hDlg);
                inithardfile(hDlg);
+               updatehdfinfo (hDlg, 1);
                break;
            case IDC_FILESYS_SELECTOR:
                DiskSelection (hDlg, IDC_PATH_FILESYS, 12, &workprefs, 0);
@@ -6278,7 +6328,11 @@ static INT_PTR CALLBACK HardfileSettingsProc (HWND hDlg, UINT msg, WPARAM wParam
                break;
        }
 
-       GetDlgItemText (hDlg, IDC_PATH_NAME, current_hfdlg.filename, sizeof current_hfdlg.filename);
+       GetDlgItemText (hDlg, IDC_PATH_NAME, tmp, sizeof tmp);
+       if (strcmp (tmp, current_hfdlg.filename)) {
+           strcpy (current_hfdlg.filename, tmp);
+           updatehdfinfo (hDlg, 1);
+       }
        GetDlgItemText (hDlg, IDC_PATH_FILESYS, current_hfdlg.fsfilename, sizeof current_hfdlg.fsfilename);
        GetDlgItemText (hDlg, IDC_HARDFILE_DEVICE, current_hfdlg.devicename, sizeof current_hfdlg.devicename);
        current_hfdlg.sectors   = GetDlgItemInt(hDlg, IDC_SECTORS, NULL, FALSE);
@@ -6289,6 +6343,7 @@ static INT_PTR CALLBACK HardfileSettingsProc (HWND hDlg, UINT msg, WPARAM wParam
        posn = SendDlgItemMessage (hDlg, IDC_HDF_CONTROLLER, CB_GETCURSEL, 0, 0);
        if (posn != CB_ERR)
            current_hfdlg.controller = posn;
+       updatehdfinfo (hDlg, 0);
        recursive--;
 
        break;
index 57b057668203489da2db55661f3c0feec0d5724c..a6ebcc4c72bef1b8c1d4566689e49d6f06af320e 100644 (file)
@@ -1,4 +1,23 @@
 
+Beta 7:
+
+- added information text to hardfile panel.
+  RDB hardfile: size of selected file, first 4 bytes of data.
+  Regular hardfile: cylinders (warns if > 65535, OS3.5+ only), blocks,
+  current size and total size of hardfile, first 4 bytes of data.
+- analog joystick mouse emulation didn't "repeat"
+- graphics garbage in right border fixed (happened for example when
+  productivity mode with vgaonly was enabled)
+- CDTV CD ROM command 0x83 emulated, returns drive name/version string
+  ("MATSHITA0.97", also "MATSHITA0.96" exists. No idea if there are any
+  real differences). Another quite pointless feature because CDTV's
+  driver does not use command 0x83..
+- ECS superhires sprite positioning fixed. Note that ECS shres sprites
+  always have halved resolution (not size) due to emulation limitation
+- ECS superhires "palette scrambling" emulated, ECS shres colors should
+  be now 100% correct
+- some doublescan emulation tweaks
+
 Beta 6:
 
 - do not call CD32 CD emulation handler when non-CD controller