/* @@@ TODO: ensure proper interlocking */
struct socketbase *sbsigqueue;
+volatile int bsd_int_requested;
+
void addtosigqueue (SB, int events)
{
locksigqueue ();
}
sb->dosignal = 1;
+ bsd_int_requested = 1;
+
unlocksigqueue ();
- INTREQ (0x8000 | 0x2000);
+ //INTREQ (0x8000 | 0x2000);
}
static uae_u32 REGPARAM2 bsdsock_int_handler (TrapContext *context)
{
SB;
+ locksigqueue ();
+
if (sbsigqueue != NULL) {
- locksigqueue ();
for (sb = sbsigqueue; sb; sb = sb->nextsig) {
if (sb->dosignal == 1) {
m68k_areg (&context->regs, 1) = sb->ownertask;
m68k_dreg (&context->regs, 0) = sb->sigstosend;
CallLib (context, get_long (4), -0x144); /* Signal() */
-
- regs = sbved_regs;
-
+ context->regs = sbved_regs;
sb->sigstosend = 0;
}
sb->dosignal = 0;
}
sbsigqueue = NULL;
- unlocksigqueue ();
}
+
+ bsd_int_requested = 0;
+ unlocksigqueue ();
+
return 0;
}
perform_copper_write (0);
} else { // wait or skip
if (cop_state.i1 >= 0xffdf && cop_state.i2 == 0xfffe)
- return;
+ break;
}
}
-
+ cop_state.state = COP_stop;
+ unset_special (®s, SPCFLAG_COPPER);
}
STATIC_INLINE void COP1LCH (uae_u16 v) { cop1lc = (cop1lc & 0xffff) | ((uae_u32)v << 16); }
STATIC_INLINE void COP2LCH (uae_u16 v) { cop2lc = (cop2lc & 0xffff) | ((uae_u32)v << 16); }
STATIC_INLINE void COP2LCL (uae_u16 v) { cop2lc = (cop2lc & ~0xffff) | (v & 0xfffe); }
+static void compute_spcflag_copper (void);
+
static void COPJMP (int num)
{
int oldstrobe = cop_state.strobe;
- if (nocustom()) {
- immediate_copper (num);
- return;
- }
-
unset_special (®s, SPCFLAG_COPPER);
cop_state.ignore_next = 0;
if (!oldstrobe)
copper_enabled_thisline = 0;
cop_state.strobe = num;
+ if (nocustom()) {
+ immediate_copper (num);
+ return;
+ }
+
if (dmaen (DMA_COPPER)) {
- copper_enabled_thisline = 1;
- set_special (®s, SPCFLAG_COPPER);
+ compute_spcflag_copper ();
} else if (oldstrobe > 0 && oldstrobe != num && cop_state.state_prev == COP_wait) {
/* dma disabled, copper idle and accessing both COPxJMPs -> copper stops! */
cop_state.state = COP_stop;
copcon = a;
}
-static void compute_spcflag_copper (void);
static void DMACON (int hpos, uae_u16 v)
{
int oldcop, newcop;
static void dump_copper (char *error, int until_hpos)
{
- static int warned = 10;
-
write_log("%s: vpos=%d until_hpos=%d\n",
error, vpos, until_hpos);
write_log("cvcmp=%d chcmp=%d chpos=%d cvpos=%d ci1=%04.4X ci2=%04.4X\n",
set_special (®s, SPCFLAG_COPPER);
}
-static void copper_handler (void)
-{
- /* This will take effect immediately, within the same cycle. */
- set_special (®s, SPCFLAG_COPPER);
- if (! copper_enabled_thisline)
- uae_abort ("copper_handler");
-}
-
void blitter_done_notify (void)
{
if (cop_state.state != COP_bltwait)
next_lineno = lineno;
reset_decisions ();
}
-
+#if 1
#ifdef FILESYS
if (uae_int_requested) {
set_uae_int_flag ();
INTREQ (0x8000 | 0x0008);
}
+#endif
+#if 1
+ {
+ extern volatile int bsd_int_requested;
+ if (bsd_int_requested) {
+ INTREQ (0x8000 | 0x2000);
+ }
+ }
+#endif
#endif
/* See if there's a chance of a copper wait ending this line. */
static void disk_dmafinished (void)
{
- INTREQ (0x8002);
+ INTREQ (0x8000 | 0x0002);
longwritemode = 0;
dskdmaen = 0;
if (disk_debug_logging > 0) {
pos += 16;
pos %= drv->tracklen;
}
- INTREQ (0x9000);
+ INTREQ (0x8000 | 0x1000);
done = 1;
} else if (dskdmaen == 3) { /* TURBO write */
/* Keys */
struct key *keys;
- uae_u32 key_uniq;
- uae_u32 a_uniq;
a_inode rootnode;
unsigned long aino_cache_size;
} Unit;
+static uae_u32 a_uniq, key_uniq;
+
typedef uae_u8 *dpacket;
#define PUT_PCK_RES1(p,v) do { do_put_mem_long ((uae_u32 *)((p) + dp_Res1), (v)); } while (0)
#define PUT_PCK_RES2(p,v) do { do_put_mem_long ((uae_u32 *)((p) + dp_Res2), (v)); } while (0)
static void init_child_aino (Unit *unit, a_inode *base, a_inode *aino)
{
- aino->uniq = ++unit->a_uniq;
- if (unit->a_uniq == 0xFFFFFFFF) {
+ aino->uniq = ++a_uniq;
+ if (a_uniq == 0xFFFFFFFF) {
write_log ("Running out of a_inodes (prepare for big trouble)!\n");
}
aino->shlock = 0;
unit->total_locked_ainos = 0;
unit->next_exkey = 1;
unit->keys = 0;
- unit->a_uniq = unit->key_uniq = 0;
unit->rootnode.aname = uinfo->volname;
unit->rootnode.nname = uinfo->rootdir;
static Key *new_key (Unit *unit)
{
Key *k = (Key *) xmalloc(sizeof(Key));
- k->uniq = ++unit->key_uniq;
+ k->uniq = ++key_uniq;
k->fd = NULL;
k->file_pos = 0;
k->next = unit->keys;
int i = 0;
for (i = 0; i < MAX_FILESYSTEM_UNITS; i++) {
if (current_mountinfo.ui[i].self) {
- uae_u32 err;
a_inode *a = lookup_aino (current_mountinfo.ui[i].self, get_long ((lock << 2) + 4));
if (a) {
strcpy (out, a->nname);
PUT_PCK_RES1 (packet, DOS_TRUE);
}
-int last_n, last_n2;
-void blehint(void)
-{
- do_uae_int_requested();
-}
-
/* We don't want multiple interrupts to be active at the same time. I don't
* know whether AmigaOS takes care of that, but this does. */
static uae_sem_t singlethread_int_sem;
int n = m68k_dreg (&context->regs, 0);
static int unit_no;
- last_n = n;
- last_n2 = -1;
-
switch (n) {
case 0:
/* Determine whether a given EXTER interrupt is for us. */
}
unit_num = 0;
units = 0;
+ key_uniq = 0;
+ a_uniq = 0;
}
static void free_all_ainos (Unit *u, a_inode *parent)
Unit *u = startup_create_unit (ui);
int cnt;
- u->a_uniq = restore_u64 ();
- u->key_uniq = restore_u64 ();
+ a_uniq = restore_u64 ();
+ key_uniq = restore_u64 ();
u->dosbase = restore_u32 ();
u->volume = restore_u32 ();
u->port = restore_u32 ();
Key *k;
int cnt;
- save_u64 (u->a_uniq);
- save_u64 (u->key_uniq);
+ save_u64 (a_uniq);
+ save_u64 (key_uniq);
save_u32 (u->dosbase);
save_u32 (u->volume);
save_u32 (u->port);
return (dmamask & dmacon) && (dmacon & 0x200);
}
+#define SPCFLAG_UAE_INT 1
#define SPCFLAG_STOP 2
#define SPCFLAG_COPPER 4
#define SPCFLAG_INT 8
#define MAX_SELECT_THREADS 64
#define MAX_GET_THREADS 64
-struct selt {
- HANDLE hThreads[MAX_SELECT_THREADS];
- struct threadargsw *threadargsw[MAX_SELECT_THREADS];
- HANDLE hEvents[MAX_SELECT_THREADS];
-};
-
-struct gett {
- HANDLE hGetThreads[MAX_GET_THREADS];
- struct threadargs *threadGetargs[MAX_GET_THREADS];
- int threadGetargs_inuse[MAX_GET_THREADS];
- HANDLE hGetEvents[MAX_GET_THREADS];
-};
-
-struct pendingasync {
- struct socketbase *asyncsb[MAXPENDINGASYNC];
- SOCKET asyncsock[MAXPENDINGASYNC];
- uae_u32 asyncsd[MAXPENDINGASYNC];
- int asyncindex;
-};
-
struct bsdsockdata {
HWND hSockWnd;
HANDLE hSockThread;
DWORD threadid;
WSADATA wsbData;
- struct selt *st;
- struct gett *gt;
- struct pendingasync *as;
+ HANDLE hGetThreads[MAX_GET_THREADS];
+ struct threadargs *threadGetargs[MAX_GET_THREADS];
+ int threadGetargs_inuse[MAX_GET_THREADS];
+ HANDLE hGetEvents[MAX_GET_THREADS];
+
+ HANDLE hThreads[MAX_SELECT_THREADS];
+ struct threadargsw *threadargsw[MAX_SELECT_THREADS];
+ HANDLE hEvents[MAX_SELECT_THREADS];
+
+ struct socketbase *asyncsb[MAXPENDINGASYNC];
+ SOCKET asyncsock[MAXPENDINGASYNC];
+ uae_u32 asyncsd[MAXPENDINGASYNC];
+ int asyncindex;
};
static struct bsdsockdata *bsd;
if (!bsd) {
bsd = calloc (sizeof (struct bsdsockdata), 1);
- bsd->st = calloc (sizeof (struct selt), 1);
- bsd->gt = calloc (sizeof (struct gett), 1);
- bsd->as = calloc (sizeof (struct pendingasync), 1);
}
if (WSAStartup(MAKEWORD(SOCKVER_MAJOR, SOCKVER_MINOR), &bsd->wsbData)) {
lasterror = WSAGetLastError();
CloseHandle(bsd->hSockThread);
}
for (i = 0; i < MAX_SELECT_THREADS; i++) {
- if (bsd->st->hThreads[i]) {
- CloseHandle(bsd->st->hThreads[i]);
- bsd->st->hThreads[i] = NULL;
+ if (bsd->hThreads[i]) {
+ CloseHandle(bsd->hThreads[i]);
+ bsd->hThreads[i] = NULL;
}
}
}
int i;
for (i = 0; i < MAXPENDINGASYNC; i++) {
- if (bsd->as->asyncsb[i] == sb)
- bsd->as->asyncsb[i] = NULL;
+ if (bsd->asyncsb[i] == sb)
+ bsd->asyncsb[i] = NULL;
}
if (sb->hEvent != NULL)
host_closesocketquick(sb->dtable[i]);
if (sb->mtable[i])
- bsd->as->asyncsb[(sb->mtable[i] - 0xb000) / 2] = NULL;
+ bsd->asyncsb[(sb->mtable[i] - 0xb000) / 2] = NULL;
}
shutdown(sb->sockAbort,1);
{
int i;
for (i = 0; i < MAXPENDINGASYNC; i++) {
- bsd->as->asyncsb[i] = 0;
- bsd->as->asyncsock[i] = 0;
- bsd->as->asyncsd[i] = 0;
+ bsd->asyncsb[i] = 0;
+ bsd->asyncsock[i] = 0;
+ bsd->asyncsd[i] = 0;
}
for (i = 0; i < MAX_GET_THREADS; i++) {
- bsd->st->threadargsw[i] = 0;
+ bsd->threadargsw[i] = 0;
}
}
-void sockmsg(unsigned int msg, WPARAM wParam, LPARAM lParam)
+static void sockmsg(unsigned int msg, WPARAM wParam, LPARAM lParam)
{
SB;
unsigned int index;
int sdi;
- index = (msg-0xb000)/2;
- sb = bsd->as->asyncsb[index];
+ index = (msg - 0xb000) / 2;
+ sb = bsd->asyncsb[index];
if (!(msg & 1))
{
// is this one really for us?
- if ((SOCKET)wParam != bsd->as->asyncsock[index])
+ if ((SOCKET)wParam != bsd->asyncsock[index])
{
// cancel socket event
WSAAsyncSelect((SOCKET)wParam, hWndSelector ? hAmigaWnd : bsd->hSockWnd, 0, 0);
return;
}
- sdi = bsd->as->asyncsd[index] - 1;
+ sdi = bsd->asyncsd[index] - 1;
// asynchronous socket event?
if (sb && !(sb->ftable[sdi] & SF_BLOCKINGINPROGRESS) && sb->mtable[sdi])
if (WSAGETSELECTERROR(lParam)) fmask |= REP_ERROR;
// notify
- if (sb->ftable[sdi] & fmask) sb->ftable[sdi] |= fmask<<8;
+ if (sb->ftable[sdi] & fmask) sb->ftable[sdi] |= fmask << 8;
- addtosigqueue(sb,1);
+ addtosigqueue(sb, 1);
return;
}
}
locksigqueue();
- if (sb != NULL)
- {
-
+ if (sb != NULL) {
- bsd->as->asyncsb[index] = NULL;
+ bsd->asyncsb[index] = NULL;
- if (WSAGETASYNCERROR(lParam))
- {
- bsdsocklib_seterrno(sb,WSAGETASYNCERROR(lParam)-WSABASEERR);
- if (sb->sb_errno >= 1001 && sb->sb_errno <= 1005) bsdsocklib_setherrno(sb,sb->sb_errno-1000);
- else if (sb->sb_errno == 55) // ENOBUFS
- write_log("BSDSOCK: ERROR - Buffer overflow - %d bytes requested\n",WSAGETASYNCBUFLEN(lParam));
+ if (WSAGETASYNCERROR(lParam)) {
+ bsdsocklib_seterrno(sb, WSAGETASYNCERROR(lParam) - WSABASEERR);
+ if (sb->sb_errno >= 1001 && sb->sb_errno <= 1005) {
+ bsdsocklib_setherrno(sb, sb->sb_errno - 1000);
+ } else if (sb->sb_errno == 55) { // ENOBUFS
+ write_log("BSDSOCK: ERROR - Buffer overflow - %d bytes requested\n",
+ WSAGETASYNCBUFLEN(lParam));
+ }
+ } else {
+ bsdsocklib_seterrno(sb,0);
}
- else bsdsocklib_seterrno(sb,0);
-
SETSIGNAL;
}
int i;
locksigqueue();
- for (i = bsd->as->asyncindex+1; i != bsd->as->asyncindex; i++) {
- if (i == MAXPENDINGASYNC)
+ for (i = bsd->asyncindex + 1; i != bsd->asyncindex; i++) {
+ if (i >= MAXPENDINGASYNC)
i = 0;
- if (!bsd->as->asyncsb[i]) {
- bsd->as->asyncsb[i] = sb;
- if (++bsd->as->asyncindex == MAXPENDINGASYNC)
- bsd->as->asyncindex = 0;
+ if (!bsd->asyncsb[i]) {
+ bsd->asyncsb[i] = sb;
+ if (++bsd->asyncindex >= MAXPENDINGASYNC)
+ bsd->asyncindex = 0;
unlocksigqueue();
if (s == INVALID_SOCKET) {
return i * 2 + 0xb001;
} else {
- bsd->as->asyncsd[i] = sd;
- bsd->as->asyncsock[i] = s;
+ bsd->asyncsd[i] = sd;
+ bsd->asyncsock[i] = s;
return i * 2 + 0xb000;
}
}
wMsg = (wMsg-0xb000)/2;
- sb = bsd->as->asyncsb[wMsg];
+ sb = bsd->asyncsb[wMsg];
if (sb != NULL) {
- bsd->as->asyncsb[wMsg] = NULL;
+ bsd->asyncsb[wMsg] = NULL;
CANCELSIGNAL;
}
}
wsbevents |= FD_CLOSE;
wsbevents |= lEvent;
i = (sb->mtable[sd-1]-0xb000)/2;
- bsd->as->asyncsb[i] = sb;
- bsd->as->asyncsd[i] = sd;
- bsd->as->asyncsock[i] = s;
+ bsd->asyncsb[i] = sb;
+ bsd->asyncsd[i] = sd;
+ bsd->asyncsock[i] = s;
WSAAsyncSelect(s, hWndSelector ? hAmigaWnd : bsd->hSockWnd, sb->mtable[sd-1], wsbevents);
unlocksigqueue();
void host_accept(TrapContext *context, SB, uae_u32 sd, uae_u32 name, uae_u32 namelen)
{
- struct sockaddr *rp_name,*rp_nameuae;
+ struct sockaddr *rp_name, *rp_nameuae;
struct sockaddr sockaddr;
- int hlen,hlenuae=0;
+ int hlen, hlenuae = 0;
SOCKET s, s2;
int success = 0;
unsigned int wMsg;
if (s2 == INVALID_SOCKET) {
SETERRNO;
- if (sb->ftable[sd-1] & SF_BLOCKING && sb->sb_errno == WSAEWOULDBLOCK - WSABASEERR) {
+ if ((sb->ftable[sd-1] & SF_BLOCKING) && sb->sb_errno == WSAEWOULDBLOCK - WSABASEERR) {
if (sb->mtable[sd-1] || (wMsg = allocasyncmsg(sb,sd,s)) != 0) {
if (sb->mtable[sd-1] == 0) {
WSAAsyncSelect(s,hWndSelector ? hAmigaWnd : bsd->hSockWnd, wMsg, FD_ACCEPT);
static BOOL HandleStuff( void )
{
- BOOL quit = FALSE;
- SB = NULL;
- BOOL handled = TRUE;
- if (bsd->hSockReq) {
+ BOOL quit = FALSE;
+ SB = NULL;
+ BOOL handled = TRUE;
+ if (bsd->hSockReq) {
// 100ms sleepiness might need some tuning...
- //if(WaitForSingleObject( hSockReq, 100 ) == WAIT_OBJECT_0 )
+ //if(WaitForSingleObject( hSockReq, 100 ) == WAIT_OBJECT_0 )
{
switch( sockreq.packet_type )
{
static LRESULT CALLBACK SocketWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
- if(message >= 0xB000 && message < 0xB000+MAXPENDINGASYNC * 2) {
+ if(message >= 0xB000 && message < 0xB000 + MAXPENDINGASYNC * 2) {
#if DEBUG_SOCKETS
write_log( "sockmsg(0x%x, 0x%x, 0x%x)\n", message, wParam, lParam );
#endif
static unsigned int __stdcall sock_thread(void *blah)
{
- unsigned int result = 0;
- HANDLE WaitHandle;
- MSG msg;
+ unsigned int result = 0;
+ HANDLE WaitHandle;
+ MSG msg;
if(bsd->hSockWnd) {
// Make sure we're outrunning the wolves
if(HandleStuff()) // See if its time to quit...
break;
}
- if (wait == WAIT_OBJECT_0 +1) {
+ if (wait == WAIT_OBJECT_0 + 1) {
Sleep(10);
while(PeekMessage(&msg, NULL, WM_USER, 0xB000 + MAXPENDINGASYNC * 2, PM_REMOVE) > 0) {
TranslateMessage(&msg);
}
}
}
- write_log( "BSDSOCK: We have exited our sock_thread()\n" );
- THREADEND(result);
- return result;
+ write_log( "BSDSOCK: We have exited our sock_thread()\n" );
+ THREADEND(result);
+ return result;
}
if (s != INVALID_SOCKET) {
if (sb->mtable[sd-1]) {
- bsd->as->asyncsb[(sb->mtable[sd-1]-0xb000)/2] = NULL;
+ bsd->asyncsb[(sb->mtable[sd-1]-0xb000)/2] = NULL;
sb->mtable[sd-1] = 0;
}
}
}
}
- put_long(fd_set_amiga,val);
+ put_long(fd_set_amiga, val);
fd_set_amiga += 4;
}
}
SB;
for (;;) {
- WaitForSingleObject(bsd->st->hEvents[index],INFINITE);
+ WaitForSingleObject(bsd->hEvents[index], INFINITE);
- if ((args = bsd->st->threadargsw[index]) != NULL) {
+ if ((args = bsd->threadargsw[index]) != NULL) {
sb = args->sb;
nfds = args->nfds;
readfds = args->readfds;
TRACE(("-> "));
- sb->resultval = select(nfds+1,&readsocks,writefds ? &writesocks : NULL,exceptfds ? &exceptsocks : NULL,timeout ? &tv : 0);
+ sb->resultval = select(nfds+1,&readsocks,writefds ? &writesocks : NULL,
+ exceptfds ? &exceptsocks : NULL,timeout ? &tv : 0);
if (sb->resultval == SOCKET_ERROR) {
// select was stopped by sb->sockAbort
if (readsocks.fd_count > 1) {
SETSIGNAL;
- bsd->st->threadargsw[index] = NULL;
+ bsd->threadargsw[index] = NULL;
SetEvent(sb->hEvent);
}
}
wssigs = sigmp ? get_long(sigmp) : 0;
- TRACE(("WaitSelect(%d,0x%lx,0x%lx,0x%lx,0x%lx,0x%lx) ",nfds,readfds,writefds,exceptfds,timeout,wssigs));
+ TRACE(("WaitSelect(%d,0x%lx,0x%lx,0x%lx,0x%lx,0x%lx) ",
+ nfds, readfds, writefds, exceptfds, timeout, wssigs));
if (!readfds && !writefds && !exceptfds && !timeout && !wssigs) {
sb->resultval = 0;
if (wssigs != 0) {
m68k_dreg(&context->regs, 0) = wssigs;
sigs = CallLib(context, get_long(4),-0x13e); // Wait()
-
put_long(sigmp, sigs & wssigs);
- }
+ }
if (readfds)
fd_zero(readfds,nfds);
sb->needAbort = 1;
for (i = 0; i < MAX_SELECT_THREADS; i++) {
- if (bsd->st->hThreads[i] && !bsd->st->threadargsw[i])
+ if (bsd->hThreads[i] && !bsd->threadargsw[i])
break;
}
if (i >= MAX_SELECT_THREADS) {
for (i = 0; i < MAX_SELECT_THREADS; i++) {
- if (!bsd->st->hThreads[i]) {
- bsd->st->hEvents[i] = CreateEvent(NULL,FALSE,FALSE,NULL);
- bsd->st->hThreads[i] = THREAD(thread_WaitSelect,&i);
- if (bsd->st->hEvents[i] == NULL || bsd->st->hThreads[i] == NULL) {
- bsd->st->hThreads[i] = 0;
+ if (!bsd->hThreads[i]) {
+ bsd->hEvents[i] = CreateEvent(NULL,FALSE,FALSE,NULL);
+ bsd->hThreads[i] = THREAD(thread_WaitSelect, &i);
+ if (bsd->hEvents[i] == NULL || bsd->hThreads[i] == NULL) {
+ bsd->hThreads[i] = 0;
write_log("BSDSOCK: ERROR - Thread/Event creation failed - error code: %d\n",
GetLastError());
bsdsocklib_seterrno(sb,12); // ENOMEM
return;
}
// this should improve responsiveness
- SetThreadPriority(bsd->st->hThreads[i], THREAD_PRIORITY_TIME_CRITICAL);
+ SetThreadPriority(bsd->hThreads[i], THREAD_PRIORITY_TIME_CRITICAL);
break;
}
}
taw.exceptfds = exceptfds;
taw.timeout = timeout;
- bsd->st->threadargsw[i] = &taw;
+ bsd->threadargsw[i] = &taw;
- SetEvent(bsd->st->hEvents[i]);
+ SetEvent(bsd->hEvents[i]);
- m68k_dreg(&context->regs,0) = (((uae_u32)1)<<sb->signal)|sb->eintrsigs|wssigs;
- sigs = CallLib(context, get_long(4),-0x13e); // Wait()
+ m68k_dreg(&context->regs, 0) = (((uae_u32)1) << sb->signal) | sb->eintrsigs | wssigs;
+ sigs = CallLib(context, get_long(4), -0x13e); // Wait()
/*
if ((1<<sb->signal) & sigs)
{ // 2.3.2002/SR Fix for AmiFTP -> Thread is ready, no need to Abort
write_log("BSDSOCK: ERROR - Cannot create socket: %d\n", WSAGetLastError());
shutdown(sb->sockAbort,1);
if (newsock != sb->sockAbort) {
- shutdown(sb->sockAbort,1);
+ shutdown(sb->sockAbort, 1);
closesocket(sb->sockAbort);
}
}
- WaitForSingleObject(sb->hEvent,INFINITE);
+ WaitForSingleObject(sb->hEvent, INFINITE);
CANCELSIGNAL;
{
DWORD dwFlags;
BOOL bReturn = TRUE;
+
if (InternetGetConnectedState(&dwFlags,0) == FALSE) { // Internet is offline
if (InternetAttemptConnect(0) != ERROR_SUCCESS) { // Show Dialer window
sb->sb_errno = 10001;
SetActiveWindow(hAmigaWnd);
}
}
- return(bReturn);
+ return bReturn;
}
static unsigned int __stdcall thread_get(void *indexp)
SB;
for (;;) {
- WaitForSingleObject(bsd->gt->hGetEvents[index], INFINITE);
- if (bsd->gt->threadGetargs_inuse[index] == -1) {
- bsd->gt->threadGetargs_inuse[index] = 0;
- bsd->gt->threadGetargs[index] = NULL;
+ WaitForSingleObject(bsd->hGetEvents[index], INFINITE);
+ if (bsd->threadGetargs_inuse[index] == -1) {
+ bsd->threadGetargs_inuse[index] = 0;
+ bsd->threadGetargs[index] = NULL;
}
- if ((args = bsd->gt->threadGetargs[index]) != NULL) {
+ if ((args = bsd->threadGetargs[index]) != NULL) {
sb = args->sb;
if (args->args1 == 0) {
// gethostbyname or gethostbyaddr
if (addrtype == -1) {
host = gethostbyname(name_rp);
} else {
- host = gethostbyaddr(name_rp,namelen,addrtype);
+ host = gethostbyaddr(name_rp, namelen, addrtype);
}
- if (bsd->gt->threadGetargs_inuse[index] != -1) {
+ if (bsd->threadGetargs_inuse[index] != -1) {
// No CTRL-C Signal
if (host == 0) {
// Error occured
SETERRNO;
- TRACE(("failed (%d) - ",sb->sb_errno));
+ TRACE(("failed (%d) - ", sb->sb_errno));
} else {
- bsdsocklib_seterrno(sb,0);
- memcpy(buf,host,sizeof(HOSTENT));
+ bsdsocklib_seterrno(sb, 0);
+ memcpy(buf, host, sizeof(HOSTENT));
}
}
}
buf = args->args5;
name_rp = get_real_address(name);
proto = getprotobyname (name_rp);
- if (bsd->gt->threadGetargs_inuse[index] != -1) { // No CTRL-C Signal
+ if (bsd->threadGetargs_inuse[index] != -1) { // No CTRL-C Signal
if (proto == 0) {
// Error occured
SETERRNO;
- TRACE(("failed (%d) - ",sb->sb_errno));
+ TRACE(("failed (%d) - ", sb->sb_errno));
} else {
- bsdsocklib_seterrno(sb,0);
- memcpy(buf,proto,sizeof(struct protoent));
+ bsdsocklib_seterrno(sb, 0);
+ memcpy(buf, proto, sizeof(struct protoent));
}
}
}
proto_rp = get_real_address(proto);
if (type) {
- serv = getservbyport(nameport,proto_rp);
+ serv = getservbyport(nameport, proto_rp);
} else {
name_rp = get_real_address(nameport);
- serv = getservbyname(name_rp,proto_rp);
+ serv = getservbyname(name_rp, proto_rp);
}
- if (bsd->gt->threadGetargs_inuse[index] != -1) {
+ if (bsd->threadGetargs_inuse[index] != -1) {
// No CTRL-C Signal
if (serv == 0) {
// Error occured
SETERRNO;
- TRACE(("failed (%d) - ",sb->sb_errno));
+ TRACE(("failed (%d) - ", sb->sb_errno));
} else {
- bsdsocklib_seterrno(sb,0);
- memcpy(buf,serv,sizeof(struct servent));
+ bsdsocklib_seterrno(sb, 0);
+ memcpy(buf, serv, sizeof(struct servent));
}
}
}
TRACE(("-> "));
- if (bsd->gt->threadGetargs_inuse[index] != -1)
+ if (bsd->threadGetargs_inuse[index] != -1)
SETSIGNAL;
- bsd->gt->threadGetargs_inuse[index] = 0;
- bsd->gt->threadGetargs[index] = NULL;
+ bsd->threadGetargs_inuse[index] = 0;
+ bsd->threadGetargs[index] = NULL;
}
}
args.args5 = buf;
for (i = 0; i < MAX_GET_THREADS; i++) {
- if (bsd->gt->threadGetargs_inuse[i] == -1) {
- bsd->gt->threadGetargs_inuse[i] = 0;
- bsd->gt->threadGetargs[i] = NULL;
+ if (bsd->threadGetargs_inuse[i] == -1) {
+ bsd->threadGetargs_inuse[i] = 0;
+ bsd->threadGetargs[i] = NULL;
}
- if (bsd->gt->hGetThreads[i] && !bsd->gt->threadGetargs_inuse[i]) break;
+ if (bsd->hGetThreads[i] && !bsd->threadGetargs_inuse[i])
+ break;
}
if (i >= MAX_GET_THREADS) {
for (i = 0; i < MAX_GET_THREADS; i++) {
- if (bsd->gt->hGetThreads[i] == NULL) {
- bsd->gt->hGetEvents[i] = CreateEvent(NULL,FALSE,FALSE,NULL);
- bsd->gt->hGetThreads[i] = THREAD(thread_get, &i);
- if (bsd->gt->hGetEvents[i] == NULL || bsd->gt->hGetThreads[i] == NULL) {
- bsd->gt->hGetThreads[i] = NULL;
+ if (bsd->hGetThreads[i] == NULL) {
+ bsd->hGetEvents[i] = CreateEvent(NULL,FALSE,FALSE,NULL);
+ bsd->hGetThreads[i] = THREAD(thread_get, &i);
+ if (bsd->hGetEvents[i] == NULL || bsd->hGetThreads[i] == NULL) {
+ bsd->hGetThreads[i] = NULL;
write_log("BSDSOCK: ERROR - Thread/Event creation failed - error code: %d\n",
GetLastError());
bsdsocklib_seterrno(sb, 12); // ENOMEM
if (i >= MAX_GET_THREADS)
write_log("BSDSOCK: ERROR - Too many gethostbyname()s\n");
else {
- bsdsetpriority (bsd->gt->hGetThreads[i]);
- bsd->gt->threadGetargs[i] = &args;
- bsd->gt->threadGetargs_inuse[i] = 1;
+ bsdsetpriority (bsd->hGetThreads[i]);
+ bsd->threadGetargs[i] = &args;
+ bsd->threadGetargs_inuse[i] = 1;
- SetEvent(bsd->gt->hGetEvents[i]);
+ SetEvent(bsd->hGetEvents[i]);
}
+
sb->eintr = 0;
- while (bsd->gt->threadGetargs_inuse[i] != 0 && sb->eintr == 0) {
+ while (bsd->threadGetargs_inuse[i] != 0 && sb->eintr == 0) {
WAITSIGNAL;
if (sb->eintr == 1)
- bsd->gt->threadGetargs_inuse[i] = -1;
+ bsd->threadGetargs_inuse[i] = -1;
}
CANCELSIGNAL;
args.args5 = buf;
for (i = 0; i < MAX_GET_THREADS; i++) {
- if (bsd->gt->threadGetargs_inuse[i] == -1) {
- bsd->gt->threadGetargs_inuse[i] = 0;
- bsd->gt->threadGetargs[i] = NULL;
+ if (bsd->threadGetargs_inuse[i] == -1) {
+ bsd->threadGetargs_inuse[i] = 0;
+ bsd->threadGetargs[i] = NULL;
}
- if (bsd->gt->hGetThreads[i] && !bsd->gt->threadGetargs_inuse[i]) break;
+ if (bsd->hGetThreads[i] && !bsd->threadGetargs_inuse[i]) break;
}
if (i >= MAX_GET_THREADS) {
for (i = 0; i < MAX_GET_THREADS; i++) {
- if (!bsd->gt->hGetThreads[i]) {
- bsd->st->hEvents[i] = CreateEvent(NULL, FALSE, FALSE, NULL);
- bsd->gt->hGetThreads[i] = THREAD(thread_get, &i);
- if (bsd->gt->hGetEvents[i] == NULL || bsd->gt->hGetThreads[i] == NULL) {
- bsd->gt->hGetThreads[i] = 0;
+ if (!bsd->hGetThreads[i]) {
+ bsd->hEvents[i] = CreateEvent(NULL, FALSE, FALSE, NULL);
+ bsd->hGetThreads[i] = THREAD(thread_get, &i);
+ if (bsd->hGetEvents[i] == NULL || bsd->hGetThreads[i] == NULL) {
+ bsd->hGetThreads[i] = 0;
write_log("BSDSOCK: ERROR - Thread/Event creation failed - error code: %d\n", GetLastError());
bsdsocklib_seterrno(sb, 12); // ENOMEM
sb->resultval = -1;
if (i >= MAX_GET_THREADS)
write_log("BSDSOCK: ERROR - Too many getprotobyname()s\n");
else {
- bsdsetpriority (bsd->gt->hGetThreads[i]);
+ bsdsetpriority (bsd->hGetThreads[i]);
- bsd->gt->threadGetargs[i] = &args;
- bsd->gt->threadGetargs_inuse[i] = 1;
+ bsd->threadGetargs[i] = &args;
+ bsd->threadGetargs_inuse[i] = 1;
- SetEvent(bsd->gt->hGetEvents[i]);
+ SetEvent(bsd->hGetEvents[i]);
}
sb->eintr = 0;
- while (bsd->gt->threadGetargs_inuse[i] != 0 && sb->eintr == 0) {
+ while (bsd->threadGetargs_inuse[i] != 0 && sb->eintr == 0) {
WAITSIGNAL;
if (sb->eintr == 1)
- bsd->gt->threadGetargs_inuse[i] = -1;
+ bsd->threadGetargs_inuse[i] = -1;
}
CANCELSIGNAL;
args.args5 = buf;
for (i = 0; i < MAX_GET_THREADS; i++) {
- if (bsd->gt->threadGetargs_inuse[i] == -1) {
- bsd->gt->threadGetargs_inuse[i] = 0;
- bsd->gt->threadGetargs[i] = NULL;
+ if (bsd->threadGetargs_inuse[i] == -1) {
+ bsd->threadGetargs_inuse[i] = 0;
+ bsd->threadGetargs[i] = NULL;
}
- if (bsd->gt->hGetThreads[i] && !bsd->gt->threadGetargs_inuse[i]) break;
+ if (bsd->hGetThreads[i] && !bsd->threadGetargs_inuse[i]) break;
}
if (i >= MAX_GET_THREADS) {
for (i = 0; i < MAX_GET_THREADS; i++) {
- if (!bsd->gt->hGetThreads[i]) {
- bsd->gt->hGetEvents[i] = CreateEvent(NULL, FALSE, FALSE, NULL);
- bsd->gt->hGetThreads[i] = THREAD(thread_get, &i);
- if (bsd->gt->hGetEvents[i] == NULL || bsd->gt->hGetThreads[i] == NULL) {
- bsd->gt->hGetThreads[i] = 0;
+ if (!bsd->hGetThreads[i]) {
+ bsd->hGetEvents[i] = CreateEvent(NULL, FALSE, FALSE, NULL);
+ bsd->hGetThreads[i] = THREAD(thread_get, &i);
+ if (bsd->hGetEvents[i] == NULL || bsd->hGetThreads[i] == NULL) {
+ bsd->hGetThreads[i] = 0;
write_log("BSDSOCK: ERROR - Thread/Event creation failed - error code: %d\n", GetLastError());
bsdsocklib_seterrno(sb, 12); // ENOMEM
sb->resultval = -1;
if (i >= MAX_GET_THREADS)
write_log("BSDSOCK: ERROR - Too many getprotobyname()s\n");
else {
- bsdsetpriority (bsd->gt->hGetThreads[i]);
+ bsdsetpriority (bsd->hGetThreads[i]);
- bsd->gt->threadGetargs[i] = &args;
- bsd->gt->threadGetargs_inuse[i] = 1;
+ bsd->threadGetargs[i] = &args;
+ bsd->threadGetargs_inuse[i] = 1;
- SetEvent(bsd->gt->hGetEvents[i]);
+ SetEvent(bsd->hGetEvents[i]);
}
sb->eintr = 0;
- while (bsd->gt->threadGetargs_inuse[i] != 0 && sb->eintr == 0) {
+ while (bsd->threadGetargs_inuse[i] != 0 && sb->eintr == 0) {
WAITSIGNAL;
if (sb->eintr == 1)
- bsd->gt->threadGetargs_inuse[i] = -1;
+ bsd->threadGetargs_inuse[i] = -1;
}
CANCELSIGNAL;
uae_u8 *natmem_offset = NULL;
#ifdef CPU_64_BIT
-static uae_u32 max_allowed_mman = 2048;
+int max_allowed_mman = 2048;
#else
-static uae_u32 max_allowed_mman = 512;
+int max_allowed_mman = 512;
#endif
void cache_free(void *cache)
size64 <<= 1;
if (size64 > max_allowed_mman * 1024 * 1024)
size64 = max_allowed_mman * 1024 * 1024;
- if (size64 > 0x40000000)
- size64 = 0x40000000;
+ if (size64 > 0x80000000)
+ size64 = 0x80000000;
if (size64 < 8 * 1024 * 1024)
size64 = 8 * 1024 * 1024;
size = max_z3fastmem = (uae_u32)size64;
static void startwce(struct uaeserialdatawin32 *sd, DWORD *evtmask)
{
+ SetEvent(sd->evtwce);
WaitCommEvent(sd->hCom, evtmask, &sd->olwce);
}
static HANDLE hCom = INVALID_HANDLE_VALUE;
static DCB dcb;
-static HANDLE writeevent;
+static HANDLE writeevent, readevent;
#define SERIAL_WRITE_BUFFER 100
#define SERIAL_READ_BUFFER 100
static uae_u8 outputbuffer[SERIAL_WRITE_BUFFER];
static uae_u8 inputbuffer[SERIAL_READ_BUFFER];
static int datainoutput;
static int dataininput, dataininputcnt;
-static OVERLAPPED writeol;
+static OVERLAPPED writeol, readol;
static writepending;
int openser (char *sername)
sprintf (buf, "\\.\\\\%s", sername);
+ if (!(readevent = CreateEvent (NULL, TRUE, FALSE, NULL))) {
+ write_log ("SERIAL: Failed to create r event!\n");
+ return 0;
+ }
+ readol.hEvent = readevent;
+
if (!(writeevent = CreateEvent (NULL, TRUE, FALSE, NULL))) {
- write_log ("SERIAL: Failed to create event!\n");
+ write_log ("SERIAL: Failed to create w event!\n");
return 0;
}
SetEvent (writeevent);
writeol.hEvent = writeevent;
+
uartbreak = 0;
- if ((hCom = CreateFile (buf, GENERIC_READ | GENERIC_WRITE,
+
+ hCom = CreateFile (buf, GENERIC_READ | GENERIC_WRITE,
0,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED,
- NULL)) != INVALID_HANDLE_VALUE) {
- SetCommMask (hCom, EV_RXFLAG);
- SetupComm (hCom, 65536,128);
- PurgeComm (hCom, PURGE_TXABORT | PURGE_RXABORT | PURGE_TXCLEAR | PURGE_RXCLEAR);
- CommTimeOuts.ReadIntervalTimeout = 0xFFFFFFFF;
- CommTimeOuts.ReadTotalTimeoutMultiplier = 0;
- CommTimeOuts.ReadTotalTimeoutConstant = 0;
- CommTimeOuts.WriteTotalTimeoutMultiplier = 0;
- CommTimeOuts.WriteTotalTimeoutConstant = 0;
- SetCommTimeouts (hCom, &CommTimeOuts);
-
- dcb.DCBlength = sizeof (DCB);
- GetCommState (hCom, &dcb);
-
- dcb.BaudRate = 9600;
- dcb.ByteSize = 8;
- dcb.Parity = NOPARITY;
- dcb.StopBits = ONESTOPBIT;
-
- dcb.fDsrSensitivity = FALSE;
- dcb.fOutxDsrFlow = FALSE;
- dcb.fDtrControl = DTR_CONTROL_DISABLE;
+ NULL);
+ if (hCom == INVALID_HANDLE_VALUE) {
+ write_log ("SERIAL: failed to open '%s' err=%d\n", buf, GetLastError());
+ closeser();
+ return 0;
+ }
+
+ SetCommMask (hCom, EV_RXFLAG);
+ SetupComm (hCom, 65536,128);
+ PurgeComm (hCom, PURGE_TXABORT | PURGE_RXABORT | PURGE_TXCLEAR | PURGE_RXCLEAR);
+ CommTimeOuts.ReadIntervalTimeout = 0xFFFFFFFF;
+ CommTimeOuts.ReadTotalTimeoutMultiplier = 0;
+ CommTimeOuts.ReadTotalTimeoutConstant = 0;
+ CommTimeOuts.WriteTotalTimeoutMultiplier = 0;
+ CommTimeOuts.WriteTotalTimeoutConstant = 0;
+ SetCommTimeouts (hCom, &CommTimeOuts);
+
+ dcb.DCBlength = sizeof (DCB);
+ GetCommState (hCom, &dcb);
+
+ dcb.BaudRate = 9600;
+ dcb.ByteSize = 8;
+ dcb.Parity = NOPARITY;
+ dcb.StopBits = ONESTOPBIT;
+
+ dcb.fDsrSensitivity = FALSE;
+ dcb.fOutxDsrFlow = FALSE;
+ dcb.fDtrControl = DTR_CONTROL_DISABLE;
- if (currprefs.serial_hwctsrts) {
- dcb.fOutxCtsFlow = TRUE;
- dcb.fRtsControl = RTS_CONTROL_HANDSHAKE;
- } else {
- dcb.fRtsControl = RTS_CONTROL_DISABLE;
- dcb.fOutxCtsFlow = FALSE;
- }
+ if (currprefs.serial_hwctsrts) {
+ dcb.fOutxCtsFlow = TRUE;
+ dcb.fRtsControl = RTS_CONTROL_HANDSHAKE;
+ } else {
+ dcb.fRtsControl = RTS_CONTROL_DISABLE;
+ dcb.fOutxCtsFlow = FALSE;
+ }
- dcb.fTXContinueOnXoff = FALSE;
- dcb.fOutX = FALSE;
- dcb.fInX = FALSE;
+ dcb.fTXContinueOnXoff = FALSE;
+ dcb.fOutX = FALSE;
+ dcb.fInX = FALSE;
- dcb.fErrorChar = FALSE;
- dcb.fNull = FALSE;
- dcb.fAbortOnError = FALSE;
+ dcb.fErrorChar = FALSE;
+ dcb.fNull = FALSE;
+ dcb.fAbortOnError = FALSE;
- dcb.XoffLim = 512;
- dcb.XonLim = 2048;
+ dcb.XoffLim = 512;
+ dcb.XonLim = 2048;
- if (SetCommState (hCom, &dcb)) {
- write_log ("SERIAL: Using %s CTS/RTS=%d\n", sername, currprefs.serial_hwctsrts);
- return 1;
- }
- write_log ("SERIAL: serial driver didn't accept new parameters\n");
- CloseHandle (hCom);
- hCom = INVALID_HANDLE_VALUE;
+ if (SetCommState (hCom, &dcb)) {
+ write_log ("SERIAL: Using %s CTS/RTS=%d\n", sername, currprefs.serial_hwctsrts);
+ return 1;
}
+
+ write_log ("SERIAL: serial driver didn't accept new parameters\n");
+ closeser();
return 0;
}
if(writeevent)
CloseHandle(writeevent);
writeevent = 0;
+ if(readevent)
+ CloseHandle(readevent);
+ readevent = 0;
uartbreak = 0;
}
int len = ComStat.cbInQue;
if (len > sizeof (inputbuffer))
len = sizeof (inputbuffer);
- if (ReadFile (hCom, inputbuffer, len, &actual, NULL)) {
- dataininput = actual;
- dataininputcnt = 0;
- if (actual == 0)
+ if (!ReadFile (hCom, inputbuffer, len, &actual, &readol)) {
+ if (GetLastError() == ERROR_IO_PENDING)
+ WaitForSingleObject(&readol, INFINITE);
+ else
return 0;
- return readser (buffer);
}
+ dataininput = actual;
+ dataininputcnt = 0;
+ if (actual == 0)
+ return 0;
+ return readser (buffer);
}
}
}
put_long (amigamemptr + PSSO_ModeInfo_PixelClock, dm->res.width * dm->res.height * (currprefs.gfx_refreshrate ? abs (currprefs.gfx_refreshrate) : default_freq));
}
-static int AssignModeID(int i, int count)
+struct modeids {
+ int width, height;
+ int id;
+};
+static struct modeids mi[] =
+{
+/* "original" modes */
+
+ 320, 200, 0,
+ 320, 240, 1,
+ 640, 400, 2,
+ 640, 480, 3,
+ 800, 600, 4,
+ 1024, 768, 5,
+ 1152, 864, 6,
+ 1280,1024, 7,
+ 1600,1280, 8,
+
+/* new modes */
+
+ 704, 480, 129,
+ 704, 576, 130,
+ 720, 480, 131,
+ 720, 576, 132,
+ 768, 483, 133,
+ 768, 576, 134,
+ 800, 480, 135,
+ 848, 480, 136,
+ 854, 480, 137,
+ 948, 576, 138,
+ 1024, 576, 139,
+ 1152, 768, 140,
+ 1152, 864, 141,
+ 1280, 720, 142,
+ 1280, 768, 143,
+ 1280, 800, 144,
+ 1280, 854, 145,
+ 1280, 960, 146,
+ 1366, 768, 147,
+ 1440, 900, 148,
+ 1440, 960, 149,
+ 1600,1200, 150,
+ 1680,1050, 151,
+ 1920,1080, 152,
+ 1920,1200, 153,
+ 2048,1152, 154,
+ 2048,1536, 155,
+ 2560,1600, 156,
+ 2560,2048, 157,
+
+ -1,-1,0
+};
+
+static int AssignModeID(int dm, int count, int *unkcnt)
{
+ int i, w, h;
+
+ w = DisplayModes[dm].res.width;
+ h = DisplayModes[dm].res.height;
+ for (i = 0; mi[i].width > 0; i++) {
+ if (w == mi[i].width && h == mi[i].height)
+ return 0x50001000 | (mi[i].id << 16);
+ }
+ (*unkcnt)++;
+ write_log("P96: Non-unique mode %dx%d\n", w, h);
+ return 0x5F000000 + (*unkcnt) * 0x10000;
+#if 0
int result;
if(DisplayModes[i].res.width == 320 && DisplayModes[i].res.height == 200)
result = 0x50001000;
else if(DisplayModes[i].res.width == 1600 && DisplayModes[i].res.height == 1280)
result = 0x50081000;
else
- result = 0x50091000 + count * 0x10000;
+ result = 0x50090000 + count * 0x10000;
return result;
+#endif
}
/****************************************
uae_u32 REGPARAM2 picasso_InitCard (struct regstruct *regs)
{
struct LibResolution res;
- int i;
int ModeInfoStructureCount = 1, LibResolutionStructureCount = 0;
+ int i, unkcnt;
+
uaecptr amigamemptr = 0;
uaecptr AmigaBoardInfo = m68k_areg (regs, 2);
put_word (AmigaBoardInfo + PSSO_BoardInfo_BitsPerCannon, DX_BitsPerCannon());
put_word (AmigaBoardInfo + PSSO_BoardInfo_MaxVerResolution + 8, alphacolour.height);
i = 0;
+ unkcnt = 0;
while (DisplayModes[i].depth >= 0) {
int j = i;
/* Add a LibResolution structure to the ResolutionsList MinList in our BoardInfo */
- res.DisplayID = AssignModeID(i, LibResolutionStructureCount);
+ res.DisplayID = AssignModeID(i, LibResolutionStructureCount, &unkcnt);
res.BoardInfo = AmigaBoardInfo;
res.Width = DisplayModes[i].res.width;
res.Height = DisplayModes[i].res.height;
#define IDC_HIGHPRIORITY 1530
#define IDC_MINIMIZED_NOSOUND 1530
#define IDC_MINIMIZED_PAUSE 1531
-#define IDC_D0 1532
#define IDC_STATE_CAPTURE 1532
-#define IDC_D1 1533
#define IDC_KBLED_USB 1533
-#define IDC_D2 1534
-#define IDC_D3 1535
-#define IDC_D4 1536
-#define IDC_D5 1537
-#define IDC_D6 1538
-#define IDC_D7 1539
-#define IDC_A0 1540
-#define IDC_A1 1541
-#define IDC_A2 1542
-#define IDC_A3 1543
-#define IDC_A4 1544
-#define IDC_A5 1545
-#define IDC_A6 1546
-#define IDC_A7 1547
-#define IDC_USP 1548
-#define IDC_SSP 1549
-#define IDC_PC 1550
-#define IDC_T1 1551
-#define IDC_T2 1552
-#define IDC_T3 1553
#define IDC_SER_SHARED 1553
-#define IDC_T4 1554
#define IDC_SER_CTSRTS 1554
-#define IDC_T5 1555
#define IDC_SER_DIRECT 1555
-#define IDC_T6 1556
#define IDC_PSPRINTER 1556
-#define IDC_T7 1557
#define IDC_PSPRINTERDETECT 1557
-#define IDC_T8 1558
#define IDC_UAESERIAL 1558
-#define IDC_T9 1559
-#define IDC_T10 1560
-#define IDC_T11 1561
-#define IDC_T12 1562
-#define IDC_T13 1563
-#define IDC_T14 1564
-#define IDC_T15 1565
-#define IDC_T16 1566
#define IDC_VIEWINFO 1568
#define IDC_SETINFO 1569
#define IDC_FLOPPYSLIDER 1570
sound_buffer.dwBufferBytes = dsoundbuf;
sound_buffer.lpwfxFormat = &wavfmt;
sound_buffer.dwFlags = DSBCAPS_GETCURRENTPOSITION2 | DSBCAPS_GLOBALFOCUS;
- sound_buffer.dwFlags |= DSBCAPS_CTRLVOLUME | DSBCAPS_STATIC;
+ sound_buffer.dwFlags |= DSBCAPS_CTRLVOLUME | DSBCAPS_LOCSOFTWARE;
sound_buffer.guid3DAlgorithm = GUID_NULL;
hr = IDirectSound_CreateSoundBuffer(lpDS, &sound_buffer, &pdsb, NULL);
hr = IDirectSoundBuffer_GetStatus (lpDSBsecondary, &status);
if (FAILED(hr)) {
write_log ("SOUND: GetStatus() failed: %s\n", DXError(hr));
+ restore (DSERR_BUFFERLOST);
return;
}
if (status & DSBSTATUS_BUFFERLOST) {
load_keyring(NULL, NULL);
}
+#ifdef WINUAEPUBLICBETA
static char *BETAMESSAGE = {
"This is unstable beta software. Click cancel if you are not comfortable using software that is incomplete and can have serious programming errors."
};
+#endif
static int betamessage (void)
{
extern void test (void);
extern int screenshotmode, b0rken_ati_overlay, postscript_print_debugging, sound_debug, log_uaeserial;
-extern int force_direct_catweasel, cpu_affinity;
+extern int force_direct_catweasel, cpu_affinity, max_allowed_mman;
static int original_affinity;
UAEMAJOR, UAEMINOR, UAESUBREV, BetaStr);
}
-static int PASCAL WinMain2 (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
- int nCmdShow)
+static int multi_display = 1;
+static int start_data = 0;
+
+static int process_arg(char **xargv)
{
- HANDLE hMutex;
+ int i, argc, xargc;
char **argv;
- int argc;
- int i;
- int multi_display = 1;
- int start_data = 0;
-
-#ifdef _DEBUG
- {
- int tmp = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
- //tmp &= 0xffff;
- tmp |= _CRTDBG_CHECK_ALWAYS_DF;
- tmp |= _CRTDBG_CHECK_CRT_DF;
- //tmp |=_CRTDBG_CHECK_EVERY_16_DF;
- //tmp |= _CRTDBG_DELAY_FREE_MEM_DF;
- _CrtSetDbgFlag(tmp);
- }
-#endif
-
- if (!osdetect())
- return 0;
- if (!dxdetect())
- return 0;
-
- hInst = hInstance;
- hMutex = CreateMutex( NULL, FALSE, "WinUAE Instantiated" ); // To tell the installer we're running
-#ifdef AVIOUTPUT
- AVIOutput_Initialize();
-#endif
+ xargc = 0;
argc = __argc; argv = __argv;
+ xargv[xargc++] = my_strdup(argv[0]);
for (i = 1; i < argc; i++) {
char *arg = argv[i];
- if (!strcmp (arg, "-log")) console_logging = 1;
+ if (!strcmp (arg, "-log")) {
+ console_logging = 1;
+ continue;
+ }
#ifdef FILESYS
- if (!strcmp (arg, "-rdbdump")) do_rdbdump = 1;
- if (!strcmp (arg, "-disableharddrivesafetycheck")) harddrive_dangerous = 0x1234dead;
- if (!strcmp (arg, "-noaspifiltering")) aspi_allow_all = 1;
+ if (!strcmp (arg, "-rdbdump")) {
+ do_rdbdump = 1;
+ continue;
+ }
+ if (!strcmp (arg, "-disableharddrivesafetycheck")) {
+ harddrive_dangerous = 0x1234dead;
+ continue;
+ }
+ if (!strcmp (arg, "-noaspifiltering")) {
+ aspi_allow_all = 1;
+ continue;
+ }
#endif
- if (!strcmp (arg, "-disableowr")) b0rken_ati_overlay = -1;
- if (!strcmp (arg, "-enableowr")) b0rken_ati_overlay = 1;
- if (!strcmp (arg, "-nordtsc")) no_rdtsc = 1;
- if (!strcmp (arg, "-forcerdtsc")) no_rdtsc = -1;
- if (!strcmp (arg, "-norawinput")) no_rawinput = 1;
- if (!strcmp (arg, "-scsilog")) log_scsi = 1;
- if (!strcmp (arg, "-seriallog")) log_uaeserial = 1;
- if (!strcmp (arg, "-nomultidisplay")) multi_display = 0;
- if (!strcmp (arg, "-legacypaths")) start_data = -1;
- if (!strcmp (arg, "-screenshotbmp")) screenshotmode = 0;
- if (!strcmp (arg, "-psprintdebug")) postscript_print_debugging = 1;
- if (!strcmp (arg, "-sounddebug")) sound_debug = 1;
+ if (!strcmp (arg, "-disableowr")) {
+ b0rken_ati_overlay = -1;
+ continue;
+ }
+ if (!strcmp (arg, "-enableowr")) {
+ b0rken_ati_overlay = 1;
+ continue;
+ }
+ if (!strcmp (arg, "-nordtsc")) {
+ no_rdtsc = 1;
+ continue;
+ }
+ if (!strcmp (arg, "-forcerdtsc")) {
+ no_rdtsc = -1;
+ continue;
+ }
+ if (!strcmp (arg, "-norawinput")) {
+ no_rawinput = 1;
+ continue;
+ }
+ if (!strcmp (arg, "-scsilog")) {
+ log_scsi = 1;
+ continue;
+ }
+ if (!strcmp (arg, "-seriallog")) {
+ log_uaeserial = 1;
+ continue;
+ }
+ if (!strcmp (arg, "-nomultidisplay")) {
+ multi_display = 0;
+ continue;
+ }
+ if (!strcmp (arg, "-legacypaths")) {
+ start_data = -1;
+ continue;
+ }
+ if (!strcmp (arg, "-screenshotbmp")) {
+ screenshotmode = 0;
+ continue;
+ }
+ if (!strcmp (arg, "-psprintdebug")) {
+ postscript_print_debugging = 1;
+ continue;
+ }
+ if (!strcmp (arg, "-sounddebug")) {
+ sound_debug = 1;
+ continue;
+ }
if (!strcmp (arg, "-directcatweasel")) {
force_direct_catweasel = 1;
if (i + 1 < argc)
force_direct_catweasel = getval (argv[++i]);
+ continue;
}
if (!strcmp (arg, "-affinity") && i + 1 < argc) {
cpu_affinity = getval (argv[++i]);
if (cpu_affinity == 0)
cpu_affinity = original_affinity;
SetThreadAffinityMask(GetCurrentThread(), cpu_affinity);
+ continue;
}
if (!strcmp (arg, "-datapath") && i + 1 < argc) {
strcpy(start_path_data, argv[++i]);
start_data = 1;
+ continue;
}
+ if (!strcmp (arg, "-maxmem") && i + 1 < argc) {
+ max_allowed_mman = getval (argv[++i]);
+ continue;
+ }
+ xargv[xargc++] = my_strdup(arg);
}
#if 0
argv = 0;
argv[0] = 0;
#endif
+ return xargc;
+}
+
+static int PASCAL WinMain2 (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
+{
+ HANDLE hMutex;
+ char **argv;
+ int argc, i;
+
+#ifdef _DEBUG
+ {
+ int tmp = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
+ //tmp &= 0xffff;
+ tmp |= _CRTDBG_CHECK_ALWAYS_DF;
+ tmp |= _CRTDBG_CHECK_CRT_DF;
+ //tmp |=_CRTDBG_CHECK_EVERY_16_DF;
+ //tmp |= _CRTDBG_DELAY_FREE_MEM_DF;
+ _CrtSetDbgFlag(tmp);
+ }
+#endif
+
+ if (!osdetect())
+ return 0;
+ if (!dxdetect())
+ return 0;
+
+ hInst = hInstance;
+ hMutex = CreateMutex( NULL, FALSE, "WinUAE Instantiated" ); // To tell the installer we're running
+#ifdef AVIOUTPUT
+ AVIOutput_Initialize();
+#endif
+
+ argv = xcalloc (sizeof (char*), __argc);
+ argc = process_arg(argv);
+
getstartpaths(start_data);
makeverstr(VersionStr);
SetCurrentDirectory (start_path_data);
// show memory leaks
//_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
#endif
+ for (i = 0; i < argc; i++)
+ free (argv[i]);
+ free(argv);
return FALSE;
}
+#if 0
int execute_command (char *cmd)
{
STARTUPINFO si;
}
return 0;
}
+#endif
#include "driveclick.h"
static int drvsampleres[] = {
#define WINUAEBETA 4
#define WINUAEPUBLICBETA 1
-#define WINUAEDATE MAKEBD(2006, 12, 16)
+#define WINUAEDATE MAKEBD(2006, 12, 20)
#define IHF_WINDOWHIDDEN 6
#define NORMAL_WINDOW_STYLE (WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU)
EnableWindow(GetDlgItem(hDlg, IDC_MIDIINLIST), workprefs.win32_midioutdev < -1 ? FALSE : TRUE);
item = SendDlgItemMessage (hDlg, IDC_SERIAL, CB_GETCURSEL, 0, 0L);
- if (item != CB_ERR) {
+ if (item != CB_ERR && item > 0) {
workprefs.use_serial = 1;
strcpy (workprefs.sername, comports[item - 1]);
} else {
}
joy0previous = joy1previous = -1;
+
SendDlgItemMessage (hDlg, IDC_SERIAL, CB_RESETCONTENT, 0, 0L);
SendDlgItemMessage (hDlg, IDC_SERIAL, CB_ADDSTRING, 0, (LPARAM)szNone);
portcnt = 0;
if(GetDefaultCommConfig(comports[portcnt], &cc, &size)) {
SendDlgItemMessage(hDlg, IDC_SERIAL, CB_ADDSTRING, 0, (LPARAM)comports[portcnt++]);
}
- write_log("%d:%d\n",port, GetLastError());
}
SendDlgItemMessage (hDlg, IDC_PRINTERLIST, CB_RESETCONTENT, 0, 0L);
/>
</Configuration>
<Configuration
- Name="Release|Win32"
- OutputDirectory="d:\amiga"
- IntermediateDirectory=".\Release"
+ Name="Debug|x64"
+ OutputDirectory="x64\$(ConfigurationName)"
+ IntermediateDirectory="x64\$(ConfigurationName)"
ConfigurationType="1"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
/>
<Tool
Name="VCMIDLTool"
- PreprocessorDefinitions="NDEBUG"
+ PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
- TargetEnvironment="1"
- TypeLibraryName=".\Release/winuae_msvc.tlb"
+ TargetEnvironment="3"
+ TypeLibraryName=".\Debug/winuae_msvc.tlb"
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="3"
- InlineFunctionExpansion="1"
- EnableIntrinsicFunctions="true"
- FavorSizeOrSpeed="1"
- OmitFramePointers="true"
- WholeProgramOptimization="false"
+ AdditionalOptions=""
+ Optimization="0"
AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep"
- PreprocessorDefinitions="WINVER=0x0500,WIN32,NDEBUG,_WINDOWS,_WIN32_IE=0x0500,UNIX"
- StringPooling="true"
+ PreprocessorDefinitions="WINVER=0x0500,_DEBUG,WIN32,_WINDOWS,ZLIB_DLL,OPENGL_SUPPORT,_WIN32_IE 0x0500,UNIX;WIN64"
ExceptionHandling="0"
- BasicRuntimeChecks="0"
- RuntimeLibrary="0"
- BufferSecurityCheck="false"
- EnableFunctionLevelLinking="false"
- EnableEnhancedInstructionSet="0"
- FloatingPointModel="0"
- TreatWChar_tAsBuiltInType="false"
- RuntimeTypeInfo="false"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile=".\Release/winuae_msvc.pch"
- AssemblerListingLocation=".\Release/"
- ObjectFile=".\Release/"
- ProgramDataBaseFileName=".\Release/"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ BufferSecurityCheck="true"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile=".\Debug/winuae_msvc.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="true"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
CompileAs="0"
DisableSpecificWarnings="4996"
- ForcedIncludeFiles=""
+ EnablePREfast="false"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
+ PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib winio.lib setupapi.lib wininet.lib dxerr8.lib shlwapi.lib zlibstat.lib libpng.lib lglcd.lib"
+ AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib zlib1.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib winio.lib setupapi.lib wininet.lib capsimg.lib dxerr8.lib shlwapi.lib"
OutputFile="d:\amiga\winuae.exe"
- LinkIncremental="1"
+ LinkIncremental="2"
SuppressStartupBanner="true"
- AdditionalLibraryDirectories=""
- GenerateManifest="true"
- AdditionalManifestDependencies=""
+ GenerateManifest="false"
DelayLoadDLLs="setupapi.dll"
GenerateDebugInformation="true"
- ProgramDatabaseFile=".\Release/winuae.pdb"
+ ProgramDatabaseFile=".\Debug/winuae.pdb"
SubSystem="2"
StackReserveSize="2621440"
StackCommitSize="2621440"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- OptimizeForWindows98="0"
- LinkTimeCodeGeneration="0"
- TargetMachine="1"
+ TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
- AdditionalManifestFiles="..\resources\winuae.exe.manifest"
/>
<Tool
Name="VCXDCMakeTool"
/>
</Configuration>
<Configuration
- Name="TestRelease|Win32"
- IntermediateDirectory="$(ConfigurationName)"
+ Name="Release|Win32"
+ OutputDirectory="d:\amiga"
+ IntermediateDirectory=".\Release"
ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/winuae_msvc.tlb"
/>
<Tool
Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="1"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="true"
+ WholeProgramOptimization="false"
+ AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep"
+ PreprocessorDefinitions="WINVER=0x0500,WIN32,NDEBUG,_WINDOWS,_WIN32_IE=0x0500,UNIX"
+ StringPooling="true"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="false"
+ EnableEnhancedInstructionSet="0"
+ FloatingPointModel="0"
+ TreatWChar_tAsBuiltInType="false"
+ RuntimeTypeInfo="false"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/winuae_msvc.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ ForcedIncludeFiles=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
+ AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib winio.lib setupapi.lib wininet.lib dxerr8.lib shlwapi.lib zlibstat.lib libpng.lib lglcd.lib"
+ OutputFile="d:\amiga\winuae.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories=""
+ GenerateManifest="true"
+ AdditionalManifestDependencies=""
+ DelayLoadDLLs="setupapi.dll"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Release/winuae.pdb"
+ SubSystem="2"
+ StackReserveSize="2621440"
+ StackCommitSize="2621440"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="0"
+ LinkTimeCodeGeneration="0"
+ TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
+ AdditionalManifestFiles="..\resources\winuae.exe.manifest"
/>
<Tool
Name="VCXDCMakeTool"
/>
</Configuration>
<Configuration
- Name="Release64|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
+ Name="Release|x64"
+ OutputDirectory="$(SolutionDir)x64\$(ConfigurationName)"
+ IntermediateDirectory="x64\$(ConfigurationName)"
ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName=".\Release/winuae_msvc.tlb"
/>
<Tool
Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="1"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="true"
+ WholeProgramOptimization="false"
+ AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep"
+ PreprocessorDefinitions="WINVER=0x0500,WIN32,NDEBUG,_WINDOWS,ZLIB_DLL,_WIN32_IE 0x0500,WIN64,_WIN64,UNIX"
+ StringPooling="true"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ EnableEnhancedInstructionSet="0"
+ FloatingPointModel="0"
+ TreatWChar_tAsBuiltInType="false"
+ RuntimeTypeInfo="false"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/winuae_msvc.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="1"
+ DisableSpecificWarnings="4996"
+ ForcedIncludeFiles=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
+ AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib setupapi.lib wininet.lib dxerr8.lib shlwapi.lib"
+ ShowProgress="0"
+ OutputFile="d:\amiga\winuae64.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories=""
+ GenerateManifest="true"
+ DelayLoadDLLs=""
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Release/winuae.pdb"
+ SubSystem="2"
+ StackReserveSize="0"
+ StackCommitSize="0"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="0"
+ LinkTimeCodeGeneration="0"
+ TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
</Configuration>
<Configuration
- Name="Debug64|Win32"
- OutputDirectory="$(ConfigurationName)"
+ Name="TestRelease|Win32"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCMIDLTool"
- PreprocessorDefinitions="_DEBUG"
- MkTypLibCompatible="true"
- SuppressStartupBanner="true"
- TargetEnvironment="1"
- TypeLibraryName=".\Debug/winuae_msvc.tlb"
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalOptions=""
- Optimization="0"
- AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep"
- PreprocessorDefinitions="WINVER=0x0500,_DEBUG,WIN32,_WINDOWS,ZLIB_DLL,OPENGL_SUPPORT,_WIN32_IE 0x0500,UNIX"
- ExceptionHandling="0"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- BufferSecurityCheck="true"
- RuntimeTypeInfo="true"
- PrecompiledHeaderFile=".\Debug/winuae_msvc.pch"
- AssemblerListingLocation=".\Debug/"
- ObjectFile=".\Debug/"
- ProgramDataBaseFileName=".\Debug/"
- WarningLevel="3"
- SuppressStartupBanner="true"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- CompileAs="0"
- DisableSpecificWarnings="4996"
- EnablePREfast="false"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
- AdditionalOptions="/MACHINE:I386"
- AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib zdll.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib winio.lib setupapi.lib wininet.lib capsimg.lib dxerr8.lib shlwapi.lib"
- OutputFile="d:\amiga\winuae.exe"
- LinkIncremental="2"
- SuppressStartupBanner="true"
- GenerateManifest="false"
- DelayLoadDLLs="setupapi.dll"
- GenerateDebugInformation="true"
- ProgramDatabaseFile=".\Debug/winuae.pdb"
- SubSystem="2"
- StackReserveSize="2621440"
- StackCommitSize="2621440"
/>
<Tool
Name="VCALinkTool"
/>
</Configuration>
<Configuration
- Name="Debug|x64"
- OutputDirectory="x64\$(ConfigurationName)"
+ Name="TestRelease|x64"
+ OutputDirectory="$(SolutionDir)x64\$(ConfigurationName)"
IntermediateDirectory="x64\$(ConfigurationName)"
ConfigurationType="1"
UseOfMFC="0"
/>
<Tool
Name="VCMIDLTool"
- PreprocessorDefinitions="_DEBUG"
+ PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="3"
- TypeLibraryName=".\Debug/winuae_msvc.tlb"
+ TypeLibraryName=".\Release/winuae_msvc.tlb"
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalOptions=""
+ AdditionalOptions="/Oy-"
Optimization="0"
+ InlineFunctionExpansion="1"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="0"
+ OmitFramePointers="false"
AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep"
- PreprocessorDefinitions="WINVER=0x0500,_DEBUG,WIN32,_WINDOWS,ZLIB_DLL,OPENGL_SUPPORT,_WIN32_IE 0x0500,UNIX;WIN64"
+ PreprocessorDefinitions="WINVER=0x0500,WIN32,NDEBUG,_WINDOWS,ZLIB_DLL,_WIN32_IE 0x0500,UNIX;WIN64"
+ StringPooling="true"
ExceptionHandling="0"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- BufferSecurityCheck="true"
- RuntimeTypeInfo="true"
- PrecompiledHeaderFile=".\Debug/winuae_msvc.pch"
- AssemblerListingLocation=".\Debug/"
- ObjectFile=".\Debug/"
- ProgramDataBaseFileName=".\Debug/"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ EnableEnhancedInstructionSet="0"
+ TreatWChar_tAsBuiltInType="false"
+ RuntimeTypeInfo="false"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\Release/winuae_msvc.pch"
+ AssemblerListingLocation=".\TestRelease/"
+ ObjectFile=".\TestRelease/"
+ ProgramDataBaseFileName=".\TestRelease/"
WarningLevel="3"
SuppressStartupBanner="true"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- CompileAs="0"
- DisableSpecificWarnings="4996"
- EnablePREfast="false"
+ CompileAs="1"
+ ForcedIncludeFiles=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
+ PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib zlib1.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib winio.lib setupapi.lib wininet.lib capsimg.lib dxerr8.lib shlwapi.lib"
OutputFile="d:\amiga\winuae.exe"
- LinkIncremental="2"
+ LinkIncremental="1"
SuppressStartupBanner="true"
- GenerateManifest="false"
DelayLoadDLLs="setupapi.dll"
GenerateDebugInformation="true"
- ProgramDatabaseFile=".\Debug/winuae.pdb"
+ ProgramDatabaseFile=".\Release/winuae.pdb"
SubSystem="2"
StackReserveSize="2621440"
StackCommitSize="2621440"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="0"
TargetMachine="17"
/>
<Tool
/>
</Configuration>
<Configuration
- Name="Release|x64"
- OutputDirectory="$(SolutionDir)x64\$(ConfigurationName)"
- IntermediateDirectory="x64\$(ConfigurationName)"
+ Name="Release64|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCMIDLTool"
- PreprocessorDefinitions="NDEBUG"
- MkTypLibCompatible="true"
- SuppressStartupBanner="true"
- TargetEnvironment="3"
- TypeLibraryName=".\Release/winuae_msvc.tlb"
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="3"
- InlineFunctionExpansion="1"
- EnableIntrinsicFunctions="true"
- FavorSizeOrSpeed="1"
- OmitFramePointers="true"
- WholeProgramOptimization="false"
- AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep"
- PreprocessorDefinitions="WINVER=0x0500,WIN32,NDEBUG,_WINDOWS,ZLIB_DLL,_WIN32_IE 0x0500,WIN64,_WIN64,UNIX"
- StringPooling="true"
- ExceptionHandling="0"
- BasicRuntimeChecks="0"
- RuntimeLibrary="0"
- BufferSecurityCheck="false"
- EnableFunctionLevelLinking="true"
- EnableEnhancedInstructionSet="0"
- FloatingPointModel="0"
- TreatWChar_tAsBuiltInType="false"
- RuntimeTypeInfo="false"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile=".\Release/winuae_msvc.pch"
- AssemblerListingLocation=".\Release/"
- ObjectFile=".\Release/"
- ProgramDataBaseFileName=".\Release/"
- WarningLevel="3"
- SuppressStartupBanner="true"
- CompileAs="1"
- DisableSpecificWarnings="4996"
- ForcedIncludeFiles=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib setupapi.lib wininet.lib dxerr8.lib shlwapi.lib"
- ShowProgress="0"
- OutputFile="d:\amiga\winuae64.exe"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- AdditionalLibraryDirectories=""
- GenerateManifest="true"
- DelayLoadDLLs=""
- GenerateDebugInformation="true"
- ProgramDatabaseFile=".\Release/winuae.pdb"
- SubSystem="2"
- StackReserveSize="0"
- StackCommitSize="0"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- OptimizeForWindows98="0"
- LinkTimeCodeGeneration="0"
- TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
</Configuration>
<Configuration
- Name="TestRelease|x64"
+ Name="Release64|x64"
OutputDirectory="$(SolutionDir)x64\$(ConfigurationName)"
IntermediateDirectory="x64\$(ConfigurationName)"
ConfigurationType="1"
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalOptions="/Oy-"
- Optimization="0"
+ Optimization="3"
InlineFunctionExpansion="1"
EnableIntrinsicFunctions="true"
- FavorSizeOrSpeed="0"
- OmitFramePointers="false"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="true"
+ WholeProgramOptimization="false"
AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep"
- PreprocessorDefinitions="WINVER=0x0500,WIN32,NDEBUG,_WINDOWS,ZLIB_DLL,_WIN32_IE 0x0500,UNIX;WIN64"
+ PreprocessorDefinitions="WINVER=0x0500,WIN32,NDEBUG,_WINDOWS,_WIN32_IE 0x0500,UNIX;WIN64"
StringPooling="true"
ExceptionHandling="0"
+ BasicRuntimeChecks="0"
RuntimeLibrary="0"
BufferSecurityCheck="false"
- EnableFunctionLevelLinking="true"
+ EnableFunctionLevelLinking="false"
EnableEnhancedInstructionSet="0"
+ FloatingPointModel="0"
TreatWChar_tAsBuiltInType="false"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
- PrecompiledHeaderFile=".\Release/winuae_msvc.pch"
- AssemblerListingLocation=".\TestRelease/"
- ObjectFile=".\TestRelease/"
- ProgramDataBaseFileName=".\TestRelease/"
+ PrecompiledHeaderFile=".\Release64/winuae_msvc.pch"
+ AssemblerListingLocation=".\Release64/"
+ ObjectFile=".\Release64/"
+ ProgramDataBaseFileName=".\Release64/"
WarningLevel="3"
SuppressStartupBanner="true"
+ Detect64BitPortabilityProblems="true"
CompileAs="1"
+ DisableSpecificWarnings="4996"
ForcedIncludeFiles=""
/>
<Tool
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib zlib1.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib winio.lib setupapi.lib wininet.lib capsimg.lib dxerr8.lib shlwapi.lib"
- OutputFile="d:\amiga\winuae.exe"
+ AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib winio.lib setupapi.lib wininet.lib dxerr8.lib shlwapi.lib zlib.lib"
+ OutputFile="d:\amiga\winuae64.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
- DelayLoadDLLs="setupapi.dll"
+ AdditionalLibraryDirectories=""
+ GenerateManifest="true"
+ DelayLoadDLLs=""
GenerateDebugInformation="true"
- ProgramDatabaseFile=".\Release/winuae.pdb"
+ ProgramDatabaseFile=".\Release64/winuae.pdb"
SubSystem="2"
StackReserveSize="2621440"
StackCommitSize="2621440"
OptimizeReferences="2"
EnableCOMDATFolding="2"
OptimizeForWindows98="0"
+ LinkTimeCodeGeneration="0"
TargetMachine="17"
/>
<Tool
/>
<Tool
Name="VCManifestTool"
+ AdditionalManifestFiles="..\resources\winuae.exe.manifest"
/>
<Tool
Name="VCXDCMakeTool"
/>
</Configuration>
<Configuration
- Name="Release64|x64"
- OutputDirectory="$(SolutionDir)x64\$(ConfigurationName)"
- IntermediateDirectory="x64\$(ConfigurationName)"
+ Name="Debug64|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
/>
<Tool
Name="VCMIDLTool"
- PreprocessorDefinitions="NDEBUG"
+ PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
- TargetEnvironment="3"
- TypeLibraryName=".\Release/winuae_msvc.tlb"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/winuae_msvc.tlb"
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="3"
- InlineFunctionExpansion="1"
- EnableIntrinsicFunctions="true"
- FavorSizeOrSpeed="1"
- OmitFramePointers="true"
- WholeProgramOptimization="false"
+ AdditionalOptions=""
+ Optimization="0"
AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep"
- PreprocessorDefinitions="WINVER=0x0500,WIN32,NDEBUG,_WINDOWS,_WIN32_IE 0x0500,UNIX;WIN64"
- StringPooling="true"
+ PreprocessorDefinitions="WINVER=0x0500,_DEBUG,WIN32,_WINDOWS,ZLIB_DLL,OPENGL_SUPPORT,_WIN32_IE 0x0500,UNIX"
ExceptionHandling="0"
- BasicRuntimeChecks="0"
- RuntimeLibrary="0"
- BufferSecurityCheck="false"
- EnableFunctionLevelLinking="false"
- EnableEnhancedInstructionSet="0"
- FloatingPointModel="0"
- TreatWChar_tAsBuiltInType="false"
- RuntimeTypeInfo="false"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile=".\Release64/winuae_msvc.pch"
- AssemblerListingLocation=".\Release64/"
- ObjectFile=".\Release64/"
- ProgramDataBaseFileName=".\Release64/"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ BufferSecurityCheck="true"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile=".\Debug/winuae_msvc.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="true"
Detect64BitPortabilityProblems="true"
- CompileAs="1"
+ DebugInformationFormat="4"
+ CompileAs="0"
DisableSpecificWarnings="4996"
- ForcedIncludeFiles=""
+ EnablePREfast="false"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
+ PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib winio.lib setupapi.lib wininet.lib dxerr8.lib shlwapi.lib zlib.lib"
- OutputFile="d:\amiga\winuae64.exe"
- LinkIncremental="1"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib zdll.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib winio.lib setupapi.lib wininet.lib capsimg.lib dxerr8.lib shlwapi.lib"
+ OutputFile="d:\amiga\winuae.exe"
+ LinkIncremental="2"
SuppressStartupBanner="true"
- AdditionalLibraryDirectories=""
- GenerateManifest="true"
- DelayLoadDLLs=""
+ GenerateManifest="false"
+ DelayLoadDLLs="setupapi.dll"
GenerateDebugInformation="true"
- ProgramDatabaseFile=".\Release64/winuae.pdb"
+ ProgramDatabaseFile=".\Debug/winuae.pdb"
SubSystem="2"
StackReserveSize="2621440"
StackCommitSize="2621440"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- OptimizeForWindows98="0"
- LinkTimeCodeGeneration="0"
- TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
- AdditionalManifestFiles="..\resources\winuae.exe.manifest"
/>
<Tool
Name="VCXDCMakeTool"
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCResourceCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug64|Win32"
+ Name="Release|Win32"
>
<Tool
Name="VCResourceCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCResourceCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="TestRelease|x64"
>
<Tool
Name="VCResourceCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
- Name="TestRelease|x64"
+ Name="Release64|x64"
>
<Tool
Name="VCResourceCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
- Name="Release64|x64"
+ Name="Debug64|Win32"
>
<Tool
Name="VCResourceCompilerTool"
RelativePath="..\resources\resource.h"
>
</File>
- <File
- RelativePath="..\resources\resource.hm"
- >
- </File>
</Files>
<Globals>
</Globals>
+Beta 5:
+
+- added -maxmem command line parameter, "-maxmem 1536" enables
+ 1G Z3Fast support. (32-bit max) Note: not default because it
+ can cause weird side-effects and is not compatible with all Windows
+ versions.
+- remove winuae-specific command line parameters before passing
+ them to configuration parser.
+- internal serial and parallel port selection updates
+ (partially in b4 + fixes in b5)
+- defined more Picasso96 modeIDs, now most PC display modes have
+ unique ID (updating display card/drivers, moving between PCs
+ does not anymore cause mysterious mode changes)
+ NOTE: you may need to reset your Picasso96 display mode if your
+ current mode was not defined in previous WinUAE versions.
+- serial port emulation fixed (broke in b4)
+
Beta 4:
- uaeserial.device tweaks