]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
2800b17
authorToni Wilen <twilen@winuae.net>
Tue, 22 Apr 2014 16:56:00 +0000 (19:56 +0300)
committerToni Wilen <twilen@winuae.net>
Tue, 22 Apr 2014 16:56:00 +0000 (19:56 +0300)
12 files changed:
cia.cpp
custom.cpp
drawing.cpp
gayle.cpp
include/gayle.h
include/memory.h
memory.cpp
newcpu.cpp
od-win32/win32.h
od-win32/win32_scaler.cpp
od-win32/win32gui.cpp
od-win32/winuaechangelog.txt

diff --git a/cia.cpp b/cia.cpp
index 948b55bfd7ced5def5b5d5cbcd43f8c7e231f353..6e88bed12e9821ff119ecee3a71c639055accb31 100644 (file)
--- a/cia.cpp
+++ b/cia.cpp
@@ -1620,14 +1620,23 @@ static void cia_wait_post (uae_u32 value)
        }
 }
 
-static bool isgaylenocia (uaecptr addr)
+static bool iscia(uaecptr addr)
+{
+       uaecptr mask = addr & 0xf000;
+       return mask == 0xe000 || mask == 0xd000;
+}
+
+static bool isgaylenocia(uaecptr addr)
 {
-       // gayle CIA region is only 4096 bytes at 0xbfd000 and 0xbfe000
        if (!isgayle ())
                return true;
-       uaecptr mask = addr & 0xf000;
-       bool cia = mask == 0xe000 || mask == 0xd000;
-       return cia;
+       // gayle CIA region is only 4096 bytes at 0xbfd000 and 0xbfe000
+       return iscia(addr);
+}
+
+static bool isgarynocia(uaecptr addr)
+{
+       return !iscia(addr) && currprefs.cs_fatgaryrev >= 0;
 }
 
 static uae_u32 REGPARAM2 cia_bget (uaecptr addr)
@@ -1639,6 +1648,9 @@ static uae_u32 REGPARAM2 cia_bget (uaecptr addr)
        special_mem |= S_READ;
 #endif
 
+       if (isgarynocia(addr))
+               return dummy_get(addr, 1, false);
+
        if (!isgaylenocia (addr))
                return v;
 
@@ -1683,6 +1695,9 @@ static uae_u32 REGPARAM2 cia_wget (uaecptr addr)
        special_mem |= S_READ;
 #endif
 
+       if (isgarynocia(addr))
+               return dummy_get(addr, 2, false);
+
        if (!isgaylenocia (addr))
                return v;
 
@@ -1741,6 +1756,11 @@ static void REGPARAM2 cia_bput (uaecptr addr, uae_u32 value)
        special_mem |= S_WRITE;
 #endif
 
+       if (isgarynocia(addr)) {
+               dummy_put(addr, 1, false);
+               return;
+       }
+
        if (!isgaylenocia (addr))
                return;
 
@@ -1766,6 +1786,11 @@ static void REGPARAM2 cia_wput (uaecptr addr, uae_u32 value)
        special_mem |= S_WRITE;
 #endif
 
+       if (isgarynocia(addr)) {
+               dummy_put(addr, 2, false);
+               return;
+       }
+
        if (!isgaylenocia (addr))
                return;
 
@@ -1950,11 +1975,17 @@ void rtc_hardreset (void)
 
 static uae_u32 REGPARAM2 clock_lget (uaecptr addr)
 {
+       if ((addr & 0xffff) >= 0x8000 && currprefs.cs_fatgaryrev >= 0)
+               return dummy_get(addr, 4, false);
+
        return (clock_wget (addr) << 16) | clock_wget (addr + 2);
 }
 
 static uae_u32 REGPARAM2 clock_wget (uaecptr addr)
 {
+       if ((addr & 0xffff) >= 0x8000 && currprefs.cs_fatgaryrev >= 0)
+               return dummy_get(addr, 2, false);
+
        return (clock_bget (addr) << 8) | clock_bget (addr + 1);
 }
 
@@ -1967,10 +1998,15 @@ static uae_u32 REGPARAM2 clock_bget (uaecptr addr)
 #ifdef JIT
        special_mem |= S_READ;
 #endif
+
+       if ((addr & 0xffff) >= 0x8000 && currprefs.cs_fatgaryrev >= 0)
+               return dummy_get(addr, 1, false);
+
 #ifdef CDTV
-       if (currprefs.cs_cdtvram && addr >= 0xdc8000)
+       if (currprefs.cs_cdtvram && (addr & 0xffff) >= 0x8000)
                return cdtv_battram_read (addr);
 #endif
+
        addr &= 0x3f;
        if ((addr & 3) == 2 || (addr & 3) == 0 || currprefs.cs_rtc == 0) {
                if (currprefs.cpu_model == 68000 && currprefs.cpu_compatible)
@@ -1986,12 +2022,22 @@ static uae_u32 REGPARAM2 clock_bget (uaecptr addr)
 
 static void REGPARAM2 clock_lput (uaecptr addr, uae_u32 value)
 {
+       if ((addr & 0xffff) >= 0x8000 && currprefs.cs_fatgaryrev >= 0) {
+               dummy_put(addr, 4, value);
+               return;
+       }
+
        clock_wput (addr, value >> 16);
        clock_wput (addr + 2, value);
 }
 
 static void REGPARAM2 clock_wput (uaecptr addr, uae_u32 value)
 {
+       if ((addr & 0xffff) >= 0x8000 && currprefs.cs_fatgaryrev >= 0) {
+               dummy_put(addr, 2, value);
+               return;
+       }
+
        clock_bput (addr, value >> 8);
        clock_bput (addr + 1, value);
 }
@@ -2002,12 +2048,19 @@ static void REGPARAM2 clock_bput (uaecptr addr, uae_u32 value)
        special_mem |= S_WRITE;
 #endif
 //     write_log(_T("W: %x (%x): %x, PC=%08x\n"), addr, (addr & 0xff) >> 2, value & 0xff, M68K_GETPC);
+
+       if ((addr & 0xffff) >= 0x8000 && currprefs.cs_fatgaryrev >= 0) {
+               dummy_put(addr, 1, value);
+               return;
+       }
+
 #ifdef CDTV
-       if (currprefs.cs_cdtvram && addr >= 0xdc8000) {
+       if (currprefs.cs_cdtvram && (addr & 0xffff) >= 0x8000) {
                cdtv_battram_write (addr, value);
                return;
        }
 #endif
+
        addr &= 0x3f;
        if ((addr & 1) != 1 || currprefs.cs_rtc == 0)
                return;
index 58e5782ba5afd64aadce7f5bd26a04aac603abe8..03c8d3d700cbecd63b6f2570f6cdff2726b23ead 100644 (file)
@@ -8294,6 +8294,8 @@ static uae_u32 REGPARAM2 custom_wget (uaecptr addr)
 {
        uae_u32 v;
 
+       if ((addr & 0xffff) < 0x8000 && currprefs.cs_fatgaryrev >= 0)
+               return dummy_get(addr, 2, false);
        if (addr & 1) {
                /* think about move.w $dff005,d0.. (68020+ only) */
                addr &= ~1;
@@ -8310,6 +8312,8 @@ static uae_u32 REGPARAM2 custom_bget (uaecptr addr)
 #ifdef JIT
        special_mem |= S_READ;
 #endif
+       if ((addr & 0xffff) < 0x8000 && currprefs.cs_fatgaryrev >= 0)
+               return dummy_get(addr, 1, false);
        v = custom_wget2 (addr & ~1, true);
        v >>= (addr & 1 ? 0 : 8);
        return v;
@@ -8320,6 +8324,8 @@ static uae_u32 REGPARAM2 custom_lget (uaecptr addr)
 #ifdef JIT
        special_mem |= S_READ;
 #endif
+       if ((addr & 0xffff) < 0x8000 && currprefs.cs_fatgaryrev >= 0)
+               return dummy_get(addr, 4, false);
        return ((uae_u32)custom_wget (addr) << 16) | custom_wget (addr + 2);
 }
 static int REGPARAM2 custom_wput_1 (int hpos, uaecptr addr, uae_u32 value, int noget)
@@ -8544,6 +8550,11 @@ static void REGPARAM2 custom_wput (uaecptr addr, uae_u32 value)
 #ifdef JIT
        special_mem |= S_WRITE;
 #endif
+
+       if ((addr & 0xffff) < 0x8000 && currprefs.cs_fatgaryrev >= 0) {
+               dummy_put(addr, 2, value);
+               return;
+       }
 #if CUSTOM_DEBUG > 2
        write_log (_T("%d:%d:wput: %04X %04X pc=%p\n"), hpos, vpos, addr & 0x01fe, value & 0xffff, m68k_getpc ());
 #endif
@@ -8562,6 +8573,10 @@ static void REGPARAM2 custom_bput (uaecptr addr, uae_u32 value)
        static int warned;
        uae_u16 rval;
 
+       if ((addr & 0xffff) < 0x8000 && currprefs.cs_fatgaryrev >= 0) {
+               dummy_put(addr, 1, value);
+               return;
+       }
        if (currprefs.chipset_mask & CSMASK_AGA) {
                if (addr & 1) {
                        rval = value & 0xff;
@@ -8590,6 +8605,10 @@ static void REGPARAM2 custom_lput (uaecptr addr, uae_u32 value)
 #ifdef JIT
        special_mem |= S_WRITE;
 #endif
+       if ((addr & 0xffff) < 0x8000 && currprefs.cs_fatgaryrev >= 0) {
+               dummy_put(addr, 4, value);
+               return;
+       }
        custom_wput (addr & 0xfffe, value >> 16);
        custom_wput ((addr + 2) & 0xfffe, (uae_u16)value);
 }
index 39d3f880ab63fae9ff097ad2e2eeb092225927f5..5ea62f4059939274ab429aabdc95c05a5e7e1efb 100644 (file)
@@ -1008,7 +1008,7 @@ static void pfield_do_fill_line (int start, int stop, bool blank)
        }
 }
 
-STATIC_INLINE void fill_line2 (int startpos, int len)
+static void fill_line2 (int startpos, int len)
 {
        int shift;
        int nints, nrem;
@@ -1055,18 +1055,36 @@ STATIC_INLINE void fill_line2 (int startpos, int len)
        }
 }
 
-static void fill_line (void)
+static void fill_line_border (void)
 {
-       int hs = coord_hw_to_window_x (hsyncstartpos * 2);
+       int lastpos = visible_left_border;
+       int endpos = visible_left_border + gfxvidinfo.drawbuffer.inwidth;
+
+       // full hblank
        if (hposblank) {
                hposblank = 3;
-               fill_line2 (visible_left_border, gfxvidinfo.drawbuffer.inwidth);
-       } else if (hs >= gfxvidinfo.drawbuffer.inwidth) {
-               fill_line2 (visible_left_border, gfxvidinfo.drawbuffer.inwidth);
-       } else {
-               fill_line2 (visible_left_border, hs);
-               hposblank = 2;
-               fill_line2 (visible_left_border + hs, gfxvidinfo.drawbuffer.inwidth);
+               fill_line2(lastpos, gfxvidinfo.drawbuffer.inwidth);
+               return;
+       }
+       // hblank not visible
+       if (hblank_left_start <= lastpos && hblank_right_stop >= endpos) {
+               fill_line2(lastpos, gfxvidinfo.drawbuffer.inwidth);
+               return;
+       }
+
+       // left, right or both hblanks visible
+       if (lastpos < hblank_left_start) {
+               int t = hblank_left_start < endpos ? hblank_left_start : endpos;
+               pfield_do_fill_line(lastpos, t, true);
+               lastpos = t;
+       }
+       if (lastpos < hblank_right_stop) {
+               int t = hblank_right_stop < endpos ? hblank_right_stop : endpos;
+               pfield_do_fill_line(lastpos, t, false);
+               lastpos = t;
+       }
+       if (lastpos < endpos) {
+               pfield_do_fill_line(lastpos, endpos, true);
        }
 }
 
@@ -2491,8 +2509,9 @@ static void pfield_draw_line (struct vidbuffer *vb, int lineno, int gfx_ypos, in
 
                if (dip_for_drawing->nr_sprites)
                        pfield_erase_hborder_sprites ();
-       } else if (border > 0) {
-               // border > 0: top or bottom border
+
+       } else if (border > 0) { // border > 0: top or bottom border
+
                bool dosprites = false;
 
                adjust_drawing_colors (dp_for_drawing->ctable, 0);
@@ -2507,13 +2526,13 @@ static void pfield_draw_line (struct vidbuffer *vb, int lineno, int gfx_ypos, in
 #endif
 
                if (!dosprites && dip_for_drawing->nr_color_changes == 0) {
-                       fill_line ();
+                       fill_line_border ();
                        do_flush_line (vb, gfx_ypos);
 
                        if (do_double) {
                                if (dh == dh_buf) {
                                        xlinebuffer = row_map[follow_ypos] - linetoscr_x_adjust_bytes;
-                                       fill_line ();
+                                       fill_line_border ();
                                }
                                /* If dh == dh_line, do_flush_line will re-use the rendered line
                                * from linemem.  */
@@ -2557,7 +2576,7 @@ static void pfield_draw_line (struct vidbuffer *vb, int lineno, int gfx_ypos, in
                // top or bottom blanking region
                int tmp = hposblank;
                hposblank = 1;
-               fill_line ();
+               fill_line_border ();
                do_flush_line (vb, gfx_ypos);
                hposblank = tmp;
 
@@ -2996,6 +3015,7 @@ static void draw_frame2 (struct vidbuffer *vbin, struct vidbuffer *vbout)
        xvbin = vbin;
        xvbout = vbout;
 
+//     int largest = 0;
        for (i = 0; i < max_ypos_thisframe; i++) {
                int i1 = i + min_ypos_for_screen;
                int line = i + thisframe_y_adjust_real;
@@ -3006,9 +3026,12 @@ static void draw_frame2 (struct vidbuffer *vbin, struct vidbuffer *vbout)
                if (where2 < 0)
                        continue;
 
+//             if (largest < where2)
+//                     largest = where2;
                hposblank = 0;
                pfield_draw_line (vbout, line, where2, amiga2aspect_line_map[i1 + 1]);
        }
+       //write_log (_T("%d\n"), largest);
 }
 
 bool draw_frame (struct vidbuffer *vb)
index 3625914f599eb5e9882e82412b6aad92ac5e4c5d..850930da1081130909382c8c5ddf2115e80f67a6 100644 (file)
--- a/gayle.cpp
+++ b/gayle.cpp
@@ -1787,18 +1787,22 @@ static void REGPARAM2 gayle2_bput (uaecptr addr, uae_u32 value)
 }
 
 static uae_u8 ramsey_config;
-static int gary_coldboot;
-static int gary_timeout;
 static int garyidoffset;
+static int gary_coldboot;
+int gary_timeout;
 int gary_toenb;
 
 static void mbres_write (uaecptr addr, uae_u32 val, int size)
 {
-       addr &= 0xffff;
+       if ((addr & 0xffff) >= 0x8000) {
+               dummy_put(addr, size, val);
+               return;
+       }
 
+       addr &= 0xffff;
        if (MBRES_LOG > 0)
                write_log (_T("MBRES_WRITE %08X=%08X (%d) PC=%08X S=%d\n"), addr, val, size, M68K_GETPC, regs.s);
-       if (1 || regs.s) { /* CPU FC = supervisor only */
+       if (addr < 0x8000 && (1 || regs.s)) { /* CPU FC = supervisor only */
                uae_u32 addr2 = addr & 3;
                uae_u32 addr64 = (addr >> 6) & 3;
                if (addr == 0x1002)
@@ -1817,6 +1821,10 @@ static void mbres_write (uaecptr addr, uae_u32 val, int size)
 static uae_u32 mbres_read (uaecptr addr, int size)
 {
        uae_u32 v = 0;
+
+       if ((addr & 0xffff) >= 0x8000)
+               return dummy_get(addr, size, false);
+
        addr &= 0xffff;
 
        if (1 || regs.s) { /* CPU FC = supervisor only (only newest ramsey/gary? never implemented?) */
index 2982f9517670b0c02eb46b2249d770c638fbf958..69000f5a2c2d1d3fe4f6539188df5a5c4151416c 100644 (file)
@@ -12,6 +12,7 @@ extern void rethink_gayle (void);
 extern void gayle_map_pcmcia (void);
 
 extern int gary_toenb; // non-existing memory access = bus error.
+extern int gary_timeout; // non-existing memory access = delay
 
 #define PCMCIA_COMMON_START 0x600000
 #define PCMCIA_COMMON_SIZE 0x400000
index bc997fa98b934d974c68f93240f866984b5b6560..6f809ee613ba89759be3949d28d422f02af3c6a1 100644 (file)
@@ -230,6 +230,9 @@ extern uae_u16 last_custom_value1;
 
 /* Default memory access functions */
 
+extern void dummy_put (uaecptr addr, int size, uae_u32 val);
+extern uae_u32 dummy_get (uaecptr addr, int size, bool inst);
+
 extern int REGPARAM3 default_check(uaecptr addr, uae_u32 size) REGPARAM;
 extern uae_u8 *REGPARAM3 default_xlate(uaecptr addr) REGPARAM;
 /* 680x0 opcode fetches */
index a9827251e305a751994f874ea2ce0cf7c4bad625..3fd47b13e3306a2b5e209f05f6b40d3c591f0423 100644 (file)
@@ -178,18 +178,57 @@ static void dummylog (int rw, uaecptr addr, int size, uae_u32 val, int ins)
        }
 }
 
-static void dummy_put (uaecptr addr, int size)
+// 250ms delay
+static void gary_wait(uaecptr addr, int size)
 {
-       if (gary_toenb && currprefs.mmu_model)
-               exception2 (addr, true, size, regs.s ? 4 : 0);
+       static int cnt = 50;
+
+#if 0
+       int lines = 313 * 12;
+       while (lines-- > 0)
+               x_do_cycles(228 * CYCLE_UNIT);
+#endif
+
+       if (cnt > 0) {
+               write_log (_T("Gary timeout: %08x %d\n"), addr, size);
+               cnt--;
+       }
+}
+
+static bool gary_nonrange(uaecptr addr)
+{
+       if (addr <= 0xb80000)
+               return false;
+       if (addr >= 0xd00000 && addr < 0xdc0000)
+               return true;
+       if (addr >= 0xdd0000 && addr < 0xde0000)
+               return true;
+       if (addr >= 0xdf8000 && addr < 0xe00000)
+               return false;
+       if (addr >= 0xe80000 && addr < 0xf80000)
+               return false;
+       return true;
+}
+
+void dummy_put (uaecptr addr, int size, uae_u32 val)
+{
+       if (gary_nonrange(addr) || (size > 1 && gary_nonrange(addr + size - 1))) {
+               if (gary_timeout)
+                       gary_wait (addr, size);
+               if (gary_toenb && currprefs.mmu_model)
+                       exception2 (addr, true, size, regs.s ? 4 : 0);
+       }
 }
 
-static uae_u32 dummy_get (uaecptr addr, int size, bool inst)
+uae_u32 dummy_get (uaecptr addr, int size, bool inst)
 {
        uae_u32 v = NONEXISTINGDATA;
 
-       if (gary_toenb && currprefs.mmu_model) {
-               exception2 (addr, false, size, (regs.s ? 4 : 0) | (inst ? 0 : 1));
+       if (gary_nonrange(addr) || (size > 1 && gary_nonrange(addr + size - 1))) {
+               if (gary_timeout)
+                       gary_wait (addr, size);
+               if (gary_toenb && currprefs.mmu_model)
+                       exception2 (addr, false, size, (regs.s ? 4 : 0) | (inst ? 0 : 1));
                return v;
        }
 
@@ -279,7 +318,7 @@ static void REGPARAM2 dummy_lput (uaecptr addr, uae_u32 l)
 #endif
        if (currprefs.illegal_mem)
                dummylog (1, addr, 4, l, 0);
-       dummy_put (addr, 4);
+       dummy_put (addr, 4, l);
 }
 static void REGPARAM2 dummy_wput (uaecptr addr, uae_u32 w)
 {
@@ -288,7 +327,7 @@ static void REGPARAM2 dummy_wput (uaecptr addr, uae_u32 w)
 #endif
        if (currprefs.illegal_mem)
                dummylog (1, addr, 2, w, 0);
-       dummy_put (addr, 2);
+       dummy_put (addr, 2, w);
 }
 static void REGPARAM2 dummy_bput (uaecptr addr, uae_u32 b)
 {
@@ -297,7 +336,7 @@ static void REGPARAM2 dummy_bput (uaecptr addr, uae_u32 b)
 #endif
        if (currprefs.illegal_mem)
                dummylog (1, addr, 1, b, 0);
-       dummy_put (addr, 1);
+       dummy_put (addr, 1, b);
 }
 
 static int REGPARAM2 dummy_check (uaecptr addr, uae_u32 size)
index 332d3f5d0f6493d576f0ed82aac7e97ffc48e41d..5a51818b20c8ab39770f95f65f3cccc37093b240 100644 (file)
@@ -1345,18 +1345,16 @@ void check_prefs_changed_cpu(void)
 
 void init_m68k (void)
 {
-       int i;
-
        prefs_changed_cpu ();
        update_68k_cycles ();
 
-       for (i = 0 ; i < 256 ; i++) {
+       for (int i = 0 ; i < 256 ; i++) {
                int j;
                for (j = 0 ; j < 8 ; j++) {
                        if (i & (1 << j)) break;
                }
                movem_index1[i] = j;
-               movem_index2[i] = 7-j;
+               movem_index2[i] = 7 - j;
                movem_next[i] = i & (~(1 << j));
        }
 
@@ -3205,10 +3203,8 @@ static int do_specialties (int cycles)
                        }
                }
 
-               if (regs.spcflags & (SPCFLAG_BRK | SPCFLAG_MODE_CHANGE)) {
-                       unset_special (SPCFLAG_BRK);
-                       // SPCFLAG_BRK breaks STOP condition, need to prefetch
-                       m68k_resumestopped ();
+               if (regs.spcflags & SPCFLAG_MODE_CHANGE) {
+                       m68k_resumestopped();
                        return 1;
                }
 
@@ -3260,8 +3256,13 @@ static int do_specialties (int cycles)
                set_special (SPCFLAG_INT);
        }
 
-       if (regs.spcflags & SPCFLAG_BRK)
-               return 1;
+       if (regs.spcflags & SPCFLAG_BRK) {
+               unset_special(SPCFLAG_BRK);
+#ifdef DEBUGGER
+               if (debugging)
+                       debug();
+#endif
+       }
 
        return 0;
 }
@@ -4344,7 +4345,8 @@ void m68k_go (int may_quit)
 #if 0
                }
 #endif
-               unset_special(SPCFLAG_BRK | SPCFLAG_MODE_CHANGE);
+               unset_special(SPCFLAG_MODE_CHANGE);
+               unset_special(SPCFLAG_BRK);
                //activate_debugger();
                run_func();
        }
@@ -4607,7 +4609,7 @@ static const int fpsizeconv[] = {
 static void disasm_size (TCHAR *instrname, struct instr *dp)
 {
        if (dp->unsized) {
-               _tcscat(instrname, _T("   "));
+               _tcscat(instrname, _T(" "));
                return;
        }
        switch (dp->size)
@@ -4622,7 +4624,7 @@ static void disasm_size (TCHAR *instrname, struct instr *dp)
                _tcscat (instrname, _T(".L "));
                break;
        default:
-               _tcscat (instrname, _T("   "));
+               _tcscat (instrname, _T(" "));
                break;
        }
 }
@@ -4769,6 +4771,19 @@ void m68k_disasm_2 (TCHAR *buf, int bufsize, uaecptr pc, uaecptr *nextpc, int cn
                        p = instrname + _tcslen(instrname);
                        if (lookup->mnemo == i_BFFFO || lookup->mnemo == i_BFEXTS || lookup->mnemo == i_BFEXTU)
                                _stprintf(p, _T(",D%d"), reg);
+               } else if (lookup->mnemo == i_CPUSHA || lookup->mnemo == i_CPUSHL || lookup->mnemo == i_CPUSHP) {
+                       if ((opcode & 0xc0) == 0xc0)
+                               _tcscat(instrname, _T("BC"));
+                       else if (opcode & 0x80)
+                               _tcscat(instrname, _T("IC"));
+                       else if (opcode & 0x40)
+                               _tcscat(instrname, _T("DC"));
+                       else
+                               _tcscat(instrname, _T("?"));
+                       if (lookup->mnemo == i_CPUSHL || lookup->mnemo == i_CPUSHP) {
+                               TCHAR *p = instrname + _tcslen(instrname);
+                               _stprintf(p, _T(",(A%d)"), opcode & 7);
+                       }
                } else if (lookup->mnemo == i_FPP) {
                        TCHAR *p;
                        int ins = extra & 0x3f;
index d86ec664b4e97611e62d9a90c0bcc6222e2a02b1..665b4291c0341e414dc3c5ba33c0cafc3f0a8069 100644 (file)
 #define LANG_DLL 1
 
 #if WINUAEPUBLICBETA
-#define WINUAEBETA _T("16")
+#define WINUAEBETA _T("17")
 #else
 #define WINUAEBETA _T("")
 #endif
-#define WINUAEDATE MAKEBD(2014, 4, 17)
+#define WINUAEDATE MAKEBD(2014, 4, 22)
 #define WINUAEEXTRA _T("")
 //#define WINUAEEXTRA _T("AmiKit Preview")
 //#define WINUAEEXTRA _T("Amiga Forever Edition")
index 060b677d9db82cd9b5c3be08e296c4a1be0089e9..ea92e195bbf7053ce527a82b8a8a26de1b53367b 100644 (file)
@@ -115,17 +115,27 @@ static void getmanualpos (int *cxp, int *cyp, int *cwp, int *chp)
                cy = (v >> (VRES_MAX - currprefs.gfx_vresolution)) - cy;
 
        v = currprefs.gfx_xcenter_size;
-       if (v <= 0)
-               cw = native ? AMIGA_WIDTH_MAX * 4 : gfxvidinfo.outbuffer->outwidth;
-       else
+       if (v <= 0) {
+               if (programmedmode && native) {
+                       cw = gfxvidinfo.outbuffer->outwidth << (RES_MAX - currprefs.gfx_resolution);
+               } else {
+                       cw = native ? AMIGA_WIDTH_MAX << RES_MAX : gfxvidinfo.outbuffer->outwidth;
+               }
+       } else {
                cw = v;
+       }
        cw >>=  (RES_MAX - currprefs.gfx_resolution);
 
        v = currprefs.gfx_ycenter_size;
-       if (v <= 0)
-               ch = native ? AMIGA_HEIGHT_MAX * 2 : gfxvidinfo.outbuffer->outheight;
-       else
+       if (v <= 0) {
+               if (programmedmode && native) {
+                       ch = gfxvidinfo.outbuffer->outheight << (VRES_MAX - currprefs.gfx_vresolution);
+               } else {
+                       ch = native ? AMIGA_HEIGHT_MAX << VRES_MAX : gfxvidinfo.outbuffer->outheight;
+               }
+       } else {
                ch = v;
+       }
        ch >>= (VRES_MAX - currprefs.gfx_vresolution);
 
        *cxp = cx;
@@ -288,8 +298,8 @@ void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height
                                        store_custom_limits (cw, ch, cx, cy);
                                }
 
-                               int cw2 = cw + filter_horiz_zoom;
-                               int ch2 = ch + filter_vert_zoom;
+                               int cw2 = cw + cw * filter_horiz_zoom;
+                               int ch2 = ch + ch * filter_vert_zoom;
 
                                extraw = 0;
                                extrah = 0;
index dbda4f7941e188f9c195b9533ade5c8f53226c43..cb25f4a4e8534ed7ca96e64845bdb08e632b0a81 100644 (file)
@@ -916,7 +916,7 @@ static int getdeepfavdiskimage (TCHAR *imgpath, struct favitems *fitem, int idx)
        _tcscat (mask, _T("*.*"));
        myd = my_opendir (path, mask);
        int cnt = 0;
-       while (cnt < 30) {
+       while (myd && cnt < 30) {
                TCHAR tmp[MAX_DPATH], tmp2[MAX_DPATH];
                if (!my_readdir (myd, tmp))
                        break;
@@ -1799,7 +1799,7 @@ int target_cfgfile_load (struct uae_prefs *p, const TCHAR *filename, int type, i
                discard_prefs (p, 0);
        }
        type2 = type;
-       if (type == 0) {
+       if (type == 0 || type == 3) {
                default_prefs (p, type);
 #if 0
                if (isdefault == 0) {
@@ -14391,8 +14391,18 @@ static void values_to_hw3ddlg (HWND hDlg)
                i++;
        SendDlgItemMessage (hDlg, IDC_FILTERSTACK, CB_SETCURSEL, i, 0);
 
-       int range1 = workprefs.gf[filter_nativertg].gfx_filter_autoscale == AUTOSCALE_MANUAL ? -1 : -9999;
-       int range2 = workprefs.gf[filter_nativertg].gfx_filter_autoscale == AUTOSCALE_MANUAL ? 1800 : 9999;
+       int range1, range2;
+       
+       if (workprefs.gf[filter_nativertg].gfx_filter_autoscale == AUTOSCALE_MANUAL) {
+               range1 = -1;
+               range2 = 1800;
+       } else if (workprefs.gf[filter_nativertg].gfx_filter_autoscale == AUTOSCALE_INTEGER || workprefs.gf[filter_nativertg].gfx_filter_autoscale == AUTOSCALE_INTEGER_AUTOSCALE) {
+               range1 = -99;
+               range2 = 99;
+       } else {
+               range1 = -9999;
+               range2 = 9999;
+       }
 
        SendDlgItemMessage (hDlg, IDC_FILTERHZ, TBM_SETRANGE, TRUE, MAKELONG (range1, range2));
        SendDlgItemMessage (hDlg, IDC_FILTERHZ, TBM_SETPAGESIZE, 0, 1);
@@ -16253,7 +16263,7 @@ static INT_PTR CALLBACK DialogProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
                        dialogreturn = 0;
                        if (allow_quit) {
                                quit_program = UAE_QUIT;
-                               regs.spcflags |= SPCFLAG_BRK;
+                               regs.spcflags |= SPCFLAG_MODE_CHANGE;
                        }
                }
                return TRUE;
@@ -16340,7 +16350,7 @@ static INT_PTR CALLBACK DialogProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
                                DestroyWindow (hDlg);
                                if (allow_quit) {
                                        quit_program = UAE_QUIT;
-                                       regs.spcflags |= SPCFLAG_BRK;
+                                       regs.spcflags |= SPCFLAG_MODE_CHANGE;
                                }
                                guiDlg = NULL;
                                return TRUE;
index 631b385d68aa85e228fa2f65197d0d1c0dd56cfc..fcaf0f687d8773d4a0339f5bf23d9e1c2cb0a327 100644 (file)
 
 - restore only single input target to default.
 
+Beta 17:
+
+- Debugger breakpoints work again. (b14)
+- Full CPUSHA/CPUSHL/CPUSHP disassembly implemented.
+- Integer scale mode compatibility improved with programmed display modes.
+- Integer scale mode changes Filter panel zoom slider range to -99 to 99 and is used to adjust integer
+  scaling calculation. For example -10 means if next largest scaling factor is selected even if
+  display height is 10% too big to fit normally. (This was implemented already but it didn't
+  work properly)
+- Fixed fill_line() top/bottom background line drawing buffer overflow in some programmed modes.
+- Some programmed modes had single short background colored line in left horizontal blanking area.
+- Command line (or icon doubleclick) loaded config didn't reset previously loaded config (default.uae,
+  if it existed)
+- Emulated more Fat Gary address regions that are unmapped (CIA is same as Gayle, upper 32k in
+  clock space and Gary register space are unmapped, 0xdf0000-0xdf7fff is also unmapped)
+- Emulate Fat Gary invalid address space access timeout if Gary timeout bit is set, first 50 timeouts
+  are always logged. To prevent last moment stupid bugs or bug reports, delay is not yet enabled.
+
 Beta 16:
 
 - Borderblank blanked sprites incorrectly in some situations (b11, Roots AGA)