]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
imported winuaesrc1340b8b.zip
authorToni Wilen <twilen@winuae.net>
Thu, 28 Dec 2006 22:49:23 +0000 (00:49 +0200)
committerToni Wilen <twilen@winuae.net>
Mon, 22 Feb 2010 19:30:58 +0000 (21:30 +0200)
custom.c
od-win32/sounddep/sound.c
od-win32/win32.c
od-win32/win32.h
od-win32/win32gfx.c
od-win32/winuaechangelog.txt

index 3102818240377cae2373e939d8c928dc09884988..f803d6cf2a8c2354ec956147d477b2b40977244d 100755 (executable)
--- a/custom.c
+++ b/custom.c
@@ -2634,12 +2634,20 @@ static void INTREQ_f(uae_u32 data)
     rethink_cias ();
 }
 
+static void INTREQ_d (uae_u16 v, int d)
+{
+    if (!currprefs.cpu_compatible || v == 0)
+       INTREQ_f(v);
+    else
+       event2_newevent2(d, v, INTREQ_f);
+}
+
 void INTREQ (uae_u16 v)
 {
     if (!currprefs.cpu_compatible)
        INTREQ_f(v);
     else
-       event2_newevent2(6, v, INTREQ_f);
+       INTREQ_d(v, 6);
 }
 
 static void ADKCON (int hpos, uae_u16 v)
@@ -4122,7 +4130,7 @@ static void vsync_handler (void)
 
     handle_events ();
 
-    INTREQ (0x8020);
+    INTREQ_d (0x8000 | 0x0020, 2);
     if (bplcon0 & 4)
        lof ^= 0x8000;
 
@@ -4383,20 +4391,11 @@ static void hsync_handler (void)
        next_lineno = lineno;
        reset_decisions ();
     }
-#if 1
+
 #ifdef FILESYS
     if (uae_int_requested) {
        INTREQ (0x8000 | 0x0008);
     }
-#endif
-#if 0
-    {
-    extern volatile int bsd_int_requested;
-    if (bsd_int_requested) {
-       INTREQ (0x8000 | 0x2000);
-    }
-    }
-#endif
 #endif
 
     /* See if there's a chance of a copper wait ending this line.  */
@@ -4643,8 +4642,8 @@ void customreset (void)
        uae_u32 vv;
 
        audio_update_adkmasks ();
-       INTENA (0);
-       INTREQ (0);
+       INTENA_f (0);
+       INTREQ_f (0);
 #if 0
        DMACON (0, 0);
 #endif
index 437249a47d3b2d52a0b2b778efe9b8e1e96c573d..ee57b6c1e41b41a63b071671d3cbc6f9f66df4c4 100755 (executable)
@@ -510,7 +510,9 @@ void restart_sound_buffer(void)
     hr = IDirectSoundBuffer_GetCurrentPosition (lpDSBsecondary, &playpos, &safed);
     if (FAILED(hr))
        return;
-    writepos = playpos + snd_writeoffset;
+    writepos = playpos + snd_writeoffset - 2 * sndbufsize;
+    if (writepos < 0)
+       writepos += dsoundbuf;
     cf (writepos);
 }
 
@@ -608,6 +610,7 @@ static void finish_sound_buffer_ds (void)
            diff = dsoundbuf - playpos + writepos;
 
        if (diff < safedist || diff > snd_totalmaxoffset_uf) {
+#if 0
            hr = IDirectSoundBuffer_Lock (lpDSBsecondary, writepos, sndbufsize, &b1, &s1, &b2, &s2, 0);
            if (SUCCEEDED(hr)) {
                memset (b1, 0, s1);
@@ -615,11 +618,15 @@ static void finish_sound_buffer_ds (void)
                    memset (b2, 0, s2);
                IDirectSoundBuffer_Unlock (lpDSBsecondary, b1, s1, b2, s2);
            }
+#endif
            gui_data.sndbuf_status = -1;
            statuscnt = SND_STATUSCNT;
+           if (diff > snd_totalmaxoffset_uf)
+               writepos += dsoundbuf - diff;
            writepos += sndbufsize;
            cf(writepos);
-           continue;
+           diff = safedist;
+           break;
        }
 
        if (diff > snd_totalmaxoffset_of) {
@@ -627,7 +634,7 @@ static void finish_sound_buffer_ds (void)
            statuscnt = SND_STATUSCNT;
            restart_sound_buffer();
            diff = snd_writeoffset;
-           write_log("SOUND: overflow (%d %d)\n", diff, snd_totalmaxoffset_of);
+           write_log("SOUND: underflow (%d %d)\n", diff, snd_totalmaxoffset_of);
            break;
        }
 
index 8e6cd132fd8d75b509aec792217e990f7220593a..b019679c89f911f7531c0b3fc42afed0693db9e2 100755 (executable)
@@ -893,8 +893,8 @@ static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
     case WM_WINDOWPOSCHANGED:
        GetWindowRect (hWnd, &amigawin_rect);
        if (!isfullscreen()) {
-           currprefs.gfx_size_win.x = amigawin_rect.left;
-           currprefs.gfx_size_win.y = amigawin_rect.top;
+           changed_prefs.gfx_size_win.x = amigawin_rect.left;
+           changed_prefs.gfx_size_win.y = amigawin_rect.top;
        }
     break;
 
@@ -1188,8 +1188,8 @@ static LRESULT CALLBACK MainWindowProc (HWND hWnd, UINT message, WPARAM wParam,
                        RegSetValueEx(hWinUAEKey, "xPos", 0, REG_DWORD, (LPBYTE)&left, sizeof(LONG));
                        RegSetValueEx(hWinUAEKey, "yPos", 0, REG_DWORD, (LPBYTE)&top, sizeof(LONG));
                    }
-                   currprefs.gfx_size_win.x = left;
-                   currprefs.gfx_size_win.y = top;
+                   changed_prefs.gfx_size_win.x = left;
+                   changed_prefs.gfx_size_win.y = top;
                }
                return 0;
            }
index 2a0fd924afe461919a02a791f223d0d115f125aa..d200f4462d3c85750425c35c0d0580e49b04b7c4 100755 (executable)
@@ -17,7 +17,7 @@
 
 #define WINUAEBETA 8
 #define WINUAEPUBLICBETA 1
-#define WINUAEDATE MAKEBD(2006, 12, 28)
+#define WINUAEDATE MAKEBD(2006, 12, 29)
 
 #define IHF_WINDOWHIDDEN 6
 #define NORMAL_WINDOW_STYLE (WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU)
index 1a3647f16fbd2c0bd6ea5fd38beed866f8d1f899..be87b9360ce7bd57bedcca66785b02c80bfd94dc 100755 (executable)
@@ -1113,8 +1113,10 @@ int check_prefs_changed_gfx (void)
     c |= currprefs.gfx_size_fs.height != changed_prefs.gfx_size_fs.height ? (2|8) : 0;
     c |= currprefs.gfx_size_win.width != changed_prefs.gfx_size_win.width ? (2|8) : 0;
     c |= currprefs.gfx_size_win.height != changed_prefs.gfx_size_win.height ? (2|8) : 0;
+#if 0
     c |= currprefs.gfx_size_win.x != changed_prefs.gfx_size_win.x ? 16 : 0;
     c |= currprefs.gfx_size_win.y != changed_prefs.gfx_size_win.y ? 16 : 0;
+#endif
     c |= currprefs.color_mode != changed_prefs.color_mode ? (2|8) : 0;
     c |= currprefs.gfx_afullscreen != changed_prefs.gfx_afullscreen ? (2|8) : 0;
     c |= currprefs.gfx_pfullscreen != changed_prefs.gfx_pfullscreen ? (2|8) : 0;
index f1c63fd61fcf4b89d230aeb346d4d4ac4c00e9f3..391a8e8eb2ebe48a449b21fee201fe85efde469f 100755 (executable)
@@ -1,4 +1,8 @@
 
+Beta 9:
+
+- interrupt timing tweak (Gravity Force in ce-mode)
+
 Beta 8: (RC3, really final?)
 
 - random sound automatic restart delay fixed