]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
2710b13
authorToni Wilen <twilen@winuae.net>
Wed, 26 Mar 2014 16:53:56 +0000 (18:53 +0200)
committerToni Wilen <twilen@winuae.net>
Wed, 26 Mar 2014 16:53:56 +0000 (18:53 +0200)
30 files changed:
cfgfile.cpp
custom.cpp
disk.cpp
include/newcpu.h
include/readcpu.h
jit/compemu_fpp.cpp
newcpu.cpp
od-win32/avioutput.cpp
od-win32/caps/CapsLib.h
od-win32/caps/caps_win32.cpp
od-win32/dinput.cpp
od-win32/direct3d.cpp
od-win32/win32.cpp
od-win32/win32.h
od-win32/win32_scaler.cpp
od-win32/win32_uaenet.cpp
od-win32/win32gui.cpp
od-win32/win32gui.h
od-win32/win32gui_extra.cpp
od-win32/winuae_msvc11/winuae_msvc.vcxproj
slirp/libslirp.h
slirp/misc.cpp
slirp/misc.h
slirp/slirp.cpp
slirp/slirp.h
slirp/socket.cpp
slirp/socket.h
slirp/tcp_subr.cpp
slirp/udp.cpp
slirp/udp.h

index d76f6a8277a219d3ca24bc981f349bf01c25a575..5cbfc579a3ed7313a043bf6e5e05fe0da1bc9305 100644 (file)
@@ -1559,7 +1559,7 @@ int cfgfile_floatval (const TCHAR *option, const TCHAR *value, const TCHAR *name
 }
 int cfgfile_floatval (const TCHAR *option, const TCHAR *value, const TCHAR *name, float *location)
 {
-       return cfgfile_floatval (option, NULL, value, name, location);
+       return cfgfile_floatval (option, value, name, NULL, location);
 }
 
 int cfgfile_intval (const TCHAR *option, const TCHAR *value, const TCHAR *name, const TCHAR *nameext, unsigned int *location, int scale)
@@ -2201,11 +2201,12 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value)
                p->gfx_vresolution = VRES_DOUBLE;
                p->gfx_pscanlines = 0;
                p->gfx_iscanlines = 0;
-               if (cfgfile_strval (option, value, _T("gfx_linemode"), &v, linemode, 0)) {
+               if (cfgfile_strval(option, value, _T("gfx_linemode"), &v, linemode, 0)) {
+                       p->gfx_vresolution = VRES_NONDOUBLE;
                        if (v > 0) {
                                p->gfx_iscanlines = (v - 1) / 4;
                                p->gfx_pscanlines = (v - 1) % 4;
-                               p->gfx_vresolution = 1;
+                               p->gfx_vresolution = VRES_DOUBLE;
                        }
                }
                return 1;
index a75d96385acc2f7f0d28a6b01a9c80af55f890fd..37089b324e6017acabb844ae6893c24f87758a06 100644 (file)
@@ -2118,7 +2118,7 @@ static void finish_final_fetch (void)
        if (thisline_decision.plfleft < 0)
                return;
 
-       if (plfr_state < plf_end)
+       if (plfr_state < plfr_end)
                finish_last_fetch (maxhpos, fetchmode, true);
        plfr_state = plfr_finished;
 
index c75c71a5eea21e38c7b7d5ae0f1b083abbb6ca5a..6f640073cb3ffb1092d9f624256814fc9bda7de5 100644 (file)
--- a/disk.cpp
+++ b/disk.cpp
@@ -18,6 +18,7 @@ int disk_debug_logging = 0;
 int disk_debug_mode = 0;
 int disk_debug_track = -1;
 
+#define REVOLUTION_DEBUG 0
 #define MFM_VALIDATOR 0
 
 #include "uae.h"
@@ -2939,7 +2940,7 @@ static void fetchnextrevolution (drive *drv)
        if (drv->revolution_check)
                return;
        drv->trackspeed = get_floppy_speed2 (drv);
-#if 0
+#if REVOLUTION_DEBUG
        if (1 || drv->mfmpos != 0) {
                write_log (_T("REVOLUTION: DMA=%d %d %d/%d %d %d %d\n"), dskdmaen, drv->trackspeed, drv->mfmpos, drv->tracklen, drv->indexoffset, drv->floppybitcounter);
        }
@@ -2969,7 +2970,7 @@ static void fetchnextrevolution (drive *drv)
 
 static void do_disk_index (void)
 {
-#if 0
+#if REVOLUTION_DEBUG
        write_log(_T("INDEX %d\n"), indexdecay);
 #endif
        if (!indexdecay) {
@@ -3344,6 +3345,10 @@ uae_u16 DSKBYTR (int hpos)
                        continue;
                if (!(selected & (1 << dr))) {
                        drv->lastdataacesstrack = drv->cyl * 2 + side;
+#if REVOLUTION_DEBUG
+                       if (!drv->track_access_done)
+                               write_log(_T("DSKBYTR\n"));
+#endif
                        drv->track_access_done = true;
                        if (disk_debug_mode & DISK_DEBUG_PIO) {
                                if (disk_debug_track < 0 || disk_debug_track == 2 * drv->cyl + side) {
@@ -3371,11 +3376,6 @@ static void DISK_start (void)
                        int tr = drv->cyl * 2 + side;
                        trackid *ti = drv->trackdata + tr;
 
-                       if (dskdmaen == DSKDMA_READ) {
-                               drv->lastdataacesstrack = drv->cyl * 2 + side;
-                               drv->track_access_done = true;
-                       }
-
                        if (dskdmaen == DSKDMA_WRITE) {
                                drv->tracklen = longwritemode ? FLOPPY_WRITE_MAXLEN : FLOPPY_WRITE_LEN * drv->ddhd * 8 * 2;
                                drv->trackspeed = get_floppy_speed ();
@@ -3540,6 +3540,21 @@ void DSKLEN (uae_u16 v, int hpos)
                DISK_start ();
        }
 
+       for (dr = 0; dr < MAX_FLOPPY_DRIVES; dr++) {
+               drive *drv = &floppy[dr];
+               if (drv->motoroff)
+                       continue;
+               if (selected & (1 << dr))
+                       continue;
+               if (dskdmaen == DSKDMA_READ) {
+                       drv->lastdataacesstrack = drv->cyl * 2 + side;
+                       drv->track_access_done = true;
+#if REVOLUTION_DEBUG
+                       write_log(_T("DMA\n"));
+#endif
+               }
+       }
+
        if (((disk_debug_mode & DISK_DEBUG_DMA_READ) && dskdmaen == DSKDMA_READ) ||
                ((disk_debug_mode & DISK_DEBUG_DMA_WRITE) && dskdmaen == DSKDMA_WRITE))
        {
index 2b7fdcd974bfbd5ae1ad3f254c8e5ac64f4b6ee3..e56d86ed997b4e6c6de14c62d2079a72071f1e8b 100644 (file)
@@ -298,7 +298,7 @@ STATIC_INLINE void m68k_incpci (int o)
 
 STATIC_INLINE void m68k_incpc_normal (int o)
 {
-       if (currprefs.mmu_model || currprefs.cpu_compatible)
+       if ((currprefs.mmu_model || currprefs.cpu_compatible) && !currprefs.cachesize)
                m68k_incpci (o);
        else
                m68k_incpc (o);
@@ -306,8 +306,8 @@ STATIC_INLINE void m68k_incpc_normal (int o)
 
 STATIC_INLINE void m68k_setpc_normal (uaecptr pc)
 {
-       if (currprefs.mmu_model || currprefs.cpu_compatible)
-               m68k_setpci (pc);
+       if ((currprefs.mmu_model || currprefs.cpu_compatible) && !currprefs.cachesize)
+               m68k_setpci(pc);
        else
                m68k_setpc (pc);
 }
index 78df404467e13ff5ad0e540d5004da238ebca6bc..a9d106d43ee55be71f57846388fb2ec7799e0b41 100644 (file)
@@ -46,7 +46,7 @@ struct mnemolookup {
 extern struct mnemolookup lookuptab[];
 
 ENUMDECL {
-    sz_byte, sz_word, sz_long
+    sz_byte, sz_word, sz_long, sz_single, sz_double, sz_extended, sz_packed
 } ENUMNAME (wordsizes);
 
 ENUMDECL {
index 33fd32ab77280e7d742c02d13829ae48763a5254..80399c7e658ff547d1d69acda2d09622815ce43a 100644 (file)
@@ -141,6 +141,19 @@ STATIC_INLINE int comp_fp_get (uae_u32 opcode, uae_u16 extra, int treg)
                        case 3: /* (d8,PC,Xn) or (bd,PC,Xn) or ([bd,PC,Xn],od) or ([bd,PC],Xn,od) */
                        return -1; /* rarely used, fallback to non-JIT */
                        case 4: /* # < data >; Constants should be converted just once by the JIT */
+#if 1
+                       {
+                               uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+
+                                       m68k_pc_offset;
+                               uae_u32 ad=S1;
+                               if (size == 6)
+                                       address++;
+                               mov_l_ri(ad,address);
+                               m68k_pc_offset+=sz2[size];
+                               break;
+                       }
+#else
+                       /* disable until rare bug is found */
                        m68k_pc_offset += sz2[size];
                        switch (size) {
                                case 0:
@@ -169,10 +182,12 @@ STATIC_INLINE int comp_fp_get (uae_u32 opcode, uae_u16 extra, int treg)
                                return 0;
                                case 4:
                                {
+                                       extern uae_u8 *natmem_offset;
+
                                        uae_s16 w = (uae_s16) comp_get_iword (m68k_pc_offset - 2);
                                        float si = (float)w;
 
-                                       //write_log (_T("converted immediate WORD constant %d to SINGLE %f, %x\n"), w, si, m68k_getpc());
+                                       write_log(_T("converted immediate WORD constant %d to SINGLE %f, %08x %d (%08X)\n"), w, si, m68k_getpc(), m68k_pc_offset, comp_pc_p + m68k_pc_offset - NATMEM_OFFSET);
                                        fmovs_ri (treg, *(uae_u32 *) &si);
                                        return 1;
                                }
@@ -193,7 +208,7 @@ STATIC_INLINE int comp_fp_get (uae_u32 opcode, uae_u16 extra, int treg)
                                }
                                case 6:
                                {
-                                       float si = (float) (uae_s8) comp_get_ibyte (m68k_pc_offset - 1);
+                                       float si = (float) (uae_s8) comp_get_ibyte (m68k_pc_offset - 2);
 
                                        //write_log (_T("immediate BYTE constant converted to SINGLE\n"));
                                        fmovs_ri (treg, *(uae_u32 *) &si);
@@ -202,6 +217,7 @@ STATIC_INLINE int comp_fp_get (uae_u32 opcode, uae_u16 extra, int treg)
                                default: /* never reached */
                                return -1;
                        }
+#endif
                        default: /* never reached */
                        return -1;
                }
@@ -456,8 +472,6 @@ void comp_fdbcc_opp (uae_u32 opcode, uae_u16 extra)
 
 void comp_fscc_opp (uae_u32 opcode, uae_u16 extra)
 {
-       uae_u32 ad;
-       int cc;
        int reg;
 
        if (!currprefs.compfpu) {
@@ -774,7 +788,7 @@ void comp_fpp_opp (uae_u32 opcode, uae_u16 extra)
                        uae_u32 list = 0;
                        int incr = 0;
                        if (extra & 0x2000) {
-                               uae_u32 ad;
+                               int ad;
 
                                /* FMOVEM FPP->memory */
                                switch ((extra >> 11) & 3) { /* Get out early if failure */
@@ -847,7 +861,7 @@ void comp_fpp_opp (uae_u32 opcode, uae_u16 extra)
                        else {
                                /* FMOVEM memory->FPP */
 
-                               uae_u32 ad;
+                               int ad;
                                switch ((extra >> 11) & 3) { /* Get out early if failure */
                                        case 0:
                                        case 2:
index 60bdae08c4e0b11ad6e005d501b719f25f06697c..3363c7b0e8e6a85a0fe926d0fe8c3079739fc46e 100644 (file)
@@ -35,6 +35,7 @@
 #include "inputrecord.h"
 #include "inputdevice.h"
 #include "audio.h"
+#include "md-fpp.h"
 #ifdef JIT
 #include "jit/compemu.h"
 #include <signal.h>
@@ -1542,9 +1543,33 @@ static uaecptr ShowEA (void *f, uaecptr pc, uae_u16 opcode, int reg, amodes mode
                        pc += 2;
                        break;
                case sz_long:
-                       _stprintf (buffer, _T("#$%08lx"), (unsigned long)(get_ilong_debug (pc)));
+                       _stprintf(buffer, _T("#$%08lx"), (unsigned long)(get_ilong_debug(pc)));
                        pc += 4;
                        break;
+               case sz_single:
+                       _stprintf(buffer, _T("#%e"), to_single(get_ilong_debug(pc)));
+                       pc += 4;
+                       break;
+               case sz_double:
+                       _stprintf(buffer, _T("#%e"), to_double(get_ilong_debug(pc), get_ilong_debug(pc + 4)));
+                       pc += 8;
+                       break;
+               case sz_extended:
+               {
+                       fpdata fp;
+                       to_exten(&fp, get_ilong_debug(pc), get_ilong_debug(pc + 4), get_ilong_debug(pc + 8));
+#if USE_LONG_DOUBLE
+                       _stprintf(buffer, _T("#%Le"), fp.fp);
+#else
+                       _stprintf(buffer, _T("#%e"), fp.fp);
+#endif
+                       pc += 12;
+                       break;
+               }
+               case sz_packed:
+                       _stprintf(buffer, _T("#$%08lx%08lx%08lx"), (unsigned long)(get_ilong_debug(pc)), (unsigned long)(get_ilong_debug(pc + 4)), (unsigned long)(get_ilong_debug(pc + 8)));
+                       pc += 12;
+                       break;
                default:
                        break;
                }
@@ -4339,8 +4364,112 @@ static void m68k_verify (uaecptr addr, uaecptr *nextpc)
 #endif
 
 static const TCHAR *ccnames[] =
-{ _T("T "),_T("F "),_T("HI"),_T("LS"),_T("CC"),_T("CS"),_T("NE"),_T("EQ"),
-_T("VC"),_T("VS"),_T("PL"),_T("MI"),_T("GE"),_T("LT"),_T("GT"),_T("LE") };
+{
+       _T("T "),_T("F "),_T("HI"),_T("LS"),_T("CC"),_T("CS"),_T("NE"),_T("EQ"),
+       _T("VC"),_T("VS"),_T("PL"),_T("MI"),_T("GE"),_T("LT"),_T("GT"),_T("LE")
+};
+static const TCHAR *fpccnames[] =
+{
+       _T("F"),
+       _T("EQ"),
+       _T("OGT"),
+       _T("OGE"),
+       _T("OLT"),
+       _T("OLE"),
+       _T("OGL"),
+       _T("OR"),
+       _T("UN"),
+       _T("UEQ"),
+       _T("UGT"),
+       _T("UGE"),
+       _T("ULT"),
+       _T("ULE"),
+       _T("NE"),
+       _T("T"),
+       _T("SF"),
+       _T("SEQ"),
+       _T("GT"),
+       _T("GE"),
+       _T("LT"),
+       _T("LE"),
+       _T("GL"),
+       _T("GLE"),
+       _T("NGLE"),
+       _T("NGL"),
+       _T("NLE"),
+       _T("NLT"),
+       _T("NGE"),
+       _T("NGT"),
+       _T("SNE"),
+       _T("ST")
+};
+static const TCHAR *fpuopcodes[] =
+{
+       _T("FMOVE"),
+       _T("FINT"),
+       _T("FSINH"),
+       _T("FINTRZ"),
+       _T("FSQRT"),
+       NULL,
+       _T("FLOGNP1"),
+       NULL,
+       _T("FETOXM1"),
+       _T("FTANH"),
+       _T("FATAN"),
+       NULL,
+       _T("FASIN"),
+       _T("FATANH"),
+       _T("FSIN"),
+       _T("FTAN"),
+       _T("FETOX"),    // 0x10
+       _T("FTWOTOX"),
+       _T("FTENTOX"),
+       NULL,
+       _T("FLOGN"),
+       _T("FLOG10"),
+       _T("FLOG2"),
+       NULL,
+       _T("FABS"),
+       _T("FCOSH"),
+       _T("FNEG"),
+       NULL,
+       _T("FACOS"),
+       _T("FCOS"),
+       _T("FGETEXP"),
+       _T("FGETMAN"),
+       _T("FDIV"),             // 0x20
+       _T("FMOD"),
+       _T("FADD"),
+       _T("FMUL"),
+       _T("FSGLDIV"),
+       _T("FREM"),
+       _T("FSCALE"),
+       _T("FSGLMUL"),
+       _T("FSUB"),
+       NULL,
+       NULL,
+       NULL,
+       NULL,
+       NULL,
+       NULL,
+       NULL,
+       _T("FSINCOS"),  // 0x30
+       _T("FSINCOS"),
+       _T("FSINCOS"),
+       _T("FSINCOS"),
+       _T("FSINCOS"),
+       _T("FSINCOS"),
+       _T("FSINCOS"),
+       _T("FSINCOS"),
+       _T("FCMP"),
+       NULL,
+       _T("FTST"),
+       NULL,
+       NULL,
+       NULL,
+       NULL,
+       NULL
+};
 
 static void addmovemreg (TCHAR *out, int *prevreg, int *lastreg, int *first, int reg)
 {
@@ -4390,6 +4519,27 @@ static void movemout (TCHAR *out, uae_u16 mask, int mode)
        addmovemreg (out, &prevreg, &lastreg, &first, -1);
 }
 
+static const TCHAR *fpsizes[] = {
+       _T("L"),
+       _T("S"),
+       _T("X"),
+       _T("P"),
+       _T("W"),
+       _T("D"),
+       _T("B"),
+       _T("?")
+};
+static const int fpsizeconv[] = {
+       sz_long,
+       sz_single,
+       sz_extended,
+       sz_packed,
+       sz_word,
+       sz_double,
+       sz_byte,
+       0
+};
+
 static void disasm_size (TCHAR *instrname, struct instr *dp)
 {
 #if 0
@@ -4437,6 +4587,7 @@ void m68k_disasm_2 (TCHAR *buf, int bufsize, uaecptr pc, uaecptr *nextpc, int cn
                TCHAR instrname[100], *ccpt;
                int i;
                uae_u32 opcode;
+               uae_u16 extra;
                struct mnemolookup *lookup;
                struct instr *dp;
                int oldpc;
@@ -4446,6 +4597,7 @@ void m68k_disasm_2 (TCHAR *buf, int bufsize, uaecptr pc, uaecptr *nextpc, int cn
                seaddr2 = deaddr2 = 0;
                oldpc = pc;
                opcode = get_word_debug (pc);
+               extra = get_word_debug (pc + 2);
                if (cpufunctbl[opcode] == op_illg_1 || cpufunctbl[opcode] == op_unimpl_1) {
                        m68kpc_illg = pc + 2;
                        illegal = TRUE;
@@ -4470,12 +4622,15 @@ void m68k_disasm_2 (TCHAR *buf, int bufsize, uaecptr pc, uaecptr *nextpc, int cn
                        _tcscpy (instrname, lookup->name);
                ccpt = _tcsstr (instrname, _T("cc"));
                if (ccpt != 0) {
-                       _tcsncpy (ccpt, ccnames[dp->cc], 2);
+                       if ((opcode & 0xf000) == 0xf000)
+                               _tcscpy (ccpt, fpccnames[extra & 0x1f]);
+                       else
+                               _tcsncpy (ccpt, ccnames[dp->cc], 2);
                }
                disasm_size (instrname, dp);
 
                if (lookup->mnemo == i_MOVEC2 || lookup->mnemo == i_MOVE2C) {
-                       uae_u16 imm = get_word_debug (pc);
+                       uae_u16 imm = extra;
                        uae_u16 creg = imm & 0x0fff;
                        uae_u16 r = imm >> 12;
                        TCHAR regs[16], *cname = _T("?");
@@ -4498,18 +4653,61 @@ void m68k_disasm_2 (TCHAR *buf, int bufsize, uaecptr pc, uaecptr *nextpc, int cn
                        }
                        pc += 2;
                } else if (lookup->mnemo == i_MVMEL) {
-                       uae_u16 mask = get_word_debug (pc);
+                       uae_u16 mask = extra;
                        pc += 2;
                        pc = ShowEA (0, pc, opcode, dp->dreg, dp->dmode, dp->size, instrname, deaddr, safemode);
                        _tcscat (instrname, _T(","));
                        movemout (instrname, mask, dp->dmode);
                } else if (lookup->mnemo == i_MVMLE) {
-                       uae_u16 mask = get_word_debug (pc);
+                       uae_u16 mask = extra;
                        pc += 2;
-                       movemout (instrname, mask, dp->dmode);
-                       _tcscat (instrname, _T(","));
-                       pc = ShowEA (0, pc, opcode, dp->dreg, dp->dmode, dp->size, instrname, deaddr, safemode);
-               } else {
+                       movemout(instrname, mask, dp->dmode);
+                       _tcscat(instrname, _T(","));
+                       pc = ShowEA(0, pc, opcode, dp->dreg, dp->dmode, dp->size, instrname, deaddr, safemode);
+               } else if (lookup->mnemo == i_DIVL || lookup->mnemo == i_MULL) {
+                       TCHAR *p;
+                       pc = ShowEA(0, pc, opcode, dp->dreg, dp->dmode, dp->size, instrname, &deaddr2, safemode);
+                       extra = get_word_debug(pc);
+                       pc += 2;
+                       p = instrname + _tcslen(instrname);
+                       if (extra & 0x0400)
+                               _stprintf(p, _T(",D%d:D%d"), extra & 7, (extra >> 12) & 7);
+                       else
+                               _stprintf(p, _T(",D%d"), (extra >> 12) & 7);
+               } else if (lookup->mnemo == i_FPP) {
+                       TCHAR *p;
+                       int ins = extra & 0x3f;
+                       int size = (extra >> 10) & 7;
+
+                       pc += 2;
+                       if (fpuopcodes[ins])
+                               _tcscpy(instrname, fpuopcodes[ins]);
+                       else
+                               _tcscpy(instrname, _T("F?"));
+
+                       if ((extra & 0xe000) == 0x6000) { // FMOVE to memory
+                               _tcscat(instrname, _T("."));
+                               _tcscat(instrname, fpsizes[size]);
+                               _tcscat(instrname, _T(" "));
+                               p = instrname + _tcslen(instrname);
+                               _stprintf(p, _T("FP%d,"), (extra >> 10) & 7);
+                               pc = ShowEA(0, pc, opcode, dp->dreg, dp->dmode, fpsizeconv[size], instrname, &deaddr2, safemode);
+                       } else if (extra & 0x4000) {
+                               _tcscat(instrname, _T("."));
+                               _tcscat(instrname, fpsizes[size]);
+                               _tcscat(instrname, _T(" "));
+                               pc = ShowEA(0, pc, opcode, dp->dreg, dp->dmode, fpsizeconv[size], instrname, &seaddr2, safemode);
+                               p = instrname + _tcslen(instrname);
+                               _stprintf(p, _T(",FP%d"), (extra >> 7) & 7);
+                       } else if (ins == 0 || (extra & 0x20)) {
+                               p = instrname + _tcslen(instrname);
+                               _stprintf(p, _T(".X FP%d,FP%d"), (extra >> 10) & 7, (extra >> 7) & 7);
+                       } else {
+                               p = instrname + _tcslen(instrname);
+                               _stprintf(p, _T(".X FP%d"), (extra >> 10) & 7);
+                       }
+               }
+               else {
                        if (dp->suse) {
                                pc = ShowEA (0, pc, opcode, dp->sreg, dp->smode, dp->size, instrname, &seaddr2, safemode);
                        }
index 4ce47346e798ac4eb822f5b3a0148bf565e8abb3..32309c3330174de6176ff46a10c84eaad855e529 100644 (file)
@@ -384,7 +384,7 @@ static int AVIOutput_GetAudioFromRegistry (WAVEFORMATEX *wft)
                                ok = 1;
                }
        }
-       if (ok < 0)
+       if (ok < 0 || !wft)
                regdelete (avikey, _T("AudioConfigurationVars"));
        regclosetree (avikey);
        return ok;
@@ -404,7 +404,7 @@ int AVIOutput_GetAudioCodec (TCHAR *name, int len)
                return AVIOutput_GetAudioCodecName (pwfxDst, name, len);
        if (!AVIOutput_AllocateAudio ())
                return 0;
-       if (AVIOutput_GetAudioFromRegistry (pwfxDst)) {
+       if (AVIOutput_GetAudioFromRegistry (pwfxDst) > 0) {
                AVIOutput_GetAudioCodecName (pwfxDst, name, len);
                return 1;
        }
@@ -576,7 +576,7 @@ static int AVIOutput_GetCOMPVARSFromRegistry (COMPVARS *pcv)
                        }
                }
        }
-       if (ok < 0) {
+       if (ok < 0 || !pcv) {
                regdelete (avikey, _T("VideoConfigurationVars"));
                regdelete (avikey, _T("VideoConfigurationState"));
        }
@@ -609,7 +609,7 @@ int AVIOutput_GetVideoCodec (TCHAR *name, int len)
        if (!AVIOutput_AllocateVideo ())
                return 0;
        AVIOutput_FreeCOMPVARS (pcompvars);
-       if (AVIOutput_GetCOMPVARSFromRegistry (pcompvars)) {
+       if (AVIOutput_GetCOMPVARSFromRegistry (pcompvars) > 0) {
                AVIOutput_GetVideoCodecName (pcompvars, name, len);
                return 1;
        }
index 498e5c3f98398d703807ab015e33ed7ee4507454..b75cad213cd68ab3cab077ab6305aea7e9784e4f 100644 (file)
@@ -33,5 +33,6 @@ ExtSub SDWORD __cdecl CAPSGetInfo(PVOID pinfo, SDWORD id, UDWORD cylinder, UDWOR
 ExtSub SDWORD __cdecl CAPSSetRevolution(SDWORD id, UDWORD value);
 ExtSub SDWORD __cdecl CAPSGetImageType(PCHAR name);
 ExtSub SDWORD __cdecl CAPSGetImageTypeMemory(PUBYTE buffer, UDWORD length);
+ExtSub SDWORD __cdecl CAPSGetDebugRequest();
 
 #endif
index a582d5098b89334540df1c30024fcc94b7954398..fb13fb2d44426fef61dc39b52ebcde524665a412 100644 (file)
@@ -255,7 +255,9 @@ int caps_loadrevolution (uae_u16 *mfmbuf, uae_u16 *tracktiming, int drv, int tra
 
        if (!track_access_done && caps_revolution_hack[drv]) {
 #if LOG_REVOLUTION
-               write_log(_T("%03d skipped revolution increase\n"), track);
+               CapsRevolutionInfo  pinfo;
+               pCAPSGetInfo(&pinfo, caps_cont[drv], track / 2, track & 1, cgiitRevolution, 0);
+               write_log(_T("%03d skipped revolution increase. Next = %d\n"), track, pinfo.next);
 #endif
                return 1;
        }
index 0e03caf91acc82b51a5dfcf250a70c402b290982..f513b2a0e86b30de617464a513c0a09ccfd82266 100644 (file)
@@ -611,6 +611,16 @@ static int keyhack (int scancode, int pressed, int num)
        return scancode;
 }
 
+static HMODULE wintab;
+typedef UINT(API* WTINFOW)(UINT, UINT, LPVOID);
+static WTINFOW pWTInfoW;
+typedef BOOL(API* WTCLOSE)(HCTX);
+static WTCLOSE pWTClose;
+typedef HCTX(API* WTOPENW)(HWND, LPLOGCONTEXTW, BOOL);
+static WTOPENW pWTOpenW;
+typedef BOOL(API* WTPACKET)(HCTX, UINT, LPVOID);
+WTPACKET pWTPacket;
+
 static int tablet;
 static int axmax, aymax, azmax;
 static int xmax, ymax, zmax;
@@ -700,7 +710,6 @@ static int gettabletres (AXIS *a)
 
 void *open_tablet (HWND hwnd)
 {
-#ifndef _WIN64
        static int initialized;
        LOGCONTEXT lc;
        AXIS tx = { 0 }, ty = { 0 }, tz = { 0 };
@@ -712,16 +721,16 @@ void *open_tablet (HWND hwnd)
        xmax = -1;
        ymax = -1;
        zmax = -1;
-       WTInfo (WTI_DEFCONTEXT, 0, &lc);
-       WTInfo (WTI_DEVICES, DVC_X, &tx);
-       WTInfo (WTI_DEVICES, DVC_Y, &ty);
-       WTInfo (WTI_DEVICES, DVC_NPRESSURE, &pres);
-       WTInfo (WTI_DEVICES, DVC_XMARGIN, &xm);
-       WTInfo (WTI_DEVICES, DVC_YMARGIN, &ym);
-       WTInfo (WTI_DEVICES, DVC_ZMARGIN, &zm);
+       pWTInfoW (WTI_DEFCONTEXT, 0, &lc);
+       pWTInfoW (WTI_DEVICES, DVC_X, &tx);
+       pWTInfoW (WTI_DEVICES, DVC_Y, &ty);
+       pWTInfoW (WTI_DEVICES, DVC_NPRESSURE, &pres);
+       pWTInfoW (WTI_DEVICES, DVC_XMARGIN, &xm);
+       pWTInfoW (WTI_DEVICES, DVC_YMARGIN, &ym);
+       pWTInfoW (WTI_DEVICES, DVC_ZMARGIN, &zm);
        xmax = tx.axMax;
        ymax = ty.axMax;
-       if (WTInfo (WTI_DEVICES, DVC_Z, &tz))
+       if (pWTInfoW (WTI_DEVICES, DVC_Z, &tz))
                zmax = tz.axMax;
        lc.lcOptions |= CXO_MESSAGES;
        lc.lcPktData = PACKETDATA;
@@ -759,24 +768,26 @@ void *open_tablet (HWND hwnd)
        inputdevice_tablet_info (xmax, ymax, zmax, axmax, aymax, azmax, xres, yres);
        tabletlib_tablet_info (xmax, ymax, zmax, axmax, aymax, azmax, xres, yres);
        initialized = 1;
-       return WTOpen (hwnd, &lc, TRUE);
-#else
-       return 0;
-#endif
+       return pWTOpenW (hwnd, &lc, TRUE);
 }
 
 int close_tablet (void *ctx)
 {
-#ifndef _WIN64
+       if (!wintab)
+               return 0;
        if (ctx != NULL)
-               WTClose ((HCTX)ctx);
+               pWTClose ((HCTX)ctx);
        ctx = NULL;
+       if (wintab)
+               FreeModule(wintab);
+       wintab = NULL;
+       pWTOpenW = NULL;
+       pWTClose = NULL;
+       pWTInfoW = NULL;
+       pWTPacket = NULL;
        if (!tablet)
                return 0;
        return 1;
-#else
-       return 0;
-#endif
 }
 
 int is_tablet (void)
@@ -786,26 +797,38 @@ int is_tablet (void)
 
 static int initialize_tablet (void)
 {
-#ifndef _WIN64
-       HMODULE h;
        TCHAR name[MAX_DPATH];
        struct tagAXIS ori[3];
        int tilt = 0;
 
-       h = LoadLibrary (_T("wintab32.dll"));
-       if (h == NULL) {
-               write_log (_T("Tablet: no wintab32.dll\n"));
+       wintab = WIN32_LoadLibrary(_T("wintab32.dll"));
+       if (wintab == NULL) {
+               write_log(_T("Tablet: no wintab32.dll\n"));
                return 0;
        }
-       FreeLibrary (h);
-       if (!WTInfo (0, 0, NULL)) {
-               write_log (_T("Tablet: WTInfo() returned failure\n"));
+
+       pWTOpenW = (WTOPENW)GetProcAddress(wintab, "WTOpenW");
+       pWTClose = (WTCLOSE)GetProcAddress(wintab, "WTClose");
+       pWTInfoW = (WTINFOW)GetProcAddress(wintab, "WTInfoW");
+       pWTPacket = (WTPACKET)GetProcAddress(wintab, "WTPacket");
+
+       if (!pWTOpenW || !pWTClose || !pWTInfoW || !pWTPacket) {
+               write_log(_T("Tablet: wintab32.dll has missing functions!\n"));
+               FreeModule(wintab);
+               wintab = NULL;
+               return 0;
+       }
+
+       if (!pWTInfoW(0, 0, NULL)) {
+               write_log(_T("Tablet: WTInfo() returned failure\n"));
+               FreeModule(wintab);
+               wintab = NULL;
                return 0;
        }
        name[0] = 0;
-       WTInfo (WTI_DEVICES, DVC_NAME, name);
+       pWTInfoW (WTI_DEVICES, DVC_NAME, name);
        axmax = aymax = azmax = -1;
-       tilt = WTInfo (WTI_DEVICES, DVC_ORIENTATION, &ori);
+       tilt = pWTInfoW (WTI_DEVICES, DVC_ORIENTATION, ori);
        if (tilt) {
                if (ori[0].axMax > 0)
                        axmax = ori[0].axMax;
@@ -818,9 +841,6 @@ static int initialize_tablet (void)
        tabletname = my_strdup (name);
        tablet = TRUE;
        return 1;
-#else
-       return 0;
-#endif
 }
 
 #if 0
index a6969ed9fdd0414eb2340437cf25898f7eec7949..31d97685a703d24ad4f5e08deeb005a2f4c2e6e7 100644 (file)
@@ -81,6 +81,7 @@ struct shaderdata
        D3DXHANDLE m_MatWorldViewProjEffectHandle;
        // Texture Handles
        D3DXHANDLE m_SourceDimsEffectHandle;
+       D3DXHANDLE m_InputDimsEffectHandle;
        D3DXHANDLE m_TexelSizeEffectHandle;
        D3DXHANDLE m_SourceTextureEffectHandle;
        D3DXHANDLE m_WorkingTexture1EffectHandle;
@@ -382,9 +383,11 @@ static int psEffect_ParseParameters (LPD3DXEFFECTCOMPILER EffectCompiler, LPD3DX
                                else if(strcmpi(ParamDesc.Semantic, "worldviewprojection") == 0)
                                        s->m_MatWorldViewProjEffectHandle = hParam;
                        } else if(ParamDesc.Class == D3DXPC_VECTOR && ParamDesc.Type == D3DXPT_FLOAT) {
-                               if(strcmpi(ParamDesc.Semantic, "sourcedims") == 0)
+                               if (strcmpi(ParamDesc.Semantic, "sourcedims") == 0)
                                        s->m_SourceDimsEffectHandle = hParam;
-                               else if(strcmpi(ParamDesc.Semantic, "texelsize") == 0)
+                               if (strcmpi(ParamDesc.Semantic, "inputdims") == 0)
+                                       s->m_InputDimsEffectHandle = hParam;
+                               else if (strcmpi(ParamDesc.Semantic, "texelsize") == 0)
                                        s->m_TexelSizeEffectHandle = hParam;
                        } else if(ParamDesc.Class == D3DXPC_SCALAR && ParamDesc.Type == D3DXPT_FLOAT) {
                                if(strcmpi(ParamDesc.Semantic, "SCALING") == 0)
@@ -1024,9 +1027,16 @@ static int psEffect_SetTextures (LPDIRECT3DTEXTURE9 lpSource, struct shaderdata
        fTexelSize.y = 1.0f / fDims.y;
 
        if (s->m_SourceDimsEffectHandle) {
-               hr = s->pEffect->SetVector (s->m_SourceDimsEffectHandle, &fDims);
-               if (FAILED (hr)) {
-                       write_log (_T("%s: SetTextures:SetVector:Source %s\n"), D3DHEAD, D3D_ErrorString (hr));
+               hr = s->pEffect->SetVector(s->m_SourceDimsEffectHandle, &fDims);
+               if (FAILED(hr)) {
+                       write_log(_T("%s: SetTextures:SetVector:Source %s\n"), D3DHEAD, D3D_ErrorString(hr));
+                       return 0;
+               }
+       }
+       if (s->m_InputDimsEffectHandle) {
+               hr = s->pEffect->SetVector(s->m_InputDimsEffectHandle, &fDims);
+               if (FAILED(hr)) {
+                       write_log(_T("%s: SetTextures:SetVector:Source %s\n"), D3DHEAD, D3D_ErrorString(hr));
                        return 0;
                }
        }
index 38cd3d55c58cd5b5b83e20cdfe4899235b0d0fe0..d228a086a803270e149d174e11db081d9c4697cd 100644 (file)
@@ -1560,7 +1560,6 @@ static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
                        }
                }
 
-#ifndef _WIN64
        case WT_PROXIMITY:
                {
                        send_tablet_proximity (LOWORD (lParam) ? 1 : 0);
@@ -1568,13 +1567,15 @@ static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
                }
        case WT_PACKET:
                {
+                       typedef BOOL(API* WTPACKET)(HCTX, UINT, LPVOID);
+                       extern WTPACKET pWTPacket;
                        PACKET pkt;
                        if (inputdevice_is_tablet () <= 0 && !currprefs.tablet_library) {
                                close_tablet (tablet);
                                tablet = NULL;
                                return 0;
                        }
-                       if (WTPacket ((HCTX)lParam, wParam, &pkt)) {
+                       if (pWTPacket ((HCTX)lParam, wParam, &pkt)) {
                                int x, y, z, pres, proxi;
                                DWORD buttons;
                                ORIENTATION ori;
@@ -1593,7 +1594,7 @@ static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
                        }
                        return 0;
                }
-#endif
+
        default:
                break;
        }
index 2c05d6f08919b83bb61dfa804a8b66952be6a28b..26c87ae53329ea598b7a7e6150b9519e87ffb0ce 100644 (file)
 #define LANG_DLL 1
 
 #if WINUAEPUBLICBETA
-#define WINUAEBETA _T("12")
+#define WINUAEBETA _T("13")
 #else
 #define WINUAEBETA _T("")
 #endif
-#define WINUAEDATE MAKEBD(2014, 3, 22)
+#define WINUAEDATE MAKEBD(2014, 3, 26)
 #define WINUAEEXTRA _T("")
 //#define WINUAEEXTRA _T("AmiKit Preview")
 //#define WINUAEEXTRA _T("Amiga Forever Edition")
index f54073d0668368fea9d42ba3737690cb08f65226..060b677d9db82cd9b5c3be08e296c4a1be0089e9 100644 (file)
@@ -880,6 +880,9 @@ void S2X_render (void)
 
        if (usedfilter->type == UAE_FILTER_SCALE2X) { /* 16+32/2X */
 
+               if (dptr + pitch * ah * 2 >= enddptr)
+                       ah = (enddptr - dptr) / (pitch * 2);
+
                if (amiga_depth == 16 && dst_depth == 16) {
                        AdMame2x (sptr, vb->rowbytes, dptr, pitch, aw, ah);
                        ok = 1;
@@ -933,6 +936,9 @@ void S2X_render (void)
 
        } else if (usedfilter->type == UAE_FILTER_SUPEREAGLE) { /* 16/32/2X */
 
+               if (dptr + pitch * ah * 2 >= enddptr)
+                       ah = (enddptr - dptr) / (pitch * 2);
+
                if (scale == 2 && amiga_depth == 16) {
                        if (dst_depth == 16) {
                                SuperEagle_16 (sptr, vb->rowbytes, dptr, pitch, aw, ah);
@@ -945,6 +951,9 @@ void S2X_render (void)
 
        } else if (usedfilter->type == UAE_FILTER_SUPER2XSAI) { /* 16/32/2X */
 
+               if (dptr + pitch * ah * 2 >= enddptr)
+                       ah = (enddptr - dptr) / (pitch * 2);
+
                if (scale == 2 && amiga_depth == 16) {
                        if (dst_depth == 16) {
                                Super2xSaI_16 (sptr, vb->rowbytes, dptr, pitch, aw, ah);
@@ -957,6 +966,9 @@ void S2X_render (void)
 
        } else if (usedfilter->type == UAE_FILTER_2XSAI) { /* 16/32/2X */
 
+               if (dptr + pitch * ah * 2 >= enddptr)
+                       ah = (enddptr - dptr) / (pitch * 2);
+
                if (scale == 2 && amiga_depth == 16) {
                        if (dst_depth == 16) {
                                _2xSaI_16 (sptr, vb->rowbytes, dptr, pitch, aw, ah);
index dbdd1d3f9e48c06152b64c4a6e8f78cd61674ecc..87d927cd689294ee37864971993f6f34d55cb072 100644 (file)
@@ -443,7 +443,8 @@ static void *slirp_receive_func(void *arg)
        while (slirp_thread_active) {
                // Wait for packets to arrive
                fd_set rfds, wfds, xfds;
-               int nfds, ret, timeout;
+               SOCKET nfds;
+               int ret, timeout;
 
                // ... in the output queue
                nfds = -1;
index 10a16b982261787adb6e944eb547d50ebfa4ca9b..fac1b7e0e9e49f9a8c8902733ed07636871db8c0 100644 (file)
@@ -15650,7 +15650,7 @@ static HWND updatePanel (int id)
        gui_height = r2c.bottom;
 
        fullpanel = ppage[id].fullpanel;
-       tres = scaleresource (ppage[id].nres, hDlg, -1);
+       tres = scaleresource (ppage[id].nres, hDlg, -1, 0);
        panelDlg = CreateDialogIndirectParam (tres->inst, tres->resource, hDlg, ppage[id].dlgproc, id);
        freescaleresource(tres);
        scaleresource_setfont (panelDlg);
@@ -16394,7 +16394,7 @@ INT_PTR CustomDialogBox (int templ, HWND hDlg, DLGPROC proc)
        res = getresource (templ);
        if (!res)
                return h;
-       r = scaleresource (res, hDlg, -1);
+       r = scaleresource (res, hDlg, -1, 0);
        if (r) {
                h = DialogBoxIndirect (r->inst, r->resource, hDlg, proc);
                freescaleresource (r);
@@ -16413,7 +16413,7 @@ HWND CustomCreateDialog (int templ, HWND hDlg, DLGPROC proc)
        res = getresource (templ);
        if (!res)
                return h;
-       r = scaleresource (res, hDlg, -1);
+       r = scaleresource (res, hDlg, -1, 0);
        if (r) {
                h = CreateDialogIndirect (r->inst, r->resource, hDlg, proc);
                freescaleresource (r);
@@ -16661,7 +16661,7 @@ static int GetSettings (int all_options, HWND hwnd)
                        }
                }
 
-               tres = scaleresource (panelresource, hwnd, gui_resize_enabled);
+               tres = scaleresource (panelresource, hwnd, gui_resize_enabled, workprefs.win32_alwaysontop ? WS_EX_TOPMOST : 0);
                dhwnd = CreateDialogIndirect (tres->inst, tres->resource, isfullscreen () > 0 ? hwnd : NULL, DialogProc);
                dialog_rect.top = dialog_rect.left = 0;
                dialog_rect.right = tres->width;
index 6fab491e23993e2a5a69608657cd099f2ae97cde..4a1543a664f1671b0521a51923d9a89341a8e74a 100644 (file)
@@ -31,7 +31,7 @@ struct newresource
 #define GUI_INTERNAL_HEIGHT 600
 #define GUI_INTERNAL_FONT 8
 
-extern struct newresource *scaleresource (struct newresource *res, HWND, int);
+extern struct newresource *scaleresource (struct newresource *res, HWND, int, DWORD);
 extern void freescaleresource (struct newresource*);
 extern void scaleresource_setmult (HWND hDlg, int w, int h);
 extern void scaleresource_getmult (int *mx, int *my);
index 8b810b52f46e148146c89c875e4da7319a38299e..c3104229d504ec60efce174ed3f4252dc71c8ed4 100644 (file)
@@ -210,7 +210,7 @@ static INT_PTR CALLBACK DummyProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP
 
 extern int full_property_sheet;
 
-struct newresource *scaleresource (struct newresource *res, HWND parent, int resize)
+struct newresource *scaleresource (struct newresource *res, HWND parent, int resize, DWORD exstyle)
 {
        DLGTEMPLATEEX *d, *s;
        DLGTEMPLATEEX_END *d2, *s2;
@@ -248,6 +248,7 @@ struct newresource *scaleresource (struct newresource *res, HWND parent, int res
        }
        if (full_property_sheet)
                d->style |= WS_MINIMIZEBOX;
+       d->exStyle |= exstyle;
 
        d2 = (DLGTEMPLATEEX_END*)ns->resource;
        p = (BYTE*)d + sizeof (DLGTEMPLATEEX);
@@ -450,7 +451,7 @@ static void getbaseunits (void)
                abort();
        }
        multx = multy = 100;
-       nr2 = scaleresource (nr, NULL, -1);
+       nr2 = scaleresource (nr, NULL, -1, 0);
        hwnd = CreateDialogIndirect (nr2->inst, nr2->resource, NULL, TestProc);
        if (hwnd) {
                DestroyWindow (hwnd);
index f79baaaba22459ef734b68c39c7926e7e4044890..be8b1526acf54939d5c794c4ef8059a02f5edf14 100644 (file)
@@ -82,7 +82,7 @@
     <ConfigurationType>Application</ConfigurationType>
     <UseOfMfc>false</UseOfMfc>
     <CharacterSet>Unicode</CharacterSet>
-    <PlatformToolset>v110</PlatformToolset>
+    <PlatformToolset>v120</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     </ResourceCompile>
     <Link>
       <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
-      <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9d.lib;winio.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;libpng15.lib;lglcd.lib;wpcap.lib;packet.lib;openal32.lib;wintab32.lib;portaudio_x86.lib;vfw32.lib;wtsapi32.lib;enet.lib;prowizard.lib;lzmalib.lib;libFLAC_static.lib;Avrt.lib;hid.lib;Iphlpapi.lib;luastatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9d.lib;winio.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;libpng15.lib;lglcd.lib;wpcap.lib;packet.lib;openal32.lib;portaudio_x86.lib;vfw32.lib;wtsapi32.lib;enet.lib;prowizard.lib;lzmalib.lib;libFLAC_static.lib;Avrt.lib;hid.lib;Iphlpapi.lib;luastatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <ShowProgress>NotSet</ShowProgress>
       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <IgnoreSpecificDefaultLibraries>LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
-      <DelayLoadDLLs>wpcap.dll;packet.dll;d3dx9_43.dll;openal32.dll;wintab32.dll;portaudio_x86.dll;ws2_32.dll;msacm32.dll;wtsapi32.dll;dsound.dll;wininet.dll;avrt.dll;ddraw.dll;Iphlpapi.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+      <DelayLoadDLLs>wpcap.dll;packet.dll;d3dx9_43.dll;openal32.dll;portaudio_x86.dll;ws2_32.dll;msacm32.dll;wtsapi32.dll;dsound.dll;wininet.dll;avrt.dll;ddraw.dll;Iphlpapi.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <ProgramDatabaseFile>.\Debug/winuae.pdb</ProgramDatabaseFile>
       <SubSystem>Windows</SubSystem>
       <Culture>0x0409</Culture>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;winio.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;libpng15.lib;lglcd.lib;wpcap.lib;packet.lib;openal32.lib;wintab32.lib;portaudio_x86.lib;vfw32.lib;wtsapi32.lib;enet.lib;lzmalib.lib;prowizard.lib;libFLAC_static.lib;Avrt.lib;hid.lib;zlibstat.lib;Iphlpapi.lib;luastatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;winio.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;libpng15.lib;lglcd.lib;wpcap.lib;packet.lib;openal32.lib;portaudio_x86.lib;vfw32.lib;wtsapi32.lib;enet.lib;lzmalib.lib;prowizard.lib;libFLAC_static.lib;Avrt.lib;hid.lib;zlibstat.lib;Iphlpapi.lib;luastatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(SolutionDir)\..\lib\</AdditionalLibraryDirectories>
       <AdditionalManifestDependencies>%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
       <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
-      <DelayLoadDLLs>wpcap.dll;packet.dll;d3dx9_43.dll;openal32.dll;wintab32.dll;portaudio_x86.dll;ws2_32.dll;msacm32.dll;wtsapi32.dll;dsound.dll;wininet.dll;avrt.dll;ddraw.dll;Iphlpapi.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+      <DelayLoadDLLs>wpcap.dll;packet.dll;d3dx9_43.dll;openal32.dll;portaudio_x86.dll;ws2_32.dll;msacm32.dll;wtsapi32.dll;dsound.dll;wininet.dll;avrt.dll;ddraw.dll;Iphlpapi.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <ProgramDatabaseFile>.\Release/winuae.pdb</ProgramDatabaseFile>
       <SubSystem>Windows</SubSystem>
       <Culture>0x0409</Culture>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;winio.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;libpng15.lib;lglcd.lib;wpcap.lib;packet.lib;openal32.lib;wintab32.lib;portaudio_x86.lib;vfw32.lib;wtsapi32.lib;enet.lib;lzmalib.lib;prowizard.lib;libFLAC_static.lib;Avrt.lib;hid.lib;zlibstat.lib;Iphlpapi.lib;luastatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;winio.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;libpng15.lib;lglcd.lib;wpcap.lib;packet.lib;openal32.lib;portaudio_x86.lib;vfw32.lib;wtsapi32.lib;enet.lib;lzmalib.lib;prowizard.lib;libFLAC_static.lib;Avrt.lib;hid.lib;zlibstat.lib;Iphlpapi.lib;luastatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(SolutionDir)\..\lib\</AdditionalLibraryDirectories>
       <AdditionalManifestDependencies>%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
       <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
-      <DelayLoadDLLs>wpcap.dll;packet.dll;d3dx9_43.dll;openal32.dll;wintab32.dll;portaudio_x86.dll;ws2_32.dll;msacm32.dll;wtsapi32.dll;dsound.dll;wininet.dll;avrt.dll;ddraw.dll;Iphlpapi.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+      <DelayLoadDLLs>wpcap.dll;packet.dll;d3dx9_43.dll;openal32.dll;portaudio_x86.dll;ws2_32.dll;msacm32.dll;wtsapi32.dll;dsound.dll;wininet.dll;avrt.dll;ddraw.dll;Iphlpapi.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <ProgramDatabaseFile>.\Test/winuae.pdb</ProgramDatabaseFile>
       <SubSystem>Windows</SubSystem>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <OmitFramePointers>true</OmitFramePointers>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>..\..\include;..\..;..\;..\resources;..\osdep;..\sounddep;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\..\include;..\..;..\;..\resources;..\osdep;..\sounddep;..\..\slirp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WINVER=0x0500;NDEBUG;_WIN32_IE=0x0700;WIN32;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <ExceptionHandling>Sync</ExceptionHandling>
       <Culture>0x0409</Culture>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>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;dxerr.lib;shlwapi.lib;zlibstat.lib;portaudio_x64.lib;packet.lib;wpcap.lib;openal32.lib;libpng15.lib;lglcd.lib;wtsapi32.lib;wntab32x.lib;enet_x64.lib;prowizard_x64.lib;lzmalib.lib;libFLAC_static.lib;avrt.lib;hid.lib;Iphlpapi.lib;luastatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>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;dxerr.lib;shlwapi.lib;zlibstat.lib;portaudio_x64.lib;packet.lib;wpcap.lib;openal32.lib;libpng15.lib;lglcd.lib;wtsapi32.lib;enet_x64.lib;prowizard_x64.lib;lzmalib.lib;libFLAC_static.lib;avrt.lib;hid.lib;Iphlpapi.lib;luastatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <ShowProgress>NotSet</ShowProgress>
       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(SolutionDir)\..\lib\</AdditionalLibraryDirectories>
       <IgnoreSpecificDefaultLibraries>LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
-      <DelayLoadDLLs>wpcap.dll;packet.dll;d3dx9_43.dll;openal32.dll;wintab32.dll;portaudio_x64.dll;ws2_32.dll;msacm32.dll;wtsapi32.dll;dsound.dll;avrt.dll;Dwmapi.lib;%(DelayLoadDLLs)</DelayLoadDLLs>
+      <DelayLoadDLLs>wpcap.dll;packet.dll;d3dx9_43.dll;openal32.dll;portaudio_x64.dll;ws2_32.dll;msacm32.dll;wtsapi32.dll;dsound.dll;avrt.dll;Dwmapi.lib;%(DelayLoadDLLs)</DelayLoadDLLs>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <ProgramDatabaseFile>$(Platform)\$(Configuration)\winuae.pdb</ProgramDatabaseFile>
       <SubSystem>Windows</SubSystem>
       <Culture>0x0409</Culture>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;winio.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;libpng15.lib;lglcd.lib;wpcap.lib;packet.lib;openal32.lib;wintab32.lib;portaudio_x86.lib;vfw32.lib;wtsapi32.lib;avrt.lib;enet.lib;prowizard.lib;lzmalib.lib;libFLAC_static.lib;Avrt.lib;hid.lib;Iphlpapi.lib;luastatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;winio.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;libpng15.lib;lglcd.lib;wpcap.lib;packet.lib;openal32.lib;portaudio_x86.lib;vfw32.lib;wtsapi32.lib;avrt.lib;enet.lib;prowizard.lib;lzmalib.lib;libFLAC_static.lib;Avrt.lib;hid.lib;Iphlpapi.lib;luastatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(SolutionDir)\..\lib\</AdditionalLibraryDirectories>
       <AdditionalManifestDependencies>%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
       <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
-      <DelayLoadDLLs>wpcap.dll;packet.dll;d3dx9_43.dll;openal32.dll;wintab32.dll;portaudio_x86.dll;ws2_32.dll;msacm32.dll;wtsapi32.dll;dsound.dll;wininet.dll;avrt.dll;ddraw.dll;Iphlpapi.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+      <DelayLoadDLLs>wpcap.dll;packet.dll;d3dx9_43.dll;openal32.dll;portaudio_x86.dll;ws2_32.dll;msacm32.dll;wtsapi32.dll;dsound.dll;wininet.dll;avrt.dll;ddraw.dll;Iphlpapi.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <ProgramDatabaseFile>.\FullRelease/winuae.pdb</ProgramDatabaseFile>
       <SubSystem>Windows</SubSystem>
index 669efbfc83ee79aeb9bf2513b42d49cc324042d5..62047ec671454545d1e64cbc2dcc0b2c75e9f9c9 100644 (file)
@@ -16,7 +16,7 @@ extern "C" {
 int slirp_init(void);
 void slirp_cleanup(void);
 
-int slirp_select_fill(int *pnfds, 
+int slirp_select_fill(SOCKET *pnfds, 
                                          fd_set *readfds, fd_set *writefds, fd_set *xfds);
 
 void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds);
index c110752232d772c3412202b546bd7d4d66f422b6..13e0bc834f47eedc19d3293d458efad2d2e15c36 100644 (file)
@@ -802,7 +802,7 @@ u_sleep(int usec)
  */
 
 void
-fd_nonblock(int fd)
+fd_nonblock(SOCKET fd)
 {
 #if defined USE_FIONBIO && defined FIONBIO
        ioctlsockopt_t opt = 1;
@@ -818,7 +818,7 @@ fd_nonblock(int fd)
 }
 
 void
-fd_block(int fd)
+fd_block(SOCKET fd)
 {
 #if defined USE_FIONBIO && defined FIONBIO
        ioctlsockopt_t opt = 0;
index efea9ff8ba55a828041fed15adcdcd946a6f592d..0d85940df8a5cda42f93ac0fa67ca6ed7ace1665 100644 (file)
@@ -80,8 +80,8 @@ void snooze _P((void));
 void relay _P((int));
 void add_emu _P((char *));
 void u_sleep _P((int));
-void fd_nonblock _P((int));
-void fd_block _P((int));
+void fd_nonblock _P((SOCKET));
+void fd_block _P((SOCKET));
 int rsh_exec _P((struct socket *, struct socket *, char *, char *, char *));
 
 #endif
index aa60899dd4c6b68f5428e80c4c826d763d93659e..09481c636a2ee96bea62b1286fe2122cf56cc257 100644 (file)
@@ -191,11 +191,11 @@ static void updtime(void)
 }
 #endif
 
-int slirp_select_fill(int *pnfds, 
+int slirp_select_fill(SOCKET *pnfds, 
                                          fd_set *readfds, fd_set *writefds, fd_set *xfds)
 {
     struct socket *so, *so_next;
-    int nfds;
+    SOCKET nfds;
     int timeout, tmp_time;
 
     /* fail safe */
index 43bdcdc1a1c92203e855a674122945df3033a7bd..7736339093d6dac9bca637e7d553cf674cb7c698 100644 (file)
@@ -352,7 +352,7 @@ struct tcpcb * tcp_newtcpcb _P((struct socket *));
 struct tcpcb * tcp_close _P((register struct tcpcb *));
 void tcp_drain _P((void));
 void tcp_sockclosed _P((struct tcpcb *));
-int tcp_fconnect _P((struct socket *));
+SOCKET tcp_fconnect _P((struct socket *));
 void tcp_connect _P((struct socket *));
 int tcp_attach _P((struct socket *));
 u_int8_t tcp_tos _P((struct socket *));
index 2d12a00dc135f9abddc0e31b10ba4ff2c49a6389..b44ed4aada0aa25a89517ca5cef808f8afb12382 100644 (file)
@@ -516,7 +516,7 @@ struct socket *solisten(u_int port, u_int32_t laddr, u_int lport, int flags)
 {
        struct sockaddr_in addr;
        struct socket *so;
-       int s;
+       SOCKET s;
        socklen_t addrlen = sizeof(addr);
        int opt = 1;
 
index d05354c8c14abaf5b18117f9f3f32a16defdf144..e8a5faf3c614bf0f0a29adf6d87d9c20f802a530 100644 (file)
@@ -20,7 +20,7 @@
 struct socket {
   struct socket *so_next,*so_prev;      /* For a linked list of sockets */
 
-  int s;                           /* The actual socket */
+  SOCKET s;                           /* The actual socket */
 
                        /* XXX union these with not-yet-used sbuf params */
   struct mbuf *so_m;              /* Pointer to the original SYN packet,
index 75c2fdbbca9a487a4c4313b1facd36e90550c293..90d456decebdb6d79de724181087e7f29cf6d94c 100644 (file)
@@ -382,15 +382,16 @@ void tcp_sockclosed(struct tcpcb *tp)
  * nonblocking.  Connect returns after the SYN is sent, and does 
  * not wait for ACK+SYN.
  */
-int tcp_fconnect(struct socket *so)
+SOCKET tcp_fconnect(struct socket *so)
 {
-  int ret=0;
+  SOCKET ret=0;
   
   DEBUG_CALL("tcp_fconnect");
   DEBUG_ARG("so = %lx", (long )so);
 
   if( (ret=so->s=socket(AF_INET,SOCK_STREAM,0)) >= 0) {
-    int opt, s=so->s;
+       int opt;
+       SOCKET s = so->s;
     struct sockaddr_in addr;
     memset(&addr, 0, sizeof(struct sockaddr_in));
 
@@ -448,7 +449,8 @@ void tcp_connect(struct socket *inso)
        struct sockaddr_in addr;
        socklen_t addrlen = sizeof(struct sockaddr_in);
        struct tcpcb *tp;
-       int s, opt;
+       SOCKET s;
+       int opt;
 
        DEBUG_CALL("tcp_connect");
        DEBUG_ARG("inso = %lx", (long)inso);
index fcf931fd6882e85664a0b1c88ea728b13cc2aeeb..508c64075deeffd2a5999c462b08a98ed0690f57 100644 (file)
@@ -325,7 +325,7 @@ int udp_output(struct socket *so, struct mbuf *m,
     return udp_output2(so, m, &saddr, &daddr, so->so_iptos);
 }
 
-int udp_attach(struct socket *so)
+SOCKET udp_attach(struct socket *so)
 {
   struct sockaddr_in addr;
        
index b06c8c27964ebde937e0507d98e7d26c7ef7c970..73120086b5a99ba28571663cad6fc2cd41c074ac 100644 (file)
@@ -98,7 +98,7 @@ void udp_init _P((void));
 void udp_cleanup _P((void));
 void udp_input _P((register struct mbuf *, int));
 int udp_output _P((struct socket *, struct mbuf *, struct sockaddr_in *));
-int udp_attach _P((struct socket *));
+SOCKET udp_attach _P((struct socket *));
 void udp_detach _P((struct socket *));
 u_int8_t udp_tos _P((struct socket *));
 void udp_emu _P((struct socket *, struct mbuf *));