From: Toni Wilen Date: Wed, 26 Mar 2014 16:53:56 +0000 (+0200) Subject: 2710b13 X-Git-Tag: 2800~10 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=b71f6f6cac0d73593ef1ccbdffbdf06908e16da6;p=francis%2Fwinuae.git 2710b13 --- diff --git a/cfgfile.cpp b/cfgfile.cpp index d76f6a82..5cbfc579 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -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; diff --git a/custom.cpp b/custom.cpp index a75d9638..37089b32 100644 --- a/custom.cpp +++ b/custom.cpp @@ -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; diff --git a/disk.cpp b/disk.cpp index c75c71a5..6f640073 100644 --- 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)) { diff --git a/include/newcpu.h b/include/newcpu.h index 2b7fdcd9..e56d86ed 100644 --- a/include/newcpu.h +++ b/include/newcpu.h @@ -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); } diff --git a/include/readcpu.h b/include/readcpu.h index 78df4044..a9d106d4 100644 --- a/include/readcpu.h +++ b/include/readcpu.h @@ -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 { diff --git a/jit/compemu_fpp.cpp b/jit/compemu_fpp.cpp index 33fd32ab..80399c7e 100644 --- a/jit/compemu_fpp.cpp +++ b/jit/compemu_fpp.cpp @@ -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: diff --git a/newcpu.cpp b/newcpu.cpp index 60bdae08..3363c7b0 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -35,6 +35,7 @@ #include "inputrecord.h" #include "inputdevice.h" #include "audio.h" +#include "md-fpp.h" #ifdef JIT #include "jit/compemu.h" #include @@ -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); } diff --git a/od-win32/avioutput.cpp b/od-win32/avioutput.cpp index 4ce47346..32309c33 100644 --- a/od-win32/avioutput.cpp +++ b/od-win32/avioutput.cpp @@ -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; } diff --git a/od-win32/caps/CapsLib.h b/od-win32/caps/CapsLib.h index 498e5c3f..b75cad21 100644 --- a/od-win32/caps/CapsLib.h +++ b/od-win32/caps/CapsLib.h @@ -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 diff --git a/od-win32/caps/caps_win32.cpp b/od-win32/caps/caps_win32.cpp index a582d509..fb13fb2d 100644 --- a/od-win32/caps/caps_win32.cpp +++ b/od-win32/caps/caps_win32.cpp @@ -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; } diff --git a/od-win32/dinput.cpp b/od-win32/dinput.cpp index 0e03caf9..f513b2a0 100644 --- a/od-win32/dinput.cpp +++ b/od-win32/dinput.cpp @@ -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 diff --git a/od-win32/direct3d.cpp b/od-win32/direct3d.cpp index a6969ed9..31d97685 100644 --- a/od-win32/direct3d.cpp +++ b/od-win32/direct3d.cpp @@ -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; } } diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index 38cd3d55..d228a086 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -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; } diff --git a/od-win32/win32.h b/od-win32/win32.h index 2c05d6f0..26c87ae5 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -19,11 +19,11 @@ #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") diff --git a/od-win32/win32_scaler.cpp b/od-win32/win32_scaler.cpp index f54073d0..060b677d 100644 --- a/od-win32/win32_scaler.cpp +++ b/od-win32/win32_scaler.cpp @@ -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); diff --git a/od-win32/win32_uaenet.cpp b/od-win32/win32_uaenet.cpp index dbdd1d3f..87d927cd 100644 --- a/od-win32/win32_uaenet.cpp +++ b/od-win32/win32_uaenet.cpp @@ -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; diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 10a16b98..fac1b7e0 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -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; diff --git a/od-win32/win32gui.h b/od-win32/win32gui.h index 6fab491e..4a1543a6 100644 --- a/od-win32/win32gui.h +++ b/od-win32/win32gui.h @@ -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); diff --git a/od-win32/win32gui_extra.cpp b/od-win32/win32gui_extra.cpp index 8b810b52..c3104229 100644 --- a/od-win32/win32gui_extra.cpp +++ b/od-win32/win32gui_extra.cpp @@ -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); diff --git a/od-win32/winuae_msvc11/winuae_msvc.vcxproj b/od-win32/winuae_msvc11/winuae_msvc.vcxproj index f79baaab..be8b1526 100644 --- a/od-win32/winuae_msvc11/winuae_msvc.vcxproj +++ b/od-win32/winuae_msvc11/winuae_msvc.vcxproj @@ -82,7 +82,7 @@ Application false Unicode - v110 + v120 Application @@ -219,12 +219,12 @@ /MACHINE:I386 %(AdditionalOptions) - 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) + 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) NotSet $(OutDir)$(TargetName)$(TargetExt) true LIBCMT;%(IgnoreSpecificDefaultLibraries) - 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) + 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) true .\Debug/winuae.pdb Windows @@ -350,13 +350,13 @@ 0x0409 - 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) + 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) $(OutDir)$(TargetName)$(TargetExt) true %(AdditionalLibraryDirectories);$(SolutionDir)\..\lib\ %(AdditionalManifestDependencies) %(IgnoreSpecificDefaultLibraries) - 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) + 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) true .\Release/winuae.pdb Windows @@ -428,13 +428,13 @@ 0x0409 - 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) + 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) $(OutDir)$(TargetName)$(TargetExt) true %(AdditionalLibraryDirectories);$(SolutionDir)\..\lib\ %(AdditionalManifestDependencies) %(IgnoreSpecificDefaultLibraries) - 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) + 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) true .\Test/winuae.pdb Windows @@ -546,7 +546,7 @@ Speed true false - ..\..\include;..\..;..\;..\resources;..\osdep;..\sounddep;%(AdditionalIncludeDirectories) + ..\..\include;..\..;..\;..\resources;..\osdep;..\sounddep;..\..\slirp;%(AdditionalIncludeDirectories) WINVER=0x0500;NDEBUG;_WIN32_IE=0x0700;WIN32;WIN64;%(PreprocessorDefinitions) true Sync @@ -576,13 +576,13 @@ 0x0409 - 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) + 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) NotSet $(OutDir)$(TargetName)$(TargetExt) true %(AdditionalLibraryDirectories);$(SolutionDir)\..\lib\ LIBCMT;%(IgnoreSpecificDefaultLibraries) - 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) + 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) true $(Platform)\$(Configuration)\winuae.pdb Windows @@ -648,13 +648,13 @@ 0x0409 - 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) + 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) $(OutDir)$(TargetName)$(TargetExt) true %(AdditionalLibraryDirectories);$(SolutionDir)\..\lib\ %(AdditionalManifestDependencies) %(IgnoreSpecificDefaultLibraries) - 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) + 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) true .\FullRelease/winuae.pdb Windows diff --git a/slirp/libslirp.h b/slirp/libslirp.h index 669efbfc..62047ec6 100644 --- a/slirp/libslirp.h +++ b/slirp/libslirp.h @@ -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); diff --git a/slirp/misc.cpp b/slirp/misc.cpp index c1107522..13e0bc83 100644 --- a/slirp/misc.cpp +++ b/slirp/misc.cpp @@ -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; diff --git a/slirp/misc.h b/slirp/misc.h index efea9ff8..0d85940d 100644 --- a/slirp/misc.h +++ b/slirp/misc.h @@ -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 diff --git a/slirp/slirp.cpp b/slirp/slirp.cpp index aa60899d..09481c63 100644 --- a/slirp/slirp.cpp +++ b/slirp/slirp.cpp @@ -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 */ diff --git a/slirp/slirp.h b/slirp/slirp.h index 43bdcdc1..77363390 100644 --- a/slirp/slirp.h +++ b/slirp/slirp.h @@ -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 *)); diff --git a/slirp/socket.cpp b/slirp/socket.cpp index 2d12a00d..b44ed4aa 100644 --- a/slirp/socket.cpp +++ b/slirp/socket.cpp @@ -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; diff --git a/slirp/socket.h b/slirp/socket.h index d05354c8..e8a5faf3 100644 --- a/slirp/socket.h +++ b/slirp/socket.h @@ -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, diff --git a/slirp/tcp_subr.cpp b/slirp/tcp_subr.cpp index 75c2fdbb..90d456de 100644 --- a/slirp/tcp_subr.cpp +++ b/slirp/tcp_subr.cpp @@ -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); diff --git a/slirp/udp.cpp b/slirp/udp.cpp index fcf931fd..508c6407 100644 --- a/slirp/udp.cpp +++ b/slirp/udp.cpp @@ -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; diff --git a/slirp/udp.h b/slirp/udp.h index b06c8c27..73120086 100644 --- a/slirp/udp.h +++ b/slirp/udp.h @@ -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 *));