]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
imported winuaesrc1530b8.zip
authorToni Wilen <twilen@winuae.net>
Sun, 9 Nov 2008 09:19:33 +0000 (11:19 +0200)
committerToni Wilen <twilen@winuae.net>
Mon, 22 Feb 2010 19:43:38 +0000 (21:43 +0200)
archivers/dms/pfile.c
cia.c
gayle.c
gfxutil.c
od-win32/hardfile_win32.c
od-win32/picasso96_win.c
od-win32/win32.h
od-win32/winuaechangelog.txt

index 7677714b42e4f70c3daecb94e02ad2803c0e7ed5..d1bf43b3a5dc2f3417b1b5a125665464bd7ba23f 100755 (executable)
@@ -420,7 +420,7 @@ static USHORT Unpack_Track(UCHAR *b1, UCHAR *b2, USHORT pklen2, USHORT unpklen,
            if (usum1 == Calc_CheckSum(b2,(ULONG)unpklen)) {
                passfound = maybeencrypted;
                if (passfound)
-                   write_log ("DMS: decryption key = 0x%04.4X\n", pass);
+                   write_log ("DMS: decryption key = 0x%04X\n", prevpass);
                err = NO_PROBLEM;
                pass = prevpass;
                break;
diff --git a/cia.c b/cia.c
index bb8d5100c47a60ad748469d9ed4a1dead62304f1..1704a68b2b847bb04e58b7c1b7b707b169354256 100755 (executable)
--- a/cia.c
+++ b/cia.c
@@ -335,6 +335,7 @@ STATIC_INLINE void ciaa_checkalarm (int inc)
 
 #ifdef TOD_HACK
 static uae_u64 tod_hack_tv, tod_hack_tod, tod_hack_tod_last;
+static int tod_hack_enabled;
 static void tod_hack_reset (void)
 {
     struct timeval tv;
@@ -349,20 +350,36 @@ static void do_tod_hack (int dotod)
 {
     struct timeval tv;
     static int oldrate;
-    uae_u64 t, rate;
+    uae_u64 t;
+    int rate;
     int docount = 0;
 
+    if (tod_hack_enabled == 0)
+       return;
+    if (tod_hack_enabled > 1) {
+       tod_hack_enabled--;
+       if (tod_hack_enabled == 1) {
+           write_log ("TOD HACK enabled\n");
+           tod_hack_reset ();
+       }
+       return;
+    }
+
     if (currprefs.cs_ciaatod == 0)
         rate = vblank_hz;
     else if (currprefs.cs_ciaatod == 1)
         rate = 50;
     else
         rate = 60;
+    if (rate <= 0)
+       return;
     if (rate != oldrate || ciaatod != tod_hack_tod_last) {
+       if (ciaatod != 0)
+           write_log ("TOD HACK reset %d,%d %d,%d\n",
+               rate, oldrate, ciaatod, tod_hack_tod_last);
         tod_hack_reset ();
         oldrate = rate;
        docount = 1;
-       write_log ("TOD HACK reset %d\n", rate);
     }
     if (!dotod && currprefs.cs_ciaatod == 0)
        return;
@@ -547,7 +564,7 @@ void CIA_vsync_handler (int dotod)
 {
     led_vsync ();
 #ifdef TOD_HACK
-    if (currprefs.tod_hack)
+    if (currprefs.tod_hack && tod_hack_enabled == 1)
        return;
 #endif
     if (ciaatodon && dotod) {
@@ -1102,8 +1119,9 @@ void CIA_reset (void)
 #ifdef TOD_HACK
     tod_hack_tv = 0;
     tod_hack_tod = 0;
+    tod_hack_enabled = 0;
     if (currprefs.tod_hack)
-       tod_hack_reset ();
+       tod_hack_enabled = 312 * 50 * 10;
 #endif
     kback = 1;
     kbstate = 3;
diff --git a/gayle.c b/gayle.c
index 24b91b74437256783e215a54c191fd99a80f88e5..1fdc64f3c357d5ee9724b242e70e5d95ad732771 100755 (executable)
--- a/gayle.c
+++ b/gayle.c
@@ -1820,9 +1820,9 @@ int gayle_add_pcmcia_sram_unit (const char *path, int readonly)
 int gayle_modify_pcmcia_sram_unit (const char *path, int readonly, int insert)
 {
     if (insert)
-       return initpcmcia (path, readonly, 1);
+       return initpcmcia (path, readonly, pcmcia_sram ? 0 : 1);
     else
-       return freepcmcia (1);
+       return freepcmcia (0);
 }
 
 static void initide (void)
index 3cbaf5de2731227be6b76e6177ab6120c8d74729..3ff46c0719500f4e1b677db067b6645ffbfeb228 100755 (executable)
--- a/gfxutil.c
+++ b/gfxutil.c
@@ -200,7 +200,6 @@ void alloc_colors_picasso (int rw, int gw, int bw, int rs, int gs, int bs, int r
     int i;
     int red_bits = 0, green_bits, blue_bits;
     int red_shift, green_shift, blue_shift;
-
     int bpp = rw + gw + bw;
 
     switch (rgbfmt)
@@ -278,7 +277,7 @@ void alloc_colors_picasso (int rw, int gw, int bw, int rs, int gs, int bs, int r
            b = (((j >>  blue_shift) & lbmask) << lbbits) | lowbits (j,  blue_shift, lbbits);
            c = doMask(r, rw, rs) | doMask(g, gw, gs) | doMask(b, bw, bs);
            if (bpp <= 16)
-               c |= c * 0x00010001;
+               c *= 0x00010001;
            p96_rgbx16[i] = c;
        }
     }
index ba0ca6f2c9c3e7319ddd0e072ce4e1ee19f76dac..1dd7f08699625499063db030cd16dc875fa97b35 100755 (executable)
@@ -206,7 +206,7 @@ int hdf_open (struct hardfiledata *hfd, const char *pname)
            if (h == INVALID_HANDLE_VALUE)
                goto end;
            if (!DeviceIoControl(h, FSCTL_ALLOW_EXTENDED_DASD_IO, NULL, 0, NULL, 0, &r, NULL))
-               write_log ("FSCTL_ALLOW_EXTENDED_DASD_IO returned %d\n", GetLastError());
+               write_log ("WARNING: '%s' FSCTL_ALLOW_EXTENDED_DASD_IO returned %d\n", name, GetLastError());
            strncpy (hfd->vendor_id, udi->vendor_id, 8);
            strncpy (hfd->product_id, udi->product_id, 16);
            strncpy (hfd->product_rev, udi->product_rev, 4);
@@ -295,8 +295,8 @@ int hdf_open (struct hardfiledata *hfd, const char *pname)
     }
     hfd->handle = h;
     if (hfd->handle_valid || hfd->drive_empty) {
-       hfd_log ("HDF '%s' opened succesfully, mode=%d empty=%d\n",
-           name, hfd->handle_valid, hfd->drive_empty);
+       hfd_log ("HDF '%s' opened, size=%dK mode=%d empty=%d\n",
+           name, hfd->size / 1024, hfd->handle_valid, hfd->drive_empty);
        return 1;
     }
 end:
index 040ea4b08098b6453dcbf857841d14df85172a72..17c4342c88eff5c154490b672c88176afbb82356 100755 (executable)
@@ -661,30 +661,36 @@ static int doskip (void)
 
 static void picasso_trigger_vblank (void)
 {
-    if (!boardinfo || !uaegfx_base || !interrupt_enabled)
+    if (!boardinfo || !uaegfx_base || !interrupt_enabled) {
        return;
+    }
     put_long (uaegfx_base + CARD_VBLANKCODE + 6 + 2, boardinfo + PSSO_BoardInfo_SoftInterrupt);
     put_byte (uaegfx_base + CARD_VBLANKFLAG, 1);
     INTREQ_f (0x8000 | 0x2000);
 }
 
+static int isvsync (void)
+{
+    return currprefs.gfx_pfullscreen && currprefs.gfx_pvsync;
+}
+
 void picasso_handle_vsync (void)
 {
     static int vsynccnt;
-    int isvsync = 1;
+    int thisisvsync = 1;
     
 #ifdef RETROPLATFORM
     rp_vsync ();
 #endif
 
     if (currprefs.chipset_refreshrate >= 100) {
-       vsynccnt++;
+       thisisvsync++;
        if (vsynccnt < 2)
-           isvsync = 0;
+           thisisvsync = 0;
        vsynccnt = 0;
     }
 
-    if (isvsync && currprefs.win32_rtgvblankrate == 0 && !(currprefs.gfx_pfullscreen && currprefs.gfx_pvsync))
+    if (thisisvsync && currprefs.win32_rtgvblankrate == 0 && !isvsync ())
        picasso_trigger_vblank ();
 
     if (!picasso_on)
@@ -695,7 +701,7 @@ void picasso_handle_vsync (void)
     framecnt++;
     mouseupdate ();
 
-    if (isvsync) {
+    if (thisisvsync) {
        if (doskip () && p96skipmode == 0) {
            ;
        } else {
@@ -850,6 +856,7 @@ static void setconvert (void)
     }
     picasso_convert = v;
     host_mode = DirectDraw_GetSurfacePixelFormat (NULL);
+    gfx_set_picasso_colors (picasso96_state.RGBFormat);
     if (d == 4)
        alloc_colors_rgb (8, 8, 8, 16, 8, 0, 0, 0, 0, 0, p96rc, p96gc, p96bc);
     else
@@ -3250,7 +3257,7 @@ void picasso_handle_hsync (void)
 
     if (currprefs.gfxmem_size == 0)
        return;
-    if (currprefs.win32_rtgvblankrate == 0)
+    if (currprefs.win32_rtgvblankrate == 0 && !isvsync ())
        return;
     if (p96hsync < 0) {
        p96hsync++;
@@ -3258,7 +3265,7 @@ void picasso_handle_hsync (void)
            p96hsync = p96syncrate;
        return;
     }
-    if (WIN32GFX_IsPicassoScreen () && currprefs.gfx_pfullscreen && currprefs.gfx_pvsync) {
+    if (WIN32GFX_IsPicassoScreen () && isvsync ()) {
        if (DirectDraw_GetVerticalBlankStatus ())
            p96hsync = -maxvpos / 3;
     } else {
@@ -3274,7 +3281,7 @@ void picasso_handle_hsync (void)
 void init_hz_p96 (void)
 {
     p96syncrate = maxvpos * vblank_hz;
-    if (currprefs.win32_rtgvblankrate < 0) 
+    if (currprefs.win32_rtgvblankrate < 0 || isvsync ()
        p96vblank = DirectDraw_CurrentRefreshRate ();
     else if (currprefs.win32_rtgvblankrate == 0)
        p96vblank = vblank_hz;
index 49abe4be3d75bf834ff225949509e98f6c0e0994..5347ffd91a1b7acbdbbccf9ac69bb8f7d3887665 100755 (executable)
@@ -17,8 +17,8 @@
 
 #define WINUAEPUBLICBETA 1
 
-#define WINUAEBETA "7"
-#define WINUAEDATE MAKEBD(2008, 11, 2)
+#define WINUAEBETA "8"
+#define WINUAEDATE MAKEBD(2008, 11, 9)
 #define WINUAEEXTRA ""
 #define WINUAEREV ""
 
index f44a0bb362c2e45923b05f9177199550e8a0a98c..673bb9f071c2a39837ad2ccc90a03d50992605e9 100755 (executable)
@@ -1,4 +1,13 @@
 
+1.5.3
+
+- delay sync clock enable until 10s from reset
+- real PCMCIA SRAM re-insert detection really really does work now
+  (Thanks to Eclipse for donating PCMCIA SRAM card)
+  Vista note: Vista does not come with generic PCMCIA SRAM drivers
+  anymore but XP built-in drivers work after force-installing them..
+  (only need memcard.sys and memcard.inf) 32-bit tested only.
+
 Beta 7:
 
 - fixed D3D scanline missing right edge
@@ -11,7 +20,8 @@ Beta 7:
   configured chipset refresh rate was different than current refresh
   rate. Bug since the beginning of time but genlock option made this
   worse because old "genlock always connected" feature hide this bug..
-  (CIA-A TOD configured to PS tick didn't have this problem)
+  (CIA-A TOD configured to PS tick didn't have this problem) Thanks
+  to Ed Cruse for real NTSC A3000 testing.
 - Syncronize clock improved. Automatically enables PS supply tick mode
   (CIA-A TOD = sysclock only if it uses PS supply tick) and also counts
   "lost" ticks when emulation is stopped (for example GUI is open)
@@ -36,7 +46,6 @@ Beta 6:
   apparently only gets reset when disk read is started. Kick Off 2
   save, most likely many other programs too..
 
-
 Beta 5:
 
 - moved file extension stuff to half-empty priority panel, replaced