]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
imported winuaesrc0990b11b.zip
authorToni Wilen <twilen@winuae.net>
Sun, 18 Jul 2004 12:02:47 +0000 (15:02 +0300)
committerToni Wilen <twilen@winuae.net>
Mon, 22 Feb 2010 19:23:55 +0000 (21:23 +0200)
24 files changed:
audio.c
cfgfile.c
cia.c
custom.c
ersatz.c
include/gui.h
include/inputdevice.h
inputdevice.c
memory.c
od-win32/avioutput.c
od-win32/dinput.c
od-win32/direct3d.c
od-win32/keyboard_win32.c
od-win32/opengl.c
od-win32/resources/resource.h
od-win32/resources/winuae.rc
od-win32/sounddep/sound.c
od-win32/sysconfig.h
od-win32/win32.c
od-win32/win32.h
od-win32/win32_scale2x.c
od-win32/win32gfx.c
od-win32/win32gui.c
od-win32/winuae_msvc/winuae_msvc.vcproj

diff --git a/audio.c b/audio.c
index 8c8184a968c6b21f14f26b9d7f2dbd60816b08ed..48ab819ffdfa2a3a52effbedf9cff98ae516f41c 100755 (executable)
--- a/audio.c
+++ b/audio.c
@@ -115,6 +115,7 @@ STATIC_INLINE void put_sound_word_right (uae_u32 w)
     PUT_SOUND_WORD_RIGHT (w);
 }
 
+#define MIXED_STEREO_MAX 32
 static int mixed_stereo_size, mixed_mul1, mixed_mul2;
 
 STATIC_INLINE void put_sound_word_left (uae_u32 w)
@@ -129,12 +130,12 @@ STATIC_INLINE void put_sound_word_left (uae_u32 w)
         saved_ptr = (saved_ptr + 1) & mixed_stereo_size;
 
        lold = left_word_saved[saved_ptr] - SOUND16_BASE_VAL;
-       tmp = (rnew * mixed_mul1 + lold * mixed_mul2) >> 6;
+       tmp = (rnew * mixed_mul1 + lold * mixed_mul2) / MIXED_STEREO_MAX;
        tmp += SOUND16_BASE_VAL;
        PUT_SOUND_WORD_RIGHT (tmp);
 
        rold = right_word_saved[saved_ptr] - SOUND16_BASE_VAL;
-       w = (lnew * mixed_mul1 + rold * mixed_mul2) >> 6;
+       w = (lnew * mixed_mul1 + rold * mixed_mul2) / MIXED_STEREO_MAX;
     }
     PUT_SOUND_WORD_LEFT (w);
 }
@@ -305,10 +306,10 @@ void sample16ss_handler (void)
     data2 &= audio_channel[2].adk_mask;
     data3 &= audio_channel[3].adk_mask;
     
-    PUT_SOUND_WORD_LEFT (data0 << 2);
-    PUT_SOUND_WORD_RIGHT (data1 << 2);
-    PUT_SOUND_WORD_LEFT (data2 << 2);
-    PUT_SOUND_WORD_RIGHT (data3 << 2);
+    PUT_SOUND_WORD (data1 << 2);
+    PUT_SOUND_WORD (data0 << 2);
+    PUT_SOUND_WORD (data2 << 2);
+    PUT_SOUND_WORD (data3 << 2);
     
     check_sound_buffers ();
 }
@@ -749,6 +750,7 @@ STATIC_INLINE int sound_prefs_changed (void)
 
 void check_prefs_changed_audio (void)
 {
+    int v;
 #ifdef DRIVESOUND
     driveclick_check_prefs ();
 #endif
@@ -785,8 +787,8 @@ void check_prefs_changed_audio (void)
        next_sample_evtime = scaled_sample_evtime;
        compute_vsynctime ();
     }
-    mixed_mul1 = 32 - currprefs.sound_stereo_separation;
-    mixed_mul2 = 32 + currprefs.sound_stereo_separation;
+    mixed_mul1 = MIXED_STEREO_MAX / 2 - ((currprefs.sound_stereo_separation * 3) / 2);
+    mixed_mul2 = MIXED_STEREO_MAX / 2 + ((currprefs.sound_stereo_separation * 3) / 2);
     mixed_stereo_size = currprefs.sound_mixed_stereo > 0 ? (1 << (currprefs.sound_mixed_stereo - 1)) - 1 : 0;
 
     /* Select the right interpolation method.  */
index 1806f3fd31e4c33e697b113f3e5f6a7da84f96ed..c0920e17aa19e5cf5e0ff83f68984c9a9826ddb2 100755 (executable)
--- a/cfgfile.c
+++ b/cfgfile.c
@@ -128,7 +128,7 @@ static const char *soundmode1[] = { "none", "interrupts", "normal", "exact", 0 }
 static const char *soundmode2[] = { "none", "interrupts", "good", "best", 0 };
 static const char *centermode1[] = { "none", "simple", "smart", 0 };
 static const char *centermode2[] = { "false", "true", "smart", 0 };
-static const char *stereomode[] = { "mono", "stereo", "mixed", 0 };
+static const char *stereomode[] = { "mono", "stereo", "4ch", "mixed", 0 };
 static const char *interpolmode[] = { "none", "rh", "crux", 0 };
 static const char *collmode[] = { "none", "sprites", "playfields", "full", 0 };
 static const char *compmode[] = { "direct", "indirect", "indirectKS", "afterPic", 0 };
@@ -749,10 +749,10 @@ static int cfgfile_parse_host (struct uae_prefs *p, char *option, char *value)
     }
 
     if (cfgfile_strval (option, value, "sound_channels", &p->sound_stereo, stereomode, 1)) {
-       if (p->sound_stereo > 1) { /* "mixed stereo" compatibility hack */
+       if (p->sound_stereo == 3) { /* "mixed stereo" compatibility hack */
            p->sound_stereo = 1;
            p->sound_mixed_stereo = 5;
-           p->sound_stereo_separation = 21;
+           p->sound_stereo_separation = 7;
        }
        return 1;
     }
@@ -1444,10 +1444,10 @@ static void parse_sound_spec (struct uae_prefs *p, char *spec)
     }
     p->produce_sound = atoi (x0);
     if (x1) {
-       p->sound_stereo_separation = 32;
+       p->sound_stereo_separation = 16;
        if (*x1 == 'S') {
            p->sound_stereo = 1;
-           p->sound_stereo_separation = 20;
+           p->sound_stereo_separation = 10;
        } else if (*x1 == 's')
            p->sound_stereo = 1;
        else
@@ -1471,22 +1471,22 @@ static void parse_joy_spec (struct uae_prefs *p, char *spec)
        goto bad;
 
     switch (spec[0]) {
-     case '0': v0 = 0; break;
-     case '1': v0 = 1; break;
-     case 'M': case 'm': v0 = 2; break;
-     case 'A': case 'a': v0 = 3; break;
-     case 'B': case 'b': v0 = 4; break;
-     case 'C': case 'c': v0 = 5; break;
+     case '0': v0 = JSEM_JOYS; break;
+     case '1': v0 = JSEM_JOYS + 1; break;
+     case 'M': case 'm': v0 = JSEM_MICE; break;
+     case 'A': case 'a': v0 = JSEM_KBDLAYOUT; break;
+     case 'B': case 'b': v0 = JSEM_KBDLAYOUT + 1; break;
+     case 'C': case 'c': v0 = JSEM_KBDLAYOUT + 2; break;
      default: goto bad;
     }
 
     switch (spec[1]) {
-     case '0': v1 = 0; break;
-     case '1': v1 = 1; break;
-     case 'M': case 'm': v1 = 2; break;
-     case 'A': case 'a': v1 = 3; break;
-     case 'B': case 'b': v1 = 4; break;
-     case 'C': case 'c': v1 = 5; break;
+     case '0': v1 = JSEM_JOYS; break;
+     case '1': v1 = JSEM_JOYS + 1; break;
+     case 'M': case 'm': v1 = JSEM_MICE; break;
+     case 'A': case 'a': v1 = JSEM_KBDLAYOUT; break;
+     case 'B': case 'b': v1 = JSEM_KBDLAYOUT + 1; break;
+     case 'C': case 'c': v1 = JSEM_KBDLAYOUT + 2; break;
      default: goto bad;
     }
     if (v0 == v1)
@@ -1873,13 +1873,13 @@ void default_prefs (struct uae_prefs *p, int type)
     p->serial_hwctsrts = 1;
     p->parallel_demand = 0;
 
-    p->jport0 = 2;
-    p->jport1 = 4;
+    p->jport0 = JSEM_MICE;
+    p->jport1 = JSEM_KBDLAYOUT;
     p->keyboard_lang = KBD_LANG_US;
 
     p->produce_sound = 3;
     p->sound_stereo = 1;
-    p->sound_stereo_separation = 21;
+    p->sound_stereo_separation = 7;
     p->sound_mixed_stereo = -1;
     p->sound_bits = DEFAULT_SOUND_BITS;
     p->sound_freq = DEFAULT_SOUND_FREQ;
@@ -2045,7 +2045,7 @@ static void buildin_default_prefs (struct uae_prefs *p)
     p->maprom = 0;
     p->sound_filter = 1;
     p->sound_stereo = 1;
-    p->sound_stereo_separation = 21;
+    p->sound_stereo_separation = 7;
     p->sound_mixed_stereo = -1;
 
     p->chipmem_size = 0x00080000;
diff --git a/cia.c b/cia.c
index a56116a2384825e05486579d2d44c0ff86c15477..80506ed1982b6a8dd464441128c8620c5cd20835 100755 (executable)
--- a/cia.c
+++ b/cia.c
@@ -82,7 +82,7 @@ static unsigned int ciabprb, ciabdra, ciabdrb, ciabsdr, ciabsdr_cnt;
 static int div10;
 static int kbstate, kback, ciaasdr_unread;
 #ifdef TOD_HACK
-static int tod_hack;
+static int tod_hack, tod_hack_delay;
 #endif
 
 static uae_u8 serbits;
@@ -385,7 +385,8 @@ static void tod_hack_reset (void)
     uae_u32 rate = currprefs.ntscmode ? 60 : 50;
     gettimeofday (&tv, NULL);
     tod_hack = (uae_u32)(((uae_u64)tv.tv_sec) * rate  + tv.tv_usec / (1000000 / rate));
-    tod_hack += ciaatod;
+    tod_hack -= ciaatod;
+    tod_hack_delay = 10 * 50;
 }
 #endif
 
@@ -395,15 +396,26 @@ void CIA_vsync_handler ()
     if (currprefs.tod_hack && ciaatodon) {
         struct timeval tv;
        uae_u32 t, nt, rate = currprefs.ntscmode ? 60 : 50;
-       gettimeofday (&tv, NULL);
-       t = (uae_u32)(((uae_u64)tv.tv_sec) * rate + tv.tv_usec / (1000000 / rate));
-       nt = t - tod_hack;
-       if ((nt < ciaatod && ciaatod - nt < 10) || nt == ciaatod)
-           return; /* try not to count backwards */
-       ciaatod = nt;
-       ciaatod &= 0xffffff;
-       ciaa_checkalarm ();
-       return;
+
+       if (tod_hack_delay > 0) {
+           tod_hack_delay--;
+           if (tod_hack_delay == 0) {
+               tod_hack_reset ();
+               tod_hack_delay = 0;
+               write_log ("TOD_HACK re-initialized CIATOD=%06.6X\n", ciaatod);
+           }
+       }
+       if (tod_hack_delay == 0) {
+           gettimeofday (&tv, NULL);
+           t = (uae_u32)(((uae_u64)tv.tv_sec) * rate + tv.tv_usec / (1000000 / rate));
+           nt = t - tod_hack;
+           if ((nt < ciaatod && ciaatod - nt < 10) || nt == ciaatod)
+               return; /* try not to count backwards */
+           ciaatod = nt;
+           ciaatod &= 0xffffff;
+           ciaa_checkalarm ();
+           return;
+       }
     }
 #endif
     if (ciaatodon) {
@@ -446,7 +458,7 @@ static uae_u8 ReadCIAA (unsigned int addr)
 #ifdef CIA_DEBUG_R
     write_log("R_CIAA: bfe%x01 %08.8X\n", addr, m68k_getpc());
 #endif
-    
+
     switch (addr & 0xf) {
     case 0:
 #ifdef ACTION_REPLAY
@@ -694,11 +706,9 @@ static void WriteCIAA (uae_u16 addr,uae_u8 val)
            ciaatod = (ciaatod & ~0xff) | val;
            ciaatodon = 1;
            ciaa_checkalarm ();
-#if 0
 #ifdef TOD_HACK
            if (currprefs.tod_hack)
                tod_hack_reset ();
-#endif
 #endif
        }
        break;
@@ -918,6 +928,7 @@ void CIA_reset (void)
        div10 = 0;
        ciaasdr_cnt = 0; ciaasdr = 0;
        ciabsdr_cnt = 0; ciabsdr = 0;
+        ciaata_passed = ciaatb_passed = ciabta_passed = ciabtb_passed = 0;
     }
     CIA_calctimers ();
     if (! ersatzkickfile)
@@ -942,13 +953,13 @@ void CIA_reset (void)
 
 void dumpcia (void)
 {
-    write_log("A: CRA %02x CRB %02x ICR %02x IM %02x TA %04x (%04x) TB %04x (%04x)\n",
+    write_log ("A: CRA %02x CRB %02x ICR %02x IM %02x TA %04x (%04x) TB %04x (%04x)\n",
           ciaacra, ciaacrb, ciaaicr, ciaaimask, ciaata, ciaala, ciaatb, ciaalb);
-    write_log("TOD %06x ALARM %06x %c%c\n",
+    write_log ("TOD %06x ALARM %06x %c%c\n",
        ciaatod, ciaaalarm, ciaatlatch ? 'L' : ' ', ciaatodon ? ' ' : 'S');
-    write_log("B: CRA %02x CRB %02x ICR %02x IM %02x TA %04x (%04x) TB %04x (%04x)\n",
+    write_log ("B: CRA %02x CRB %02x ICR %02x IM %02x TA %04x (%04x) TB %04x (%04x)\n",
           ciabcra, ciabcrb, ciaaicr, ciabimask, ciabta, ciabla, ciabtb, ciablb);
-    write_log("TOD %06x ALARM %06x %c%c\n",
+    write_log ("TOD %06x ALARM %06x %c%c\n",
        ciabtod, ciabalarm, ciabtlatch ? 'L' : ' ', ciabtodon ? ' ' : 'S');
 }
 
index 10c59c5d59fbdb5214f8d80fb5c19ca302a47edf..3ff7276b783bf72a6bbd4d2ebae07c57954809ae 100755 (executable)
--- a/custom.c
+++ b/custom.c
@@ -2206,7 +2206,8 @@ void init_hz (void)
     beamcon0 = new_beamcon0;
     isntsc = beamcon0 & 0x20 ? 0 : 1;
     if (hack_vpos > 0) {
-       if (maxvpos == hack_vpos) return;
+       if (maxvpos == hack_vpos)
+           return;
        maxvpos = hack_vpos;
        vblank_hz = 15600 / hack_vpos;
        hack_vpos = -1;
@@ -4222,7 +4223,6 @@ static void vsync_handler (void)
     if (timehack_alive > 0)
        timehack_alive--;
     inputdevice_vsync ();
-
 }
 
 #ifdef JIT
@@ -4304,15 +4304,9 @@ static void hsync_handler (void)
 #ifdef PICASSO96
     picasso_handle_hsync ();
 #endif
+
     ciahsync++;
     if (ciahsync >= (currprefs.ntscmode ? MAXVPOS_NTSC : MAXVPOS_PAL) * MAXHPOS_PAL / maxhpos) { /* not so perfect.. */
-       if (ciahsync != 312) {
-           static int warned = 0;
-           if (!warned)
-               gui_message("ciahsync may be messed up! check logs!");
-           warned = 1;
-           write_log ("ciahsync=%d! %d %d", ciahsync, currprefs.ntscmode, maxhpos);
-       }
         CIA_vsync_handler ();
        ciahsync = 0;
     }
index 0c4df3823cdb59539992941d177597b953920c6c..f68a44c2dcb1a2b4fc5bda83dd2113e76c5e777c 100755 (executable)
--- a/ersatz.c
+++ b/ersatz.c
@@ -20,6 +20,7 @@
 #include "cia.h"
 #include "disk.h"
 #include "ersatz.h"
+#include "gui.h"
 
 #define EOP_INIT     0
 #define EOP_NIMP     1
@@ -31,6 +32,8 @@
 #define EOP_ALLOCABS 7
 #define EOP_LOOP 8
 
+static int already_failed = 0;
+
 void init_ersatz_rom (uae_u8 *data)
 {
     *data++ = 0x00; *data++ = 0x08; /* initial SP */
@@ -66,6 +69,15 @@ void init_ersatz_rom (uae_u8 *data)
     *data++ = 0x4E; *data++ = 0x75;
 }
 
+static void ersatz_failed (void)
+{
+    if (already_failed)
+       return;
+    already_failed = 1;
+    notify_user (NUMSG_KICKREPNO);
+    uae_restart (-1, NULL);
+}
+
 static void ersatz_doio (void)
 {
     uaecptr request = m68k_areg(regs, 1);
@@ -76,7 +88,7 @@ static void ersatz_doio (void)
 
      default:
        write_log ("Only CMD_READ supported in DoIO()\n");
-       uae_restart (-1, NULL);
+       ersatz_failed ();
     }
     {
        uaecptr dest = get_long (request + 0x28);
@@ -99,8 +111,11 @@ static void ersatz_init (void)
     uaecptr request;
     uaecptr a;
 
+    already_failed = 0;
+    write_log ("initializing kickstart replacement\n");
     if (disk_empty (0)) {
-       gui_message ("You need to have a diskfile in DF0 to use the Kickstart replacement!\n");
+       already_failed = 1;
+       notify_user (NUMSG_KICKREP);
        uae_restart (-1, NULL);
        return;
     }
@@ -224,7 +239,7 @@ void ersatz_perform (uae_u16 what)
 
      case EOP_NIMP:
        write_log ("Unimplemented Kickstart function called\n");
-       uae_restart (-1, NULL);
+       ersatz_failed ();
        
        /* fall through */
      case EOP_LOOP:
@@ -234,6 +249,6 @@ void ersatz_perform (uae_u16 what)
      case EOP_OPENLIB:
      default:
        write_log ("Internal error. Giving up.\n");
-       uae_restart (-1, NULL);
+       ersatz_failed ();
     }
 }
index 89638e01eacb219e35949b992c164baf4134e74b..88dfd0a21e7b34dd662eac128322a74c7f9a3b78 100755 (executable)
@@ -45,9 +45,10 @@ extern void gui_update_gfx (void);
 void notify_user (int msg);
 int translate_message (int msg, char *out);
 typedef enum {
-    NUMSG_NEEDEXT2, NUMSG_NOROMKEY, NUMSG_KSROMCRCERROR, NUMSG_KSROMREADERROR, NUMSG_NOEXTROM,
+    NUMSG_NEEDEXT2, NUMSG_NOROM, NUMSG_NOROMKEY,
+    NUMSG_KSROMCRCERROR, NUMSG_KSROMREADERROR, NUMSG_NOEXTROM,
     NUMSG_MODRIP_NOTFOUND, NUMSG_MODRIP_FINISHED, NUMSG_MODRIP_SAVE,
     NUMSG_KS68EC020, NUMSG_KS68020, NUMSG_ROMNEED, NUMSG_NOZLIB, NUMSG_STATEHD,
-    NUMSG_NOCAPS, NUMSG_OLDCAPS,
+    NUMSG_NOCAPS, NUMSG_OLDCAPS, NUMSG_KICKREP, NUMSG_KICKREPNO
 } notify_user_msg;
 
index cf4915feee647096a76301bd2d374f23b93405c8..130a73ce540b1f28e5c814aacfa4485c8f689ca9 100755 (executable)
@@ -84,6 +84,7 @@ extern int getbuttonstate (int joy, int button);
 extern int getjoystate (int joy);
 
 extern void mousehack_set (enum mousestate);
+extern int mousehack_get (void);
 extern uae_u32 mousehack_helper (void);
 extern void mousehack_handle (int sprctl, int sprpos);
 
index dd8325b173808fa0d5f2e4cc29244e9f6de095f7..d9bd31a04147c8026e12fa4cffd57a2a0c70fa23 100755 (executable)
@@ -535,6 +535,11 @@ void mousehack_set (int state)
     }
 }
 
+int mousehack_get (void)
+{
+    return mousestate;
+}
+
 uae_u32 mousehack_helper (void)
 {
     int mousexpos, mouseypos;
index 1b37e5bbb898d44b1ded410a5eae92ed061b7b5a..4a85629be7d096cac32413fed6eaaee380a2e715 100755 (executable)
--- a/memory.c
+++ b/memory.c
@@ -1706,6 +1706,8 @@ void memory_reset (void)
         load_extendedkickstart ();
        kickmem_mask = 524288 - 1;
        if (!load_kickstart ()) {
+           if (strlen (currprefs.romfile) > 0)
+               notify_user (NUMSG_NOROM);
 #ifdef AUTOCONFIG
             init_ersatz_rom (kickmemory);
            ersatzkickfile = 1;
@@ -1835,7 +1837,7 @@ void memory_init (void)
     kickmemory = mapped_malloc (kickmem_size, "kick");
     memset (kickmemory, 0, kickmem_size);
     kickmem_bank.baseaddr = kickmemory;
-    currprefs.romfile[0] = 0;
+    strcpy (currprefs.romfile, "<none>");
     currprefs.romextfile[0] = 0;
 #ifdef AUTOCONFIG
     init_ersatz_rom (kickmemory);
index 26951a30cd8f858a352ac17e6d5174be6f8f7c74..8caab8e4bdc59caca7e831c52dd6a3ba19f2678f 100755 (executable)
@@ -490,6 +490,7 @@ void AVIOutput_RGBinfo(int rb, int gb, int bb, int rs, int gs, int bs)
        rgb_type = 0;
 }
 
+#if defined (GFXFILTER)
 extern int bufmem_width, bufmem_height;
 extern uae_u8 *bufmem_ptr;
 
@@ -528,7 +529,7 @@ static int getFromBuffer(LPBITMAPINFO lpbi)
     }
     return 1;
 }
-
+#endif
 
 void AVIOutput_WriteVideo(void)
 {
@@ -553,11 +554,14 @@ void AVIOutput_WriteVideo(void)
            actual_width = WIN32GFX_GetWidth();
            actual_height = WIN32GFX_GetHeight();
        }
-
+#if defined (GFXFILTER)
        if (!usedfilter || (usedfilter && usedfilter->x[0]) || WIN32GFX_IsPicassoScreen ())
            v = getFromDC((LPBITMAPINFO)lpbi);
        else
            v = getFromBuffer((LPBITMAPINFO)lpbi);
+#else
+        v = getFromDC((LPBITMAPINFO)lpbi);
+#endif
        if (!v)
            goto error;
 
index e1e9f1eef0a3a8bf0df7b1795a1e366ee2fa515d..740a499f6f9bf7e08ee2122c38a1d1b8df4c6579 100755 (executable)
@@ -469,6 +469,18 @@ static void sortdd (struct didata *dd, int num, int type)
     int i, j;
     struct didata ddtmp;
 
+    for (i = 0; i < num; i++) {
+       dd[i].type = type;
+       for (j = i + 1; j < num; j++) {
+           dd[j].type = type;
+           if (dd[i].priority < dd[j].priority || (dd[i].priority == dd[j].priority && strcmp (dd[i].sortname, dd[j].sortname) > 0)) {
+               memcpy (&ddtmp, &dd[i], sizeof(ddtmp));
+               memcpy (&dd[i], &dd[j], sizeof(ddtmp));
+               memcpy (&dd[j], &ddtmp, sizeof(ddtmp));
+           }
+       }
+    }
+
     /* rename duplicate names */
     for (i = 0; i < num; i++) {
        for (j = i + 1; j < num; j++) {
@@ -488,17 +500,6 @@ static void sortdd (struct didata *dd, int num, int type)
        }
     }
 
-    for (i = 0; i < num; i++) {
-       dd[i].type = type;
-       for (j = i + 1; j < num; j++) {
-           dd[j].type = type;
-           if (dd[i].priority < dd[j].priority || (dd[i].priority == dd[j].priority && strcmp (dd[i].sortname, dd[j].sortname) > 0)) {
-               memcpy (&ddtmp, &dd[i], sizeof(ddtmp));
-               memcpy (&dd[i], &dd[j], sizeof(ddtmp));
-               memcpy (&dd[j], &ddtmp, sizeof(ddtmp));
-           }
-       }
-    }
 }
 
 static void sortobjects (struct didata *did, int *mappings, int *sort, char **names, int *types, int num)
@@ -844,6 +845,8 @@ static int acquire_mouse (int num, int flags)
     HRESULT hr;
 
     unacquire (lpdi, "mouse");
+    if (mousehack_get () == mousehack_follow)
+       return 0;
     if (lpdi) {
        setcoop (lpdi, flags ? (DISCL_FOREGROUND | DISCL_EXCLUSIVE) : (DISCL_BACKGROUND | DISCL_NONEXCLUSIVE), "mouse");
        dipdw.diph.dwSize = sizeof(DIPROPDWORD);
@@ -1415,7 +1418,7 @@ static int acquire_kb (int num, int flags)
 
     if (currprefs.keyboard_leds_in_use) {
 #ifdef WINDDK
-       if (os_winnt) {
+       if (os_winnt && !usbledmode) {
            if (DefineDosDevice (DDD_RAW_TARGET_PATH, "Kbd","\\Device\\KeyboardClass0")) {
                kbhandle = CreateFile("\\\\.\\Kbd", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
                if (kbhandle == INVALID_HANDLE_VALUE) {
@@ -1474,7 +1477,6 @@ static void unacquire_kb (int num)
            kbhandle = INVALID_HANDLE_VALUE;
        }
 #endif
-       usbledmode = 0;
     }
 }
 
index 37a03329d059cc61b0f3445edaac3dfa39308bab..4b9a414190b1163357c919cbe5cc6d98b8a06ba0 100755 (executable)
@@ -2,6 +2,9 @@
 #include <windows.h>
 #include "sysconfig.h"
 #include "sysdeps.h"
+
+#if defined (OPENGL) && defined (GFXFILTER)
+
 #include "config.h"
 #include "options.h"
 #include "xwin.h"
@@ -552,8 +555,4 @@ int D3D_isenabled (void)
     return d3d_enabled;
 }
 
-
-
-
-
-
+#endif
index 070b64d10072d4eba030eaaa2e23ee451b8d825a..3cb88bfc3cde4c6c2c7979029a3c028e09ec9279 100755 (executable)
@@ -328,7 +328,6 @@ void my_kbd_handler (int keyboard, int scancode, int newstate)
            screenshot (endpressed() ? 1 : 0);
            break;
            case DIK_PAUSE:
-           write_log("DIK_PAUSE\n");
            if (endpressed ())
                code = AKS_WARP;
            else
index 6308537493f2c557e4bed46c654da07e4ec883b3..4f66462e389acdf39b84a439ac8d1e30a3067a01 100755 (executable)
@@ -9,6 +9,9 @@
 #include <windows.h>
 #include "sysconfig.h"
 #include "sysdeps.h"
+
+#if defined (OPENGL) && defined (GFXFILTER)
+
 #include "config.h"
 #include "options.h"
 #include "xwin.h"
@@ -19,7 +22,6 @@
 #include "win32gfx.h"
 #include "gfxfilter.h"
 
-#ifdef OPENGL
 //#define FSAA
 
 #include <gl\gl.h>
index 8023bd3fa5053d623def0f0b0debd3bd7ac69ea8..0339e3b41f317d0154df0b24167dd0714c995d35 100755 (executable)
 #define IDS_TREEVIEW_ABOUT              239
 #define IDS_NOHARDDRIVES                240
 #define IDS_DEFAULT_HOST                241
+#define IDS_SOUND_4CHANNEL              242
 #define IDS_NUMSG_NEEDEXT2              300
 #define IDS_NUMSG_NOROMKEY              301
 #define IDS_NUMSG_KSROMCRCERROR         302
 #define IDS_HARDDRIVESAFETYWARNING      322
 #define IDS_NUMSG_KS68EC020             323
 #define IDS_ROMSCANNOROMS               324
+#define IDS_NUMSG_KICKREP               325
+#define IDS_NUMSG_KICKREPNO             326
+#define IDS_STRING19                    327
+#define IDS_NUMSG_NOROM                 327
 #define IDS_QS_MODELS                   1000
 #define IDS_QS_MODEL_A500               1001
 #define IDS_QS_MODEL_A500P              1002
 #define IDC_INPUTTYPE                   1607
 #define IDC_AVIOUTPUT_NTSC              1608
 #define IDC_INPUTSELECTTEXT             1608
-#define IDC_KILLWINKEYS                 1608
-#define IDC_SCSIDEVICE2                 1608
-#define IDC_CLOCKSYNC                   1608
 #define IDC_NOUAEFSDB                   1608
 #define IDC_NOTASKBARBUTTON             1608
+#define IDC_CLOCKSYNC                   1609
 #define IDC_AVIOUTPUT_FPS               1609
 #define IDC_INPUTDEVICE                 1609
 #define IDC_MAPROM                      1609
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_NO_MFC                     1
 #define _APS_3D_CONTROLS                     1
-#define _APS_NEXT_RESOURCE_VALUE        242
+#define _APS_NEXT_RESOURCE_VALUE        244
 #define _APS_NEXT_COMMAND_VALUE         40021
 #define _APS_NEXT_CONTROL_VALUE         1695
 #define _APS_NEXT_SYMED_VALUE           101
index 8074f369ca3d3c3637a3b9da44f7cbd49591531d..7c926618105ba3af67b2c92f22419cb9e027b447 100755 (executable)
@@ -551,6 +551,8 @@ BEGIN
                     WS_VSCROLL | WS_TABSTOP
     CONTROL         "Don't show Taskbar button",IDC_NOTASKBARBUTTON,"Button",
                     BS_AUTOCHECKBOX | WS_TABSTOP,29,80,117,10
+    CONTROL         "Syncronize clock",IDC_CLOCKSYNC,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,159,80,115,10
 END
 
 IDD_HARDFILE DIALOGEX 0, 0, 299, 180
@@ -1339,6 +1341,7 @@ STRINGTABLE
 BEGIN
     IDS_NOHARDDRIVES        "No Amiga formatted or completely empty harddrives detected."
     IDS_DEFAULT_HOST        "Default Configuration"
+    IDS_SOUND_4CHANNEL      "4 Channels"
 END
 
 STRINGTABLE 
@@ -1356,7 +1359,7 @@ BEGIN
     IDS_NUMSG_MODRIP_FINISHED "Scan finished."
     IDS_NUMSG_MODRIP_SAVE   "Module/packer found\n%s\nDo you want to save it?"
     IDS_NUMSG_KS68020       "Your Kickstart requires a 68020 CPU or later CPU."
-    IDS_NUMSG_ROMNEED       "You need any of following ROM(s)\n\n%s"
+    IDS_NUMSG_ROMNEED       "You need any following ROM(s)\n\n%s"
     IDS_NUMSG_NOZLIB        "Zip and gzip support disabled because zlib1.dll is missing."
     IDS_NUMSG_STATEHD       "WARNING: State saves do not support harddrive emulation. This message does not appear again."
     IDS_NUMSG_NOCAPS        "This disk image needs the C.A.P.S. plugin\nwhich is available from\nhttp//www.caps-project.org/download.shtml"
@@ -1378,11 +1381,14 @@ BEGIN
                             "WARNING: Non-empty or Amiga formatted\nharddrive detected and safety test was disabled\n\nHarddrives marked with 'HD_*_' are not empty"
     IDS_NUMSG_KS68EC020     "Your Kickstart requires a 68EC020 or later CPU."
     IDS_ROMSCANNOROMS       "No supported Kickstart ROMs detected."
+    IDS_NUMSG_KICKREP       "You need to have a diskfile in DF0 to use the Kickstart replacement."
+    IDS_NUMSG_KICKREPNO     "Diskfiles in DF0: is not compatible with Kickstart replacement."
+    IDS_NUMSG_NOROM         "Could not load Kickstart ROM, trying Kickstart replacement."
 END
 
 STRINGTABLE 
 BEGIN
-    IDS_QS_MODELS           "Amiga 500\nAmiga 500+\nAmiga 600\nAmiga 1000\nAmiga 1200\nCD32\nCDTV (CDROM emulation not yet working)\nExpanded UAE example configuration"
+    IDS_QS_MODELS           "Amiga 500 (Amiga 2000)\nAmiga 500+\nAmiga 600\nAmiga 1000\nAmiga 1200\nCD32\nCDTV (CDROM emulation not yet working)\nExpanded UAE example configuration"
     IDS_QS_MODEL_A500       "KS 1.3, OCS Agnus, 0.5M Chip + 0.5M Slow (most common)\nThis configuration is capable of running most games and demos ever produced for the first Amiga line. Only few exceptions need different configuration. Oldest Amiga games tend to be incompatible with this configuration.\nKS 1.3, ECS Agnus, 0.5M Chip + 0.5M Slow\nLater hardware revision of Amiga 500. Nearly 100% compatible with previous configuration.\nKS 1.3, ECS Agnus, 1.0M Chip\nFew newer games and demos require this configuration.\nKS 1.3, OCS Agnus, 0.5M Chip\nVery old (~1987 and older) games and demos may require this configuration.\nKS 1.2, OCS Agnus, 0.5M Chip\nThe first Amiga 500 produced had this configuration. Some very old programs only work correctly with this configuration. NOTE: This configuration cannot boot the Amiga OS installed on an emulated HD.\nKS 1.2, OCS Agnus, 0.5M Chip + 0.5M Slow\nThis configuration adds expansion memory to the first Amiga 500 ever produced. Try this if your game do not work with newer configurations but works with the previous one. It could add some features to the game and faster game loading. NOTE: This configuration cannot boot the Amiga OS installed on an emulated HD."
     IDS_QS_MODEL_A500P      "Basic non-expanded configuration\nA500+ is basically an Amiga 500 with ECS Agnus,  1MB of Chip RAM and Kickstart 2.0 ROM. Many Amiga 500 games and demos won't work properly on an Amiga 500+.\n2M Chip RAM expanded configuration\n\n4M Fast RAM expanded configuration\n"
     IDS_QS_MODEL_A600       "Basic non-expanded configuration\nA600 is basically smaller Amiga 500+ with updated Kickstart 2.0 ROM.\n2M Chip RAM expanded configuration\n\n4M Fast RAM expanded configuration\n"
@@ -1394,7 +1400,7 @@ END
 
 STRINGTABLE 
 BEGIN
-    IDS_QS_MODEL_UAE        "High-end expanded configuration\nThis configuration can be used as a basis for your own A3000/A4000-style high-performance, expanded custom configuration for Workbench, applications, WHDLoad etc.."
+    IDS_QS_MODEL_UAE        "High-end expanded configuration"
 END
 
 #endif    // English (U.S.) resources
index c242784e2512777f4b069480e589056d38c1b231..6d56809f128870899ad0aadd2eae1ecdda22ec33 100755 (executable)
@@ -34,8 +34,6 @@
 
 #include <math.h>
 
-int dsound_hardware_mixing = 0;
-
 #define ADJUST_SIZE 10
 #define EXP 1.3
 
@@ -255,7 +253,7 @@ static int open_audio_ds (int size)
     int freq = currprefs.sound_freq;
     
     enumerate_sound_devices (0);
-    if (dsound_hardware_mixing) {
+    if (currprefs.sound_stereo == 2) {
        size <<= 3;
     } else {
        size <<= 1;
@@ -319,7 +317,7 @@ static int open_audio_ds (int size)
     }
 
     wavfmt.wFormatTag = WAVE_FORMAT_PCM;
-    wavfmt.nChannels = dsound_hardware_mixing ? 4 : (currprefs.sound_stereo ? 2 : 1);
+    wavfmt.nChannels = (currprefs.sound_stereo == 2) ? 4 : (currprefs.sound_stereo ? 2 : 1);
     wavfmt.nSamplesPerSec = freq;
     wavfmt.wBitsPerSample = 16;
     wavfmt.nBlockAlign = 16 / 8 * wavfmt.nChannels;
@@ -364,14 +362,14 @@ static int open_audio_ds (int size)
     clearbuffer ();
 
     init_sound_table16 ();
-    if (dsound_hardware_mixing)
+    if (currprefs.sound_stereo == 2)
        sample_handler = sample16ss_handler;
     else
        sample_handler = currprefs.sound_stereo ? sample16s_handler : sample16_handler;
 
     write_log ("DS driver '%s'/%d/%d bits/%d Hz/buffer %d/dist %d\n",
        sound_devices[currprefs.win32_soundcard],
-       dsound_hardware_mixing ? 4 : (currprefs.sound_stereo ? 2 : 1),
+       currprefs.sound_stereo == 2 ? 4 : (currprefs.sound_stereo ? 2 : 1),
        16, freq, max_sndbufsize, snd_configsize);
     obtainedfreq = currprefs.sound_freq;
 
@@ -583,7 +581,7 @@ static void finish_sound_buffer_ds (void)
 
 static void filtercheck (uae_s16 *sndbuffer, int len)
 {
-    int ch = dsound_hardware_mixing ? 4 : (currprefs.sound_stereo ? 2 : 1);
+    int ch = currprefs.sound_stereo == 2 ? 4 : (currprefs.sound_stereo ? 2 : 1);
     int i;
     static double cold[4];
     double old0, old1, v;
index 9adcd7d7ced768afd0e04e6e283176da63c129c5..8669dff0b37f862761b8deb495d4ae2c61c841c4 100755 (executable)
 
 #endif
 
+#ifndef GFXFILTER
+#undef OPENGL
+#undef D3D
+#endif
+
 #ifdef _DEBUG
 #define _CRTDBG_MAP_ALLOC
 #include <stdlib.h>
index 8ce2fd384778ceb4429b60f57573003cda9ab8dc..a8867b93c7dfef2fe25dec50db1ce9ce275fd654 100755 (executable)
@@ -109,7 +109,7 @@ static HANDLE timehandle;
 char *start_path;
 char help_file[ MAX_DPATH ];
 
-extern int harddrive_dangerous, do_rdbdump, aspi_allow_all, dsound_hardware_mixing, no_rawinput;
+extern int harddrive_dangerous, do_rdbdump, aspi_allow_all, no_rawinput;
 int log_scsi;
 DWORD quickstart = 1;
 
@@ -359,6 +359,12 @@ static void setcursor(int oldx, int oldy)
     SetCursorPos (amigawin_rect.left + x, amigawin_rect.top + y);
 }
 
+static void movehackmouse (int x, int y)
+{
+    setmousestate (0, 0, x, 1);
+    setmousestate (0, 1, y, 1);
+}
+
 void setmouseactive (int active)
 {
     int oldactive = mouseactive;
@@ -367,10 +373,15 @@ void setmouseactive (int active)
 
     if (active > 0 && ievent_alive > 0) {
        mousehack_set (mousehack_follow);
-       return;
+       if (!isfullscreen ())
+           return;
+    } else {
+       mousehack_set (mousehack_dontcare);
     }
-    mousehack_set (mousehack_dontcare);
     inputdevice_unacquire ();
+    //mousehack_width = GetSystemMetrics (SM_CXVIRTUALSCREEN);
+    //mousehack_height = GetSystemMetrics (SM_CYVIRTUALSCREEN);
+
     mouseactive = active;
     strcpy (txt, "WinUAE");
     if (mouseactive > 0) {
@@ -651,7 +662,7 @@ static long FAR PASCAL AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
     return 0;
 
     case WM_LBUTTONUP:
-       if (dinput_winmouse () > 0)
+       if (dinput_winmouse () > 0 || mousehack_get () == mousehack_follow)
            setmousebuttonstate (dinput_winmouse(), 0, 0);
     return 0;
     case WM_LBUTTONDOWN:
@@ -659,42 +670,42 @@ static long FAR PASCAL AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
        if (!mouseactive && !isfullscreen()) {
            setmouseactive (1);
        }
-       if (dinput_winmouse () > 0)
+       if (dinput_winmouse () > 0 || mousehack_get () == mousehack_follow)
            setmousebuttonstate (dinput_winmouse(), 0, 1);
     return 0;
     case WM_RBUTTONUP:
-       if (dinput_winmouse () > 0)
+       if (dinput_winmouse () > 0 || mousehack_get () == mousehack_follow)
            setmousebuttonstate (dinput_winmouse(), 1, 0);
     return 0;
     case WM_RBUTTONDOWN:
     case WM_RBUTTONDBLCLK:
-       if (dinput_winmouse () > 0)
+       if (dinput_winmouse () > 0 || mousehack_get () == mousehack_follow)
            setmousebuttonstate (dinput_winmouse(), 1, 1);
     return 0;
     case WM_MBUTTONUP:
-       if (dinput_winmouse () > 0)
+       if (dinput_winmouse () > 0 || mousehack_get () == mousehack_follow)
            setmousebuttonstate (dinput_winmouse(), 2, 0);
     return 0;
     case WM_MBUTTONDOWN:
     case WM_MBUTTONDBLCLK:
-       if (dinput_winmouse () > 0)
+       if (dinput_winmouse () > 0 || mousehack_get () == mousehack_follow)
            setmousebuttonstate (dinput_winmouse(), 2, 1);
     return 0;
     case WM_XBUTTONUP:
-       if (dinput_winmouse () > 0) {
+       if (dinput_winmouse () > 0 || mousehack_get () == mousehack_follow) {
            handleXbutton (wParam, 0);
            return TRUE;
        }
     return 0;
     case WM_XBUTTONDOWN:
     case WM_XBUTTONDBLCLK:
-       if (dinput_winmouse () > 0) {
+       if (dinput_winmouse () > 0 || mousehack_get () == mousehack_follow) {
            handleXbutton (wParam, 1);
            return TRUE;
        }
     return 0;
     case WM_MOUSEWHEEL:
-       if (dinput_winmouse () > 0)
+       if (dinput_winmouse () > 0 || mousehack_get () == mousehack_follow)
            setmousestate (dinput_winmouse(), 2, ((short)HIWORD(wParam)), 0);
     return 0;
 
@@ -740,7 +751,10 @@ static long FAR PASCAL AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
     case WM_MOUSEMOVE:
         mx = (signed short) LOWORD (lParam);
         my = (signed short) HIWORD (lParam);
-       if (dinput_winmouse () > 0) {
+       if (mousehack_get () == mousehack_follow) {
+           movehackmouse (mx, my);
+           return 0;
+       } else if (dinput_winmouse () > 0) {
            int mxx = (amigawin_rect.right - amigawin_rect.left) / 2;
            int myy = (amigawin_rect.bottom - amigawin_rect.top) / 2;
            mx = mx - mxx;
@@ -750,15 +764,6 @@ static long FAR PASCAL AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
         } else if ((!mouseactive && !isfullscreen())) {
            setmousestate (0, 0, mx, 1);
            setmousestate (0, 1, my, 1);
-       } else {
-#if 0
-           int mxx = (amigawin_rect.right - amigawin_rect.left) / 2;
-           int myy = (amigawin_rect.bottom - amigawin_rect.top) / 2;
-           mx = mx - mxx;
-           my = my - myy;
-           setmousestate (0, 0, mx, 0);
-           setmousestate (0, 1, my, 0);
-#endif
        }
        if (mouseactive)
            setcursor (LOWORD (lParam), HIWORD (lParam));
@@ -2057,7 +2062,6 @@ __asm{
        if (!strcmp (arg, "-disableharddrivesafetycheck")) harddrive_dangerous = 0x1234dead;
        if (!strcmp (arg, "-noaspifiltering")) aspi_allow_all = 1;
 #endif
-       if (!strcmp (arg, "-dsaudiomix")) dsound_hardware_mixing = 1;
        if (!strcmp (arg, "-nordtsc")) no_rdtsc = 1;
        if (!strcmp (arg, "-forcerdtsc")) no_rdtsc = -1;
        if (!strcmp (arg, "-norawinput")) no_rawinput = 1;
index 149a0cdda754fc0abf73160c95ca0d103e4d555a..c070d17e5a3ec0c93e22a7f520d36b560aef1c9c 100755 (executable)
@@ -21,7 +21,7 @@ extern int manual_painting_needed;
 extern int manual_palette_refresh_needed;
 extern int mouseactive, focus;
 #define WINUAEBETA 1
-#define WINUAEBETASTR " Beta 11"
+#define WINUAEBETASTR " Beta 12"
 
 extern void my_kbd_handler (int, int, int);
 extern void clearallkeys(void);
index e28b9559debd3b6eb719074a00ff0ed9eacb685e..a7dd6ab3ba9063834a9156cd0f91f4251d0bf038 100755 (executable)
@@ -1,6 +1,9 @@
 
 #include "sysconfig.h"
 #include "sysdeps.h"
+
+#ifdef GFXFILTER
+
 #include "config.h"
 #include "options.h"
 #include "xwin.h"
@@ -200,6 +203,7 @@ void S2X_render (void)
            ok = 1;
        }
 
+#if 0
     } else if (usedfilter->type == UAE_FILTER_HQ) { /* 32/2X+3X+4X */
 
         int hqsrcpitch = gfxvidinfo.rowbytes - aw * amiga_depth / 8;
@@ -224,7 +228,7 @@ void S2X_render (void)
                ok = 1;
            }
        }
-
+#endif
     } else if (usedfilter->type == UAE_FILTER_SUPEREAGLE) { /* 16/2X */
 
        if (scale == 2 && amiga_depth == 16 && dst_depth == 16) {
@@ -290,3 +294,5 @@ void S2X_refresh (void)
     DirectDraw_SurfaceUnlock ();
     S2X_render ();
 }
+
+#endif
index a81c5c785602bc5b5d896affdb8b2ef1c10f737c..6a67559e7f9136e96cde353c2e97bd351f794b96 100755 (executable)
@@ -771,12 +771,14 @@ void flush_screen (int a, int b)
 #endif
     } else if (currentmode->flags & DM_D3D) {
        return;
+#ifdef GFXFILTER
     } else if (currentmode->flags & DM_SWSCALE) {
        S2X_render ();
        if( currentmode->flags & DM_DX_FULLSCREEN )
            DX_Flip ();
        else if (DirectDraw_GetLockableType() != overlay_surface)
            DX_Blit( 0, 0, 0, 0, WIN32GFX_GetWidth(), WIN32GFX_GetHeight(), BLIT_SRC );
+#endif
     } else if ((currentmode->flags & DM_DDRAW) && DirectDraw_GetLockableType() == secondary_surface ) {
        if (currentmode->flags & DM_DX_FULLSCREEN) {
            if( turbo_emulation || DX_Flip() == 0 )
@@ -1178,7 +1180,9 @@ void init_colors (void)
            }           
        }
        alloc_colors64k (red_bits, green_bits, blue_bits, red_shift,green_shift, blue_shift, alpha_bits, alpha_shift, alpha);
+#ifdef GFXFILTER
        S2X_configure (red_bits, green_bits, blue_bits, red_shift,green_shift, blue_shift);
+#endif
 #ifdef AVIOUTPUT
        AVIOutput_RGBinfo (red_bits, green_bits, blue_bits, red_shift, green_shift, blue_shift);
 #endif
@@ -1516,6 +1520,7 @@ void gfx_set_picasso_modeinfo( uae_u32 w, uae_u32 h, uae_u32 depth, RGBFTYPE rgb
 
 static void gfxmode_reset (void)
 {
+#ifdef GFXFILTER
     usedfilter = 0;
     if (currprefs.gfx_filter > 0) {
        int i = 0;
@@ -1527,17 +1532,18 @@ static void gfxmode_reset (void)
            i++;
        }
     }
+#endif
     currentmode->amode[0] = &wmodes[currprefs.win32_no_overlay ? SM_WINDOW : SM_WINDOW_OVERLAY];
     currentmode->amode[1] = &wmodes[SM_FULLSCREEN_DX];
     currentmode->pmode[0] = &wmodes[currprefs.win32_no_overlay ? SM_WINDOW : SM_WINDOW_OVERLAY];
     currentmode->pmode[1] = &wmodes[SM_FULLSCREEN_DX];
-#ifdef OPENGL
+#if defined (OPENGL) && defined (GFXFILTER)
     if (usedfilter && usedfilter->type == UAE_FILTER_OPENGL) {
        currentmode->amode[0] = &wmodes[SM_OPENGL_WINDOW];
        currentmode->amode[1] = &wmodes[SM_OPENGL_FULLSCREEN_DX];
     }
 #endif
-#ifdef D3D
+#if defined (D3D) && defined (GFXFILTER)
     if (usedfilter && usedfilter->type == UAE_FILTER_DIRECT3D) {
        currentmode->amode[0] = &wmodes[SM_D3D_WINDOW];
        currentmode->amode[1] = &wmodes[SM_D3D_FULLSCREEN_DX];
@@ -1583,7 +1589,9 @@ uae_u32 OSDEP_minimize_uae( void )
 
 void close_windows (void)
 {
+#if defined (GFXFILTER)
     S2X_free ();
+#endif
     free (gfxvidinfo.realbufmem);
     gfxvidinfo.realbufmem = 0;
     DirectDraw_Release();
@@ -1828,11 +1836,13 @@ static void updatemodes (void)
     currentmode->modeindex = currentmode->mode - &wmodes[0];
 
     currentmode->flags &= ~DM_SWSCALE;
+#if defined (GFXFILTER)
     if (usedfilter && !usedfilter->x[0]) {
         currentmode->flags |= DM_SWSCALE;
         if (currentmode->current_depth < 15)
            currentmode->current_depth = 16;
     }
+#endif
 }
 
 static BOOL doInit (void)
@@ -1943,6 +1953,7 @@ static BOOL doInit (void)
                continue;
            }
            currentmode->real_depth = currentmode->current_depth;
+#if defined (GFXFILTER)
            if (currentmode->flags & (DM_OPENGL | DM_D3D | DM_SWSCALE)) {
                currentmode->amiga_width = AMIGA_WIDTH_MAX >> (currprefs.gfx_lores ? 1 : 0);
                currentmode->amiga_height = AMIGA_HEIGHT_MAX >> (currprefs.gfx_linedbl ? 0 : 1);
@@ -1965,7 +1976,10 @@ static BOOL doInit (void)
                    }
                }
                currentmode->pitch = currentmode->amiga_width * currentmode->current_depth >> 3;
-           } else {
+           }
+               else
+#endif
+           {
                currentmode->amiga_width = currentmode->current_width;
                currentmode->amiga_height = currentmode->current_height;
            }
@@ -2017,12 +2031,13 @@ static BOOL doInit (void)
     if (currentmode->flags & DM_OVERLAY)
        setoverlay ();
 
+#if defined (GFXFILTER)
     if (currentmode->flags & DM_SWSCALE) {
        S2X_init (currentmode->current_width, currentmode->current_height,
            currentmode->amiga_width, currentmode->amiga_height,
            mult, currentmode->current_depth, currentmode->real_depth);
     }
-#ifdef OPENGL
+#if defined OPENGL
     if (currentmode->flags & DM_OPENGL) {
        const char *err = OGL_init (hAmigaWnd, currentmode->current_width, currentmode->current_height,
            currentmode->amiga_width, currentmode->amiga_height, currentmode->current_depth);
@@ -2053,6 +2068,7 @@ static BOOL doInit (void)
            goto oops;
        }
     }
+#endif
 #endif
     return 1;
 
@@ -2111,15 +2127,19 @@ void updatedisplayarea (void)
     if (picasso_on)
        return;
     /* Update the display area */
+#if defined (GFXFILTER)
     if (currentmode->flags & DM_OPENGL) {
-#ifdef OPENGL
+#if defined (OPENGL)
        OGL_refresh ();
 #endif
     } else if (currentmode->flags & DM_D3D) {
-#ifdef D3D
+#if defined (D3D)
        D3D_refresh ();
 #endif
-    } else if (currentmode->flags & DM_DDRAW) {
+    } else
+#endif
+    if (currentmode->flags & DM_DDRAW) {
+#if defined (GFXFILTER)
        if (currentmode->flags & DM_SWSCALE) {
            S2X_refresh ();
            if( !isfullscreen() ) {
@@ -2128,7 +2148,10 @@ void updatedisplayarea (void)
            } else {
                DirectDraw_Blt( primary_surface, NULL, secondary_surface, NULL, DDBLT_WAIT, NULL );
            }
-       } else {
+       }
+           else
+#endif
+       {
            if( !isfullscreen() ) {
                if(DirectDraw_GetLockableType() != overlay_surface)
                    DX_Blit( 0, 0, 0, 0, WIN32GFX_GetWidth(), WIN32GFX_GetHeight(), BLIT_SRC );
index 25ef88a29175054f4f7b927c19788f659282199f..1cae830f85e8fa6169dc4f5c81bee9358601f2ff 100755 (executable)
@@ -3878,14 +3878,11 @@ static void enable_for_miscdlg (HWND hDlg)
         EnableWindow (GetDlgItem (hDlg, IDC_DOSAVESTATE), TRUE);
         EnableWindow (GetDlgItem (hDlg, IDC_ASPI), FALSE);
         EnableWindow (GetDlgItem (hDlg, IDC_SCSIDEVICE), FALSE);
-        //EnableWindow (GetDlgItem (hDlg, IDC_CLOCKSYNC), FALSE);
+        EnableWindow (GetDlgItem (hDlg, IDC_CLOCKSYNC), FALSE);
         EnableWindow (GetDlgItem (hDlg, IDC_STATE_CAPTURE), FALSE);
         EnableWindow (GetDlgItem (hDlg, IDC_STATE_RATE), FALSE);
         EnableWindow (GetDlgItem (hDlg, IDC_STATE_BUFFERSIZE), FALSE);
     } else {
-#if !defined (FILESYS)
-        //EnableWindow (GetDlgItem(hDlg, IDC_CLOCKSYNC), FALSE);
-#endif
 #if !defined (BSDSOCKET)
         EnableWindow (GetDlgItem(hDlg, IDC_SOCKETS), FALSE);
 #endif
@@ -3966,7 +3963,8 @@ static void values_to_miscdlg (HWND hDlg)
     CheckDlgButton (hDlg, IDC_SCSIDEVICE, workprefs.scsi);
     CheckDlgButton (hDlg, IDC_NOTASKBARBUTTON, workprefs.win32_notaskbarbutton);
     CheckDlgButton (hDlg, IDC_ASPI, workprefs.win32_aspi);
-    CheckDlgButton (hDlg, IDC_STATE_CAPTURE, workprefs.tod_hack);
+    CheckDlgButton (hDlg, IDC_CLOCKSYNC, workprefs.tod_hack);
+    CheckDlgButton (hDlg, IDC_STATE_CAPTURE, workprefs.statecapture);
 
     if (!os_winnt || !os_winnt_admin) {
        EnableWindow( GetDlgItem( hDlg, IDC_ASPI), FALSE );
@@ -3981,7 +3979,6 @@ static void values_to_miscdlg (HWND hDlg)
     misc_addpri (hDlg, IDC_INACTIVE_PRIORITY, workprefs.win32_inactive_priority);
     misc_addpri (hDlg, IDC_MINIMIZED_PRIORITY, workprefs.win32_iconified_priority);
 
-    CheckDlgButton (hDlg, IDC_STATE_CAPTURE, workprefs.statecapture);
 
     SendDlgItemMessage (hDlg, IDC_STATE_RATE, CB_RESETCONTENT, 0, 0);
     SendDlgItemMessage (hDlg, IDC_STATE_RATE, CB_ADDSTRING, 0, (LPARAM)"1");
@@ -4101,6 +4098,9 @@ static BOOL MiscDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
        case IDC_ASPI:
            workprefs.win32_aspi = IsDlgButtonChecked (hDlg, IDC_ASPI);
            break;
+       case IDC_CLOCKSYNC:
+           workprefs.tod_hack = IsDlgButtonChecked (hDlg, IDC_CLOCKSYNC);
+           break;
        case IDC_NOTASKBARBUTTON:
            workprefs.win32_notaskbarbutton = IsDlgButtonChecked (hDlg, IDC_NOTASKBARBUTTON);
            break;
@@ -4393,11 +4393,11 @@ static void enable_for_sounddlg (HWND hDlg)
     EnableWindow (GetDlgItem (hDlg, IDC_FREQUENCY), workprefs.produce_sound);
     EnableWindow (GetDlgItem (hDlg, IDC_SOUNDFREQ), workprefs.produce_sound ? TRUE : FALSE);
     EnableWindow (GetDlgItem (hDlg, IDC_SOUNDSTEREO), workprefs.produce_sound);
-    EnableWindow (GetDlgItem (hDlg, IDC_SOUNDINTERPOLATION), workprefs.produce_sound);
+    EnableWindow (GetDlgItem (hDlg, IDC_SOUNDINTERPOLATION), workprefs.sound_stereo < 2 && workprefs.produce_sound);
     EnableWindow (GetDlgItem (hDlg, IDC_SOUNDVOLUME), workprefs.produce_sound);
     EnableWindow (GetDlgItem (hDlg, IDC_SOUNDVOLUME2), workprefs.produce_sound);
-    EnableWindow (GetDlgItem (hDlg, IDC_SOUNDSTEREOSEP), workprefs.sound_stereo && workprefs.produce_sound);
-    EnableWindow (GetDlgItem (hDlg, IDC_SOUNDSTEREOMIX), workprefs.sound_stereo && workprefs.produce_sound);
+    EnableWindow (GetDlgItem (hDlg, IDC_SOUNDSTEREOSEP), workprefs.sound_stereo == 1 && workprefs.produce_sound);
+    EnableWindow (GetDlgItem (hDlg, IDC_SOUNDSTEREOMIX), workprefs.sound_stereo == 1&& workprefs.produce_sound);
 
     EnableWindow (GetDlgItem (hDlg, IDC_SOUNDBUFFERMEM), workprefs.produce_sound);
     EnableWindow (GetDlgItem (hDlg, IDC_SOUNDBUFFERRAM), workprefs.produce_sound);
@@ -4522,14 +4522,16 @@ static void values_to_sounddlg (HWND hDlg)
     SendDlgItemMessage(hDlg, IDC_SOUNDSTEREO, CB_ADDSTRING, 0, (LPARAM)txt);
     WIN32GUI_LoadUIString (IDS_SOUND_STEREO, txt, sizeof (txt));
     SendDlgItemMessage(hDlg, IDC_SOUNDSTEREO, CB_ADDSTRING, 0, (LPARAM)txt);
-    SendDlgItemMessage (hDlg, IDC_SOUNDSTEREO, CB_SETCURSEL, workprefs.sound_stereo ? 1 : 0, 0);
+    WIN32GUI_LoadUIString (IDS_SOUND_4CHANNEL, txt, sizeof (txt));
+    SendDlgItemMessage(hDlg, IDC_SOUNDSTEREO, CB_ADDSTRING, 0, (LPARAM)txt);
+    SendDlgItemMessage (hDlg, IDC_SOUNDSTEREO, CB_SETCURSEL, workprefs.sound_stereo, 0);
 
     SendDlgItemMessage(hDlg, IDC_SOUNDSTEREOSEP, CB_RESETCONTENT, 0, 0);
     for (i = 10; i >= 0; i--) {
        sprintf (txt, "%d%%", i * 10);
         SendDlgItemMessage(hDlg, IDC_SOUNDSTEREOSEP, CB_ADDSTRING, 0, (LPARAM)txt);
     }
-    SendDlgItemMessage (hDlg, IDC_SOUNDSTEREOSEP, CB_SETCURSEL, 10 - (workprefs.sound_stereo_separation / 3), 0);
+    SendDlgItemMessage (hDlg, IDC_SOUNDSTEREOSEP, CB_SETCURSEL, 10 - workprefs.sound_stereo_separation, 0);
 
     SendDlgItemMessage(hDlg, IDC_SOUNDSTEREOMIX, CB_RESETCONTENT, 0, 0);
     SendDlgItemMessage(hDlg, IDC_SOUNDSTEREOMIX, CB_ADDSTRING, 0, (LPARAM)"-");
@@ -4637,7 +4639,8 @@ static void values_from_sounddlg (HWND hDlg)
                               : IsDlgButtonChecked (hDlg, IDC_SOUND1) ? 1
                               : IsDlgButtonChecked (hDlg, IDC_SOUND2) ? 2 : 3);
     idx = SendDlgItemMessage (hDlg, IDC_SOUNDSTEREO, CB_GETCURSEL, 0, 0);
-    workprefs.sound_stereo = idx == 1 ? 1 : 0;
+    if (idx != CB_ERR)
+       workprefs.sound_stereo = idx;
     workprefs.sound_stereo_separation = 0;
     workprefs.sound_mixed_stereo = 0;
     if (workprefs.sound_stereo > 0) {
@@ -4645,7 +4648,7 @@ static void values_from_sounddlg (HWND hDlg)
        if (idx >= 0) {
            if (idx > 0)
                workprefs.sound_mixed_stereo = -1;
-           workprefs.sound_stereo_separation = (10 - idx) * 3;
+           workprefs.sound_stereo_separation = 10 - idx;
        }
        idx = SendDlgItemMessage (hDlg, IDC_SOUNDSTEREOMIX, CB_GETCURSEL, 0, 0);
        if (idx > 0)
@@ -6568,6 +6571,8 @@ static BOOL CALLBACK InputDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPa
     return FALSE;
 }
 
+#ifdef GFXFILTER
+
 static int scanlineratios[] = { 1,1,1,2,1,3, 2,1,2,2,2,3, 3,1,3,2,3,3, 0,0 };
 static int scanlineindexes[100];
 static int filterpreset = 0;
@@ -6960,6 +6965,7 @@ static BOOL CALLBACK hw3dDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPar
     }
     return FALSE;
 }
+#endif
 
 #ifdef AVIOUTPUT
 static void values_to_avioutputdlg(HWND hDlg)
@@ -7720,7 +7726,7 @@ static int GetSettings (int all_options, HWND hwnd)
        KICKSTART_ID = init_page (IDD_KICKSTART, IDI_MEMORY, IDS_KICKSTART, KickstartDlgProc, "gui/rom.htm");
        CPU_ID = init_page (IDD_CPU, IDI_CPU, IDS_CPU, CPUDlgProc, "gui/cpu.htm");
        DISPLAY_ID = init_page (IDD_DISPLAY, IDI_DISPLAY, IDS_DISPLAY, DisplayDlgProc, "gui/display.htm");
-#if defined(OPENGL) || defined (D3D)
+#if defined (GFXFILTER)
        HW3D_ID = init_page (IDD_FILTER, IDI_DISPLAY, IDS_FILTER, hw3dDlgProc, "gui/filter.htm");
 #endif
        CHIPSET_ID = init_page (IDD_CHIPSET, IDI_CPU, IDS_CHIPSET, ChipsetDlgProc, "gui/chipset.htm");
@@ -8031,6 +8037,7 @@ void pre_gui_message (const char *format,...)
 static int transla[] = {
     NUMSG_NEEDEXT2, IDS_NUMSG_NEEDEXT2,
     NUMSG_NOROMKEY,IDS_NUMSG_NOROMKEY,
+    NUMSG_NOROM,IDS_NUMSG_NOROM,
     NUMSG_KSROMCRCERROR,IDS_NUMSG_KSROMCRCERROR,
     NUMSG_KSROMREADERROR,IDS_NUMSG_KSROMREADERROR,
     NUMSG_NOEXTROM,IDS_NUMSG_NOEXTROM,
@@ -8044,6 +8051,8 @@ static int transla[] = {
     NUMSG_STATEHD,IDS_NUMSG_STATEHD,
     NUMSG_OLDCAPS, IDS_NUMSG_OLDCAPS,
     NUMSG_NOCAPS, IDS_NUMSG_NOCAPS,
+    NUMSG_KICKREP, IDS_NUMSG_KICKREP,
+    NUMSG_KICKREPNO, IDS_NUMSG_KICKREPNO,
     -1
 };
 
index 235fcf329cc5e89b36b420e9c0cfffcbe5bac94f..2fe9c646366c6e3c89cd6e9a0f378ef896bff84c 100755 (executable)
                <File
                        RelativePath="..\resources\drive_startup.wav">
                </File>
-               <File
-                       RelativePath="..\hq2x32.obj">
-               </File>
-               <File
-                       RelativePath="..\hq3x16.obj">
-               </File>
-               <File
-                       RelativePath="..\hq3x32.obj">
-               </File>
-               <File
-                       RelativePath="..\hq4x32.obj">
-               </File>
                <File
                        RelativePath="..\resources\resource.h">
                </File>