]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
imported winuaesrc1600b27.zip
authorToni Wilen <twilen@winuae.net>
Fri, 1 May 2009 09:11:44 +0000 (12:11 +0300)
committerToni Wilen <twilen@winuae.net>
Mon, 22 Feb 2010 19:46:13 +0000 (21:46 +0200)
36 files changed:
archivers/lha/lha_macro.h
cfgfile.c
custom.c
drawing.c
gencpu.c
include/gfxfilter.h
include/options.h
include/parallel.h
od-win32/ahidsound_dsonly.c [new file with mode: 0644]
od-win32/ahidsound_unified.c [moved from od-win32/ahidsound.c with 100% similarity]
od-win32/build68k_msvc/build68k_msvc.vcproj
od-win32/direct3d.c
od-win32/direct3d.h
od-win32/dxwrap.h
od-win32/genblitter_msvc/genblitter_msvc.vcproj
od-win32/gencomp_msvc/gencomp_msvc.vcproj
od-win32/gencpu_msvc/gencpu_msvc.vcproj
od-win32/hq2x_d3d.c
od-win32/keyboard_win32.c
od-win32/lcd.c
od-win32/parser.c
od-win32/picasso96_win.c
od-win32/resources/resource
od-win32/resources/winuae.rc
od-win32/screenshot.c
od-win32/sounddep/sound.c
od-win32/sys/mman.h
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
od-win32/winuaechangelog.txt
prowizard/rippers/TitanicsPlayer.c

index a227a810c158ee972a981a69454f8f43a6cf4b10..e5021aae3c288c18aa1738695dcd7ba16d7df055 100644 (file)
@@ -8,7 +8,7 @@
 /* ------------------------------------------------------------------------ */
 
 /* external variables */
-extern int      errno;
+//extern int      errno;
 
 /* used by qsort() for alphabetic-sort */
 #define STRING_COMPARE(a,b)            strcmp((a),(b))
index b5803eee62945eba9226e4363b50064e183329c6..6eb9eebe29ecf0d8263e5ae5f987be6442298411 100644 (file)
--- a/cfgfile.c
+++ b/cfgfile.c
@@ -594,6 +594,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
 
     cfgfile_write_bool (f, L"synchronize_clock", p->tod_hack);
     cfgfile_write (f, L"maprom", L"0x%x", p->maprom);
+    cfgfile_write_bool (f, L"parallel_matrix_emulation", p->parallel_ascii_emulation);
     cfgfile_write_bool (f, L"parallel_postscript_emulation", p->parallel_postscript_emulation);
     cfgfile_write_bool (f, L"parallel_postscript_detection", p->parallel_postscript_detection);
     cfgfile_write_str (f, L"ghostscript_parameters", p->ghostscript_parameters);
@@ -1077,11 +1078,13 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value)
 
 
     if (cfgfile_yesno (option, value, L"show_leds", &v)) {
-       p->leds_on_screen |= STATUSLINE_CHIPSET;
+       if (v)
+           p->leds_on_screen |= STATUSLINE_CHIPSET;
        return 1;
     }
     if (cfgfile_yesno (option, value, L"show_leds_rtg", &v)) {
-       p->leds_on_screen |= STATUSLINE_RTG;
+       if (v)
+           p->leds_on_screen |= STATUSLINE_RTG;
        return 1;
     }
 
@@ -1522,6 +1525,7 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, TCHAR *option, TCHAR *va
        || cfgfile_yesno (option, value, L"cpu_compatible", &p->cpu_compatible)
        || cfgfile_yesno (option, value, L"cpu_24bit_addressing", &p->address_space_24)
        || cfgfile_yesno (option, value, L"parallel_on_demand", &p->parallel_demand)
+       || cfgfile_yesno (option, value, L"parallel_matrix_emulation", &p->parallel_ascii_emulation)
        || cfgfile_yesno (option, value, L"parallel_postscript_emulation", &p->parallel_postscript_emulation)
        || cfgfile_yesno (option, value, L"parallel_postscript_detection", &p->parallel_postscript_detection)
        || cfgfile_yesno (option, value, L"serial_on_demand", &p->serial_demand)
@@ -3083,6 +3087,7 @@ void default_prefs (struct uae_prefs *p, int type)
     p->serial_demand = 0;
     p->serial_hwctsrts = 1;
     p->parallel_demand = 0;
+    p->parallel_ascii_emulation = 0;
     p->parallel_postscript_emulation = 0;
     p->parallel_postscript_detection = 0;
     p->parallel_autoflush_time = 5;
index 0bb7c542390201a2b083fc4dabc777487dc2b82b..187d03b567889f78ab3323bea2b71306566ee26e 100644 (file)
--- a/custom.c
+++ b/custom.c
@@ -63,6 +63,7 @@
 #define MAX_SPRITES 8
 #define SPRITE_COLLISIONS
 #define SPEEDUP
+#define AUTOSCALE_SPRITES 1
 
 #define NEW_BPL 1
 
@@ -2300,22 +2301,25 @@ static void decide_sprites (int hpos)
        int nr = nrs[i] & (MAX_SPRITES - 1);
        record_sprite (next_lineno, nr, posns[i], sprdata[nr], sprdatb[nr], sprctl[nr]);
        /* get left and right sprite edge if brdsprt enabled */
-       if (bplcon3 & 2) {
-           int j;
-           for (j = 0; j < sprite_width; j+= 16) {
+#if AUTOSCALE_SPRITES
+       if ((bplcon0 & 1) && (bplcon3 & 0x02) && !(bplcon3 & 0x20)) {
+           int j, jj;
+           for (j = 0, jj = 0; j < sprite_width; j+= 16, jj++) {
                int nx = fromspritexdiw (posns[i] + j);
-               if (sprdata[nr][j] || sprdata[nr][j]) {
-                   if (diwfirstword_total > nx)
+               if (sprdata[nr][jj] || sprdatb[nr][jj]) {
+                   if (diwfirstword_total > nx && nx >= (48 << currprefs.gfx_resolution))
                        diwfirstword_total = nx;
-                   if (diwlastword_total < nx + 16)
+                   if (diwlastword_total < nx + 16 && nx <= (448 << currprefs.gfx_resolution))
                        diwlastword_total = nx + 16;
                }
            }
            gotdata = 1;
        }
+#endif
     }
     last_sprite_point = point;
 
+#if AUTOSCALE_SPRITES
     /* get upper and lower sprite position if brdsprt enabled */
     if (gotdata) {
        if (vpos < first_planes_vpos)
@@ -2327,6 +2331,7 @@ static void decide_sprites (int hpos)
        if (vpos > plflastline_total)
            plflastline_total = vpos;
     }
+#endif
 }
 
 STATIC_INLINE int sprites_differ (struct draw_info *dip, struct draw_info *dip_old)
index 3367446ca79c9691c947bc25034bc5b0e65f3764..84358ff4203882dff035babe8729c210e182bd91 100644 (file)
--- a/drawing.c
+++ b/drawing.c
@@ -403,12 +403,8 @@ int get_custom_limits (int *pw, int *ph, int *pdx, int *pdy)
            w = MIN_DISPLAY_W << currprefs.gfx_resolution;
        }
        if ((h >> dbl1) < MIN_DISPLAY_H) {
-           if (gcloh > MIN_DISPLAY_H) {
-               h = gcloh;
-           } else {
-               dy += (h - (MIN_DISPLAY_H << dbl1)) / 2;
-               h = MIN_DISPLAY_H << dbl1;
-           }
+           dy += (h - (MIN_DISPLAY_H << dbl1)) / 2;
+           h = MIN_DISPLAY_H << dbl1;
        }
        if ((w >> currprefs.gfx_resolution) > MAX_DISPLAY_W) {
            dx += (w - (MAX_DISPLAY_W << currprefs.gfx_resolution)) / 2;
index 7ed2e8897d89fdc9db1f7325bc09a16a8e8a8b0f..d7d3be91ef24f28acc33999ee7933e483f9f5b76 100644 (file)
--- a/gencpu.c
+++ b/gencpu.c
@@ -3103,7 +3103,11 @@ static char *outopcode (int opcode)
        if (ins->mnemo == lookuptab[i].mnemo)
            break;
     }
-    strcpy (out, lookuptab[i].name);
+    {
+       char *s = ua (lookuptab[i].name);
+       strcpy (out, s);
+       xfree (s);
+    }
     if (ins->size == sz_byte)
        strcat (out,".B");
     if (ins->size == sz_word)
index b2a541bd54f90a3363cf48b0932e76e1f1507539..a5da16144b0c3db532f4186179ca7c2cf55f91d4 100644 (file)
@@ -11,8 +11,8 @@ extern void S2X_init (int dw, int dh, int aw, int ah, int mult, int ad, int dd);
 extern void S2X_free (void);
 
 extern void PAL_init (void);
-extern void PAL_1x1_32(uae_u32 *src, int pitchs, uae_u32 *trg, int pitcht, int width, int height);
-extern void PAL_1x1_16(uae_u16 *src, int pitchs, uae_u16 *trg, int pitcht, int width, int height);
+extern void PAL_1x1_32 (uae_u32 *src, int pitchs, uae_u32 *trg, int pitcht, int width, int height);
+extern void PAL_1x1_16 (uae_u16 *src, int pitchs, uae_u16 *trg, int pitcht, int width, int height);
 
 typedef unsigned char uint8;
 typedef unsigned short uint16;
@@ -22,25 +22,25 @@ typedef int bool;
 #endif
 
 extern void S2X_configure (int rb, int gb, int bb, int rs, int gs, int bs);
-extern int Init_2xSaI(int rb, int gb, int bb, int rs, int gs, int bs);
-extern void Super2xSaI_16(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height);
-extern void Super2xSaI_32(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height);
-extern void SuperEagle_16(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height);
-extern void SuperEagle_32(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height);
-extern void _2xSaI_16(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height);
-extern void _2xSaI_32(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height);
-extern void AdMame2x(u8 *srcPtr, u32 srcPitch, /* u8 deltaPtr, */
+extern int Init_2xSaI (int rb, int gb, int bb, int rs, int gs, int bs);
+extern void Super2xSaI_16 (const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height);
+extern void Super2xSaI_32 (const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height);
+extern void SuperEagle_16 (const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height);
+extern void SuperEagle_32 (const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height);
+extern void _2xSaI_16 (const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height);
+extern void _2xSaI_32 (const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height);
+extern void AdMame2x (u8 *srcPtr, u32 srcPitch, /* u8 deltaPtr, */
              u8 *dstPtr, u32 dstPitch, int width, int height);
-extern void AdMame2x32(u8 *srcPtr, u32 srcPitch, /* u8 deltaPtr, */
+extern void AdMame2x32 (u8 *srcPtr, u32 srcPitch, /* u8 deltaPtr, */
              u8 *dstPtr, u32 dstPitch, int width, int height);
 
-extern void hq_init(int rb, int gb, int bb, int rs, int gs, int bs);
-extern void hq2x_16(unsigned char*, unsigned char*, DWORD, DWORD, DWORD);
-extern void hq2x_32(unsigned char*, unsigned char*, DWORD, DWORD, DWORD);
-extern void hq3x_16(unsigned char*, unsigned char*, DWORD, DWORD, DWORD);
-extern void hq3x_32(unsigned char*, unsigned char*, DWORD, DWORD, DWORD);
-extern void hq4x_16(unsigned char*, unsigned char*, DWORD, DWORD, DWORD);
-extern void hq4x_32(unsigned char*, unsigned char*, DWORD, DWORD, DWORD);
+extern void hq_init (int rb, int gb, int bb, int rs, int gs, int bs);
+extern void _cdecl hq2x_16 (unsigned char*, unsigned char*, DWORD, DWORD, DWORD);
+extern void _cdecl hq2x_32 (unsigned char*, unsigned char*, DWORD, DWORD, DWORD);
+extern void _cdecl hq3x_16 (unsigned char*, unsigned char*, DWORD, DWORD, DWORD);
+extern void _cdecl hq3x_32 (unsigned char*, unsigned char*, DWORD, DWORD, DWORD);
+extern void _cdecl hq4x_16 (unsigned char*, unsigned char*, DWORD, DWORD, DWORD);
+extern void _cdecl hq4x_32 (unsigned char*, unsigned char*, DWORD, DWORD, DWORD);
 
 #define UAE_FILTER_NULL 1
 #define UAE_FILTER_DIRECT3D 2
index 16ac813a452a004f7877c9516072a180901d6cd2..2c396c4ea9aa18d058e96f20774693261260c3e2 100644 (file)
@@ -107,6 +107,7 @@ struct uae_prefs {
     int serial_hwctsrts;
     int serial_direct;
     int parallel_demand;
+    int parallel_ascii_emulation;
     int parallel_postscript_emulation;
     int parallel_postscript_detection;
     int parallel_autoflush_time;
index c53fde227da5e94651ae4e49d045838d0e542147..70d30197d65c1a76db6de8c544b8c9b83a501109 100644 (file)
@@ -1,8 +1,7 @@
 
 extern int isprinter (void);
-extern int doprinter (uae_u8);
+extern void doprinter (uae_u8);
 extern void flushprinter (void);
 extern void closeprinter (void);
-extern void openprinter (void);
 extern int isprinteropen (void);
 extern void initparallel (void);
\ No newline at end of file
diff --git a/od-win32/ahidsound_dsonly.c b/od-win32/ahidsound_dsonly.c
new file mode 100644 (file)
index 0000000..45881e1
--- /dev/null
@@ -0,0 +1,872 @@
+/*
+ * UAE - The Un*x Amiga Emulator
+ *
+ * Win32 interface
+ *
+ * Copyright 1997 Mathias Ortmann
+ * Copyright 1997-2001 Brian King
+ * Copyright 2000-2002 Bernd Roesch
+ */
+
+#define NATIVBUFFNUM 4
+#define RECORDBUFFER 50 //survive 9 sec of blocking at 44100
+
+#include "sysconfig.h"
+
+#if defined(AHI)
+
+#include <ctype.h>
+#include <assert.h>
+
+#include <windows.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <dsound.h>
+#include <stdio.h>
+
+#include "sysdeps.h"
+#include "options.h"
+#include "audio.h"
+#include "memory.h"
+#include "events.h"
+#include "custom.h"
+#include "newcpu.h"
+#include "traps.h"
+#include "od-win32/win32.h"
+#include "sounddep/sound.h"
+#include "dxwrap.h"
+#include "win32.h"
+#include "parser.h"
+#include "enforcer.h"
+#include "ahidsound.h"
+
+static long samples, playchannel, intcount;
+static int record_enabled;
+int ahi_on;
+static uae_u8 *sndptrmax;
+static uae_u8 soundneutral;
+
+static LPSTR lpData,sndptrout;
+extern uae_u32 chipmem_mask;
+unsigned int *sndbufrecpt;
+static uae_u8 *ahisndbuffer, *sndrecbuffer;
+static int ahisndbufsize, *ahisndbufpt, ahitweak;;
+int ahi_pollrate = 40;
+
+int sound_freq_ahi, sound_channels_ahi, sound_bits_ahi;
+
+static int vin, devicenum;
+static int amigablksize;
+
+static DWORD sound_flushes2 = 0;
+
+extern HWND hAmigaWnd;
+
+static LPDIRECTSOUND lpDS2 = NULL;
+static LPDIRECTSOUNDBUFFER lpDSBprimary2 = NULL;
+static LPDIRECTSOUNDBUFFER lpDSB2 = NULL;
+static LPDIRECTSOUNDNOTIFY lpDSBN2 = NULL;
+
+// for record
+static LPDIRECTSOUNDCAPTURE lpDS2r = NULL;
+static LPDIRECTSOUNDCAPTUREBUFFER lpDSBprimary2r = NULL;
+static LPDIRECTSOUNDCAPTUREBUFFER lpDSB2r = NULL;
+
+struct winuae  //this struct is put in a6 if you call
+               //execute native function
+{
+    HWND amigawnd;    //adress of amiga Window Windows Handle
+    unsigned int changenum;   //number to detect screen close/open
+    unsigned int z3offset;    //the offset to add to acsess Z3 mem from Dll side
+};
+static struct winuae uaevar;
+static struct winuae *a6;
+
+#if defined(X86_MSVC_ASSEMBLY)
+
+#define CREATE_NATIVE_FUNC_PTR2 uae_u32 (*native_func)(uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32,\
+       uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32,uae_u32,uae_u32)
+#define SET_NATIVE_FUNC2(x) native_func = (uae_u32 (*)(uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32,uae_u32,uae_u32))(x)
+#define CALL_NATIVE_FUNC2(d1,d2,d3,d4,d5,d6,d7,a1,a2,a3,a4,a5,a6,a7) if(native_func) return native_func(d1,d2,d3,d4,d5,d6,d7,a1,a2,a3,a4,a5,a6,a7,regs_)
+
+static uae_u32 REGPARAM2 emulib_ExecuteNativeCode2 (TrapContext *context)
+{
+    unsigned int espstore;
+    uae_u8* object_UAM = (uae_u8*) m68k_areg (&context->regs, 0);
+    uae_u32 d1 = m68k_dreg (&context->regs, 1);
+    uae_u32 d2 = m68k_dreg (&context->regs, 2);
+    uae_u32 d3 = m68k_dreg (&context->regs, 3);
+    uae_u32 d4 = m68k_dreg (&context->regs, 4);
+    uae_u32 d5 = m68k_dreg (&context->regs, 5);
+    uae_u32 d6 = m68k_dreg (&context->regs, 6);
+    uae_u32 d7 = m68k_dreg (&context->regs, 7);
+    uae_u32 a1 = m68k_areg (&context->regs, 1);
+    uae_u32 a2 = m68k_areg (&context->regs, 2);
+    uae_u32 a3 = m68k_areg (&context->regs, 3);
+    uae_u32 a4 = m68k_areg (&context->regs, 4);
+    uae_u32 a5 = m68k_areg (&context->regs, 5);
+    uae_u32 a7 = m68k_areg (&context->regs, 7);
+    uae_u32 regs_ = (uae_u32)&context->regs;
+    CREATE_NATIVE_FUNC_PTR2;
+    uaevar.z3offset = (uae_u32)(get_real_address (0x10000000) - 0x10000000);
+    uaevar.amigawnd = hAmigaWnd;
+    a6 = &uaevar;
+    if (object_UAM)  {
+       SET_NATIVE_FUNC2 (object_UAM);
+    __asm
+       {   mov espstore,esp
+           push regs_
+           push a7
+           push a6
+           push a5
+           push a4
+           push a3
+           push a2
+           push a1
+           push d7
+           push d6
+           push d5
+           push d4
+           push d3
+           push d2
+           push d1
+           call native_func
+           mov esp,espstore
+       }
+       //CALL_NATIVE_FUNC2( d1, d2,d3, d4, d5, d6, d7, a1, a2, a3, a4 , a5 , a6 , a7);
+    } else {
+       return 0;
+    }
+}
+
+#endif
+
+void ahi_close_sound (void)
+{
+    HRESULT hr = DS_OK;
+
+    if (!ahi_on)
+       return;
+    ahi_on = 0;
+    record_enabled = 0;
+    ahisndbufpt = (int*)ahisndbuffer;
+
+    if (lpDSB2) {
+       hr = IDirectSoundBuffer_Stop (lpDSB2);
+       if(FAILED (hr))
+           write_log (L"AHI: SoundStop() failure: %s\n", DXError (hr));
+    } else {
+       write_log (L"AHI: Sound Stopped...\n");
+    }
+
+    if (lpDSB2)
+       IDirectSoundBuffer_Release (lpDSB2);
+    lpDSB2 = NULL;
+    if (lpDSBprimary2)
+       IDirectSoundBuffer_Release (lpDSBprimary2);
+    lpDSBprimary2 = NULL;
+    if (lpDS2)
+       IDirectSound_Release (lpDS2);
+    lpDS2 = NULL;
+
+    if (lpDSB2r)
+       IDirectSoundCaptureBuffer_Release (lpDSB2r);
+    lpDSB2r = NULL;
+    if (lpDS2r)
+       IDirectSound_Release (lpDS2r);
+    lpDS2r = NULL;
+    if (ahisndbuffer)
+       free (ahisndbuffer);
+    ahisndbuffer = NULL;
+}
+
+void ahi_updatesound(int force)
+{
+    HRESULT hr;
+    int pos;
+    unsigned int dwBytes1, dwBytes2;
+    LPVOID dwData1, dwData2;
+    static int oldpos;
+
+    if (sound_flushes2 == 1) {
+       oldpos = 0;
+       intcount = 1;
+       INTREQ_f (0x8000 | 0x2000);
+       hr = IDirectSoundBuffer_Play (lpDSB2, 0, 0, DSBPLAY_LOOPING);
+       if(hr == DSERR_BUFFERLOST) {
+           IDirectSoundBuffer_Restore (lpDSB2);
+           hr = IDirectSoundBuffer_Play (lpDSB2, 0, 0, DSBPLAY_LOOPING);
+       }
+    }
+
+    hr = IDirectSoundBuffer_GetCurrentPosition (lpDSB2, &pos, 0);
+    if (hr != DSERR_BUFFERLOST) {
+       pos -= ahitweak;
+       if (pos < 0)
+           pos += ahisndbufsize;
+       if (pos >= ahisndbufsize)
+           pos -= ahisndbufsize;
+       pos = (pos / (amigablksize * 4)) * (amigablksize * 4);
+       if (force == 1) {
+           if (oldpos != pos) {
+               intcount = 1;
+               INTREQ_f (0x8000 | 0x2000);
+               return; //to generate amiga ints every amigablksize
+           } else {
+               return;
+           }
+       }
+    }
+
+    hr = IDirectSoundBuffer_Lock (lpDSB2, oldpos, amigablksize * 4, &dwData1, &dwBytes1, &dwData2, &dwBytes2, 0);
+    if(hr == DSERR_BUFFERLOST) {
+       write_log (L"AHI: lostbuf %d %x\n", pos, amigablksize);
+       IDirectSoundBuffer_Restore (lpDSB2);
+       hr = IDirectSoundBuffer_Lock (lpDSB2, oldpos, amigablksize * 4, &dwData1, &dwBytes1, &dwData2, &dwBytes2, 0);
+    }
+    if(FAILED(hr))
+       return;
+
+    if (currprefs.sound_stereo_swap_ahi) {
+       int i;
+       uae_s16 *p = (uae_s16*)ahisndbuffer;
+       for (i = 0; i < (dwBytes1 + dwBytes2) / 2; i += 2) {
+           uae_s16 tmp;
+           tmp = p[i + 0];
+           p[i + 0] = p[i + 1];
+           p[i + 1] = tmp;
+       }
+    }
+
+    memcpy (dwData1, ahisndbuffer, dwBytes1);
+    if (dwData2)
+       memcpy (dwData2, (uae_u8*)ahisndbuffer + dwBytes1, dwBytes2);
+
+    sndptrmax = ahisndbuffer + ahisndbufsize;
+    ahisndbufpt = (int*)ahisndbuffer;
+
+    IDirectSoundBuffer_Unlock (lpDSB2, dwData1, dwBytes1, dwData2, dwBytes2);
+
+    oldpos += amigablksize * 4;
+    if (oldpos >= ahisndbufsize)
+       oldpos -= ahisndbufsize;
+    if (oldpos != pos) {
+       intcount = 1;
+       INTREQ_f (0x8000 | 0x2000);
+    }
+}
+
+
+void ahi_finish_sound_buffer (void)
+{
+    sound_flushes2++;
+    ahi_updatesound(2);
+}
+
+static WAVEFORMATEX wavfmt;
+
+static int ahi_init_record_win32 (void)
+{
+    HRESULT hr;
+    DSCBUFFERDESC sound_buffer_rec;
+    // Record begin
+    hr = DirectSoundCaptureCreate (NULL, &lpDS2r, NULL);
+    if (FAILED (hr)) {
+       write_log (L"AHI: DirectSoundCaptureCreate() failure: %s\n", DXError (hr));
+       record_enabled = -1;
+       return 0;
+    }
+    memset (&sound_buffer_rec, 0, sizeof (DSCBUFFERDESC));
+    sound_buffer_rec.dwSize = sizeof (DSCBUFFERDESC);
+    sound_buffer_rec.dwBufferBytes = amigablksize * 4 * RECORDBUFFER;
+    sound_buffer_rec.lpwfxFormat = &wavfmt;
+    sound_buffer_rec.dwFlags = 0 ;
+
+    hr = IDirectSoundCapture_CreateCaptureBuffer (lpDS2r, &sound_buffer_rec, &lpDSB2r, NULL);
+    if (FAILED (hr)) {
+       write_log (L"AHI: CreateCaptureSoundBuffer() failure: %s\n", DXError(hr));
+       record_enabled = -1;
+       return 0;
+    }
+
+    hr = IDirectSoundCaptureBuffer_Start (lpDSB2r, DSCBSTART_LOOPING);
+    if (FAILED (hr)) {
+       write_log (L"AHI: DirectSoundCaptureBuffer_Start failed: %s\n", DXError (hr));
+       record_enabled = -1;
+       return 0;
+    }
+    record_enabled = 1;
+    write_log (L"AHI: Init AHI Audio Recording \n");
+    return 1;
+}
+
+void setvolume_ahi (LONG vol)
+{
+    HRESULT hr;
+    if (!lpDS2)
+       return;
+    hr = IDirectSoundBuffer_SetVolume (lpDSB2, vol);
+    if (FAILED (hr))
+       write_log (L"AHI: SetVolume(%d) failed: %s\n", vol, DXError (hr));
+}
+
+static int ahi_init_sound_win32 (void)
+{
+    HRESULT hr;
+    DSBUFFERDESC sound_buffer;
+    DSCAPS DSCaps;
+
+    if (lpDS2)
+       return 0;
+
+    enumerate_sound_devices ();
+    wavfmt.wFormatTag = WAVE_FORMAT_PCM;
+    wavfmt.nChannels = sound_channels_ahi;
+    wavfmt.nSamplesPerSec = sound_freq_ahi;
+    wavfmt.wBitsPerSample = sound_bits_ahi;
+    wavfmt.nBlockAlign = wavfmt.wBitsPerSample / 8 * wavfmt.nChannels;
+    wavfmt.nAvgBytesPerSec = wavfmt.nBlockAlign * sound_freq_ahi;
+    wavfmt.cbSize = 0;
+
+    write_log (L"AHI: Init AHI Sound Rate %d, Channels %d, Bits %d, Buffsize %d\n",
+       sound_freq_ahi, sound_channels_ahi, sound_bits_ahi, amigablksize);
+
+    if (!amigablksize)
+       return 0;
+    soundneutral = 0;
+    ahisndbufsize = (amigablksize * 4) * NATIVBUFFNUM;  // use 4 native buffer
+    ahisndbuffer = malloc (ahisndbufsize + 32);
+    if (!ahisndbuffer)
+       return 0;
+    if (sound_devices[currprefs.win32_soundcard].type != SOUND_DEVICE_DS)
+       hr = DirectSoundCreate (NULL, &lpDS2, NULL);
+    else
+       hr = DirectSoundCreate (&sound_devices[currprefs.win32_soundcard].guid, &lpDS2, NULL);
+    if (FAILED (hr)) {
+       write_log (L"AHI: DirectSoundCreate() failure: %s\n", DXError (hr));
+       return 0;
+    }
+    memset (&sound_buffer, 0, sizeof (DSBUFFERDESC));
+    sound_buffer.dwSize = sizeof (DSBUFFERDESC);
+    sound_buffer.dwFlags = DSBCAPS_PRIMARYBUFFER;
+    sound_buffer.dwBufferBytes = 0;
+    sound_buffer.lpwfxFormat = NULL;
+
+    DSCaps.dwSize = sizeof(DSCAPS);
+    hr = IDirectSound_GetCaps (lpDS2, &DSCaps);
+    if (SUCCEEDED (hr)) {
+       if (DSCaps.dwFlags & DSCAPS_EMULDRIVER)
+           write_log (L"AHI: Your DirectSound Driver is emulated via WaveOut - yuck!\n");
+    }
+    if (FAILED (IDirectSound_SetCooperativeLevel (lpDS2, hMainWnd, DSSCL_PRIORITY)))
+       return 0;
+    hr = IDirectSound_CreateSoundBuffer (lpDS2, &sound_buffer, &lpDSBprimary2, NULL);
+    if (FAILED (hr)) {
+       write_log (L"AHI: CreateSoundBuffer() failure: %s\n", DXError(hr));
+       return 0;
+    }
+    hr = IDirectSoundBuffer_SetFormat (lpDSBprimary2, &wavfmt);
+    if (FAILED (hr)) {
+       write_log (L"AHI: SetFormat() failure: %s\n", DXError (hr));
+       return 0;
+    }
+    sound_buffer.dwBufferBytes = ahisndbufsize;
+    sound_buffer.lpwfxFormat = &wavfmt;
+    sound_buffer.dwFlags = DSBCAPS_CTRLFREQUENCY | DSBCAPS_CTRLVOLUME
+       | DSBCAPS_GETCURRENTPOSITION2 | DSBCAPS_GLOBALFOCUS | DSBCAPS_LOCSOFTWARE;
+    sound_buffer.guid3DAlgorithm = GUID_NULL;
+    hr = IDirectSound_CreateSoundBuffer (lpDS2, &sound_buffer, &lpDSB2, NULL);
+    if (FAILED (hr)) {
+       write_log (L"AHI: CreateSoundBuffer() failure: %s\n", DXError (hr));
+       return 0;
+    }
+
+    setvolume_ahi (0);
+
+    hr = IDirectSoundBuffer_GetFormat (lpDSBprimary2,&wavfmt,500,0);
+    if (FAILED (hr)) {
+       write_log (L"AHI: GetFormat() failure: %s\n", DXError (hr));
+       return 0;
+    }
+
+    ahisndbufpt =(int*)ahisndbuffer;
+    sndptrmax = ahisndbuffer + ahisndbufsize;
+    memset (ahisndbuffer,  soundneutral, amigablksize * 8);
+    ahi_on = 1;
+    return sound_freq_ahi;
+}
+
+int ahi_open_sound (void)
+{
+    int rate;
+
+    uaevar.changenum++;
+    if (!sound_freq_ahi)
+       return 0;
+    if (ahi_on)
+       ahi_close_sound ();
+    sound_flushes2 = 1;
+    if ((rate = ahi_init_sound_win32 ()))
+       return rate;
+    return 0;
+}
+
+
+static void *bswap_buffer = NULL;
+static uae_u32 bswap_buffer_size = 0;
+static double syncdivisor;
+
+uae_u32 REGPARAM2 ahi_demux (TrapContext *context)
+{
+//use the extern int (6 #13)
+// d0 0=opensound      d1=unit d2=samplerate d3=blksize ret: sound frequency
+// d0 6=opensound_new  d1=unit d2=samplerate d3=blksize ret d4=channels d5=bits d6=zero: sound frequency
+// d0 1=closesound     d1=unit
+// d0 2=writesamples   d1=unit a0=addr     write blksize samples to card
+// d0 3=readsamples    d1=unit a0=addr     read samples from card ret: d0=samples read
+       // make sure you have from amigaside blksize*4 mem alloced
+       // d0=-1 no data available d0=-2 no recording open
+       // d0 > 0 there are more blksize Data in the que
+       // do the loop until d0 get 0
+       // if d0 is greater than 200 bring a message
+       // that show the user that data is lost
+       // maximum blocksbuffered are 250 (8,5 sec)
+// d0 4=writeinterrupt d1=unit d0=0 no interrupt happen for this unit
+       // d0=-2 no playing open
+       //note units for now not support use only unit 0
+// d0 5=?
+    // d0=10 get clipboard size  d0=size in bytes
+// d0=11 get clipboard data  a0=clipboarddata
+                                 //Note: a get clipboard size must do before
+// d0=12 write clipboard data   a0=clipboarddata
+// d0=13 setp96mouserate        d1=hz value
+// d0=100 open dll              d1=dll name in windows name conventions
+// d0=101 get dll function addr         d1=dllhandle a0 function/var name
+// d0=102 exec dllcode          a0=addr of function (see 101)
+// d0=103 close dll
+// d0=104 screenlost
+// d0=105 mem offset
+// d0=106 16Bit byteswap
+// d0=107 32Bit byteswap
+// d0=108 free swap array
+// d0=200 ahitweak              d1=offset for dsound position pointer
+
+    int opcode = m68k_dreg (&context->regs, 0);
+
+    switch (opcode)
+    {
+       uae_u32 src, num_vars;
+       static int cap_pos, clipsize;
+       static TCHAR *clipdat;
+
+       case 0:
+           cap_pos = 0;
+           sound_bits_ahi = 16;
+           sound_channels_ahi = 2;
+           sound_freq_ahi = m68k_dreg (&context->regs, 2);
+           amigablksize = m68k_dreg (&context->regs, 3);
+           sound_freq_ahi = ahi_open_sound();
+           uaevar.changenum--;
+       return sound_freq_ahi;
+       case 6: /* new open function */
+           cap_pos = 0;
+           sound_freq_ahi = m68k_dreg (&context->regs, 2);
+           amigablksize = m68k_dreg (&context->regs, 3);
+           sound_channels_ahi = m68k_dreg (&context->regs, 4);
+           sound_bits_ahi = m68k_dreg (&context->regs, 5);
+           sound_freq_ahi = ahi_open_sound();
+           uaevar.changenum--;
+       return sound_freq_ahi;
+
+       case 1:
+           ahi_close_sound();
+           sound_freq_ahi = 0;
+       return 0;
+
+       case 2:
+       {
+           int i;
+           uaecptr addr = m68k_areg (&context->regs, 0);
+           for (i = 0; i < amigablksize * 4; i += 4)
+               *ahisndbufpt++ = get_long (addr + i);
+           ahi_finish_sound_buffer();
+       }
+       return amigablksize;
+
+       case 3:
+       {
+           LPTSTR pos1,pos2;
+           uaecptr addr;
+           HRESULT hr;
+           int i, t, todo, byte1, byte2, cur_pos;
+
+           if (!ahi_on)
+               return -2;
+           if (record_enabled == 0)
+               ahi_init_record_win32();
+           if (record_enabled < 0)
+               return -2;
+           hr = IDirectSoundCaptureBuffer_GetCurrentPosition(lpDSB2r, &t, &cur_pos);
+           if (FAILED(hr))
+               return -1;
+
+           t =  amigablksize * 4;
+           if (cap_pos <= cur_pos)
+               todo = cur_pos - cap_pos;
+           else
+               todo = cur_pos + (RECORDBUFFER * t) - cap_pos;
+           if (todo < t) //if no complete buffer ready exit
+               return -1;
+           hr = IDirectSoundCaptureBuffer_Lock(lpDSB2r, cap_pos, t, &pos1, &byte1, &pos2, &byte2, 0);
+           if (FAILED(hr))
+               return -1;
+           if ((cap_pos + t) < (t * RECORDBUFFER))
+               cap_pos = cap_pos + t;
+           else
+               cap_pos = 0;
+           addr = m68k_areg (&context->regs, 0);
+           sndbufrecpt = (unsigned int*)pos1;
+           t /= 4;
+           for (i = 0; i < t; i++) {
+               put_long (addr, *sndbufrecpt++);
+               addr += 4;
+           }
+           t *= 4;
+           IDirectSoundCaptureBuffer_Unlock(lpDSB2r, pos1, byte1, pos2, byte2);
+           return (todo - t) / t;
+       }
+
+       case 4:
+       {
+           int i;
+           if (!ahi_on)
+               return -2;
+           i = intcount;
+           intcount = 0;
+           return i;
+       }
+
+       case 5:
+           if (!ahi_on)
+               return 0;
+           ahi_updatesound ( 1 );
+       return 1;
+
+       case 10:
+#if 1
+           if (OpenClipboard (0)) {
+               clipdat = GetClipboardData (CF_TEXT);
+               if (clipdat) {
+                   clipsize = _tcslen (clipdat);
+                   clipsize++;
+                   return clipsize;
+               }
+           }
+#endif
+           return 0;
+
+       case 11:
+       {
+#if 1
+           int i;
+           for (i = 0; i < clipsize; i++)
+               put_byte (m68k_areg (&context->regs, 0) + i, clipdat[i]);
+           CloseClipboard ();
+#endif
+       }
+       return 0;
+
+       case 12:
+       {
+#if 1
+           TCHAR *s = au (get_real_address (m68k_areg (&regs, 0)));
+           static LPTSTR p;
+           int slen;
+
+           if (OpenClipboard (0)) {
+               EmptyClipboard();
+               slen = _tcslen (s);
+               if (p)
+                   GlobalFree (p);
+               p = GlobalAlloc (GMEM_MOVEABLE, (slen + 1) * sizeof (TCHAR));
+               if (p) {
+                   TCHAR *p2 = GlobalLock (p);
+                   if (p2) {
+                       _tcscpy (p2, s);
+                       GlobalUnlock (p);
+                       SetClipboardData (CF_TEXT, p);
+                   }
+               }
+               CloseClipboard ();
+           }
+           xfree (s);
+#endif
+       }
+       return 0;
+
+       case 13: /* HACK */
+       { //for higher P96 mouse draw rate
+           extern int p96hack_vpos2, hack_vpos ,p96refresh_active;
+           extern uae_u16 vtotal;
+           extern unsigned int new_beamcon0;
+           p96hack_vpos2 = 0;
+           if (m68k_dreg (&context->regs, 1) > 0)
+               p96hack_vpos2 = 15625 / m68k_dreg (&context->regs, 1);
+           if (!currprefs.cs_ciaatod)
+               changed_prefs.cs_ciaatod = currprefs.cs_ciaatod = currprefs.ntscmode ? 2 : 1;
+           p96refresh_active=1;
+           picasso_refresh ();
+       } //end for higher P96 mouse draw rate
+       return 0;
+
+       case 20:
+       return enforcer_enable(m68k_dreg (&context->regs, 1));
+
+       case 21:
+       return enforcer_disable();
+
+       case 25:
+           flushprinter ();
+       return 0;
+
+#if defined(X86_MSVC_ASSEMBLY)
+
+       case 100: // open dll
+       {
+           TCHAR *dlldir = TEXT ("winuae_dll");
+           TCHAR *dllname;
+           uaecptr dllptr;
+           HMODULE h = NULL;
+           TCHAR dpath[MAX_DPATH];
+           TCHAR newdllpath[MAX_DPATH];
+           int ok = 0;
+           TCHAR *filepart;
+
+           dllptr = m68k_areg (&context->regs, 0);
+           dllname = au ((uae_char*)get_real_address (dllptr));
+           dpath[0] = 0;
+           GetFullPathName (dllname, sizeof dpath / sizeof (TCHAR), dpath, &filepart);
+           if (_tcslen (dpath) > _tcslen (start_path_data) && !_tcsncmp (dpath, start_path_data, _tcslen (start_path_data))) {
+               /* path really is relative to winuae directory */
+               ok = 1;
+               _tcscpy (newdllpath, dpath + _tcslen (start_path_data));
+               if (!_tcsncmp (newdllpath, dlldir, _tcslen (dlldir))) /* remove "winuae_dll" */
+                   _tcscpy (newdllpath, dpath + _tcslen (start_path_data) + 1 + _tcslen (dlldir));
+               _stprintf (dpath, L"%s%s%s", start_path_data, WIN32_PLUGINDIR, newdllpath);
+               h = LoadLibrary (dpath);
+               if (h == NULL)
+                   write_log (L"native open: '%s' = %d\n", dpath, GetLastError ());
+               if (h == NULL) {
+                   _stprintf (dpath, L"%s%s\\%s", start_path_data, dlldir, newdllpath);
+                   h = LoadLibrary (dllname);
+                   if (h == NULL)
+                       write_log (L"fallback native open: '%s' = %d\n", dpath, GetLastError ());
+               }
+           } else {
+               write_log (L"native open outside of installation dir '%s'!\n", dpath);
+           }
+           xfree (dllname);
+#if 0
+           if (h == NULL) {
+               h = LoadLibrary (filepart);
+               write_log (L"native file open: '%s' = %p\n", filepart, h);
+               if (h == NULL) {
+                   _stprintf (dpath, "%s%s%s", start_path_data, WIN32_PLUGINDIR, filepart);
+                   h = LoadLibrary (dpath);
+                   write_log (L"native path open: '%s' = %p\n", dpath, h);
+               }
+           }
+#endif
+           syncdivisor = (3580000.0 * CYCLE_UNIT) / (double)syncbase;
+           return (uae_u32)h;
+       }
+
+       case 101:       //get dll label
+       {
+           HMODULE m;
+           uaecptr funcaddr;
+           char *funcname;
+           m = (HMODULE) m68k_dreg (&context->regs, 1);
+           funcaddr = m68k_areg (&context->regs, 0);
+           funcname = get_real_address (funcaddr);
+           return (uae_u32) GetProcAddress (m, funcname);
+       }
+
+       case 102:       //execute native code
+       {
+           uae_u32 ret;
+           unsigned long rate1;
+           double v;
+           rate1 = read_processor_time ();
+           ret = emulib_ExecuteNativeCode2 (context);
+           rate1 = read_processor_time () - rate1;
+           v = syncdivisor * rate1;
+           if (v > 0) {
+               if (v > 1000000 * CYCLE_UNIT)
+                   v = 1000000 * CYCLE_UNIT;
+               do_extra_cycles ((unsigned long)(syncdivisor * rate1)); //compensate the time stay in native func
+           }
+           return ret;
+       }
+
+       case 103:       //close dll
+       {
+           HMODULE libaddr;
+           libaddr = (HMODULE) m68k_dreg (&context->regs, 1);
+           FreeLibrary (libaddr);
+           return 0;
+       }
+#endif
+
+       case 104:        //screenlost
+       {
+           static int oldnum = 0;
+           if (uaevar.changenum == oldnum)
+               return 0;
+           oldnum = uaevar.changenum;
+           return 1;
+       }
+
+#if defined(X86_MSVC_ASSEMBLY)
+
+       case 105:   //returns memory offset
+           return (uae_u32) get_real_address (0);
+
+       case 106:   //byteswap 16bit vars
+                   //a0 = start address
+                   //d1 = number of 16bit vars
+                   //returns address of new array
+           src = m68k_areg (&context->regs, 0);
+           num_vars = m68k_dreg (&context->regs, 1);
+
+           if (bswap_buffer_size < num_vars * 2) {
+               bswap_buffer_size = (num_vars + 1024) * 2;
+               free(bswap_buffer);
+               bswap_buffer = (void*)malloc(bswap_buffer_size);
+           }
+           __asm {
+               mov esi, dword ptr [src]
+               mov edi, dword ptr [bswap_buffer]
+               mov ecx, num_vars
+
+               mov ebx, ecx
+               and ecx, 3
+               je BSWAP_WORD_4X
+
+               BSWAP_WORD_LOOP:
+               mov ax, [esi]
+               mov dl, al
+               mov al, ah
+               mov ah, dl
+               mov [edi], ax
+               add esi, 2
+               add edi, 2
+               loopne BSWAP_WORD_LOOP
+
+               BSWAP_WORD_4X:
+               mov ecx, ebx
+               shr ecx, 2
+               je BSWAP_WORD_END
+               BSWAP_WORD_4X_LOOP:
+               mov ax, [esi]
+               mov dl, al
+               mov al, ah
+               mov ah, dl
+               mov [edi], ax
+               mov ax, [esi+2]
+               mov dl, al
+               mov al, ah
+               mov ah, dl
+               mov [edi+2], ax
+               mov ax, [esi+4]
+               mov dl, al
+               mov al, ah
+               mov ah, dl
+               mov [edi+4], ax
+               mov ax, [esi+6]
+               mov dl, al
+               mov al, ah
+               mov ah, dl
+               mov [edi+6], ax
+               add esi, 8
+               add edi, 8
+               loopne BSWAP_WORD_4X_LOOP
+               BSWAP_WORD_END:
+           }
+       return (uae_u32) bswap_buffer;
+
+       case 107:   //byteswap 32bit vars - see case 106
+                   //a0 = start address
+                   //d1 = number of 32bit vars
+                   //returns address of new array
+           src = m68k_areg (&context->regs, 0);
+           num_vars = m68k_dreg (&context->regs, 1);
+           if (bswap_buffer_size < num_vars * 4) {
+               bswap_buffer_size = (num_vars + 16384) * 4;
+               free(bswap_buffer);
+               bswap_buffer = (void*)malloc(bswap_buffer_size);
+           }
+           __asm {
+               mov esi, dword ptr [src]
+               mov edi, dword ptr [bswap_buffer]
+               mov ecx, num_vars
+
+               mov ebx, ecx
+               and ecx, 3
+               je BSWAP_DWORD_4X
+
+               BSWAP_DWORD_LOOP:
+               mov eax, [esi]
+               bswap eax
+               mov [edi], eax
+               add esi, 4
+               add edi, 4
+               loopne BSWAP_DWORD_LOOP
+
+               BSWAP_DWORD_4X:
+               mov ecx, ebx
+               shr ecx, 2
+               je BSWAP_DWORD_END
+               BSWAP_DWORD_4X_LOOP:
+               mov eax, [esi]
+               bswap eax
+               mov [edi], eax
+               mov eax, [esi+4]
+               bswap eax
+               mov [edi+4], eax
+               mov eax, [esi+8]
+               bswap eax
+               mov [edi+8], eax
+               mov eax, [esi+12]
+               bswap eax
+               mov [edi+12], eax
+               add esi, 16
+               add edi, 16
+               loopne BSWAP_DWORD_4X_LOOP
+
+               BSWAP_DWORD_END:
+           }
+       return (uae_u32) bswap_buffer;
+
+       case 108: //frees swap array
+           bswap_buffer_size = 0;
+           free (bswap_buffer);
+           bswap_buffer = NULL;
+       return 0;
+#endif
+
+       case 200:
+           ahitweak = m68k_dreg (&context->regs, 1);
+           ahi_pollrate = m68k_dreg (&context->regs, 2);
+           if (ahi_pollrate < 10)
+               ahi_pollrate = 10;
+           if (ahi_pollrate > 60)
+               ahi_pollrate = 60;
+       return 1;
+
+       default:
+       return 0x12345678;     // Code for not supportet function
+    }
+}
+
+#endif
index ed747f26e0573ca183e7a6faadc3719bb81089f1..a783e62f659ed4b41ea3f3580c23254fd44bddeb 100644 (file)
@@ -21,7 +21,7 @@
                        ConfigurationType="1"
                        UseOfMFC="0"
                        ATLMinimizesCRunTimeLibraryUsage="false"
-                       CharacterSet="2"
+                       CharacterSet="1"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
                        ConfigurationType="1"
                        UseOfMFC="0"
                        ATLMinimizesCRunTimeLibraryUsage="false"
-                       CharacterSet="2"
+                       CharacterSet="1"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
index 2983f83b7331f42084134bb53295280218e16ad7..2c8168534305456bd5d6325d197513b64f71ff0e 100644 (file)
@@ -307,18 +307,41 @@ static int psEffect_ParseParameters (LPD3DXEFFECTCOMPILER EffectCompiler)
 static int psEffect_hasPreProcess (void) { return m_PreprocessTechnique1EffectHandle != 0; }
 static int psEffect_hasPreProcess2 (void) { return m_PreprocessTechnique2EffectHandle != 0; }
 
+static int d3d_yesno = 0;
+
+int D3D_goodenough (void)
+{
+    static int d3d_good;
+    LPDIRECT3D9 d3dx;
+    D3DCAPS9 d3dCaps;
+
+    if (d3d_yesno > 0 || d3d_good > 0)
+       return 1;
+    if (d3d_good < 0)
+       return 0;
+    d3d_good = -1;
+    d3dx = Direct3DCreate9 (D3D_SDK_VERSION);
+    if (d3dx != NULL) {
+        if (SUCCEEDED (IDirect3D9_GetDeviceCaps (d3dx, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, &d3dCaps))) {
+           if(d3dCaps.PixelShaderVersion >= D3DPS_VERSION(2,0))
+               d3d_good = 1;
+       }
+       IDirect3D9_Release (d3dx);
+    }
+    return d3d_good > 0 ? 1 : 0;
+}
+
 int D3D_canshaders (void)
 {
-    static int yesno = 0;
     HANDLE h;
     LPDIRECT3D9 d3dx;
     D3DCAPS9 d3dCaps;
 
-    if (yesno < 0)
+    if (d3d_yesno < 0)
        return 0;
-    if (yesno > 0)
+    if (d3d_yesno > 0)
        return 1;
-    yesno = -1;
+    d3d_yesno = -1;
     h = LoadLibrary (L"d3dx9_41.dll");
     if (h != NULL) {
        FreeLibrary (h);
@@ -327,13 +350,13 @@ int D3D_canshaders (void)
            if (SUCCEEDED (IDirect3D9_GetDeviceCaps (d3dx, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, &d3dCaps))) {
                if(d3dCaps.PixelShaderVersion >= D3DPS_VERSION(2,0)) {
                    write_log (L"D3D: Pixel shader 2.0+ support detected, shader filters enabled.\n");
-                   yesno = 1;
+                   d3d_yesno = 1;
                }
            }
            IDirect3D9_Release (d3dx);
        }
     }
-    return yesno > 0 ? 1 : 0;
+    return d3d_yesno > 0 ? 1 : 0;
 }
 
 static int psEffect_LoadEffect (const TCHAR *shaderfile)
@@ -1020,7 +1043,8 @@ const TCHAR *D3D_init (HWND ahwnd, int w_w, int w_h, int t_w, int t_h, int depth
     hr = -1;
     if (d3d_ex && D3DEX) {
         hr = Direct3DCreate9Ex (D3D_SDK_VERSION, &d3dex);
-       write_log (L"Direct3D: failed to create D3DEx object: %s\n", D3D_ErrorString (hr));
+       if (FAILED (hr))
+           write_log (L"Direct3D: failed to create D3DEx object: %s\n", D3D_ErrorString (hr));
         d3d = (IDirect3D9*)d3dex;
     }
     if (FAILED (hr)) {
@@ -1040,8 +1064,11 @@ const TCHAR *D3D_init (HWND ahwnd, int w_w, int w_h, int t_w, int t_h, int depth
        adapter = 0;
 
     modeex.Size = sizeof modeex;
-    if (d3dex && D3DEX)
-       IDirect3D9Ex_GetAdapterDisplayModeEx (d3dex, adapter, &modeex, NULL);
+    if (d3dex && D3DEX) {
+       LUID luid;
+       hr = IDirect3D9Ex_GetAdapterLUID (d3dex, adapter, &luid);
+       hr = IDirect3D9Ex_GetAdapterDisplayModeEx (d3dex, adapter, &modeex, NULL);
+    }
     if (FAILED (hr = IDirect3D9_GetAdapterDisplayMode (d3d, adapter, &mode)))
         write_log (L"D3D: IDirect3D9_GetAdapterDisplayMode failed %s\n", D3D_ErrorString (hr));
     if (FAILED (hr = IDirect3D9_GetDeviceCaps (d3d, adapter, D3DDEVTYPE_HAL, &d3dCaps)))
@@ -1187,6 +1214,7 @@ int D3D_needreset (void)
        hr = IDirect3DDevice9_Reset (d3ddev, &dpp);
        if (FAILED (hr)) {
            write_log (L"D3D: Reset failed %s\n", D3D_ErrorString (hr));
+           changed_prefs.gfx_filter = 0;
            return 1;
        }
     }
index 9601cd92a384e2e5b06565f55c6ebed5cb339e53..6cf5c0ee281b45176ab3801542119fceae6ddd97 100644 (file)
@@ -13,3 +13,4 @@ extern int D3D_isenabled (void);
 extern int D3D_needreset (void);
 extern void D3D_clear (void);
 extern int D3D_canshaders (void);
+extern int D3D_goodenough (void);
index 6ae88172b8a229db2045aa89a1b768be10deeca3..919461bb8d13dee6c59e2fabe9db88af70430cdf 100644 (file)
@@ -69,8 +69,7 @@ extern GUID *displayGUID;
 struct MultiDisplay {
     int primary, disabled, gdi;
     GUID guid;
-    TCHAR *name;
-    TCHAR *name2;
+    TCHAR *name, *name2, *name3;
     struct PicassoResolution *DisplayModes;
     RECT rect;
 };
index f02fc41f6580fefd7767c5d794f6cdf5a039ef4a..e179c9d1271a380f0e191784c2de721300c226d4 100644 (file)
@@ -21,7 +21,7 @@
                        ConfigurationType="1"
                        UseOfMFC="0"
                        ATLMinimizesCRunTimeLibraryUsage="false"
-                       CharacterSet="2"
+                       CharacterSet="1"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
                        ConfigurationType="1"
                        UseOfMFC="0"
                        ATLMinimizesCRunTimeLibraryUsage="false"
-                       CharacterSet="2"
+                       CharacterSet="1"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
index 47bf26a559d59c7fae44067b19665d51b386c488..b305bb5253e8e758674f1a50466552cf192290e3 100644 (file)
@@ -20,8 +20,9 @@
                        IntermediateDirectory=".\Release"
                        ConfigurationType="1"
                        UseOfMFC="0"
+                       UseOfATL="0"
                        ATLMinimizesCRunTimeLibraryUsage="false"
-                       CharacterSet="2"
+                       CharacterSet="1"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
                        ConfigurationType="1"
                        UseOfMFC="0"
                        ATLMinimizesCRunTimeLibraryUsage="false"
-                       CharacterSet="2"
+                       CharacterSet="1"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
                        ConfigurationType="1"
                        UseOfMFC="0"
                        ATLMinimizesCRunTimeLibraryUsage="false"
-                       CharacterSet="2"
+                       CharacterSet="1"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
index d959e11f4c827c1cee7b983e0d95af46340e8676..d7ee9042470a90435ece637c275415a8148ca04d 100644 (file)
@@ -21,7 +21,7 @@
                        ConfigurationType="1"
                        UseOfMFC="0"
                        ATLMinimizesCRunTimeLibraryUsage="false"
-                       CharacterSet="2"
+                       CharacterSet="1"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
                        ConfigurationType="1"
                        UseOfMFC="0"
                        ATLMinimizesCRunTimeLibraryUsage="false"
-                       CharacterSet="2"
+                       CharacterSet="1"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
                        ConfigurationType="1"
                        UseOfMFC="0"
                        ATLMinimizesCRunTimeLibraryUsage="false"
-                       CharacterSet="2"
+                       CharacterSet="1"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
                                RelativePath="..\..\readcpu.c"
                                >
                        </File>
+                       <File
+                               RelativePath="..\unicode.c"
+                               >
+                       </File>
                </Filter>
        </Files>
        <Globals>
index f48ab0212df92124c09b3ef370f92896cb8d9064..583ac28f80dbe2b9f527f9485b997593925829c1 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "hq2x_d3d.h"
+#include <math.h>
 
 #define fmax(x,y) ((x)>(y)?(x):(y))
 #define fmin(x,y) ((x)<(y)?(x):(y))
index 34988ec8ee9677b9edb2705e686c31ea433a7d04..06bfa3259e0375bafe224e901b5a8608b4b79c4f 100644 (file)
@@ -218,9 +218,7 @@ int getcapslock (void)
 {
     int newstate;
 
-    BYTE keyState[256];
-    GetKeyboardState (keyState);
-    newstate = keyState[VK_CAPITAL] & 1;
+    newstate = GetKeyState (VK_CAPITAL) & 1; // this returns bogus state if caps change when in exclusive mode..
     if (newstate != capslockstate)
        inputdevice_translatekeycode (0, DIK_CAPITAL, newstate);
     capslockstate = newstate;
index 7bf6aacfa21741d71e54533ded92882ba470b4ba..480d6dee14df77525677fd4041f0ce0f43f65beb 100644 (file)
@@ -14,7 +14,7 @@ extern HINSTANCE hInst;
 
 static int inited;
 static lgLcdConnectContext cctx;
-static lgLcdDeviceDesc desc;
+static lgLcdDeviceDescEx desc;
 static int device;
 static lgLcdBitmapHeader *lbh;
 static uae_u8 *bitmap, *origbitmap;
@@ -22,7 +22,7 @@ static uae_u8 *numbers;
 static int numbers_width = 7, numbers_height = 10;
 static int old_pri;
 
-void lcd_close(void)
+void lcd_close (void)
 {
     lgLcdDeInit ();
     xfree (lbh);
@@ -31,7 +31,7 @@ void lcd_close(void)
     inited = 0;
 }
 
-static int lcd_init(void)
+static int lcd_init (void)
 {
     DWORD ret;
     lgLcdOpenContext octx;
@@ -57,13 +57,13 @@ static int lcd_init(void)
     ret = lgLcdConnect (&cctx);
     if (ret != ERROR_SUCCESS) {
        write_log (L"LCD: lgLcdConnect() returned %d\n", ret);
-       lcd_close();
+       lcd_close ();
        return 0;
     }
-    ret = lgLcdEnumerate (cctx.connection, 0, &desc);
+    ret = lgLcdEnumerateEx (cctx.connection, 0, &desc);
     if (ret != ERROR_SUCCESS) {
-       write_log (L"LCD: lgLcdEnumerate() returned %d\n", ret);
-       lcd_close();
+       write_log (L"LCD: lgLcdEnumerateEx() returned %d\n", ret);
+       lcd_close ();
        return 0;
     }
     lbh = xcalloc (1, sizeof (lgLcdBitmapHeader) + desc.Width * (desc.Height + 20));
@@ -76,14 +76,14 @@ static int lcd_init(void)
     ret = lgLcdOpen (&octx);
     if (ret != ERROR_SUCCESS) {
        write_log (L"LCD: lgLcdOpen() returned %d\n", ret);
-       lcd_close();
+       lcd_close ();
        return 0;
     }
     device = octx.device;
 
     bmp = LoadBitmap (hInst, MAKEINTRESOURCE(IDB_LCD160X43));
     dc = CreateCompatibleDC (NULL);
-    SelectObject(dc, bmp);
+    SelectObject (dc, bmp);
     GetObject (bmp, sizeof (binfo), &binfo);
     for (y = 0; y < binfo.bmHeight; y++) {
        for (x = 0; x < binfo.bmWidth; x++) {
@@ -98,7 +98,7 @@ static int lcd_init(void)
     return 1;
 }
 
-static void dorect(int *crd, int inv)
+static void dorect (int *crd, int inv)
 {
     int yy, xx;
     int x = crd[0], y = crd[1], w = crd[2], h = crd[3];
@@ -112,7 +112,7 @@ static void dorect(int *crd, int inv)
     }
 }
 
-static void putnumber(int x, int y, int n, int inv)
+static void putnumber (int x, int y, int n, int inv)
 {
     int xx, yy;
     uae_u8 *dst, *src;
@@ -135,7 +135,7 @@ static void putnumber(int x, int y, int n, int inv)
     }
 }
 
-static void putnumbers(int x, int y, int num, int inv)
+static void putnumbers (int x, int y, int num, int inv)
 {
     putnumber (x, y, num < 0 ? num : ((num / 10) > 0 ? num / 10 : -1), inv);
     putnumber (x + numbers_width, y, num < 0 ? num : num % 10, inv);
@@ -157,7 +157,7 @@ void lcd_priority (int priority)
        old_pri = priority;
 }
 
-void lcd_update(int led, int on)
+void lcd_update (int led, int on)
 {
     int track, x, y;
 
@@ -196,7 +196,7 @@ void lcd_update(int led, int on)
     lgLcdUpdateBitmap (device, lbh, LGLCD_ASYNC_UPDATE (LGLCD_PRIORITY_NORMAL + 1));
 }
 
-int lcd_open(void)
+int lcd_open (void)
 {
     if (!inited) {
        if (!lcd_init ())
index 4548c1e3ea10717efa1a2ff6c83dc45871e8e16e..6caaa6eb4e64e20fd0b47d5b011ebf5c273005c0 100644 (file)
@@ -53,6 +53,8 @@
 #include <Ghostscript/errors.h>
 #include <Ghostscript/iapi.h>
 
+#define MIN_PRTBYTES 10
+
 static uae_char prtbuf[PRTBUFSIZE];
 static int prtbufbytes,wantwrite;
 static HANDLE hPrt = INVALID_HANDLE_VALUE;
@@ -213,6 +215,18 @@ static void *prt_thread (void *p)
     return 0;
 }
 
+static int doflushprinter (void)
+{
+    if (prtopen == 0 && prtbufbytes < MIN_PRTBYTES) {
+       if (prtbufbytes > 0)
+           write_log (L"PRINTER: %d bytes received, less than %d bytes, not printing.\n", prtbufbytes, MIN_PRTBYTES);
+       prtbufbytes = 0;
+       return 0;
+    }
+    return 1;
+}
+
+static void openprinter (void);
 static void flushprtbuf (void)
 {
     DWORD written = 0;
@@ -224,6 +238,7 @@ static void flushprtbuf (void)
        zfile_fwrite (prtbuf, prtbufbytes, 1, prtdump);
 
     if (currprefs.parallel_postscript_emulation) {
+
        if (psmode) {
            uae_u8 *p;
            psbuffer = realloc (psbuffer, (psbuffers + 2) * sizeof (uae_u8*));
@@ -236,15 +251,24 @@ static void flushprtbuf (void)
        }
        prtbufbytes = 0;
        return;
-    } else if (hPrt != INVALID_HANDLE_VALUE) {
-       if (WritePrinter (hPrt, prtbuf, prtbufbytes, &written)) {
-           if (written != prtbufbytes)
-               write_log (L"PRINTER: Only wrote %d of %d bytes!\n", written, prtbufbytes);
-       } else {
-           write_log (L"PRINTER: Couldn't write data!\n");
+
+    } else if (prtbufbytes > 0) {
+       int pbyt = prtbufbytes;
+
+       if (hPrt == INVALID_HANDLE_VALUE) {
+           if (!doflushprinter ())
+               return;
+           openprinter ();
        }
-    } else {
-       write_log (L"PRINTER: Not open!\n");
+       if (hPrt != INVALID_HANDLE_VALUE) {
+           if (WritePrinter (hPrt, prtbuf, pbyt, &written)) {
+               if (written != pbyt)
+                   write_log (L"PRINTER: Only wrote %d of %d bytes!\n", written, pbyt);
+           } else {
+               write_log (L"PRINTER: Couldn't write data!\n");
+           }
+       }
+
     }
     prtbufbytes = 0;
 }
@@ -287,6 +311,7 @@ static void DoSomeWeirdPrintingStuff (uae_char val)
            }
            freepsbuffers ();
            return;
+
        } else if (!psmode && !stricmp (prev, "%!PS")) {
 
            if (postscript_print_debugging)
@@ -325,7 +350,7 @@ int isprinter (void)
 
 int isprinteropen (void)
 {
-    if (prtopen)
+    if (prtopen || prtbufbytes > 0)
        return 1;
     return 0;
 }
@@ -420,7 +445,7 @@ void unload_ghostscript (void)
     psmode = 0;
 }
 
-void openprinter( void )
+static void openprinter (void)
 {
     DOC_INFO_1 DocInfo;
     static int first;
@@ -436,14 +461,14 @@ void openprinter( void )
        flushprtbuf ();
        if (OpenPrinter (currprefs.prtname, &hPrt, NULL)) {
            // Fill in the structure with info about this "document."
-           DocInfo.pDocName = L"My Document";
+           DocInfo.pDocName = L"WinUAE Document";
            DocInfo.pOutputFile = NULL;
-           DocInfo.pDatatype = L"RAW";
+           DocInfo.pDatatype = currprefs.parallel_ascii_emulation ? L"TEXT" : L"RAW";
            // Inform the spooler the document is beginning.
-           if ((dwJob = StartDocPrinter(hPrt, 1, (LPSTR)&DocInfo)) == 0) {
-               ClosePrinter(hPrt );
+           if ((dwJob = StartDocPrinter (hPrt, 1, (LPSTR)&DocInfo)) == 0) {
+               ClosePrinter (hPrt );
                hPrt = INVALID_HANDLE_VALUE;
-           } else if(StartPagePrinter (hPrt)) {
+           } else if (StartPagePrinter (hPrt)) {
                prtopen = 1;
            }
        } else {
@@ -459,6 +484,8 @@ void openprinter( void )
 
 void flushprinter (void)
 {
+    if (!doflushprinter ())
+       return;
     closeprinter ();
 }
 
@@ -486,21 +513,13 @@ void closeprinter (void)
            Sleep (10);
     }
     freepsbuffers ();
+    prtbufbytes = 0;
 }
 
-static void putprinter (uae_char val)
-{
-    DoSomeWeirdPrintingStuff (val);
-}
-
-int doprinter (uae_u8 val)
+void doprinter (uae_u8 val)
 {
     parflush = 0;
-    if (!prtopen)
-       openprinter ();
-    if (prtopen)
-       putprinter (val);
-    return prtopen;
+    DoSomeWeirdPrintingStuff (val);
 }
 
 struct uaeserialdatawin32
@@ -1115,7 +1134,8 @@ void hsyncstuff(void)
     keycheck++;
     if(keycheck >= 1000)
     {
-       flushprtbuf ();
+       if (prtopen)
+           flushprtbuf ();
        {
 #if defined(AHI)
            //extern int warned_JIT_0xF10000;
index 0eb34cef0b90d4d470f1827da5c4e924151dd6b4..4e09038cab4e5cc620b270556b13914be1bea5eb 100644 (file)
@@ -2359,10 +2359,14 @@ static void inituaegfx (uaecptr ABI)
     flags |= BIF_HARDWARESPRITE;
 #endif
     if (flags & BIF_NOBLITTER)
-       write_log (L"P96: blitter disabled in devs:monitors/uaegfx!\n");
+       write_log (L"P96: Blitter disabled in devs:monitors/uaegfx!\n");
 
     if (currprefs.win32_rtgvblankrate >= -1)
        flags |= BIF_VBLANKINTERRUPT;
+    if (!(flags & BIF_INDISPLAYCHAIN)) {
+       write_log (L"P96: BIF_INDISPLAYCHAIN force-enabled!\n");
+       flags |= BIF_INDISPLAYCHAIN;
+    }
 
     put_long (ABI + PSSO_BoardInfo_Flags, flags);
 
index 3ccc5557fdcd8fa1238096ecf965b316be955db9..17697b6b60413fe96b0a99c97b2dae8271a8eaab 100644 (file)
 #define IDS_TABLET_BOTH_CURSORS         345
 #define IDS_TABLET_NATIVE_CURSOR        346
 #define IDS_TABLET_HOST_CURSOR          347
+#define IDS_AUTOSCALE_DISABLED          348
+#define IDS_AUTOSCALE_SCALING           349
+#define IDS_AUTOSCALE_RESIZE            350
 #define IDS_QS_MODELS                   1000
 #define IDS_QS_MODEL_A500               1001
 #define IDS_QS_MODEL_A500P              1002
 #define IDC_PSPRINTER                   1556
 #define IDC_PSPRINTERDETECT             1557
 #define IDC_UAESERIAL                   1558
+#define IDC_PSPRINTERDETECT2            1559
+#define IDC_ASCIIPRINTER                1559
 #define IDC_VIEWINFO                    1568
 #define IDC_SETINFO                     1569
 #define IDC_FLOPPYSLIDER                1570
index 499963253cf08848b8ace997d7075e3e233629ab..3eadb21a8e7f6e964a3e8fc2f5c4cd0908c52cb4 100644 (file)
@@ -349,8 +349,8 @@ BEGIN
     RTEXT           "Printer:",IDC_STATIC,12,15,25,15,SS_CENTERIMAGE\r
     COMBOBOX        IDC_PRINTERLIST,49,15,232,134,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
     PUSHBUTTON      "Flush print job",IDC_FLUSHPRINTER,114,51,58,12\r
-    CONTROL         "PostScript detection",IDC_PSPRINTERDETECT,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,65,35,79,12\r
-    CONTROL         "PostScript printer emulation",IDC_PSPRINTER,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,175,35,110,12\r
+    CONTROL         "PostScript detection",IDC_PSPRINTERDETECT,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,91,35,84,12\r
+    CONTROL         "PostScript printer emulation",IDC_PSPRINTER,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,180,35,111,12\r
     RTEXT           "Autoflush [] Time in seconds after a pending print job is automatically flushed.",IDC_PRINTERAUTOFLUSHTXT,173,49,86,15,SS_NOTIFY | SS_CENTERIMAGE\r
     EDITTEXT        IDC_PRINTERAUTOFLUSH,263,50,25,12,ES_NUMBER\r
     RTEXT           "Ghostscript extra parameters:",IDC_STATIC,12,66,102,15,SS_CENTERIMAGE\r
@@ -367,6 +367,7 @@ BEGIN
     CONTROL         "Direct []Use when emulating serial-link games on two PCs running WinUAE",IDC_SER_DIRECT,\r
                     "Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,135,123,65,12\r
     CONTROL         "uaeserial.device",IDC_UAESERIAL,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,200,123,78,12\r
+    CONTROL         "ASCII Printer",IDC_ASCIIPRINTER,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,13,35,69,12\r
 END\r
 \r
 IDD_GAMEPORTS DIALOGEX 0, 0, 300, 236\r
@@ -1112,11 +1113,6 @@ IDB_LCD160X43           BITMAP                  "lcd.bmp"
 #ifdef APSTUDIO_INVOKED\r
 GUIDELINES DESIGNINFO \r
 BEGIN\r
-    IDD_IOPORTS, DIALOG\r
-    BEGIN\r
-        BOTTOMMARGIN, 180\r
-    END\r
-\r
     IDD_FILTER, DIALOG\r
     BEGIN\r
         BOTTOMMARGIN, 237\r
@@ -1445,6 +1441,9 @@ BEGIN
     IDS_TABLET_BOTH_CURSORS "Show both cursors"\r
     IDS_TABLET_NATIVE_CURSOR "Show native cursor only"\r
     IDS_TABLET_HOST_CURSOR  "Show host cursor only"\r
+    IDS_AUTOSCALE_DISABLED  "Disabled"\r
+    IDS_AUTOSCALE_SCALING   "Automatic scaling"\r
+    IDS_AUTOSCALE_RESIZE    "Automatic resize"\r
 END\r
 \r
 #endif    // English (U.S.) resources\r
index 54234e1924c750b0b69f67eb4bce3d06e47dd713..09bd5d34f27e4b904e2b1974dfe1e13fb575d136 100644 (file)
@@ -153,7 +153,7 @@ oops:
 
 #if PNG_SCREENSHOTS > 0
 
-static void pngtest_blah (png_structp png_ptr, png_const_charp message)
+static void _cdecl pngtest_blah (png_structp png_ptr, png_const_charp message)
 {
    TCHAR *name = L"unknown";
    if (png_ptr != NULL && png_ptr->error_ptr != NULL)
index fedb61a3abfc393e5e52bfc103b9eef871fa2a0b..b7cf4a1757f64098418e8332600a3719e446b900 100644 (file)
@@ -306,7 +306,7 @@ const static GUID KSDATAFORMAT_SUBTYPE_PCM = {0x00000001,0x0000,0x0010,
 
 static struct dsaudiomodes supportedmodes[16];
 
-DWORD fillsupportedmodes (LPDIRECTSOUND8 lpDS, int freq, struct dsaudiomodes *dsam)
+static DWORD fillsupportedmodes (struct sound_data *sd, int freq, struct dsaudiomodes *dsam)
 {
     DWORD speakerconfig;
     DSBUFFERDESC sound_buffer;
@@ -315,7 +315,8 @@ DWORD fillsupportedmodes (LPDIRECTSOUND8 lpDS, int freq, struct dsaudiomodes *ds
     HRESULT hr;
     int ch, round, mode, skip;
     DWORD rn[4];
-    struct sound_dp *s = sdp->data;
+    struct sound_dp *s = sd->data;
+    LPDIRECTSOUND8 lpDS = s->lpDS;
 
     mode = 2;
     dsam[0].ch = 1;
@@ -383,7 +384,7 @@ static void finish_sound_buffer_pa (struct sound_data *sd, uae_u16 *sndbuffer)
     memcpy (s->pasoundbuffer[s->patoggle], sndbuffer, sd->sndbufsize);
 }
 
-static int portAudioCallback (const void *inputBuffer, void *outputBuffer,
+static int _cdecl portAudioCallback (const void *inputBuffer, void *outputBuffer,
                            unsigned long framesPerBuffer,
                            const PaStreamCallbackTimeInfo* timeInfo,
                            PaStreamCallbackFlags statusFlags,
@@ -636,7 +637,7 @@ static int open_audio_ds (struct sound_data *sd, int index)
        }
     }
 
-    speakerconfig = fillsupportedmodes (s->lpDS, freq, supportedmodes);
+    speakerconfig = fillsupportedmodes (sd, freq, supportedmodes);
     write_log (L"DSSOUND: %08X ", speakerconfig);
     for (i = 0; supportedmodes[i].ch; i++)
        write_log (L"%d:%08X ", supportedmodes[i].ch, supportedmodes[i].ksmode);
@@ -1536,7 +1537,7 @@ int enumerate_sound_devices (void)
        write_log (L"Enumerating DirectSound devices..\n");
        DirectSoundEnumerate ((LPDSENUMCALLBACK)DSEnumProc, sound_devices);
        DirectSoundCaptureEnumerate ((LPDSENUMCALLBACK)DSEnumProc, record_devices);
-       if (isdllversion (L"openal32.dll", 6, 14, 357, 22)) {
+       if (0 && isdllversion (L"openal32.dll", 6, 14, 357, 22)) {
            write_log (L"Enumerating OpenAL devices..\n");
            if (alcIsExtensionPresent (NULL, "ALC_ENUMERATION_EXT")) {
                const char* ppDefaultDevice = alcGetString (NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
index ad1d8a7db8a935def717e5cb2ac86e01f9b31801..c79359e6da59cbdb4c39bc72cfbb3faadc95437c 100644 (file)
@@ -35,9 +35,6 @@ int shmget (key_t key, size_t size, int shmflg, const TCHAR*);
 int shmctl (int shmid, int cmd, struct shmid_ds *buf);
 int init_shm (void);
 
-int isinf(double x);
-int isnan(double x);
-
 #define PROT_READ  0x01
 #define PROT_WRITE 0x02
 #define PROT_EXEC  0x04
index dccea6db707620a864db47680e6a56763e4db2fa..d66949cd60a283f58d0910689fde3f23bc7683b7 100644 (file)
 #define HAVE_ISNAN
 #define HAVE_ISINF
 #define isnan _isnan
-extern int isinf(double);
 
 /* Define if you have the bcopy function.  */
 /* #undef HAVE_BCOPY */
index 7a55679494a425218af25bf92f76c8a2162e971b..aec64d6c14dc3f25084b736615ba53e3dfef7f3f 100644 (file)
@@ -266,7 +266,7 @@ frame_time_t read_processor_time (void)
 
 #include <process.h>
 static volatile int dummythread_die;
-static void dummythread (void *dummy)
+static void _cdecl dummythread (void *dummy)
 {
     SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_LOWEST);
     while (!dummythread_die);
index 55ad3132430aaa60741544679d19c72b0b5eb7cc..503c15488269a2185a557cf525f2ad4ff283de44 100644 (file)
@@ -17,8 +17,8 @@
 
 #define WINUAEPUBLICBETA 1
 
-#define WINUAEBETA L"26"
-#define WINUAEDATE MAKEBD(2009, 4, 26)
+#define WINUAEBETA L"27"
+#define WINUAEDATE MAKEBD(2009, 5, 1)
 #define WINUAEEXTRA L""
 #define WINUAEREV L""
 
index 6ccf44e2ef95e748fcc1d2bd531edb82d338d211..a83562b8233d8e99b670121352cd83f074a6788c 100644 (file)
@@ -74,7 +74,6 @@ uae_u8 *getfilterrect1 (RECT *sr, RECT *dr, int dst_depth, int aw, int ah, int s
 {
     int aws, ahs;
     
-    ah = vblscale (ah);
     aws = aw * scale;
     ahs = ah * scale;
     
@@ -95,16 +94,14 @@ static void sizeoffset (RECT *dr, RECT *zr, int w, int h)
 
 void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height, int aw, int ah, int scale, int temp_width, int temp_height)
 {
-    int aws, ahs, ahs2, hdiff;
+    int aws, ahs, ahs2;
     int xs, ys;
     int xmult, ymult;
     int v;
 
-    ahs2 = ah * scale;
-    ah = vblscale (ah);
+    ahs2 = vblscale (ah) * scale;
     aws = aw * scale;
     ahs = ah * scale;
-    hdiff = (ahs2 - ahs) / 2;
 
     SetRect (sr, 0, 0, dst_width, dst_height);
     SetRect (zr, 0, 0, 0, 0);
@@ -112,7 +109,6 @@ void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height
     dr->top =  (temp_height - ahs) / 2;
     dr->left -= (dst_width - aws) / 2;
     dr->top -= (dst_height - ahs) / 2;
-    dr->top -= hdiff;
     dr->right = dr->left + dst_width;
     dr->bottom = dr->top + dst_height;
 
@@ -184,7 +180,6 @@ void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height
                SetRect (sr, 0, 0, cw * scale, ch * scale);
                dr->left = (temp_width - aws) /2;
                dr->top = (temp_height - ahs) / 2;
-               dr->top -= hdiff;
                dr->right = dr->left + cw * scale;
                dr->bottom = dr->top + ch * scale;
                OffsetRect (zr, cx * scale, cy * scale);
@@ -200,7 +195,6 @@ void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height
 
            dr->left = (temp_width - aws) /2;
            dr->top =  (temp_height - ahs) / 2;
-           dr->top -= hdiff;
            dr->right = dr->left + dst_width * scale;
            dr->bottom = dr->top + dst_height * scale;
 
@@ -214,7 +208,7 @@ void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height
            filteroffsetx = -zr->left / scale;
            filteroffsety = -zr->top / scale;
 
-           if (currprefs.gfx_filter_keep_aspect || currprefs.gfx_filter_aspect > 0) {
+           if (currprefs.gfx_filter_keep_aspect || currprefs.gfx_filter_aspect != 0) {
                int dw = dst_width;
                int dh = dst_height;
                int xratio, yratio;
@@ -223,10 +217,16 @@ void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height
        
                xratio = dw * 256 / cw;
                yratio = dh * 256 / ch;
-               if (currprefs.gfx_filter_aspect > 0) {
-                   int xm = (currprefs.gfx_filter_aspect >> 8) * 256;
-                   int ym = (currprefs.gfx_filter_aspect & 0xff) * 256;
-                   int mult = currprefs.gfx_resolution - (currprefs.gfx_linedbl ? 1 : 0);
+               if (currprefs.gfx_filter_aspect != 0) {
+                   int xm, ym, mult;
+                   if (currprefs.gfx_filter_aspect > 0) {
+                       xm = (currprefs.gfx_filter_aspect >> 8) * 256;
+                       ym = (currprefs.gfx_filter_aspect & 0xff) * 256;
+                   } else {
+                       xm = dst_width * 256;
+                       ym = dst_height * 256;
+                   }
+                   mult = currprefs.gfx_resolution - (currprefs.gfx_linedbl ? 1 : 0);
                    if (mult < 0)
                        xm *= 1 << (-mult);
                    else
@@ -259,7 +259,6 @@ void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height
            xmult = ymult;
        else
            ymult = xmult;
-       ymult = vblscale (ymult);
     } else {
        if (xmult <= 0)
            xmult = aws * 1000 / dst_width;
@@ -271,12 +270,17 @@ void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height
            ymult = ymult + ymult * currprefs.gfx_filter_vert_zoom / 2000;
     }
     
-    if (currprefs.gfx_filter_aspect > 0) {
+    if (currprefs.gfx_filter_aspect != 0) {
        int srcratio, dstratio;
        int xmult2 = xmult;
        int ymult2 = ymult;
-       dstratio = (currprefs.gfx_filter_aspect >> 8) * 256 / (currprefs.gfx_filter_aspect & 0xff);
-       srcratio = dst_width * 256 / dst_height;
+       if (currprefs.gfx_filter_aspect > 0) {
+           dstratio = (currprefs.gfx_filter_aspect >> 8) * 256 / (currprefs.gfx_filter_aspect & 0xff);
+           srcratio = dst_width * 256 / dst_height;
+       } else {
+           dstratio = 4 * 256 / 3;
+           srcratio = dst_width * 256 / dst_height;
+       }
        if (srcratio > dstratio) {
            xmult = xmult * srcratio / dstratio;
        } else {
@@ -284,6 +288,8 @@ void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height
        }
     }
 
+    ymult = vblscale (ymult);
+
     v = currprefs.gfx_filter ? currprefs.gfx_filter_horiz_offset : 0;
     OffsetRect (zr, (int)(-v * aws / 1000.0), 0);
     v = currprefs.gfx_filter ? currprefs.gfx_filter_vert_offset : 0;
@@ -291,6 +297,7 @@ void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height
 
     xs = dst_width - dst_width * xmult / 1000;
     ys = dst_height - dst_height * ymult / 1000;
+    OffsetRect (dr, 0, (ahs2 - ahs) / 2);
     sizeoffset (dr, zr, xs, ys);
 
     filterxmult = xmult;
index 7417752ea5c2439e56df040331baf29c0a64313b..b26f72da3c910a8befb561e8ee948b652646d7d1 100644 (file)
@@ -374,40 +374,36 @@ oops:
     return 0;
 }
 
-static HRESULT CALLBACK modesCallback (LPDDSURFACEDESC2 modeDesc, LPVOID context)
+static void addmode (struct MultiDisplay *md, int w, int h, int d, int rate, int nondx)
 {
-    RGBFTYPE colortype;
-    int i, j, ct, depth;
-    struct MultiDisplay *md = context;
+    int ct;
+    int i, j;
 
-    colortype = DirectDraw_GetSurfacePixelFormat (modeDesc);
-    if (colortype == RGBFB_NONE)
-       return DDENUMRET_OK;
-    if (modeDesc->dwWidth > 2560 || modeDesc->dwHeight > 2048)
-       return DDENUMRET_OK;
-    ct = 1 << colortype;
-    depth = 0;
-    if (ct & RGBMASK_8BIT)
-       depth = 1;
-    else if (ct & (RGBMASK_15BIT | RGBMASK_16BIT))
-       depth = 2;
-    else if (ct & RGBMASK_24BIT)
-       depth = 3;
-    else if (ct & RGBMASK_32BIT)
-       depth = 4;
-    if (depth == 0)
-       return DDENUMRET_OK;
+    ct = 0;
+    if (d == 8)
+       ct = RGBMASK_8BIT;
+    if (d == 15)
+       ct = RGBMASK_15BIT;
+    if (d == 16)
+       ct = RGBMASK_16BIT;
+    if (d == 24)
+       ct = RGBMASK_24BIT;
+    if (d == 32)
+       ct = RGBMASK_32BIT;
+    if (ct == 0)
+       return;
+    d /= 8;
     i = 0;
     while (md->DisplayModes[i].depth >= 0) {
-       if (md->DisplayModes[i].depth == depth && md->DisplayModes[i].res.width == modeDesc->dwWidth && md->DisplayModes[i].res.height == modeDesc->dwHeight) {
+       if (md->DisplayModes[i].depth == d && md->DisplayModes[i].res.width == w && md->DisplayModes[i].res.height == h) {
            for (j = 0; j < MAX_REFRESH_RATES; j++) {
-               if (md->DisplayModes[i].refresh[j] == 0 || md->DisplayModes[i].refresh[j] == modeDesc->dwRefreshRate)
+               if (md->DisplayModes[i].refresh[j] == 0 || md->DisplayModes[i].refresh[j] == rate)
                    break;
            }
            if (j < MAX_REFRESH_RATES) {
-               md->DisplayModes[i].refresh[j] = modeDesc->dwRefreshRate;
+               md->DisplayModes[i].refresh[j] = rate;
                md->DisplayModes[i].refresh[j + 1] = 0;
-               return DDENUMRET_OK;
+               return;
            }
        }
        i++;
@@ -416,20 +412,48 @@ static HRESULT CALLBACK modesCallback (LPDDSURFACEDESC2 modeDesc, LPVOID context
     while (md->DisplayModes[i].depth >= 0)
        i++;
     if (i >= MAX_PICASSO_MODES - 1)
-       return DDENUMRET_OK;
-    md->DisplayModes[i].res.width = modeDesc->dwWidth;
-    md->DisplayModes[i].res.height = modeDesc->dwHeight;
-    md->DisplayModes[i].depth = depth;
-    md->DisplayModes[i].refresh[0] = modeDesc->dwRefreshRate;
+       return;
+    md->DisplayModes[i].res.width = w;
+    md->DisplayModes[i].res.height = h;
+    md->DisplayModes[i].depth = d;
+    md->DisplayModes[i].refresh[0] = rate;
     md->DisplayModes[i].refresh[1] = 0;
     md->DisplayModes[i].colormodes = ct;
     md->DisplayModes[i + 1].depth = -1;
     _stprintf (md->DisplayModes[i].name, L"%dx%d, %d-bit",
        md->DisplayModes[i].res.width, md->DisplayModes[i].res.height, md->DisplayModes[i].depth * 8);
+}
+
+static HRESULT CALLBACK modesCallback (LPDDSURFACEDESC2 modeDesc, LPVOID context)
+{
+    struct MultiDisplay *md = context;
+    RGBFTYPE colortype;
+    int depth, ct;
+
+    colortype = DirectDraw_GetSurfacePixelFormat (modeDesc);
+    ct = 1 << colortype;
+    depth = 0;
+    if (ct & RGBMASK_8BIT)
+       depth = 8;
+    else if (ct & RGBMASK_15BIT)
+       depth = 15;
+    else if (ct & RGBMASK_16BIT)
+       depth = 16;
+    else if (ct & RGBMASK_24BIT)
+       depth = 24;
+    else if (ct & RGBMASK_32BIT)
+       depth = 32;
+    if (depth == 0)
+       return DDENUMRET_OK;
+    if (colortype == RGBFB_NONE)
+       return DDENUMRET_OK;
+    if (modeDesc->dwWidth > 2560 || modeDesc->dwHeight > 2048)
+       return DDENUMRET_OK;
+    addmode (md, modeDesc->dwWidth, modeDesc->dwHeight, depth, modeDesc->dwRefreshRate, 0);
     return DDENUMRET_OK;
 }
 
-static int resolution_compare (const void *a, const void *b)
+static int _cdecl resolution_compare (const void *a, const void *b)
 {
     struct PicassoResolution *ma = (struct PicassoResolution *)a;
     struct PicassoResolution *mb = (struct PicassoResolution *)b;
@@ -509,6 +533,7 @@ BOOL CALLBACK displaysCallback (GUID *guid, char *adesc, char *aname, LPVOID ctx
         _stprintf (tmp, L"%s (%d*%d) [%d*%d]", desc, md->rect.right - md->rect.left, md->rect.bottom - md->rect.top, md->rect.left, md->rect.top);
     md->name = my_strdup (tmp);
     md->name2 = my_strdup (desc);
+    md->name3 = my_strdup (name);
     write_log (L"'%s' '%s' %s\n", desc, name, outGUID(guid));
     ret = 1;
 end:
@@ -560,7 +585,7 @@ static int makesort (struct MultiDisplay *md)
 void sortdisplays (void)
 {
     struct MultiDisplay *md1, *md2, tmp;
-    int i;
+    int i, idx, idx2;
 
     md1 = Displays;
     while (md1->name) {
@@ -590,7 +615,36 @@ void sortdisplays (void)
                int b = DirectDraw_GetCurrentDepth ();
                write_log (L"Desktop: W=%d H=%d B=%d. CXVS=%d CYVS=%d\n", w, h, b,
                    GetSystemMetrics (SM_CXVIRTUALSCREEN), GetSystemMetrics (SM_CYVIRTUALSCREEN));
-               DirectDraw_EnumDisplayModes (DDEDM_REFRESHRATES , modesCallback, md1);
+               DirectDraw_EnumDisplayModes (DDEDM_REFRESHRATES, modesCallback, md1);
+               idx = 0;
+               for (;;) {
+                   int found;
+                   DEVMODE dm;
+
+                   dm.dmSize = sizeof dm;
+                   dm.dmDriverExtra = 0;
+                   if (!EnumDisplaySettings  (md1->primary ? NULL : md1->name3, idx, &dm))
+                       break;
+                   idx2 = 0;
+                   found = 0;
+                   while (md1->DisplayModes[idx2].depth >= 0 && !found) {
+                       struct PicassoResolution *pr = &md1->DisplayModes[idx2];
+                       if (pr->res.width == dm.dmPelsWidth && pr->res.height == dm.dmPelsHeight && pr->depth == dm.dmBitsPerPel / 8) {
+                           for (i = 0; pr->refresh[i]; i++) {
+                               if (pr->refresh[i] == dm.dmDisplayFrequency) {
+                                   found = 1;
+                                   break;
+                               }
+                           }
+                       }
+                       idx2++;
+                   }
+                   if (!found) {
+                       write_log (L"EnumDisplaySettings(%dx%dx%d %dHz)\n", dm.dmPelsWidth, dm.dmPelsHeight, dm.dmBitsPerPel, dm.dmDisplayFrequency);
+                       addmode (md1, dm.dmPelsWidth, dm.dmPelsHeight, dm.dmBitsPerPel, dm.dmDisplayFrequency, 1);
+                   }
+                   idx++;
+               }
                //dhack();
                sortmodes (md1);
                modesList (md1);
@@ -1304,11 +1358,13 @@ int check_prefs_changed_gfx (void)
 
     if (_tcscmp (currprefs.prtname, changed_prefs.prtname) ||
        currprefs.parallel_autoflush_time != changed_prefs.parallel_autoflush_time ||
+       currprefs.parallel_ascii_emulation != changed_prefs.parallel_ascii_emulation ||
        currprefs.parallel_postscript_emulation != changed_prefs.parallel_postscript_emulation ||
        currprefs.parallel_postscript_detection != changed_prefs.parallel_postscript_detection ||
        _tcscmp (currprefs.ghostscript_parameters, changed_prefs.ghostscript_parameters)) {
        _tcscpy (currprefs.prtname, changed_prefs.prtname);
        currprefs.parallel_autoflush_time = changed_prefs.parallel_autoflush_time;
+       currprefs.parallel_ascii_emulation = changed_prefs.parallel_ascii_emulation;
        currprefs.parallel_postscript_emulation = changed_prefs.parallel_postscript_emulation;
        currprefs.parallel_postscript_detection = changed_prefs.parallel_postscript_detection;
        _tcscpy (currprefs.ghostscript_parameters, changed_prefs.ghostscript_parameters);
index 4d9cf146609bb91c738c9af425d0d5a6d259b6b2..93af48d9a516469429c7ba7aa982f5bc887cc131 100644 (file)
@@ -4739,6 +4739,7 @@ static int display_toselect(int fs, int vsync, int p96)
 }
 static void display_fromselect(int val, int *fs, int *vsync, int p96)
 {
+    int ofs = *fs;
     if (val == CB_ERR)
        return;
     *fs = 0;
@@ -4746,6 +4747,10 @@ static void display_fromselect(int val, int *fs, int *vsync, int p96)
     if (p96) {
        *fs = val / 2;
        *vsync = val & 1;
+       if (*fs == 2 && *fs != ofs) {
+           workprefs.win32_rtgscaleifsmall = 1;
+           workprefs.win32_rtgmatchdepth = 0;
+       }
        return;
     }
     switch (val)
@@ -4762,6 +4767,22 @@ static void display_fromselect(int val, int *fs, int *vsync, int p96)
        break;
        case 3:
        *fs = 2;
+       if (workprefs.gfx_filter == 0 && *fs != ofs) {
+           if (D3D_goodenough ()) {
+               workprefs.gfx_filter = 2;
+               workprefs.gfx_filter_filtermode = 2;
+           } else {
+               workprefs.gfx_filter = 1;
+           }
+           workprefs.gfx_filter_horiz_zoom = 0;
+           workprefs.gfx_filter_vert_zoom = 0;
+           workprefs.gfx_filter_horiz_zoom_mult = 0;
+           workprefs.gfx_filter_vert_zoom_mult = 0;
+           workprefs.gfx_filter_aspect = -1;
+           workprefs.gfx_filter_horiz_offset = 0;
+           workprefs.gfx_filter_vert_offset = 0;
+           workprefs.gfx_filter_keep_aspect = 0;
+       }
        break;
     }
 }
@@ -9304,6 +9325,7 @@ static void values_to_portsdlg (HWND hDlg)
        }
     }
     SetDlgItemInt (hDlg, IDC_PRINTERAUTOFLUSH, workprefs.parallel_autoflush_time, FALSE);
+    CheckDlgButton (hDlg, IDC_ASCIIPRINTER, workprefs.parallel_ascii_emulation);
     CheckDlgButton (hDlg, IDC_PSPRINTER, workprefs.parallel_postscript_emulation);
     CheckDlgButton (hDlg, IDC_PSPRINTERDETECT, workprefs.parallel_postscript_detection);
     SetDlgItemText (hDlg, IDC_PS_PARAMS, workprefs.ghostscript_parameters);
@@ -9573,14 +9595,20 @@ static INT_PTR CALLBACK IOPortsDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPAR
            if (isprinter ()) {
                closeprinter ();
            }
+       } else if (wParam == IDC_ASCIIPRINTER) {
+           workprefs.parallel_ascii_emulation = IsDlgButtonChecked (hDlg, IDC_ASCIIPRINTER) ? 1 : 0;
+           if (workprefs.parallel_ascii_emulation)
+               workprefs.parallel_postscript_detection = 0;
        } else if (wParam == IDC_PSPRINTER) {
            workprefs.parallel_postscript_emulation = IsDlgButtonChecked (hDlg, IDC_PSPRINTER) ? 1 : 0;
            if (workprefs.parallel_postscript_emulation)
                CheckDlgButton (hDlg, IDC_PSPRINTERDETECT, 1);
        } else if (wParam == IDC_PSPRINTERDETECT) {
            workprefs.parallel_postscript_detection = IsDlgButtonChecked (hDlg, IDC_PSPRINTERDETECT) ? 1 : 0;
-           if (!workprefs.parallel_postscript_detection)
+           if (!workprefs.parallel_postscript_detection) {
                CheckDlgButton (hDlg, IDC_PSPRINTER, 0);
+               workprefs.parallel_ascii_emulation = 0;
+           }
        } else if (wParam == IDC_UAESERIAL || wParam == IDC_SER_SHARED || wParam == IDC_SER_DIRECT || wParam == IDC_SER_CTSRTS || wParam == IDC_PRINTERAUTOFLUSH) {
            values_from_portsdlg (hDlg);
        } else {
@@ -10174,7 +10202,9 @@ struct filterpreset {
 };
 static struct filterpreset filterpresets[] =
 {
-    { L"PAL example", 8, 0, 0, 0, 1000, 1000, 0, 0, 50, 0, 0, 1, 1, 0, 0, 0, 10, 0, 0, 0, 300, 30, 0, 0, 0 },
+    { L"PAL", 8, 0, 0, 0, 0, 0, 0, 0, 50, 0, 0, 1, 1, 0, 0, 0, 10, 0, 0, 0, 300, 30, 0, 0, 0 },
+    { L"D3D Autoscale", 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1 },
+    { L"D3D Full Scaling", 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0 },
     { NULL }
 };
 
@@ -10242,16 +10272,20 @@ static void values_to_hw3ddlg (HWND hDlg)
     CheckDlgButton (hDlg, IDC_FILTERKEEPASPECT, workprefs.gfx_filter_keep_aspect);
     SendDlgItemMessage (hDlg, IDC_FILTERASPECT, CB_SETCURSEL,
        (workprefs.gfx_filter_aspect == 0) ? 0 :
-       (workprefs.gfx_filter_aspect == 4 * 256 + 3) ? 1 :
-       (workprefs.gfx_filter_aspect == 5 * 256 + 4) ? 2 :
-       (workprefs.gfx_filter_aspect == 15 * 256 + 9) ? 3 :
-       (workprefs.gfx_filter_aspect == 16 * 256 + 9) ? 4 :
-       (workprefs.gfx_filter_aspect == 16 * 256 + 10) ? 5 : 0, 0);
+       (workprefs.gfx_filter_aspect < 0) ? 1 :
+       (workprefs.gfx_filter_aspect == 4 * 256 + 3) ? 2 :
+       (workprefs.gfx_filter_aspect == 5 * 256 + 4) ? 3 :
+       (workprefs.gfx_filter_aspect == 15 * 256 + 9) ? 4 :
+       (workprefs.gfx_filter_aspect == 16 * 256 + 9) ? 5 :
+       (workprefs.gfx_filter_aspect == 16 * 256 + 10) ? 6 : 0, 0);
 
     SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_RESETCONTENT, 0, 0L);
-    SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_ADDSTRING, 0, (LPARAM)L"Disabled");
-    SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_ADDSTRING, 0, (LPARAM)L"Automatic scaling");
-    SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_ADDSTRING, 0, (LPARAM)L"Automatic resize");
+    WIN32GUI_LoadUIString (IDS_AUTOSCALE_DISABLED, txt, sizeof (txt) / sizeof (TCHAR));
+    SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_ADDSTRING, 0, (LPARAM)txt);
+    WIN32GUI_LoadUIString (IDS_AUTOSCALE_SCALING, txt, sizeof (txt) / sizeof (TCHAR));
+    SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_ADDSTRING, 0, (LPARAM)txt);
+    WIN32GUI_LoadUIString (IDS_AUTOSCALE_RESIZE, txt, sizeof (txt) / sizeof (TCHAR));
+    SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_ADDSTRING, 0, (LPARAM)txt);
     SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_SETCURSEL, workprefs.gfx_filter_autoscale, 0);
 
     SendDlgItemMessage (hDlg, IDC_FILTERHZ, TBM_SETRANGE, TRUE, MAKELONG (-999, +999));
@@ -10582,6 +10616,8 @@ static INT_PTR CALLBACK hw3dDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM
            SendDlgItemMessage (hDlg, IDC_FILTERASPECT, CB_RESETCONTENT, 0, 0);
            WIN32GUI_LoadUIString (IDS_DISABLED, tmp, sizeof tmp / sizeof (TCHAR));
            SendDlgItemMessage (hDlg, IDC_FILTERASPECT, CB_ADDSTRING, 0, (LPARAM)tmp);
+           WIN32GUI_LoadUIString (IDS_AUTOMATIC, tmp, sizeof tmp / sizeof (TCHAR));
+           SendDlgItemMessage (hDlg, IDC_FILTERASPECT, CB_ADDSTRING, 0, (LPARAM)tmp);
            SendDlgItemMessage (hDlg, IDC_FILTERASPECT, CB_ADDSTRING, 0, (LPARAM)L"4:3");
            SendDlgItemMessage (hDlg, IDC_FILTERASPECT, CB_ADDSTRING, 0, (LPARAM)L"5:4");
            SendDlgItemMessage (hDlg, IDC_FILTERASPECT, CB_ADDSTRING, 0, (LPARAM)L"15:9");
@@ -10632,8 +10668,14 @@ static INT_PTR CALLBACK hw3dDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM
                        item = SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_GETCURSEL, 0, 0L);
                        if (item != CB_ERR) {
                            workprefs.gfx_filter_autoscale = item;
-                           if (workprefs.gfx_filter_autoscale && workprefs.gfx_filter == 0)
-                               workprefs.gfx_filter = 1;
+                           if (workprefs.gfx_filter_autoscale && workprefs.gfx_filter == 0) {
+                               if (D3D_goodenough ()) {
+                                   workprefs.gfx_filter = 2; // D3D
+                                   workprefs.gfx_filter_filtermode = 2;
+                               } else {
+                                   workprefs.gfx_filter = 1; // NULL
+                               }
+                           }
                            values_to_hw3ddlg (hDlg);
                            enable_for_hw3ddlg (hDlg);
                        }
@@ -10674,14 +10716,16 @@ static INT_PTR CALLBACK hw3dDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM
                                if (v == 0)
                                    v2 = 0;
                                if (v == 1)
-                                   v2 = 4 * 256 + 3;
+                                   v2 = -1;
                                if (v == 2)
-                                   v2 = 5 * 256 + 4;
+                                   v2 = 4 * 256 + 3;
                                if (v == 3)
-                                   v2 = 15 * 256 + 9;
+                                   v2 = 5 * 256 + 4;
                                if (v == 4)
-                                   v2 = 16 * 256 + 9;
+                                   v2 = 15 * 256 + 9;
                                if (v == 5)
+                                   v2 = 16 * 256 + 9;
+                               if (v == 6)
                                    v2 = 16 * 256 + 10;
                            }
                            currprefs.gfx_filter_aspect = workprefs.gfx_filter_aspect = v2;
index 28fb5b511c0031eeadbc725b4463cf494fe0528d..31f24732ed5673b149a8ae2507cd5d0945faca11 100644 (file)
@@ -68,7 +68,8 @@
                                SuppressStartupBanner="true"
                                Detect64BitPortabilityProblems="false"
                                DebugInformationFormat="4"
-                               CompileAs="0"
+                               CallingConvention="2"
+                               CompileAs="1"
                                DisableSpecificWarnings="4996"
                                EnablePREfast="false"
                        />
                        />
                </Configuration>
                <Configuration
-                       Name="Debug|x64"
-                       OutputDirectory="x64\$(ConfigurationName)"
-                       IntermediateDirectory="x64\$(ConfigurationName)"
+                       Name="Release|Win32"
+                       OutputDirectory="d:\amiga"
+                       IntermediateDirectory=".\Release"
                        ConfigurationType="1"
                        UseOfMFC="0"
                        ATLMinimizesCRunTimeLibraryUsage="false"
-                       CharacterSet="2"
+                       CharacterSet="1"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
                        />
                        <Tool
                                Name="VCMIDLTool"
-                               PreprocessorDefinitions="_DEBUG"
+                               PreprocessorDefinitions="NDEBUG"
                                MkTypLibCompatible="true"
                                SuppressStartupBanner="true"
-                               TargetEnvironment="3"
-                               TypeLibraryName=".\Debug/winuae_msvc.tlb"
+                               TargetEnvironment="1"
+                               TypeLibraryName=".\Release/winuae_msvc.tlb"
                        />
                        <Tool
                                Name="VCCLCompilerTool"
-                               AdditionalOptions=""
-                               Optimization="0"
-                               AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep"
-                               PreprocessorDefinitions="WINVER=0x0500,_DEBUG,WIN32,_WINDOWS,ZLIB_DLL,OPENGL_SUPPORT,_WIN32_IE 0x0500,UNIX;WIN64"
+                               Optimization="3"
+                               InlineFunctionExpansion="2"
+                               EnableIntrinsicFunctions="true"
+                               FavorSizeOrSpeed="1"
+                               OmitFramePointers="true"
+                               WholeProgramOptimization="false"
+                               AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep,..\..\prowizard\include"
+                               PreprocessorDefinitions="WINVER=0x0500;NDEBUG;_WIN32_IE=0x0700;WIN32;CINTERFACE;COBJMACROS"
+                               StringPooling="true"
                                ExceptionHandling="0"
-                               BasicRuntimeChecks="3"
-                               RuntimeLibrary="1"
-                               BufferSecurityCheck="true"
-                               RuntimeTypeInfo="true"
-                               PrecompiledHeaderFile=".\Debug/winuae_msvc.pch"
-                               AssemblerListingLocation=".\Debug/"
-                               ObjectFile=".\Debug/"
-                               ProgramDataBaseFileName=".\Debug/"
+                               BasicRuntimeChecks="0"
+                               RuntimeLibrary="0"
+                               BufferSecurityCheck="false"
+                               EnableFunctionLevelLinking="false"
+                               EnableEnhancedInstructionSet="0"
+                               FloatingPointModel="0"
+                               TreatWChar_tAsBuiltInType="false"
+                               RuntimeTypeInfo="false"
+                               UsePrecompiledHeader="0"
+                               PrecompiledHeaderFile=".\Release/winuae_msvc.pch"
+                               AssemblerListingLocation=".\Release/"
+                               ObjectFile=".\Release/"
+                               ProgramDataBaseFileName=".\Release/"
                                WarningLevel="3"
                                SuppressStartupBanner="true"
-                               Detect64BitPortabilityProblems="true"
-                               DebugInformationFormat="3"
-                               CompileAs="0"
+                               CallingConvention="2"
+                               CompileAs="1"
                                DisableSpecificWarnings="4996"
-                               EnablePREfast="false"
+                               ForcedIncludeFiles=""
                        />
                        <Tool
                                Name="VCManagedResourceCompilerTool"
                        />
                        <Tool
                                Name="VCResourceCompilerTool"
-                               PreprocessorDefinitions="_DEBUG"
+                               PreprocessorDefinitions="NDEBUG"
                                Culture="1033"
                        />
                        <Tool
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib zlib1.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib winio.lib setupapi.lib wininet.lib capsimg.lib dxerr8.lib shlwapi.lib"
+                               AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib winio.lib setupapi.lib wininet.lib dxerr9.lib shlwapi.lib zlibstat.lib libpng.lib lglcd.lib wpcap.lib packet.lib openal32.lib wintab32.lib portaudio_x86.lib"
                                OutputFile="d:\amiga\winuae.exe"
-                               LinkIncremental="2"
+                               LinkIncremental="1"
                                SuppressStartupBanner="true"
-                               GenerateManifest="false"
-                               DelayLoadDLLs="setupapi.dll"
+                               AdditionalLibraryDirectories=""
+                               GenerateManifest="true"
+                               AdditionalManifestDependencies=""
+                               DelayLoadDLLs="wpcap.dll;packet.dll;d3dx9_41.dll;openal32.dll;wintab32.dll;portaudio_x86.dll"
                                GenerateDebugInformation="true"
-                               ProgramDatabaseFile=".\Debug/winuae.pdb"
+                               ProgramDatabaseFile=".\Release/winuae.pdb"
                                SubSystem="2"
                                StackReserveSize="2621440"
                                StackCommitSize="2621440"
-                               RandomizedBaseAddress="1"
-                               DataExecutionPrevention="0"
-                               TargetMachine="17"
+                               OptimizeReferences="2"
+                               EnableCOMDATFolding="2"
+                               OptimizeForWindows98="0"
+                               LinkTimeCodeGeneration="0"
+                               RandomizedBaseAddress="2"
+                               FixedBaseAddress="1"
+                               DataExecutionPrevention="2"
+                               TargetMachine="1"
                        />
                        <Tool
                                Name="VCALinkTool"
                        />
                        <Tool
                                Name="VCManifestTool"
+                               AdditionalManifestFiles="..\resources\winuae9.exe.manifest"
                        />
                        <Tool
                                Name="VCXDCMakeTool"
                        />
                </Configuration>
                <Configuration
-                       Name="Release|Win32"
-                       OutputDirectory="d:\amiga"
-                       IntermediateDirectory=".\Release"
+                       Name="TestRelease|Win32"
+                       IntermediateDirectory="$(ConfigurationName)"
                        ConfigurationType="1"
-                       UseOfMFC="0"
-                       ATLMinimizesCRunTimeLibraryUsage="false"
-                       CharacterSet="1"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
                        />
                        <Tool
                                Name="VCMIDLTool"
-                               PreprocessorDefinitions="NDEBUG"
-                               MkTypLibCompatible="true"
-                               SuppressStartupBanner="true"
-                               TargetEnvironment="1"
-                               TypeLibraryName=".\Release/winuae_msvc.tlb"
                        />
                        <Tool
                                Name="VCCLCompilerTool"
-                               Optimization="3"
-                               InlineFunctionExpansion="2"
-                               EnableIntrinsicFunctions="true"
-                               FavorSizeOrSpeed="1"
-                               OmitFramePointers="true"
-                               WholeProgramOptimization="false"
-                               AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep,..\..\prowizard\include"
-                               PreprocessorDefinitions="WINVER=0x0500;NDEBUG;_WIN32_IE=0x0700;WIN32;CINTERFACE;COBJMACROS"
-                               StringPooling="true"
-                               ExceptionHandling="0"
-                               BasicRuntimeChecks="0"
-                               RuntimeLibrary="0"
-                               BufferSecurityCheck="false"
-                               EnableFunctionLevelLinking="false"
-                               EnableEnhancedInstructionSet="0"
-                               FloatingPointModel="0"
-                               TreatWChar_tAsBuiltInType="false"
-                               RuntimeTypeInfo="false"
-                               UsePrecompiledHeader="0"
-                               PrecompiledHeaderFile=".\Release/winuae_msvc.pch"
-                               AssemblerListingLocation=".\Release/"
-                               ObjectFile=".\Release/"
-                               ProgramDataBaseFileName=".\Release/"
-                               WarningLevel="3"
-                               SuppressStartupBanner="true"
-                               CompileAs="0"
-                               DisableSpecificWarnings="4996"
-                               ForcedIncludeFiles=""
                        />
                        <Tool
                                Name="VCManagedResourceCompilerTool"
                        />
                        <Tool
                                Name="VCResourceCompilerTool"
-                               PreprocessorDefinitions="NDEBUG"
-                               Culture="1033"
                        />
                        <Tool
                                Name="VCPreLinkEventTool"
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib winio.lib setupapi.lib wininet.lib dxerr9.lib shlwapi.lib zlibstat.lib libpng.lib lglcd.lib wpcap.lib packet.lib openal32.lib wintab32.lib portaudio_x86.lib"
-                               OutputFile="d:\amiga\winuae.exe"
-                               LinkIncremental="1"
-                               SuppressStartupBanner="true"
-                               AdditionalLibraryDirectories=""
-                               GenerateManifest="true"
-                               AdditionalManifestDependencies=""
-                               DelayLoadDLLs="wpcap.dll;packet.dll;d3dx9_41.dll;openal32.dll;wintab32.dll;portaudio_x86.dll"
-                               GenerateDebugInformation="true"
-                               ProgramDatabaseFile=".\Release/winuae.pdb"
-                               SubSystem="2"
-                               StackReserveSize="2621440"
-                               StackCommitSize="2621440"
-                               OptimizeReferences="2"
-                               EnableCOMDATFolding="2"
-                               OptimizeForWindows98="0"
-                               LinkTimeCodeGeneration="0"
-                               RandomizedBaseAddress="2"
-                               FixedBaseAddress="1"
-                               DataExecutionPrevention="2"
-                               TargetMachine="1"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                        />
                        <Tool
                                Name="VCALinkTool"
                        />
                        <Tool
                                Name="VCManifestTool"
-                               AdditionalManifestFiles="..\resources\winuae9.exe.manifest"
                        />
                        <Tool
                                Name="VCXDCMakeTool"
                        />
                </Configuration>
                <Configuration
-                       Name="Release|x64"
-                       OutputDirectory="$(SolutionDir)x64\$(ConfigurationName)"
-                       IntermediateDirectory="x64\$(ConfigurationName)"
+                       Name="Release64|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
                        ConfigurationType="1"
-                       UseOfMFC="0"
-                       ATLMinimizesCRunTimeLibraryUsage="false"
-                       CharacterSet="2"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
                        />
                        <Tool
                                Name="VCMIDLTool"
-                               PreprocessorDefinitions="NDEBUG"
-                               MkTypLibCompatible="true"
-                               SuppressStartupBanner="true"
-                               TargetEnvironment="3"
-                               TypeLibraryName=".\Release/winuae_msvc.tlb"
                        />
                        <Tool
                                Name="VCCLCompilerTool"
-                               Optimization="3"
-                               InlineFunctionExpansion="1"
-                               EnableIntrinsicFunctions="true"
-                               FavorSizeOrSpeed="1"
-                               OmitFramePointers="true"
-                               WholeProgramOptimization="false"
-                               AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep"
-                               PreprocessorDefinitions="WINVER=0x0500,WIN32,NDEBUG,_WINDOWS,ZLIB_DLL,_WIN32_IE 0x0500,WIN64,_WIN64,UNIX"
-                               StringPooling="true"
-                               ExceptionHandling="0"
-                               BasicRuntimeChecks="0"
-                               RuntimeLibrary="0"
-                               BufferSecurityCheck="false"
-                               EnableFunctionLevelLinking="true"
-                               EnableEnhancedInstructionSet="0"
-                               FloatingPointModel="0"
-                               TreatWChar_tAsBuiltInType="false"
-                               RuntimeTypeInfo="false"
-                               UsePrecompiledHeader="0"
-                               PrecompiledHeaderFile=".\Release/winuae_msvc.pch"
-                               AssemblerListingLocation=".\Release/"
-                               ObjectFile=".\Release/"
-                               ProgramDataBaseFileName=".\Release/"
-                               WarningLevel="3"
-                               SuppressStartupBanner="true"
-                               CompileAs="1"
-                               DisableSpecificWarnings="4996"
-                               ForcedIncludeFiles=""
                        />
                        <Tool
                                Name="VCManagedResourceCompilerTool"
                        />
                        <Tool
                                Name="VCResourceCompilerTool"
-                               PreprocessorDefinitions="NDEBUG"
-                               Culture="1033"
                        />
                        <Tool
                                Name="VCPreLinkEventTool"
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib setupapi.lib wininet.lib dxerr8.lib shlwapi.lib"
-                               ShowProgress="0"
-                               OutputFile="d:\amiga\winuae64.exe"
-                               LinkIncremental="1"
-                               SuppressStartupBanner="true"
-                               AdditionalLibraryDirectories=""
-                               GenerateManifest="true"
-                               DelayLoadDLLs=""
-                               GenerateDebugInformation="true"
-                               ProgramDatabaseFile=".\Release/winuae.pdb"
-                               SubSystem="2"
-                               StackReserveSize="0"
-                               StackCommitSize="0"
-                               OptimizeReferences="2"
-                               EnableCOMDATFolding="2"
-                               OptimizeForWindows98="0"
-                               LinkTimeCodeGeneration="0"
                                RandomizedBaseAddress="1"
                                DataExecutionPrevention="0"
-                               TargetMachine="17"
                        />
                        <Tool
                                Name="VCALinkTool"
                        />
                </Configuration>
                <Configuration
-                       Name="TestRelease|Win32"
+                       Name="Debug64|Win32"
+                       OutputDirectory="$(ConfigurationName)"
                        IntermediateDirectory="$(ConfigurationName)"
                        ConfigurationType="1"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
                        />
                        <Tool
                                Name="VCMIDLTool"
+                               PreprocessorDefinitions="_DEBUG"
+                               MkTypLibCompatible="true"
+                               SuppressStartupBanner="true"
+                               TargetEnvironment="1"
+                               TypeLibraryName=".\Debug/winuae_msvc.tlb"
                        />
                        <Tool
                                Name="VCCLCompilerTool"
+                               AdditionalOptions=""
+                               Optimization="0"
+                               AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep"
+                               PreprocessorDefinitions="WINVER=0x0500,_DEBUG,WIN32,_WINDOWS,ZLIB_DLL,OPENGL_SUPPORT,_WIN32_IE 0x0500,UNIX"
+                               ExceptionHandling="0"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="1"
+                               BufferSecurityCheck="true"
+                               RuntimeTypeInfo="true"
+                               PrecompiledHeaderFile=".\Debug/winuae_msvc.pch"
+                               AssemblerListingLocation=".\Debug/"
+                               ObjectFile=".\Debug/"
+                               ProgramDataBaseFileName=".\Debug/"
+                               WarningLevel="3"
+                               SuppressStartupBanner="true"
+                               Detect64BitPortabilityProblems="true"
+                               DebugInformationFormat="4"
+                               CompileAs="0"
+                               DisableSpecificWarnings="4996"
+                               EnablePREfast="false"
                        />
                        <Tool
                                Name="VCManagedResourceCompilerTool"
                        />
                        <Tool
                                Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="_DEBUG"
+                               Culture="1033"
                        />
                        <Tool
                                Name="VCPreLinkEventTool"
                        />
                        <Tool
                                Name="VCLinkerTool"
+                               AdditionalOptions="/MACHINE:I386"
+                               AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib zdll.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib winio.lib setupapi.lib wininet.lib capsimg.lib dxerr8.lib shlwapi.lib"
+                               OutputFile="d:\amiga\winuae.exe"
+                               LinkIncremental="2"
+                               SuppressStartupBanner="true"
+                               GenerateManifest="false"
+                               DelayLoadDLLs="setupapi.dll"
+                               GenerateDebugInformation="true"
+                               ProgramDatabaseFile=".\Debug/winuae.pdb"
+                               SubSystem="2"
+                               StackReserveSize="2621440"
+                               StackCommitSize="2621440"
                                RandomizedBaseAddress="1"
                                DataExecutionPrevention="0"
                        />
                        />
                </Configuration>
                <Configuration
-                       Name="TestRelease|x64"
-                       OutputDirectory="$(SolutionDir)x64\$(ConfigurationName)"
-                       IntermediateDirectory="x64\$(ConfigurationName)"
+                       Name="FullRelease|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
                        ConfigurationType="1"
                        UseOfMFC="0"
                        ATLMinimizesCRunTimeLibraryUsage="false"
-                       CharacterSet="2"
+                       CharacterSet="1"
+                       WholeProgramOptimization="1"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
                                PreprocessorDefinitions="NDEBUG"
                                MkTypLibCompatible="true"
                                SuppressStartupBanner="true"
-                               TargetEnvironment="3"
+                               TargetEnvironment="1"
                                TypeLibraryName=".\Release/winuae_msvc.tlb"
                        />
                        <Tool
                                Name="VCCLCompilerTool"
-                               AdditionalOptions="/Oy-"
-                               Optimization="0"
-                               InlineFunctionExpansion="1"
+                               Optimization="3"
+                               InlineFunctionExpansion="2"
                                EnableIntrinsicFunctions="true"
-                               FavorSizeOrSpeed="0"
-                               OmitFramePointers="false"
-                               AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep"
-                               PreprocessorDefinitions="WINVER=0x0500,WIN32,NDEBUG,_WINDOWS,ZLIB_DLL,_WIN32_IE 0x0500,UNIX;WIN64"
+                               FavorSizeOrSpeed="1"
+                               OmitFramePointers="true"
+                               WholeProgramOptimization="true"
+                               AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep,..\..\prowizard\include"
+                               PreprocessorDefinitions="WINVER=0x0500;NDEBUG;_WIN32_IE=0x0700;WIN32;CINTERFACE;COBJMACROS"
                                StringPooling="true"
                                ExceptionHandling="0"
+                               BasicRuntimeChecks="0"
                                RuntimeLibrary="0"
                                BufferSecurityCheck="false"
                                EnableFunctionLevelLinking="true"
                                EnableEnhancedInstructionSet="0"
+                               FloatingPointModel="0"
                                TreatWChar_tAsBuiltInType="false"
                                RuntimeTypeInfo="false"
                                UsePrecompiledHeader="0"
-                               PrecompiledHeaderFile=".\Release/winuae_msvc.pch"
-                               AssemblerListingLocation=".\TestRelease/"
-                               ObjectFile=".\TestRelease/"
-                               ProgramDataBaseFileName=".\TestRelease/"
+                               PrecompiledHeaderFile=".\FullRelease/winuae_msvc.pch"
+                               AssemblerListingLocation=".\FullRelease/"
+                               ObjectFile=".\FullRelease/"
+                               ProgramDataBaseFileName=".\FullRelease/"
                                WarningLevel="3"
                                SuppressStartupBanner="true"
+                               CallingConvention="2"
                                CompileAs="1"
+                               DisableSpecificWarnings="4996"
                                ForcedIncludeFiles=""
                        />
                        <Tool
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib zlib1.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib winio.lib setupapi.lib wininet.lib capsimg.lib dxerr8.lib shlwapi.lib"
+                               AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib winio.lib setupapi.lib wininet.lib dxerr9.lib shlwapi.lib zlibstat.lib libpng.lib lglcd.lib wpcap.lib packet.lib openal32.lib wintab32.lib portaudio_x86.lib"
                                OutputFile="d:\amiga\winuae.exe"
                                LinkIncremental="1"
                                SuppressStartupBanner="true"
-                               DelayLoadDLLs="setupapi.dll"
+                               AdditionalLibraryDirectories=""
+                               GenerateManifest="true"
+                               AdditionalManifestDependencies=""
+                               DelayLoadDLLs="wpcap.dll;packet.dll;d3dx9_41.dll;openal32.dll;wintab32.dll;portaudio_x86.dll"
                                GenerateDebugInformation="true"
-                               ProgramDatabaseFile=".\Release/winuae.pdb"
+                               ProgramDatabaseFile=".\FullRelease/winuae.pdb"
                                SubSystem="2"
-                               StackReserveSize="2621440"
-                               StackCommitSize="2621440"
+                               StackReserveSize="0"
+                               StackCommitSize="0"
+                               LargeAddressAware="1"
                                OptimizeReferences="2"
                                EnableCOMDATFolding="2"
                                OptimizeForWindows98="0"
-                               RandomizedBaseAddress="1"
-                               DataExecutionPrevention="0"
-                               TargetMachine="17"
+                               LinkTimeCodeGeneration="1"
+                               RandomizedBaseAddress="2"
+                               FixedBaseAddress="1"
+                               DataExecutionPrevention="2"
+                               TargetMachine="1"
                        />
                        <Tool
                                Name="VCALinkTool"
                        />
                        <Tool
                                Name="VCManifestTool"
+                               AdditionalManifestFiles="..\resources\winuae9.exe.manifest"
                        />
                        <Tool
                                Name="VCXDCMakeTool"
                        />
                </Configuration>
                <Configuration
-                       Name="Release64|Win32"
-                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-                       IntermediateDirectory="$(ConfigurationName)"
+                       Name="Debug|x64"
+                       OutputDirectory="x64\$(ConfigurationName)"
+                       IntermediateDirectory="x64\$(ConfigurationName)"
                        ConfigurationType="1"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
                        />
                        <Tool
                                Name="VCMIDLTool"
+                               PreprocessorDefinitions="_DEBUG"
+                               MkTypLibCompatible="true"
+                               SuppressStartupBanner="true"
+                               TargetEnvironment="3"
+                               TypeLibraryName=".\Debug/winuae_msvc.tlb"
                        />
                        <Tool
                                Name="VCCLCompilerTool"
+                               AdditionalOptions=""
+                               Optimization="0"
+                               AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep"
+                               PreprocessorDefinitions="WINVER=0x0500,_DEBUG,WIN32,_WINDOWS,ZLIB_DLL,OPENGL_SUPPORT,_WIN32_IE 0x0500,UNIX;WIN64"
+                               ExceptionHandling="0"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="1"
+                               BufferSecurityCheck="true"
+                               RuntimeTypeInfo="true"
+                               PrecompiledHeaderFile=".\Debug/winuae_msvc.pch"
+                               AssemblerListingLocation=".\Debug/"
+                               ObjectFile=".\Debug/"
+                               ProgramDataBaseFileName=".\Debug/"
+                               WarningLevel="3"
+                               SuppressStartupBanner="true"
+                               Detect64BitPortabilityProblems="true"
+                               DebugInformationFormat="3"
+                               CompileAs="0"
+                               DisableSpecificWarnings="4996"
+                               EnablePREfast="false"
                        />
                        <Tool
                                Name="VCManagedResourceCompilerTool"
                        />
                        <Tool
                                Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="_DEBUG"
+                               Culture="1033"
                        />
                        <Tool
                                Name="VCPreLinkEventTool"
                        />
                        <Tool
                                Name="VCLinkerTool"
+                               AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib zlib1.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib winio.lib setupapi.lib wininet.lib capsimg.lib dxerr8.lib shlwapi.lib"
+                               OutputFile="d:\amiga\winuae.exe"
+                               LinkIncremental="2"
+                               SuppressStartupBanner="true"
+                               GenerateManifest="false"
+                               DelayLoadDLLs="setupapi.dll"
+                               GenerateDebugInformation="true"
+                               ProgramDatabaseFile=".\Debug/winuae.pdb"
+                               SubSystem="2"
+                               StackReserveSize="2621440"
+                               StackCommitSize="2621440"
                                RandomizedBaseAddress="1"
                                DataExecutionPrevention="0"
+                               TargetMachine="17"
                        />
                        <Tool
                                Name="VCALinkTool"
                        />
                </Configuration>
                <Configuration
-                       Name="Release64|x64"
+                       Name="Release|x64"
                        OutputDirectory="$(SolutionDir)x64\$(ConfigurationName)"
                        IntermediateDirectory="x64\$(ConfigurationName)"
                        ConfigurationType="1"
                                OmitFramePointers="true"
                                WholeProgramOptimization="false"
                                AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep"
-                               PreprocessorDefinitions="WINVER=0x0500,WIN32,NDEBUG,_WINDOWS,_WIN32_IE 0x0500,UNIX;WIN64"
+                               PreprocessorDefinitions="WINVER=0x0500,WIN32,NDEBUG,_WINDOWS,ZLIB_DLL,_WIN32_IE 0x0500,WIN64,_WIN64,UNIX"
                                StringPooling="true"
                                ExceptionHandling="0"
                                BasicRuntimeChecks="0"
                                RuntimeLibrary="0"
                                BufferSecurityCheck="false"
-                               EnableFunctionLevelLinking="false"
+                               EnableFunctionLevelLinking="true"
                                EnableEnhancedInstructionSet="0"
                                FloatingPointModel="0"
                                TreatWChar_tAsBuiltInType="false"
                                RuntimeTypeInfo="false"
                                UsePrecompiledHeader="0"
-                               PrecompiledHeaderFile=".\Release64/winuae_msvc.pch"
-                               AssemblerListingLocation=".\Release64/"
-                               ObjectFile=".\Release64/"
-                               ProgramDataBaseFileName=".\Release64/"
+                               PrecompiledHeaderFile=".\Release/winuae_msvc.pch"
+                               AssemblerListingLocation=".\Release/"
+                               ObjectFile=".\Release/"
+                               ProgramDataBaseFileName=".\Release/"
                                WarningLevel="3"
                                SuppressStartupBanner="true"
-                               Detect64BitPortabilityProblems="true"
                                CompileAs="1"
                                DisableSpecificWarnings="4996"
                                ForcedIncludeFiles=""
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib setupapi.lib wininet.lib dxerr8.lib shlwapi.lib zlibstat.lib libpng.lib lglcd.lib"
+                               AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib setupapi.lib wininet.lib dxerr8.lib shlwapi.lib"
+                               ShowProgress="0"
                                OutputFile="d:\amiga\winuae64.exe"
                                LinkIncremental="1"
                                SuppressStartupBanner="true"
                                GenerateManifest="true"
                                DelayLoadDLLs=""
                                GenerateDebugInformation="true"
-                               ProgramDatabaseFile=".\Release64/winuae.pdb"
+                               ProgramDatabaseFile=".\Release/winuae.pdb"
                                SubSystem="2"
+                               StackReserveSize="0"
+                               StackCommitSize="0"
                                OptimizeReferences="2"
                                EnableCOMDATFolding="2"
                                OptimizeForWindows98="0"
                        />
                        <Tool
                                Name="VCManifestTool"
-                               AdditionalManifestFiles="..\resources\winuae.exe.manifest"
                        />
                        <Tool
                                Name="VCXDCMakeTool"
                        />
                </Configuration>
                <Configuration
-                       Name="Debug64|Win32"
-                       OutputDirectory="$(ConfigurationName)"
-                       IntermediateDirectory="$(ConfigurationName)"
+                       Name="TestRelease|x64"
+                       OutputDirectory="$(SolutionDir)x64\$(ConfigurationName)"
+                       IntermediateDirectory="x64\$(ConfigurationName)"
                        ConfigurationType="1"
                        UseOfMFC="0"
                        ATLMinimizesCRunTimeLibraryUsage="false"
                        />
                        <Tool
                                Name="VCMIDLTool"
-                               PreprocessorDefinitions="_DEBUG"
+                               PreprocessorDefinitions="NDEBUG"
                                MkTypLibCompatible="true"
                                SuppressStartupBanner="true"
-                               TargetEnvironment="1"
-                               TypeLibraryName=".\Debug/winuae_msvc.tlb"
+                               TargetEnvironment="3"
+                               TypeLibraryName=".\Release/winuae_msvc.tlb"
                        />
                        <Tool
                                Name="VCCLCompilerTool"
-                               AdditionalOptions=""
+                               AdditionalOptions="/Oy-"
                                Optimization="0"
+                               InlineFunctionExpansion="1"
+                               EnableIntrinsicFunctions="true"
+                               FavorSizeOrSpeed="0"
+                               OmitFramePointers="false"
                                AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep"
-                               PreprocessorDefinitions="WINVER=0x0500,_DEBUG,WIN32,_WINDOWS,ZLIB_DLL,OPENGL_SUPPORT,_WIN32_IE 0x0500,UNIX"
+                               PreprocessorDefinitions="WINVER=0x0500,WIN32,NDEBUG,_WINDOWS,ZLIB_DLL,_WIN32_IE 0x0500,UNIX;WIN64"
+                               StringPooling="true"
                                ExceptionHandling="0"
-                               BasicRuntimeChecks="3"
-                               RuntimeLibrary="1"
-                               BufferSecurityCheck="true"
-                               RuntimeTypeInfo="true"
-                               PrecompiledHeaderFile=".\Debug/winuae_msvc.pch"
-                               AssemblerListingLocation=".\Debug/"
-                               ObjectFile=".\Debug/"
-                               ProgramDataBaseFileName=".\Debug/"
+                               RuntimeLibrary="0"
+                               BufferSecurityCheck="false"
+                               EnableFunctionLevelLinking="true"
+                               EnableEnhancedInstructionSet="0"
+                               TreatWChar_tAsBuiltInType="false"
+                               RuntimeTypeInfo="false"
+                               UsePrecompiledHeader="0"
+                               PrecompiledHeaderFile=".\Release/winuae_msvc.pch"
+                               AssemblerListingLocation=".\TestRelease/"
+                               ObjectFile=".\TestRelease/"
+                               ProgramDataBaseFileName=".\TestRelease/"
                                WarningLevel="3"
                                SuppressStartupBanner="true"
-                               Detect64BitPortabilityProblems="true"
-                               DebugInformationFormat="4"
-                               CompileAs="0"
-                               DisableSpecificWarnings="4996"
-                               EnablePREfast="false"
+                               CompileAs="1"
+                               ForcedIncludeFiles=""
                        />
                        <Tool
                                Name="VCManagedResourceCompilerTool"
                        />
                        <Tool
                                Name="VCResourceCompilerTool"
-                               PreprocessorDefinitions="_DEBUG"
+                               PreprocessorDefinitions="NDEBUG"
                                Culture="1033"
                        />
                        <Tool
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalOptions="/MACHINE:I386"
-                               AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib zdll.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib winio.lib setupapi.lib wininet.lib capsimg.lib dxerr8.lib shlwapi.lib"
+                               AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib zlib1.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib winio.lib setupapi.lib wininet.lib capsimg.lib dxerr8.lib shlwapi.lib"
                                OutputFile="d:\amiga\winuae.exe"
-                               LinkIncremental="2"
+                               LinkIncremental="1"
                                SuppressStartupBanner="true"
-                               GenerateManifest="false"
                                DelayLoadDLLs="setupapi.dll"
                                GenerateDebugInformation="true"
-                               ProgramDatabaseFile=".\Debug/winuae.pdb"
+                               ProgramDatabaseFile=".\Release/winuae.pdb"
                                SubSystem="2"
                                StackReserveSize="2621440"
                                StackCommitSize="2621440"
+                               OptimizeReferences="2"
+                               EnableCOMDATFolding="2"
+                               OptimizeForWindows98="0"
                                RandomizedBaseAddress="1"
                                DataExecutionPrevention="0"
+                               TargetMachine="17"
                        />
                        <Tool
                                Name="VCALinkTool"
                        />
                </Configuration>
                <Configuration
-                       Name="Debug64|x64"
+                       Name="Release64|x64"
                        OutputDirectory="$(SolutionDir)x64\$(ConfigurationName)"
                        IntermediateDirectory="x64\$(ConfigurationName)"
                        ConfigurationType="1"
                        />
                        <Tool
                                Name="VCMIDLTool"
-                               PreprocessorDefinitions="_DEBUG"
+                               PreprocessorDefinitions="NDEBUG"
                                MkTypLibCompatible="true"
                                SuppressStartupBanner="true"
                                TargetEnvironment="3"
-                               TypeLibraryName=".\Debug/winuae_msvc.tlb"
+                               TypeLibraryName=".\Release/winuae_msvc.tlb"
                        />
                        <Tool
                                Name="VCCLCompilerTool"
-                               AdditionalOptions=""
-                               Optimization="0"
+                               Optimization="3"
+                               InlineFunctionExpansion="1"
+                               EnableIntrinsicFunctions="true"
+                               FavorSizeOrSpeed="1"
+                               OmitFramePointers="true"
+                               WholeProgramOptimization="false"
                                AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep"
-                               PreprocessorDefinitions="WINVER=0x0500,_DEBUG,WIN32,_WINDOWS,_WIN32_IE 0x0500,UNIX,WIN64"
+                               PreprocessorDefinitions="WINVER=0x0500,WIN32,NDEBUG,_WINDOWS,_WIN32_IE 0x0500,UNIX;WIN64"
+                               StringPooling="true"
                                ExceptionHandling="0"
-                               BasicRuntimeChecks="3"
-                               RuntimeLibrary="1"
+                               BasicRuntimeChecks="0"
+                               RuntimeLibrary="0"
                                BufferSecurityCheck="false"
-                               RuntimeTypeInfo="true"
-                               PrecompiledHeaderFile=".\Debug64/winuae_msvc.pch"
-                               AssemblerListingLocation=".\Debug64/"
-                               ObjectFile=".\Debug64/"
-                               ProgramDataBaseFileName=".\Debug64/"
+                               EnableFunctionLevelLinking="false"
+                               EnableEnhancedInstructionSet="0"
+                               FloatingPointModel="0"
+                               TreatWChar_tAsBuiltInType="false"
+                               RuntimeTypeInfo="false"
+                               UsePrecompiledHeader="0"
+                               PrecompiledHeaderFile=".\Release64/winuae_msvc.pch"
+                               AssemblerListingLocation=".\Release64/"
+                               ObjectFile=".\Release64/"
+                               ProgramDataBaseFileName=".\Release64/"
                                WarningLevel="3"
                                SuppressStartupBanner="true"
                                Detect64BitPortabilityProblems="true"
-                               DebugInformationFormat="3"
-                               CompileAs="0"
+                               CompileAs="1"
                                DisableSpecificWarnings="4996"
-                               EnablePREfast="false"
+                               ForcedIncludeFiles=""
                        />
                        <Tool
                                Name="VCManagedResourceCompilerTool"
                        />
                        <Tool
                                Name="VCResourceCompilerTool"
-                               PreprocessorDefinitions="_DEBUG"
+                               PreprocessorDefinitions="NDEBUG"
                                Culture="1033"
                        />
                        <Tool
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib zlib.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib winio.lib setupapi.lib wininet.lib capsimg.lib dxerr8.lib shlwapi.lib"
+                               AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib setupapi.lib wininet.lib dxerr8.lib shlwapi.lib zlibstat.lib libpng.lib lglcd.lib"
                                OutputFile="d:\amiga\winuae64.exe"
-                               LinkIncremental="2"
+                               LinkIncremental="1"
                                SuppressStartupBanner="true"
+                               AdditionalLibraryDirectories=""
                                GenerateManifest="true"
                                DelayLoadDLLs=""
                                GenerateDebugInformation="true"
-                               ProgramDatabaseFile=".\Debug64/winuae.pdb"
+                               ProgramDatabaseFile=".\Release64/winuae.pdb"
                                SubSystem="2"
-                               StackReserveSize="2621440"
-                               StackCommitSize="2621440"
+                               OptimizeReferences="2"
+                               EnableCOMDATFolding="2"
+                               OptimizeForWindows98="0"
+                               LinkTimeCodeGeneration="0"
                                RandomizedBaseAddress="1"
                                DataExecutionPrevention="0"
                                TargetMachine="17"
                        />
                </Configuration>
                <Configuration
-                       Name="FullRelease|Win32"
-                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-                       IntermediateDirectory="$(ConfigurationName)"
+                       Name="Debug64|x64"
+                       OutputDirectory="$(SolutionDir)x64\$(ConfigurationName)"
+                       IntermediateDirectory="x64\$(ConfigurationName)"
                        ConfigurationType="1"
                        UseOfMFC="0"
                        ATLMinimizesCRunTimeLibraryUsage="false"
-                       CharacterSet="1"
-                       WholeProgramOptimization="1"
+                       CharacterSet="2"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
                        />
                        <Tool
                                Name="VCMIDLTool"
-                               PreprocessorDefinitions="NDEBUG"
+                               PreprocessorDefinitions="_DEBUG"
                                MkTypLibCompatible="true"
                                SuppressStartupBanner="true"
-                               TargetEnvironment="1"
-                               TypeLibraryName=".\Release/winuae_msvc.tlb"
+                               TargetEnvironment="3"
+                               TypeLibraryName=".\Debug/winuae_msvc.tlb"
                        />
                        <Tool
                                Name="VCCLCompilerTool"
-                               Optimization="3"
-                               InlineFunctionExpansion="2"
-                               EnableIntrinsicFunctions="true"
-                               FavorSizeOrSpeed="1"
-                               OmitFramePointers="true"
-                               WholeProgramOptimization="true"
-                               AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep,..\..\prowizard\include"
-                               PreprocessorDefinitions="WINVER=0x0500;NDEBUG;_WIN32_IE=0x0700;WIN32;CINTERFACE;COBJMACROS"
-                               StringPooling="true"
+                               AdditionalOptions=""
+                               Optimization="0"
+                               AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep"
+                               PreprocessorDefinitions="WINVER=0x0500,_DEBUG,WIN32,_WINDOWS,_WIN32_IE 0x0500,UNIX,WIN64"
                                ExceptionHandling="0"
-                               BasicRuntimeChecks="0"
-                               RuntimeLibrary="0"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="1"
                                BufferSecurityCheck="false"
-                               EnableFunctionLevelLinking="true"
-                               EnableEnhancedInstructionSet="0"
-                               FloatingPointModel="0"
-                               TreatWChar_tAsBuiltInType="false"
-                               RuntimeTypeInfo="false"
-                               UsePrecompiledHeader="0"
-                               PrecompiledHeaderFile=".\FullRelease/winuae_msvc.pch"
-                               AssemblerListingLocation=".\FullRelease/"
-                               ObjectFile=".\FullRelease/"
-                               ProgramDataBaseFileName=".\FullRelease/"
+                               RuntimeTypeInfo="true"
+                               PrecompiledHeaderFile=".\Debug64/winuae_msvc.pch"
+                               AssemblerListingLocation=".\Debug64/"
+                               ObjectFile=".\Debug64/"
+                               ProgramDataBaseFileName=".\Debug64/"
                                WarningLevel="3"
                                SuppressStartupBanner="true"
+                               Detect64BitPortabilityProblems="true"
+                               DebugInformationFormat="3"
                                CompileAs="0"
                                DisableSpecificWarnings="4996"
-                               ForcedIncludeFiles=""
+                               EnablePREfast="false"
                        />
                        <Tool
                                Name="VCManagedResourceCompilerTool"
                        />
                        <Tool
                                Name="VCResourceCompilerTool"
-                               PreprocessorDefinitions="NDEBUG"
+                               PreprocessorDefinitions="_DEBUG"
                                Culture="1033"
                        />
                        <Tool
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib winio.lib setupapi.lib wininet.lib dxerr9.lib shlwapi.lib zlibstat.lib libpng.lib lglcd.lib wpcap.lib packet.lib openal32.lib wintab32.lib portaudio_x86.lib"
-                               OutputFile="d:\amiga\winuae.exe"
-                               LinkIncremental="1"
+                               AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib zlib.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib winio.lib setupapi.lib wininet.lib capsimg.lib dxerr8.lib shlwapi.lib"
+                               OutputFile="d:\amiga\winuae64.exe"
+                               LinkIncremental="2"
                                SuppressStartupBanner="true"
-                               AdditionalLibraryDirectories=""
                                GenerateManifest="true"
-                               AdditionalManifestDependencies=""
-                               DelayLoadDLLs="wpcap.dll;packet.dll;d3dx9_41.dll;openal32.dll;wintab32.dll;portaudio_x86.dll"
+                               DelayLoadDLLs=""
                                GenerateDebugInformation="true"
-                               ProgramDatabaseFile=".\FullRelease/winuae.pdb"
+                               ProgramDatabaseFile=".\Debug64/winuae.pdb"
                                SubSystem="2"
-                               StackReserveSize="0"
-                               StackCommitSize="0"
-                               LargeAddressAware="1"
-                               OptimizeReferences="2"
-                               EnableCOMDATFolding="2"
-                               OptimizeForWindows98="0"
-                               LinkTimeCodeGeneration="1"
-                               RandomizedBaseAddress="2"
-                               FixedBaseAddress="1"
-                               DataExecutionPrevention="2"
-                               TargetMachine="1"
+                               StackReserveSize="2621440"
+                               StackCommitSize="2621440"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
+                               TargetMachine="17"
                        />
                        <Tool
                                Name="VCALinkTool"
                        />
                        <Tool
                                Name="VCManifestTool"
-                               AdditionalManifestFiles="..\resources\winuae9.exe.manifest"
+                               AdditionalManifestFiles="..\resources\winuae.exe.manifest"
                        />
                        <Tool
                                Name="VCXDCMakeTool"
                        Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
                        >
                        <File
-                               RelativePath="..\ahidsound.c"
+                               RelativePath="..\ahidsound_dsonly.c"
                                >
                        </File>
                        <File
                                                />
                                        </FileConfiguration>
                                        <FileConfiguration
-                                               Name="Debug|x64"
+                                               Name="Release|Win32"
                                                >
                                                <Tool
                                                        Name="VCResourceCompilerTool"
                                                />
                                        </FileConfiguration>
                                        <FileConfiguration
-                                               Name="Release|Win32"
+                                               Name="Debug64|Win32"
                                                >
                                                <Tool
                                                        Name="VCResourceCompilerTool"
                                                />
                                        </FileConfiguration>
                                        <FileConfiguration
-                                               Name="Release|x64"
+                                               Name="FullRelease|Win32"
                                                >
                                                <Tool
                                                        Name="VCResourceCompilerTool"
                                                />
                                        </FileConfiguration>
                                        <FileConfiguration
-                                               Name="TestRelease|x64"
+                                               Name="Debug|x64"
                                                >
                                                <Tool
                                                        Name="VCResourceCompilerTool"
                                                />
                                        </FileConfiguration>
                                        <FileConfiguration
-                                               Name="Release64|x64"
+                                               Name="Release|x64"
                                                >
                                                <Tool
                                                        Name="VCResourceCompilerTool"
                                                />
                                        </FileConfiguration>
                                        <FileConfiguration
-                                               Name="Debug64|Win32"
+                                               Name="TestRelease|x64"
                                                >
                                                <Tool
                                                        Name="VCResourceCompilerTool"
                                                />
                                        </FileConfiguration>
                                        <FileConfiguration
-                                               Name="Debug64|x64"
+                                               Name="Release64|x64"
                                                >
                                                <Tool
                                                        Name="VCResourceCompilerTool"
                                                />
                                        </FileConfiguration>
                                        <FileConfiguration
-                                               Name="FullRelease|Win32"
+                                               Name="Debug64|x64"
                                                >
                                                <Tool
                                                        Name="VCResourceCompilerTool"
index dd1a71aea99aff94d07d85f055a3ccda3bc593ee..cf3892035ca269d72d71114bdeba3e6607b742e3 100644 (file)
@@ -1,4 +1,33 @@
 
+Beta 27:
+
+- on screen led was always enabled (b26)
+- scaling in NTSC mode really fixed (b26)
+- enabling autoscaling and no filters enabled: select Direct3D if
+  at least 2.0 shaders supported (=fast enough), only select Null
+  filter if older. (D3D9 scaling is "free" on modern hardware)
+- Logitech LCD SDK updated (currently waiting for G19..)
+- autoscale found sprites outside of bitplanes when BRDSPRT was
+  enabled without ECSENA
+- vertical positioning in autoscale was wrong in some cases
+- AHI works again
+- always enable Picasso96 BIF_INDISPLAYCHAIN (not enabled means
+  RTG mode display size of 0x0 pixels = crash)
+- delayed printer open, do not open until enough data received, also
+  ignore data completely if less than 10 bytes received
+- added "ASCII Printer" option. Select this option if you use programs
+  that print directly to emulated parallel port (bypassing Amiga
+  printer drivers) and they expect old-style printers that directly
+  accept ascii text (Action Replay, demo scene disk magazines etc..)
+  In future this will also include emulation of old Epson matrix
+  printer control codes (de-facto control codes that most printers
+  supported at that time)
+- added missing "Automatic" aspect ratio setting in Filter panel
+- selecting "Full Window" mode when no filters enabled = also enable
+  Direct3D + FS. (this is what users apparently expect, not confusing
+  tiny image on the middle of screen)
+- development PC updated to Windows 7 RC
+
 Beta 26:
 
 - added transparent support for ICD AdIDE "bit swapped" disks and
@@ -20,6 +49,7 @@ Beta 26:
 - D3D and OGL mode was not properly closed when switching to
   windowed/fullwindow RTG mode (old graphics was visible depending
   on screen/scaling etc..)
+- AHI is broken in this version. Do not use
 
 Beta 25:
 
index 794ef8963025acc7a137c91df22d691f18f45d1c..0b68d65e49591efd0e7f9dd38239a38757957c71 100644 (file)
@@ -99,7 +99,7 @@ short testTitanicsPlayer ( void )
 
 
 /* With the help of Xigh :) .. thx */
-int cmplong(const void * a, const void * b)
+int _cdecl cmplong(const void * a, const void * b)
 {
   long * aa = (long *) a;
   long * bb = (long *) b;