}
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)
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;
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;
int disk_debug_mode = 0;
int disk_debug_track = -1;
+#define REVOLUTION_DEBUG 0
#define MFM_VALIDATOR 0
#include "uae.h"
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);
}
static void do_disk_index (void)
{
-#if 0
+#if REVOLUTION_DEBUG
write_log(_T("INDEX %d\n"), indexdecay);
#endif
if (!indexdecay) {
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) {
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 ();
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))
{
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);
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);
}
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 {
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:
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;
}
}
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);
default: /* never reached */
return -1;
}
+#endif
default: /* never reached */
return -1;
}
void comp_fscc_opp (uae_u32 opcode, uae_u16 extra)
{
- uae_u32 ad;
- int cc;
int reg;
if (!currprefs.compfpu) {
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 */
else {
/* FMOVEM memory->FPP */
- uae_u32 ad;
+ int ad;
switch ((extra >> 11) & 3) { /* Get out early if failure */
case 0:
case 2:
#include "inputrecord.h"
#include "inputdevice.h"
#include "audio.h"
+#include "md-fpp.h"
#ifdef JIT
#include "jit/compemu.h"
#include <signal.h>
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;
}
#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)
{
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
TCHAR instrname[100], *ccpt;
int i;
uae_u32 opcode;
+ uae_u16 extra;
struct mnemolookup *lookup;
struct instr *dp;
int oldpc;
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;
_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("?");
}
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);
}
ok = 1;
}
}
- if (ok < 0)
+ if (ok < 0 || !wft)
regdelete (avikey, _T("AudioConfigurationVars"));
regclosetree (avikey);
return ok;
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;
}
}
}
}
- if (ok < 0) {
+ if (ok < 0 || !pcv) {
regdelete (avikey, _T("VideoConfigurationVars"));
regdelete (avikey, _T("VideoConfigurationState"));
}
if (!AVIOutput_AllocateVideo ())
return 0;
AVIOutput_FreeCOMPVARS (pcompvars);
- if (AVIOutput_GetCOMPVARSFromRegistry (pcompvars)) {
+ if (AVIOutput_GetCOMPVARSFromRegistry (pcompvars) > 0) {
AVIOutput_GetVideoCodecName (pcompvars, name, len);
return 1;
}
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
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;
}
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;
void *open_tablet (HWND hwnd)
{
-#ifndef _WIN64
static int initialized;
LOGCONTEXT lc;
AXIS tx = { 0 }, ty = { 0 }, tz = { 0 };
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;
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)
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;
tabletname = my_strdup (name);
tablet = TRUE;
return 1;
-#else
- return 0;
-#endif
}
#if 0
D3DXHANDLE m_MatWorldViewProjEffectHandle;
// Texture Handles
D3DXHANDLE m_SourceDimsEffectHandle;
+ D3DXHANDLE m_InputDimsEffectHandle;
D3DXHANDLE m_TexelSizeEffectHandle;
D3DXHANDLE m_SourceTextureEffectHandle;
D3DXHANDLE m_WorkingTexture1EffectHandle;
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)
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;
}
}
}
}
-#ifndef _WIN64
case WT_PROXIMITY:
{
send_tablet_proximity (LOWORD (lParam) ? 1 : 0);
}
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;
}
return 0;
}
-#endif
+
default:
break;
}
#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")
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;
} 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);
} 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);
} 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);
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;
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);
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);
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);
}
}
- 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;
#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);
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;
}
if (full_property_sheet)
d->style |= WS_MINIMIZEBOX;
+ d->exStyle |= exstyle;
d2 = (DLGTEMPLATEEX_END*)ns->resource;
p = (BYTE*)d + sizeof (DLGTEMPLATEEX);
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);
<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>
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);
*/
void
-fd_nonblock(int fd)
+fd_nonblock(SOCKET fd)
{
#if defined USE_FIONBIO && defined FIONBIO
ioctlsockopt_t opt = 1;
}
void
-fd_block(int fd)
+fd_block(SOCKET fd)
{
#if defined USE_FIONBIO && defined FIONBIO
ioctlsockopt_t opt = 0;
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
}
#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 */
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 *));
{
struct sockaddr_in addr;
struct socket *so;
- int s;
+ SOCKET s;
socklen_t addrlen = sizeof(addr);
int opt = 1;
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,
* 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));
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);
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;
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 *));