]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
imported winuaesrc1340b6.zip
authorToni Wilen <twilen@winuae.net>
Sun, 24 Dec 2006 11:14:31 +0000 (13:14 +0200)
committerToni Wilen <twilen@winuae.net>
Mon, 22 Feb 2010 19:30:42 +0000 (21:30 +0200)
31 files changed:
autoconf.c
bsdsocket.c
compemu_fpp.c
custom.c
drawing.c
enforcer.c
expansion.c
include/autoconf.h
include/bsdsocket.h
include/custom.h
memory.c
native2amiga.c
newcpu.c
od-win32/bsdsock.c
od-win32/build68k_msvc/build68k_msvc.vcproj
od-win32/genblitter_msvc/genblitter_msvc.vcproj
od-win32/gencomp_msvc/gencomp_msvc.vcproj
od-win32/gencpu_msvc/gencpu_msvc.vcproj
od-win32/genlinetoscr_msvc/genlinetoscr_msvc.vcproj
od-win32/parser.c
od-win32/parser.h
od-win32/resources/winuae.rc
od-win32/resources/winuae_minimal.rc
od-win32/serial_win32.c
od-win32/win32.c
od-win32/win32.h
od-win32/win32gui.c
od-win32/winuae_msvc/winuae_msvc.vcproj
od-win32/winuaechangelog.txt
od-win32/writelog.c
traps.c

index 55ab611231e0c2fedde6f6ee42f720c331461da9..d8c809e8023dce2bfb391755a708442e331aaeb0 100644 (file)
@@ -44,13 +44,13 @@ addrbank rtarea_bank = {
     rtarea_lget, rtarea_wget, ABFLAG_ROMIN
 };
 
-uae_u8 *REGPARAM2 rtarea_xlate (uaecptr addr)
+static uae_u8 *REGPARAM2 rtarea_xlate (uaecptr addr)
 {
     addr &= 0xFFFF;
     return rtarea + addr;
 }
 
-uae_u32 REGPARAM2 rtarea_lget (uaecptr addr)
+static uae_u32 REGPARAM2 rtarea_lget (uaecptr addr)
 {
 #ifdef JIT
     special_mem |= S_READ;
@@ -59,7 +59,7 @@ uae_u32 REGPARAM2 rtarea_lget (uaecptr addr)
     return (uae_u32)(rtarea_wget (addr) << 16) + rtarea_wget (addr+2);
 }
 
-uae_u32 REGPARAM2 rtarea_wget (uaecptr addr)
+static uae_u32 REGPARAM2 rtarea_wget (uaecptr addr)
 {
 #ifdef JIT
     special_mem |= S_READ;
@@ -68,7 +68,7 @@ uae_u32 REGPARAM2 rtarea_wget (uaecptr addr)
     return (rtarea[addr]<<8) + rtarea[addr+1];
 }
 
-uae_u32 REGPARAM2 rtarea_bget (uaecptr addr)
+static uae_u32 REGPARAM2 rtarea_bget (uaecptr addr)
 {
 #ifdef JIT
     special_mem |= S_READ;
@@ -77,21 +77,21 @@ uae_u32 REGPARAM2 rtarea_bget (uaecptr addr)
     return rtarea[addr];
 }
 
-void REGPARAM2 rtarea_lput (uaecptr addr, uae_u32 value)
+static void REGPARAM2 rtarea_lput (uaecptr addr, uae_u32 value)
 {
 #ifdef JIT
     special_mem |= S_WRITE;
 #endif
 }
 
-void REGPARAM2 rtarea_wput (uaecptr addr, uae_u32 value)
+static void REGPARAM2 rtarea_wput (uaecptr addr, uae_u32 value)
 {
 #ifdef JIT
     special_mem |= S_WRITE;
 #endif
 }
 
-void REGPARAM2 rtarea_bput (uaecptr addr, uae_u32 value)
+static void REGPARAM2 rtarea_bput (uaecptr addr, uae_u32 value)
 {
 #ifdef JIT
     special_mem |= S_WRITE;
index e5224bd3bce980e6eb40ad4e84fe220b18a36a4e..f3fb03a99d4a4ea68ad2c0a0b89c26ad631c2f82 100644 (file)
@@ -21,6 +21,8 @@
 #include "autoconf.h"
 #include "traps.h"
 #include "bsdsocket.h"
+#include "threaddep/thread.h"
+#include "native2amiga.h"
 
 #ifdef BSDSOCKET
 
@@ -243,19 +245,22 @@ void releasesock (SB, int sd)
 
 /* Signal queue */
 /* @@@ TODO: ensure proper interlocking */
+#if 0
 struct socketbase *sbsigqueue;
-
 volatile int bsd_int_requested;
+#endif
 
 void addtosigqueue (SB, int events)
 {
+    uae_u32 ot, sts;
+
     locksigqueue ();
 
     if (events)
        sb->sigstosend |= sb->eventsigs;
     else
        sb->sigstosend |= ((uae_u32) 1) << sb->signal;
-
+#if 0
     if (!sb->dosignal) {
        sb->nextsig = sbsigqueue;
        sbsigqueue = sb;
@@ -263,12 +268,22 @@ void addtosigqueue (SB, int events)
     sb->dosignal = 1;
 
     bsd_int_requested = 1;
+#endif
+
+    ot = sb->ownertask;
+    sts = sb->sigstosend;
+
+    sb->sigstosend = 0;
 
     unlocksigqueue ();
 
+    if (sts)
+       uae_Signal(ot, sts);
+
     //INTREQ (0x8000 | 0x2000);
 }
 
+#if 0
 static uae_u32 REGPARAM2 bsdsock_int_handler (TrapContext *context)
 {
     SB;
@@ -297,12 +312,13 @@ static uae_u32 REGPARAM2 bsdsock_int_handler (TrapContext *context)
 
     return 0;
 }
+#endif
 
 void waitsig (TrapContext *context, SB)
 {
     long sigs;
     m68k_dreg (&context->regs, 0) = (((uae_u32) 1) << sb->signal) | sb->eintrsigs;
-    if ((sigs = CallLib (context, get_long (4), -0x13e)) & sb->eintrsigs) {
+    if ((sigs = CallLib (context, get_long (4), -0x13e)) & sb->eintrsigs) { /* Wait */
        sockabort (sb); 
        bsdsocklib_seterrno (sb, 4); /* EINTR */
 
@@ -318,11 +334,12 @@ void waitsig (TrapContext *context, SB)
 
 void cancelsig (TrapContext *context, SB)
 {
+#if 0
     locksigqueue ();
     if (sb->dosignal)
        sb->dosignal = 2;
     unlocksigqueue ();
-
+#endif
     m68k_dreg (&context->regs, 0) = 0;
     m68k_dreg (&context->regs, 1) = ((uae_u32) 1) << sb->signal;
     CallLib (context, get_long (4), -0x132); /* SetSignal() */
@@ -425,6 +442,7 @@ static void free_socketbase (TrapContext *context)
            }
        }
 
+#if 0
        if (sb == sbsigqueue)
            sbsigqueue = sb->next;
        else {
@@ -435,6 +453,7 @@ static void free_socketbase (TrapContext *context)
                }
            }
        }
+#endif
 
        unlocksigqueue ();
 
@@ -1357,12 +1376,14 @@ static uae_u32 REGPARAM2 bsdsocklib_init (TrapContext *context)
 
     strErrptr = addstr (&tmp1, strErr);
 
+#if 0
     /* @@@ someone please implement a proper interrupt handler setup here :) */
     tmp1 = here ();
     calltrap (deftrap2 (bsdsock_int_handler, TRAPFLAG_EXTRA_STACK | TRAPFLAG_NO_RETVAL, "bsdsock_int_handler"));
     dw (0x4ef9);
     dl (get_long (context->regs.vbr + 0x78));
     put_long (context->regs.vbr + 0x78, tmp1);
+#endif
 
     m68k_dreg (&context->regs, 0) = 1;
     return 0;
@@ -1390,7 +1411,9 @@ void bsdlib_reset (void)
     }
 
     socketbases = NULL;
+#if 0
     sbsigqueue = NULL;
+#endif
 
     for (i = 0; i < SOCKPOOLSIZE; i++) {
        if (sockdata->sockpoolids[i] != UNIQUE_ID) {
index b14855bd97aa23c3f61579e46c7f6fad9d9d506a..a237a04e73ba8bc2d82be45326457a563d206037 100644 (file)
@@ -802,10 +802,10 @@ void comp_frestore_opp (uae_u32 opcode)
        m68k_areg (&regs, opcode & 7) = ad;
 }
 
-extern uae_u32 xhex_pi, xhex_exp_1, xhex_l2_e, xhex_ln_2, xhex_ln_10;
-extern uae_u32 xhex_l10_2, xhex_l10_e, xhex_1e16, xhex_1e32, xhex_1e64;
-extern uae_u32 xhex_1e128, xhex_1e256, xhex_1e512, xhex_1e1024;
-extern uae_u32 xhex_1e2048, xhex_1e4096;
+extern uae_u32 xhex_pi[], xhex_exp_1[], xhex_l2_e[], xhex_ln_2[], xhex_ln_10[];
+extern uae_u32 xhex_l10_2[], xhex_l10_e[], xhex_1e16[], xhex_1e32[], xhex_1e64[];
+extern uae_u32 xhex_1e128[], xhex_1e256[], xhex_1e512[], xhex_1e1024[];
+extern uae_u32 xhex_1e2048[], xhex_1e4096[];
 extern double fp_1e8;
 extern float  fp_1e1, fp_1e2, fp_1e4;
 
index c72a6516058ce277323f7423ec0559a7f0bac194..d4aed672a5452d06077d46ff9a8965c4d83e0b3d 100644 (file)
--- a/custom.c
+++ b/custom.c
@@ -2457,12 +2457,12 @@ static void perform_copper_write (int old_hpos);
 static void immediate_copper (int num)
 {
     cop_state.state = COP_stop;
-    if (!dmaen (DMA_COPPER))
-       return;
     cop_state.vpos = vpos;
     cop_state.hpos = current_hpos () & ~1;
     cop_state.ip = num == 1 ? cop1lc : cop2lc;
     for (;;) {
+       if (!dmaen(DMA_COPPER))
+           break;
        cop_state.i1 = chipmem_agnus_wget (cop_state.ip);
        cop_state.i2 = chipmem_agnus_wget (cop_state.ip + 2);
        cop_state.ip += 4;
@@ -2477,7 +2477,7 @@ static void immediate_copper (int num)
                continue;
            }
            perform_copper_write (0);
-       } else { // wait or skip
+       } else { // wait or skip, simply ignore them
            if (cop_state.i1 >= 0xffdf && cop_state.i2 == 0xfffe)
                break;
        }
@@ -4386,7 +4386,7 @@ static void hsync_handler (void)
        INTREQ (0x8000 | 0x0008);
     }
 #endif
-#if 1
+#if 0
     {
     extern volatile int bsd_int_requested;
     if (bsd_int_requested) {
@@ -4427,23 +4427,6 @@ static void hsync_handler (void)
     //copper_check (2);
 }
 
-#if 0
-    unsigned long int mintime = ~0L;
-    for (i = 0; i < ev_max; i++) {
-       if (eventtab[i].active) {
-           unsigned long int eventtime = eventtab[i].evtime - currcycle;
-#ifdef EVENT_DEBUG
-           if (eventtime == 0) {
-               write_log("event %d bug\n",i);
-           }
-#endif
-           if (eventtime < mintime)
-               mintime = eventtime;
-       }
-    }
-    nextevent = currcycle + mintime;
-#endif
-
 static void MISC_handler(void)
 {
     int i, recheck;
@@ -5186,8 +5169,8 @@ static void REGPARAM2 custom_bput (uaecptr addr, uae_u32 value)
 #endif
     custom_wput (addr & ~1, rval);
     if (warned < 10) {
-       if (m68k_getpc(&regs) < 0xe00000 || m68k_getpc(&regs) >= 0x10000000) {
-           write_log ("Byte put to custom register %04.4X PC=%08.8X\n", addr, m68k_getpc(&regs));
+       if (M68K_GETPC < 0xe00000 || M68K_GETPC >= 0x10000000) {
+           write_log ("Byte put to custom register %04.4X PC=%08.8X\n", addr, M68K_GETPC);
            warned++;
        }
     }
index dd7936afdb518a31ffbbac5c66020f8f9da8e560..1b4e4d9cdabf676f9b0c4dedf2173461a3fc9cf6 100644 (file)
--- a/drawing.c
+++ b/drawing.c
@@ -1049,7 +1049,7 @@ static void NOINLINE pfield_doline_n8 (uae_u32 *data, int count) { pfield_doline
 static void pfield_doline (int lineno)
 {
     int wordcount = dp_for_drawing->plflinelen;
-    uae_u32 *data = pixdata.apixels_l + MAX_PIXELS_PER_LINE/4;
+    uae_u32 *data = pixdata.apixels_l + MAX_PIXELS_PER_LINE / 4;
 
 #ifdef SMART_UPDATE
 #define DATA_POINTER(n) (line_data[lineno] + (n)*MAX_WORDS_PER_LINE*2)
index 5b4cdd98ea1687fa9a32af89aada83192763e843..06d90ad8b6483eb43f30c442cf3bbe23e025eb08 100644 (file)
@@ -36,7 +36,7 @@
 
 #define ISILLEGAL(addr) (addr < 4 || (addr > 4 && addr < ENFORCESIZE))
 
-extern uae_u32 natmem_offset;
+extern uae_u8 *natmem_offset;
 
 int flashscreen = 0;
 static int enforcer_installed = 0;
index 80106f6618e1be6746a9bb7e1d167d3e0f37f591..24a6fadd9b09e26395a95119c2335fff1d444d05 100644 (file)
@@ -347,7 +347,7 @@ static uae_u8 *REGPARAM3 fastmem_xlate (uaecptr addr) REGPARAM;
 uaecptr fastmem_start; /* Determined by the OS */
 static uae_u8 *fastmemory;
 
-uae_u32 REGPARAM2 fastmem_lget (uaecptr addr)
+static uae_u32 REGPARAM2 fastmem_lget (uaecptr addr)
 {
     uae_u8 *m;
     addr -= fastmem_start & fastmem_mask;
@@ -356,7 +356,7 @@ uae_u32 REGPARAM2 fastmem_lget (uaecptr addr)
     return do_get_mem_long ((uae_u32 *)m);
 }
 
-uae_u32 REGPARAM2 fastmem_wget (uaecptr addr)
+static uae_u32 REGPARAM2 fastmem_wget (uaecptr addr)
 {
     uae_u8 *m;
     addr -= fastmem_start & fastmem_mask;
@@ -365,14 +365,14 @@ uae_u32 REGPARAM2 fastmem_wget (uaecptr addr)
     return do_get_mem_word ((uae_u16 *)m);
 }
 
-uae_u32 REGPARAM2 fastmem_bget (uaecptr addr)
+static uae_u32 REGPARAM2 fastmem_bget (uaecptr addr)
 {
     addr -= fastmem_start & fastmem_mask;
     addr &= fastmem_mask;
     return fastmemory[addr];
 }
 
-void REGPARAM2 fastmem_lput (uaecptr addr, uae_u32 l)
+static void REGPARAM2 fastmem_lput (uaecptr addr, uae_u32 l)
 {
     uae_u8 *m;
     addr -= fastmem_start & fastmem_mask;
@@ -381,7 +381,7 @@ void REGPARAM2 fastmem_lput (uaecptr addr, uae_u32 l)
     do_put_mem_long ((uae_u32 *)m, l);
 }
 
-void REGPARAM2 fastmem_wput (uaecptr addr, uae_u32 w)
+static void REGPARAM2 fastmem_wput (uaecptr addr, uae_u32 w)
 {
     uae_u8 *m;
     addr -= fastmem_start & fastmem_mask;
@@ -390,7 +390,7 @@ void REGPARAM2 fastmem_wput (uaecptr addr, uae_u32 w)
     do_put_mem_word ((uae_u16 *)m, w);
 }
 
-void REGPARAM2 fastmem_bput (uaecptr addr, uae_u32 b)
+static void REGPARAM2 fastmem_bput (uaecptr addr, uae_u32 b)
 {
     addr -= fastmem_start & fastmem_mask;
     addr &= fastmem_mask;
@@ -564,7 +564,7 @@ static void REGPARAM3 filesys_bput (uaecptr, uae_u32) REGPARAM;
 static uae_u32 filesys_start; /* Determined by the OS */
 uae_u8 *filesysory;
 
-uae_u32 REGPARAM2 filesys_lget (uaecptr addr)
+static uae_u32 REGPARAM2 filesys_lget (uaecptr addr)
 {
     uae_u8 *m;
 #ifdef JIT
@@ -576,7 +576,7 @@ uae_u32 REGPARAM2 filesys_lget (uaecptr addr)
     return do_get_mem_long ((uae_u32 *)m);
 }
 
-uae_u32 REGPARAM2 filesys_wget (uaecptr addr)
+static uae_u32 REGPARAM2 filesys_wget (uaecptr addr)
 {
     uae_u8 *m;
 #ifdef JIT
@@ -588,7 +588,7 @@ uae_u32 REGPARAM2 filesys_wget (uaecptr addr)
     return do_get_mem_word ((uae_u16 *)m);
 }
 
-uae_u32 REGPARAM2 filesys_bget (uaecptr addr)
+static uae_u32 REGPARAM2 filesys_bget (uaecptr addr)
 {
 #ifdef JIT
     special_mem |= S_READ;
@@ -619,12 +619,6 @@ static void REGPARAM2 filesys_bput (uaecptr addr, uae_u32 b)
 #ifdef JIT
     special_mem |= S_WRITE;
 #endif
-    write_log ("filesys_bput called. This usually means that you are using\n");
-    write_log ("Kickstart 1.2. Please give UAE the \"-a\" option next time\n");
-    write_log ("you start it. If you are _not_ using Kickstart 1.2, then\n");
-    write_log ("there's a bug somewhere.\n");
-    write_log ("Exiting...\n");
-    uae_quit ();
 }
 
 static addrbank filesys_bank = {
@@ -654,7 +648,7 @@ static uae_u8 *REGPARAM3 z3fastmem_xlate (uaecptr addr) REGPARAM;
 uaecptr z3fastmem_start; /* Determined by the OS */
 static uae_u8 *z3fastmem;
 
-uae_u32 REGPARAM2 z3fastmem_lget (uaecptr addr)
+static uae_u32 REGPARAM2 z3fastmem_lget (uaecptr addr)
 {
     uae_u8 *m;
     addr -= z3fastmem_start & z3fastmem_mask;
@@ -663,7 +657,7 @@ uae_u32 REGPARAM2 z3fastmem_lget (uaecptr addr)
     return do_get_mem_long ((uae_u32 *)m);
 }
 
-uae_u32 REGPARAM2 z3fastmem_wget (uaecptr addr)
+static uae_u32 REGPARAM2 z3fastmem_wget (uaecptr addr)
 {
     uae_u8 *m;
     addr -= z3fastmem_start & z3fastmem_mask;
@@ -672,14 +666,14 @@ uae_u32 REGPARAM2 z3fastmem_wget (uaecptr addr)
     return do_get_mem_word ((uae_u16 *)m);
 }
 
-uae_u32 REGPARAM2 z3fastmem_bget (uaecptr addr)
+static uae_u32 REGPARAM2 z3fastmem_bget (uaecptr addr)
 {
     addr -= z3fastmem_start & z3fastmem_mask;
     addr &= z3fastmem_mask;
     return z3fastmem[addr];
 }
 
-void REGPARAM2 z3fastmem_lput (uaecptr addr, uae_u32 l)
+static void REGPARAM2 z3fastmem_lput (uaecptr addr, uae_u32 l)
 {
     uae_u8 *m;
     addr -= z3fastmem_start & z3fastmem_mask;
@@ -688,7 +682,7 @@ void REGPARAM2 z3fastmem_lput (uaecptr addr, uae_u32 l)
     do_put_mem_long ((uae_u32 *)m, l);
 }
 
-void REGPARAM2 z3fastmem_wput (uaecptr addr, uae_u32 w)
+static void REGPARAM2 z3fastmem_wput (uaecptr addr, uae_u32 w)
 {
     uae_u8 *m;
     addr -= z3fastmem_start & z3fastmem_mask;
@@ -697,7 +691,7 @@ void REGPARAM2 z3fastmem_wput (uaecptr addr, uae_u32 w)
     do_put_mem_word ((uae_u16 *)m, w);
 }
 
-void REGPARAM2 z3fastmem_bput (uaecptr addr, uae_u32 b)
+static void REGPARAM2 z3fastmem_bput (uaecptr addr, uae_u32 b)
 {
     addr -= z3fastmem_start & z3fastmem_mask;
     addr &= z3fastmem_mask;
index 998bd5387c1ba30167e0efc6bd4b881a69789981..6aa09160a88dd4a7bfa6d3ab92577a55e66b9689 100644 (file)
@@ -16,11 +16,7 @@ extern void org (uae_u32);
 extern uae_u32 here (void);
 
 #define deftrap(f) define_trap((f), 0, "")
-#ifdef TRACE_TRAPS
-# define deftrap2(f, mode, str) define_trap((f), (mode), (str))
-#else
-# define deftrap2(f, mode, str) define_trap((f), (mode), "")
-#endif
+#define deftrap2(f, mode, str) define_trap((f), (mode), (str))
 
 extern void align (int);
 
index 55053e77cb5ae237456ee79316441c62f4f5d254..1062bc67c78e760e45765ff6eecfacb0200273ad 100644 (file)
@@ -38,7 +38,7 @@ struct socketbase {
     struct socketbase *next;
     struct socketbase *nextsig;        /* queue for tasks to signal */
 
-    int dosignal;              /* signal flag */
+    //int dosignal;            /* signal flag */
     uae_u32 ownertask;         /* task that opened the library */
     int signal;                        /* signal allocated for that task */
     int sb_errno, sb_herrno;   /* errno and herrno variables */
index e7e31f1bb627a9755eb169b3c36516730883425f..6e719a1eebe98ce71640bea8a9e5552f004b3e6c 100644 (file)
@@ -54,7 +54,6 @@ STATIC_INLINE int dmaen (unsigned int dmamask)
     return (dmamask & dmacon) && (dmacon & 0x200);
 }
 
-#define SPCFLAG_UAE_INT 1
 #define SPCFLAG_STOP 2
 #define SPCFLAG_COPPER 4
 #define SPCFLAG_INT 8
index b387983709e7bb9d6d394a55742a66903116bf3e..0bbf2cccae4da0d9ce1e5819ee0d093b0ec93263 100644 (file)
--- a/memory.c
+++ b/memory.c
@@ -627,7 +627,7 @@ static void dummylog(int rw, uaecptr addr, int size, uae_u32 val, int ins)
     }
 }
 
-uae_u32 REGPARAM2 dummy_lget (uaecptr addr)
+static uae_u32 REGPARAM2 dummy_lget (uaecptr addr)
 {
 #ifdef JIT
     special_mem |= S_READ;
@@ -650,7 +650,7 @@ uae_u32 REGPARAM2 dummy_lgeti (uaecptr addr)
     return (regs.irc << 16) | regs.irc;
 }
 
-uae_u32 REGPARAM2 dummy_wget (uaecptr addr)
+static uae_u32 REGPARAM2 dummy_wget (uaecptr addr)
 {
 #ifdef JIT
     special_mem |= S_READ;
@@ -673,7 +673,7 @@ uae_u32 REGPARAM2 dummy_wgeti (uaecptr addr)
     return regs.irc;
 }
 
-uae_u32 REGPARAM2 dummy_bget (uaecptr addr)
+static uae_u32 REGPARAM2 dummy_bget (uaecptr addr)
 {
 #ifdef JIT
     special_mem |= S_READ;
@@ -685,7 +685,7 @@ uae_u32 REGPARAM2 dummy_bget (uaecptr addr)
     return (addr & 1) ? regs.irc : regs.irc >> 8;
 }
 
-void REGPARAM2 dummy_lput (uaecptr addr, uae_u32 l)
+static void REGPARAM2 dummy_lput (uaecptr addr, uae_u32 l)
 {
 #ifdef JIT
     special_mem |= S_WRITE;
@@ -693,7 +693,7 @@ void REGPARAM2 dummy_lput (uaecptr addr, uae_u32 l)
    if (currprefs.illegal_mem)
        dummylog(1, addr, 4, l, 0);
 }
-void REGPARAM2 dummy_wput (uaecptr addr, uae_u32 w)
+static void REGPARAM2 dummy_wput (uaecptr addr, uae_u32 w)
 {
 #ifdef JIT
     special_mem |= S_WRITE;
@@ -701,7 +701,7 @@ void REGPARAM2 dummy_wput (uaecptr addr, uae_u32 w)
    if (currprefs.illegal_mem)
        dummylog(1, addr, 2, w, 0);
 }
-void REGPARAM2 dummy_bput (uaecptr addr, uae_u32 b)
+static void REGPARAM2 dummy_bput (uaecptr addr, uae_u32 b)
 {
 #ifdef JIT
     special_mem |= S_WRITE;
@@ -710,7 +710,7 @@ void REGPARAM2 dummy_bput (uaecptr addr, uae_u32 b)
        dummylog(1, addr, 1, b, 0);
 }
 
-int REGPARAM2 dummy_check (uaecptr addr, uae_u32 size)
+static int REGPARAM2 dummy_check (uaecptr addr, uae_u32 size)
 {
 #ifdef JIT
     special_mem |= S_READ;
@@ -739,7 +739,7 @@ static int REGPARAM3 mbres_check (uaecptr addr, uae_u32 size) REGPARAM;
 
 static int mbres_val = 0;
 
-uae_u32 REGPARAM2 mbres_lget (uaecptr addr)
+static uae_u32 REGPARAM2 mbres_lget (uaecptr addr)
 {
 #ifdef JIT
     special_mem |= S_READ;
@@ -750,7 +750,7 @@ uae_u32 REGPARAM2 mbres_lget (uaecptr addr)
     return 0;
 }
 
-uae_u32 REGPARAM2 mbres_wget (uaecptr addr)
+static uae_u32 REGPARAM2 mbres_wget (uaecptr addr)
 {
 #ifdef JIT
     special_mem |= S_READ;
@@ -761,7 +761,7 @@ uae_u32 REGPARAM2 mbres_wget (uaecptr addr)
     return 0;
 }
 
-uae_u32 REGPARAM2 mbres_bget (uaecptr addr)
+static uae_u32 REGPARAM2 mbres_bget (uaecptr addr)
 {
 #ifdef JIT
     special_mem |= S_READ;
@@ -772,7 +772,7 @@ uae_u32 REGPARAM2 mbres_bget (uaecptr addr)
     return (addr & 0xFFFF) == 3 ? mbres_val : 0;
 }
 
-void REGPARAM2 mbres_lput (uaecptr addr, uae_u32 l)
+static void REGPARAM2 mbres_lput (uaecptr addr, uae_u32 l)
 {
 #ifdef JIT
     special_mem |= S_WRITE;
@@ -780,7 +780,7 @@ void REGPARAM2 mbres_lput (uaecptr addr, uae_u32 l)
     if (currprefs.illegal_mem)
        write_log ("Illegal lput at %08lx\n", addr);
 }
-void REGPARAM2 mbres_wput (uaecptr addr, uae_u32 w)
+static void REGPARAM2 mbres_wput (uaecptr addr, uae_u32 w)
 {
 #ifdef JIT
     special_mem |= S_WRITE;
@@ -788,7 +788,7 @@ void REGPARAM2 mbres_wput (uaecptr addr, uae_u32 w)
     if (currprefs.illegal_mem)
        write_log ("Illegal wput at %08lx\n", addr);
 }
-void REGPARAM2 mbres_bput (uaecptr addr, uae_u32 b)
+static void REGPARAM2 mbres_bput (uaecptr addr, uae_u32 b)
 {
 #ifdef JIT
     special_mem |= S_WRITE;
@@ -800,7 +800,7 @@ void REGPARAM2 mbres_bput (uaecptr addr, uae_u32 b)
        mbres_val = b;
 }
 
-int REGPARAM2 mbres_check (uaecptr addr, uae_u32 size)
+static int REGPARAM2 mbres_check (uaecptr addr, uae_u32 size)
 {
     if (currprefs.illegal_mem)
        write_log ("Illegal check at %08lx\n", addr);
@@ -826,7 +826,7 @@ static void ce2_timeout (void)
     wait_cpu_cycle_read (0, -1);
 }
 
-uae_u32 REGPARAM2 chipmem_lget_ce2 (uaecptr addr)
+static uae_u32 REGPARAM2 chipmem_lget_ce2 (uaecptr addr)
 {
     uae_u32 *m;
 
@@ -840,7 +840,7 @@ uae_u32 REGPARAM2 chipmem_lget_ce2 (uaecptr addr)
     return do_get_mem_long (m);
 }
 
-uae_u32 REGPARAM2 chipmem_wget_ce2 (uaecptr addr)
+static uae_u32 REGPARAM2 chipmem_wget_ce2 (uaecptr addr)
 {
     uae_u16 *m;
 
@@ -854,7 +854,7 @@ uae_u32 REGPARAM2 chipmem_wget_ce2 (uaecptr addr)
     return do_get_mem_word (m);
 }
 
-uae_u32 REGPARAM2 chipmem_bget_ce2 (uaecptr addr)
+static uae_u32 REGPARAM2 chipmem_bget_ce2 (uaecptr addr)
 {
 #ifdef JIT
     special_mem |= S_READ;
@@ -865,7 +865,7 @@ uae_u32 REGPARAM2 chipmem_bget_ce2 (uaecptr addr)
     return chipmemory[addr];
 }
 
-void REGPARAM2 chipmem_lput_ce2 (uaecptr addr, uae_u32 l)
+static void REGPARAM2 chipmem_lput_ce2 (uaecptr addr, uae_u32 l)
 {
     uae_u32 *m;
 
@@ -879,7 +879,7 @@ void REGPARAM2 chipmem_lput_ce2 (uaecptr addr, uae_u32 l)
     do_put_mem_long (m, l);
 }
 
-void REGPARAM2 chipmem_wput_ce2 (uaecptr addr, uae_u32 w)
+static void REGPARAM2 chipmem_wput_ce2 (uaecptr addr, uae_u32 w)
 {
     uae_u16 *m;
 
@@ -893,7 +893,7 @@ void REGPARAM2 chipmem_wput_ce2 (uaecptr addr, uae_u32 w)
     do_put_mem_word (m, w);
 }
 
-void REGPARAM2 chipmem_bput_ce2 (uaecptr addr, uae_u32 b)
+static void REGPARAM2 chipmem_bput_ce2 (uaecptr addr, uae_u32 b)
 {
 #ifdef JIT
     special_mem |= S_WRITE;
@@ -916,7 +916,7 @@ uae_u32 REGPARAM2 chipmem_lget (uaecptr addr)
     return do_get_mem_long (m);
 }
 
-uae_u32 REGPARAM2 chipmem_wget (uaecptr addr)
+static uae_u32 REGPARAM2 chipmem_wget (uaecptr addr)
 {
     uae_u16 *m;
 
@@ -926,7 +926,7 @@ uae_u32 REGPARAM2 chipmem_wget (uaecptr addr)
     return do_get_mem_word (m);
 }
 
-uae_u32 REGPARAM2 chipmem_bget (uaecptr addr)
+static uae_u32 REGPARAM2 chipmem_bget (uaecptr addr)
 {
     addr -= chipmem_start & chipmem_mask;
     addr &= chipmem_mask;
@@ -960,7 +960,7 @@ void REGPARAM2 chipmem_bput (uaecptr addr, uae_u32 b)
     chipmemory[addr] = b;
 }
 
-uae_u32 REGPARAM2 chipmem_agnus_lget (uaecptr addr)
+static uae_u32 REGPARAM2 chipmem_agnus_lget (uaecptr addr)
 {
     uae_u32 *m;
 
@@ -980,14 +980,14 @@ uae_u32 REGPARAM2 chipmem_agnus_wget (uaecptr addr)
     return do_get_mem_word (m);
 }
 
-uae_u32 REGPARAM2 chipmem_agnus_bget (uaecptr addr)
+static uae_u32 REGPARAM2 chipmem_agnus_bget (uaecptr addr)
 {
     addr -= chipmem_start & chipmem_full_mask;
     addr &= chipmem_full_mask;
     return chipmemory[addr];
 }
 
-void REGPARAM2 chipmem_agnus_lput (uaecptr addr, uae_u32 l)
+static void REGPARAM2 chipmem_agnus_lput (uaecptr addr, uae_u32 l)
 {
     uae_u32 *m;
 
@@ -1011,7 +1011,7 @@ void REGPARAM2 chipmem_agnus_wput (uaecptr addr, uae_u32 w)
     do_put_mem_word (m, w);
 }
 
-void REGPARAM2 chipmem_agnus_bput (uaecptr addr, uae_u32 b)
+static void REGPARAM2 chipmem_agnus_bput (uaecptr addr, uae_u32 b)
 {
     addr -= chipmem_start & chipmem_full_mask;
     addr &= chipmem_full_mask;
@@ -1020,14 +1020,14 @@ void REGPARAM2 chipmem_agnus_bput (uaecptr addr, uae_u32 b)
     chipmemory[addr] = b;
 }
 
-int REGPARAM2 chipmem_check (uaecptr addr, uae_u32 size)
+static int REGPARAM2 chipmem_check (uaecptr addr, uae_u32 size)
 {
     addr -= chipmem_start & chipmem_mask;
     addr &= chipmem_mask;
     return (addr + size) <= allocated_chipmem;
 }
 
-uae_u8 *REGPARAM2 chipmem_xlate (uaecptr addr)
+static uae_u8 *REGPARAM2 chipmem_xlate (uaecptr addr)
 {
     addr -= chipmem_start & chipmem_mask;
     addr &= chipmem_mask;
@@ -1047,7 +1047,7 @@ static void REGPARAM3 bogomem_bput (uaecptr, uae_u32) REGPARAM;
 static int REGPARAM3 bogomem_check (uaecptr addr, uae_u32 size) REGPARAM;
 static uae_u8 *REGPARAM3 bogomem_xlate (uaecptr addr) REGPARAM;
 
-uae_u32 REGPARAM2 bogomem_lget (uaecptr addr)
+static uae_u32 REGPARAM2 bogomem_lget (uaecptr addr)
 {
     uae_u32 *m;
     addr -= bogomem_start & bogomem_mask;
@@ -1056,7 +1056,7 @@ uae_u32 REGPARAM2 bogomem_lget (uaecptr addr)
     return do_get_mem_long (m);
 }
 
-uae_u32 REGPARAM2 bogomem_wget (uaecptr addr)
+static uae_u32 REGPARAM2 bogomem_wget (uaecptr addr)
 {
     uae_u16 *m;
     addr -= bogomem_start & bogomem_mask;
@@ -1065,14 +1065,14 @@ uae_u32 REGPARAM2 bogomem_wget (uaecptr addr)
     return do_get_mem_word (m);
 }
 
-uae_u32 REGPARAM2 bogomem_bget (uaecptr addr)
+static uae_u32 REGPARAM2 bogomem_bget (uaecptr addr)
 {
     addr -= bogomem_start & bogomem_mask;
     addr &= bogomem_mask;
     return bogomemory[addr];
 }
 
-void REGPARAM2 bogomem_lput (uaecptr addr, uae_u32 l)
+static void REGPARAM2 bogomem_lput (uaecptr addr, uae_u32 l)
 {
     uae_u32 *m;
     addr -= bogomem_start & bogomem_mask;
@@ -1081,7 +1081,7 @@ void REGPARAM2 bogomem_lput (uaecptr addr, uae_u32 l)
     do_put_mem_long (m, l);
 }
 
-void REGPARAM2 bogomem_wput (uaecptr addr, uae_u32 w)
+static void REGPARAM2 bogomem_wput (uaecptr addr, uae_u32 w)
 {
     uae_u16 *m;
     addr -= bogomem_start & bogomem_mask;
@@ -1090,21 +1090,21 @@ void REGPARAM2 bogomem_wput (uaecptr addr, uae_u32 w)
     do_put_mem_word (m, w);
 }
 
-void REGPARAM2 bogomem_bput (uaecptr addr, uae_u32 b)
+static void REGPARAM2 bogomem_bput (uaecptr addr, uae_u32 b)
 {
     addr -= bogomem_start & bogomem_mask;
     addr &= bogomem_mask;
     bogomemory[addr] = b;
 }
 
-int REGPARAM2 bogomem_check (uaecptr addr, uae_u32 size)
+static int REGPARAM2 bogomem_check (uaecptr addr, uae_u32 size)
 {
     addr -= bogomem_start & bogomem_mask;
     addr &= bogomem_mask;
     return (addr + size) <= allocated_bogomem;
 }
 
-uae_u8 *REGPARAM2 bogomem_xlate (uaecptr addr)
+static uae_u8 *REGPARAM2 bogomem_xlate (uaecptr addr)
 {
     addr -= bogomem_start & bogomem_mask;
     addr &= bogomem_mask;
@@ -1126,7 +1126,7 @@ static void REGPARAM3 a3000mem_bput (uaecptr, uae_u32) REGPARAM;
 static int REGPARAM3 a3000mem_check (uaecptr addr, uae_u32 size) REGPARAM;
 static uae_u8 *REGPARAM3 a3000mem_xlate (uaecptr addr) REGPARAM;
 
-uae_u32 REGPARAM2 a3000mem_lget (uaecptr addr)
+static uae_u32 REGPARAM2 a3000mem_lget (uaecptr addr)
 {
     uae_u32 *m;
     addr -= a3000mem_start & a3000mem_mask;
@@ -1135,7 +1135,7 @@ uae_u32 REGPARAM2 a3000mem_lget (uaecptr addr)
     return do_get_mem_long (m);
 }
 
-uae_u32 REGPARAM2 a3000mem_wget (uaecptr addr)
+static uae_u32 REGPARAM2 a3000mem_wget (uaecptr addr)
 {
     uae_u16 *m;
     addr -= a3000mem_start & a3000mem_mask;
@@ -1144,14 +1144,14 @@ uae_u32 REGPARAM2 a3000mem_wget (uaecptr addr)
     return do_get_mem_word (m);
 }
 
-uae_u32 REGPARAM2 a3000mem_bget (uaecptr addr)
+static uae_u32 REGPARAM2 a3000mem_bget (uaecptr addr)
 {
     addr -= a3000mem_start & a3000mem_mask;
     addr &= a3000mem_mask;
     return a3000memory[addr];
 }
 
-void REGPARAM2 a3000mem_lput (uaecptr addr, uae_u32 l)
+static void REGPARAM2 a3000mem_lput (uaecptr addr, uae_u32 l)
 {
     uae_u32 *m;
     addr -= a3000mem_start & a3000mem_mask;
@@ -1160,7 +1160,7 @@ void REGPARAM2 a3000mem_lput (uaecptr addr, uae_u32 l)
     do_put_mem_long (m, l);
 }
 
-void REGPARAM2 a3000mem_wput (uaecptr addr, uae_u32 w)
+static void REGPARAM2 a3000mem_wput (uaecptr addr, uae_u32 w)
 {
     uae_u16 *m;
     addr -= a3000mem_start & a3000mem_mask;
@@ -1169,21 +1169,21 @@ void REGPARAM2 a3000mem_wput (uaecptr addr, uae_u32 w)
     do_put_mem_word (m, w);
 }
 
-void REGPARAM2 a3000mem_bput (uaecptr addr, uae_u32 b)
+static void REGPARAM2 a3000mem_bput (uaecptr addr, uae_u32 b)
 {
     addr -= a3000mem_start & a3000mem_mask;
     addr &= a3000mem_mask;
     a3000memory[addr] = b;
 }
 
-int REGPARAM2 a3000mem_check (uaecptr addr, uae_u32 size)
+static int REGPARAM2 a3000mem_check (uaecptr addr, uae_u32 size)
 {
     addr -= a3000mem_start & a3000mem_mask;
     addr &= a3000mem_mask;
     return (addr + size) <= allocated_a3000mem;
 }
 
-uae_u8 *REGPARAM2 a3000mem_xlate (uaecptr addr)
+static uae_u8 *REGPARAM2 a3000mem_xlate (uaecptr addr)
 {
     addr -= a3000mem_start & a3000mem_mask;
     addr &= a3000mem_mask;
@@ -1238,7 +1238,7 @@ static void REGPARAM3 kickmem_bput (uaecptr, uae_u32) REGPARAM;
 static int REGPARAM3 kickmem_check (uaecptr addr, uae_u32 size) REGPARAM;
 static uae_u8 *REGPARAM3 kickmem_xlate (uaecptr addr) REGPARAM;
 
-uae_u32 REGPARAM2 kickmem_lget (uaecptr addr)
+static uae_u32 REGPARAM2 kickmem_lget (uaecptr addr)
 {
     uae_u32 *m;
     addr -= kickmem_start & kickmem_mask;
@@ -1247,7 +1247,7 @@ uae_u32 REGPARAM2 kickmem_lget (uaecptr addr)
     return do_get_mem_long (m);
 }
 
-uae_u32 REGPARAM2 kickmem_wget (uaecptr addr)
+static uae_u32 REGPARAM2 kickmem_wget (uaecptr addr)
 {
     uae_u16 *m;
     addr -= kickmem_start & kickmem_mask;
@@ -1256,14 +1256,14 @@ uae_u32 REGPARAM2 kickmem_wget (uaecptr addr)
     return do_get_mem_word (m);
 }
 
-uae_u32 REGPARAM2 kickmem_bget (uaecptr addr)
+static uae_u32 REGPARAM2 kickmem_bget (uaecptr addr)
 {
     addr -= kickmem_start & kickmem_mask;
     addr &= kickmem_mask;
     return kickmemory[addr];
 }
 
-void REGPARAM2 kickmem_lput (uaecptr addr, uae_u32 b)
+static void REGPARAM2 kickmem_lput (uaecptr addr, uae_u32 b)
 {
     uae_u32 *m;
 #ifdef JIT
@@ -1282,7 +1282,7 @@ void REGPARAM2 kickmem_lput (uaecptr addr, uae_u32 b)
        write_log ("Illegal kickmem lput at %08lx\n", addr);
 }
 
-void REGPARAM2 kickmem_wput (uaecptr addr, uae_u32 b)
+static void REGPARAM2 kickmem_wput (uaecptr addr, uae_u32 b)
 {
     uae_u16 *m;
 #ifdef JIT
@@ -1301,7 +1301,7 @@ void REGPARAM2 kickmem_wput (uaecptr addr, uae_u32 b)
        write_log ("Illegal kickmem wput at %08lx\n", addr);
 }
 
-void REGPARAM2 kickmem_bput (uaecptr addr, uae_u32 b)
+static void REGPARAM2 kickmem_bput (uaecptr addr, uae_u32 b)
 {
 #ifdef JIT
     special_mem |= S_WRITE;
@@ -1318,7 +1318,7 @@ void REGPARAM2 kickmem_bput (uaecptr addr, uae_u32 b)
        write_log ("Illegal kickmem lput at %08lx\n", addr);
 }
 
-void REGPARAM2 kickmem2_lput (uaecptr addr, uae_u32 l)
+static void REGPARAM2 kickmem2_lput (uaecptr addr, uae_u32 l)
 {
     uae_u32 *m;
 #ifdef JIT
@@ -1330,7 +1330,7 @@ void REGPARAM2 kickmem2_lput (uaecptr addr, uae_u32 l)
     do_put_mem_long (m, l);
 }
 
-void REGPARAM2 kickmem2_wput (uaecptr addr, uae_u32 w)
+static void REGPARAM2 kickmem2_wput (uaecptr addr, uae_u32 w)
 {
     uae_u16 *m;
 #ifdef JIT
@@ -1342,7 +1342,7 @@ void REGPARAM2 kickmem2_wput (uaecptr addr, uae_u32 w)
     do_put_mem_word (m, w);
 }
 
-void REGPARAM2 kickmem2_bput (uaecptr addr, uae_u32 b)
+static void REGPARAM2 kickmem2_bput (uaecptr addr, uae_u32 b)
 {
 #ifdef JIT
     special_mem |= S_WRITE;
@@ -1352,14 +1352,14 @@ void REGPARAM2 kickmem2_bput (uaecptr addr, uae_u32 b)
     kickmemory[addr] = b;
 }
 
-int REGPARAM2 kickmem_check (uaecptr addr, uae_u32 size)
+static int REGPARAM2 kickmem_check (uaecptr addr, uae_u32 size)
 {
     addr -= kickmem_start & kickmem_mask;
     addr &= kickmem_mask;
     return (addr + size) <= kickmem_size;
 }
 
-uae_u8 *REGPARAM2 kickmem_xlate (uaecptr addr)
+static uae_u8 *REGPARAM2 kickmem_xlate (uaecptr addr)
 {
     addr -= kickmem_start & kickmem_mask;
     addr &= kickmem_mask;
@@ -1371,20 +1371,11 @@ uae_u8 *REGPARAM2 kickmem_xlate (uaecptr addr)
 uae_u8 *extendedkickmemory;
 static int extendedkickmem_size;
 static uae_u32 extendedkickmem_start;
+static int extendedkickmem_type;
 
 #define EXTENDED_ROM_CD32 1
 #define EXTENDED_ROM_CDTV 2
-
-static int extromtype (void)
-{
-    switch (extendedkickmem_size) {
-    case 524288:
-       return EXTENDED_ROM_CD32;
-    case 262144:
-       return EXTENDED_ROM_CDTV;
-    }
-    return 0;
-}
+#define EXTENDED_ROM_KS 3
 
 static uae_u32 REGPARAM3 extendedkickmem_lget (uaecptr) REGPARAM;
 static uae_u32 REGPARAM3 extendedkickmem_wget (uaecptr) REGPARAM;
@@ -1395,7 +1386,7 @@ static void REGPARAM3 extendedkickmem_bput (uaecptr, uae_u32) REGPARAM;
 static int REGPARAM3 extendedkickmem_check (uaecptr addr, uae_u32 size) REGPARAM;
 static uae_u8 *REGPARAM3 extendedkickmem_xlate (uaecptr addr) REGPARAM;
 
-uae_u32 REGPARAM2 extendedkickmem_lget (uaecptr addr)
+static uae_u32 REGPARAM2 extendedkickmem_lget (uaecptr addr)
 {
     uae_u32 *m;
     addr -= extendedkickmem_start & extendedkickmem_mask;
@@ -1404,7 +1395,7 @@ uae_u32 REGPARAM2 extendedkickmem_lget (uaecptr addr)
     return do_get_mem_long (m);
 }
 
-uae_u32 REGPARAM2 extendedkickmem_wget (uaecptr addr)
+static uae_u32 REGPARAM2 extendedkickmem_wget (uaecptr addr)
 {
     uae_u16 *m;
     addr -= extendedkickmem_start & extendedkickmem_mask;
@@ -1413,14 +1404,14 @@ uae_u32 REGPARAM2 extendedkickmem_wget (uaecptr addr)
     return do_get_mem_word (m);
 }
 
-uae_u32 REGPARAM2 extendedkickmem_bget (uaecptr addr)
+static uae_u32 REGPARAM2 extendedkickmem_bget (uaecptr addr)
 {
     addr -= extendedkickmem_start & extendedkickmem_mask;
     addr &= extendedkickmem_mask;
     return extendedkickmemory[addr];
 }
 
-void REGPARAM2 extendedkickmem_lput (uaecptr addr, uae_u32 b)
+static void REGPARAM2 extendedkickmem_lput (uaecptr addr, uae_u32 b)
 {
 #ifdef JIT
     special_mem |= S_WRITE;
@@ -1429,7 +1420,7 @@ void REGPARAM2 extendedkickmem_lput (uaecptr addr, uae_u32 b)
        write_log ("Illegal extendedkickmem lput at %08lx\n", addr);
 }
 
-void REGPARAM2 extendedkickmem_wput (uaecptr addr, uae_u32 b)
+static void REGPARAM2 extendedkickmem_wput (uaecptr addr, uae_u32 b)
 {
 #ifdef JIT
     special_mem |= S_WRITE;
@@ -1438,7 +1429,7 @@ void REGPARAM2 extendedkickmem_wput (uaecptr addr, uae_u32 b)
        write_log ("Illegal extendedkickmem wput at %08lx\n", addr);
 }
 
-void REGPARAM2 extendedkickmem_bput (uaecptr addr, uae_u32 b)
+static void REGPARAM2 extendedkickmem_bput (uaecptr addr, uae_u32 b)
 {
 #ifdef JIT
     special_mem |= S_WRITE;
@@ -1447,14 +1438,14 @@ void REGPARAM2 extendedkickmem_bput (uaecptr addr, uae_u32 b)
        write_log ("Illegal extendedkickmem lput at %08lx\n", addr);
 }
 
-int REGPARAM2 extendedkickmem_check (uaecptr addr, uae_u32 size)
+static int REGPARAM2 extendedkickmem_check (uaecptr addr, uae_u32 size)
 {
     addr -= extendedkickmem_start & extendedkickmem_mask;
     addr &= extendedkickmem_mask;
     return (addr + size) <= extendedkickmem_size;
 }
 
-uae_u8 *REGPARAM2 extendedkickmem_xlate (uaecptr addr)
+static uae_u8 *REGPARAM2 extendedkickmem_xlate (uaecptr addr)
 {
     addr -= extendedkickmem_start & extendedkickmem_mask;
     addr &= extendedkickmem_mask;
@@ -1598,10 +1589,10 @@ static int kickstart_checksum (uae_u8 *mem, int size)
 }
 
 static char *kickstring = "exec.library";
-int read_kickstart (struct zfile *f, uae_u8 *mem, int size, int dochecksum, int *cloanto_rom)
+static int read_kickstart (struct zfile *f, uae_u8 *mem, int size, int dochecksum, int *cloanto_rom)
 {
     unsigned char buffer[20];
-    int i, j;
+    int i, j, oldpos;
     int cr = 0, kickdisk = 0;
 
     if (cloanto_rom)
@@ -1611,12 +1602,13 @@ int read_kickstart (struct zfile *f, uae_u8 *mem, int size, int dochecksum, int
        size = zfile_ftell (f) & ~0x3ff;
        zfile_fseek (f, 0, SEEK_SET);
     }
+    oldpos = zfile_ftell (f);
     i = zfile_fread (buffer, 1, 11, f);
     if (!memcmp(buffer, "KICK", 4)) {
        zfile_fseek (f, 512, SEEK_SET);
        kickdisk = 1;
     } else if (strncmp ((char *)buffer, "AMIROMTYPE1", 11) != 0) {
-       zfile_fseek (f, 0, SEEK_SET);
+       zfile_fseek (f, oldpos, SEEK_SET);
     } else {
        cr = 1;
     }
@@ -1627,8 +1619,8 @@ int read_kickstart (struct zfile *f, uae_u8 *mem, int size, int dochecksum, int
     i = zfile_fread (mem, 1, size, f);
     if (kickdisk && i > 262144)
        i = 262144;
-    zfile_fclose (f);
-    if ((i != 8192 && i != 65536) && i != 131072 && i != 262144 && i != 524288) {
+
+    if ((i != 8192 && i != 65536) && i != 131072 && i != 262144 && i != 524288 && i != 524288 * 2) {
        notify_user (NUMSG_KSROMREADERROR);
        return 0;
     }
@@ -1673,12 +1665,15 @@ static int load_extendedkickstart (void)
     }
     zfile_fseek (f, 0, SEEK_END);
     size = zfile_ftell (f);
-    if (size > 300000)
+    if (size > 300000) {
        extendedkickmem_size = 524288;
-    else
+       extendedkickmem_type = EXTENDED_ROM_CD32;
+    } else {
        extendedkickmem_size = 262144;
+       extendedkickmem_type = EXTENDED_ROM_CDTV;
+    }
     zfile_fseek (f, 0, SEEK_SET);
-    switch (extromtype ()) {
+    switch (extendedkickmem_type) {
 
     case EXTENDED_ROM_CDTV:
        extendedkickmemory = (uae_u8 *) mapped_malloc (extendedkickmem_size, "rom_f0");
@@ -1691,6 +1686,7 @@ static int load_extendedkickstart (void)
     }
     read_kickstart (f, extendedkickmemory, extendedkickmem_size,  0, 0);
     extendedkickmem_mask = extendedkickmem_size - 1;
+    zfile_fclose (f);
     return 1;
 }
 
@@ -1818,10 +1814,25 @@ static int load_kickstart (void)
     }
 
     if (f != NULL) {
-       int size = read_kickstart (f, kickmemory, 0x80000, 1, &cloanto_rom);
+       int filesize, size;
+       zfile_fseek (f, 0, SEEK_END);
+       filesize = zfile_ftell (f);
+       zfile_fseek (f, 0, SEEK_SET);
+       if (filesize >= 524288 * 2)
+           zfile_fseek (f, 524288, SEEK_SET);
+       size = read_kickstart (f, kickmemory, 0x80000, 1, &cloanto_rom);
        if (size == 0)
            goto err;
-       kickmem_mask = size - 1;
+        kickmem_mask = size - 1;
+       if (filesize >= 524288 * 2 && !extendedkickmem_type) {
+           zfile_fseek (f, 0, SEEK_SET);
+           extendedkickmem_size = 0x80000;
+           extendedkickmem_type = EXTENDED_ROM_KS;
+           extendedkickmemory = (uae_u8 *) mapped_malloc (extendedkickmem_size, "rom_e0");
+           extendedkickmem_bank.baseaddr = (uae_u8 *) extendedkickmemory;
+           read_kickstart (f, extendedkickmemory, 0x80000,  0, 0);
+           extendedkickmem_mask = extendedkickmem_size - 1;
+       }
     }
 
 #if defined(AMIGA)
@@ -1829,9 +1840,11 @@ static int load_kickstart (void)
 #endif
 
     kickstart_version = (kickmemory[12] << 8) | kickmemory[13];
+    zfile_fclose (f);
     return 1;
 err:
     strcpy (currprefs.romfile, tmprom);
+    zfile_fclose (f);
     return 0;
 }
 
@@ -2118,6 +2131,7 @@ void memory_reset (void)
        xfree (extendedkickmemory);
        extendedkickmemory = 0;
        extendedkickmem_size = 0;
+       extendedkickmem_type = 0;
        load_extendedkickstart ();
        kickmem_mask = 524288 - 1;
        if (!load_kickstart ()) {
@@ -2145,7 +2159,7 @@ void memory_reset (void)
                    cloanto_rom = 1;
            }
        }
-       if (kickmem_size >= 524288) {
+       if (kickmem_size == 524288) {
            int patched = 0;
            if (currprefs.kickshifter)
                patched += patch_shapeshifter (kickmemory);
@@ -2215,8 +2229,12 @@ void memory_reset (void)
     cd32_enabled = 0;
 #endif
 
-    switch (extromtype ()) {
+    switch (extendedkickmem_type)
+    {
 
+    case EXTENDED_ROM_KS:
+       map_banks (&extendedkickmem_bank, 0xE0, 8, 0);
+       break;
 #ifdef CDTV
     case EXTENDED_ROM_CDTV:
        map_banks (&extendedkickmem_bank, 0xF0, 4, 0);
@@ -2234,7 +2252,7 @@ void memory_reset (void)
        break;
 #endif
     default:
-       if (cloanto_rom && !currprefs.maprom)
+       if (cloanto_rom && !currprefs.maprom && !extendedkickmem_type)
            map_banks (&kickmem_bank, 0xE0, 8, 0);
     }
 
@@ -2267,6 +2285,7 @@ void memory_init (void)
     kickmemory = 0;
     extendedkickmemory = 0;
     extendedkickmem_size = 0;
+    extendedkickmem_type = 0;
     chipmemory = 0;
 #ifdef AUTOCONFIG
     allocated_a3000mem = 0;
@@ -2497,7 +2516,7 @@ uae_u8 *save_rom (int first, int *len, uae_u8 *dstptr)
            sprintf (tmpname, "Kickstart %d.%d", wordget (mem_start + 12), wordget (mem_start + 14));
            break;
        case 1: /* Extended ROM */
-           if (!extendedkickmem_size)
+           if (!extendedkickmem_type)
                break;
            mem_start = extendedkickmem_start;
            mem_real_start = extendedkickmemory;
index 3efc91e8ce0f360dca227c898054e464e34791a1..de6f2c70acacce120d2dc164fff94caf50bb1feb 100644 (file)
@@ -30,7 +30,7 @@ static uae_sem_t n2asem;
 
 void native2amiga_install (void)
 {
-    init_comm_pipe (&native2amiga_pending, 10, 2);
+    init_comm_pipe (&native2amiga_pending, 100, 2);
     uae_sem_init (&n2asem, 0, 1);
 }
 
index 27468d4735a097f88e0d095bb052750609280d10..8e482481dc017dd05021be05420cc83c89fbc467 100644 (file)
--- a/newcpu.c
+++ b/newcpu.c
@@ -1581,12 +1581,6 @@ unsigned long REGPARAM2 op_illg (uae_u32 opcode, struct regstruct *regs)
        return 4;
     }
     if ((opcode & 0xF000) == 0xA000) {
-#ifdef AUTOCONFIG
-       if (inrt) {
-           /* Calltrap. */
-           m68k_handle_trap (opcode & 0xFFF, regs);
-       }
-#endif
        if (warned < 20) {
            write_log ("A-Trap %x at %x (%p)\n", opcode, pc, regs->pc_p);
            warned++;
@@ -1932,7 +1926,7 @@ void execute_normal(void)
        total_cycles += cpu_cycles;
        pc_hist[blocklen].specmem = special_mem;
        blocklen++;
-       if (end_block(opcode) || blocklen >= MAXRUN || r->spcflags || uae_int_requested || bsd_int_requested) {
+       if (end_block(opcode) || blocklen >= MAXRUN || r->spcflags || uae_int_requested) { // || bsd_int_requested) {
            compile_block(pc_hist,blocklen,total_cycles);
            return; /* We will deal with the spcflags in the caller */
        }
@@ -1952,10 +1946,12 @@ static void m68k_run_2a (void)
            intreq |= 0x0008;
            set_special (&regs, SPCFLAG_INT);
        }
+#if 0
        if (bsd_int_requested) {
            intreq |= 0x2000;
            set_special (&regs, SPCFLAG_INT);
        }
+#endif
        if (regs.spcflags) {
            if (do_specialties (0, &regs)) {
                return;
index b722e2628e942329f3b8ff31eeecaca52bf1eab6..fc3b0e86bedc2cc865e2be3bc74b47a0b046a343 100644 (file)
@@ -66,6 +66,7 @@ struct bsdsockdata {
 };
 
 static struct bsdsockdata *bsd;
+static int threadindextable[MAX_GET_THREADS];
 
 static unsigned int __stdcall sock_thread(void *);
 
@@ -137,12 +138,14 @@ static void bsdsetpriority (HANDLE thread)
 
 static int mySockStartup(void)
 {
-       int result = 0;
+       int result = 0, i;
        SOCKET dummy;
        DWORD lasterror;
 
        if (!bsd) {
                bsd = calloc (sizeof (struct bsdsockdata), 1);
+               for (i = 0; i < MAX_GET_THREADS; i++)
+                   threadindextable[i] = i;
        }
        if (WSAStartup(MAKEWORD(SOCKVER_MAJOR, SOCKVER_MINOR), &bsd->wsbData)) {
            lasterror = WSAGetLastError();
@@ -1883,7 +1886,7 @@ uae_u32 host_inet_addr(uae_u32 cp)
 }
 
 int isfullscreen (void);
-BOOL CheckOnline(SB)
+static BOOL CheckOnline(SB)
 {
        DWORD dwFlags;
        BOOL bReturn = TRUE;
@@ -1905,7 +1908,7 @@ BOOL CheckOnline(SB)
 
 static unsigned int __stdcall thread_get(void *indexp)
 {
-    uae_u32 index = *((uae_u32*)indexp);
+    int index = *((int*)indexp);
     unsigned int result = 0;
     struct threadargs *args;
     uae_u32 name;
@@ -2080,7 +2083,7 @@ void host_gethostbynameaddr(TrapContext *context, SB, uae_u32 name, uae_u32 name
            for (i = 0; i < MAX_GET_THREADS; i++) {
                        if (bsd->hGetThreads[i] == NULL) {
                                bsd->hGetEvents[i] = CreateEvent(NULL,FALSE,FALSE,NULL);
-                               bsd->hGetThreads[i] = THREAD(thread_get, &i);
+                               bsd->hGetThreads[i] = THREAD(thread_get, &threadindextable[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",
index 9859fda6cd86416469b3fa311e5c1112828d11f2..8dfd658c9b38f0701b8182f24ce0b943ca00f29a 100644 (file)
                                CommandLine="build68k.exe &gt;..\..\cpudefs.c &lt;..\..\table68k"
                        />
                </Configuration>
+               <Configuration
+                       Name="FullRelease|Win32"
+                       OutputDirectory="$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="1"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               TypeLibraryName=".\Release/build68k_msvc.tlb"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               AdditionalOptions=""
+                               InlineFunctionExpansion="1"
+                               AdditionalIncludeDirectories="..\..\include,..\..,..\"
+                               PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE"
+                               StringPooling="true"
+                               RuntimeLibrary="0"
+                               EnableFunctionLevelLinking="true"
+                               PrecompiledHeaderFile=".\Release/build68k_msvc.pch"
+                               AssemblerListingLocation=".\Release/"
+                               ObjectFile=".\Release/"
+                               ProgramDataBaseFileName=".\Release/"
+                               WarningLevel="3"
+                               SuppressStartupBanner="true"
+                               CompileAs="0"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="NDEBUG"
+                               Culture="1033"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                               Description="deleting cpudefs.c"
+                               CommandLine="del ..\..\cpudefs.c"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalOptions="/MACHINE:I386"
+                               OutputFile="build68k.exe"
+                               LinkIncremental="1"
+                               SuppressStartupBanner="true"
+                               ProgramDatabaseFile=".\Release/build68k.pdb"
+                               SubSystem="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                               Description="creating cpudefs.c"
+                               CommandLine="build68k.exe &gt;..\..\cpudefs.c &lt;..\..\table68k"
+                       />
+               </Configuration>
        </Configurations>
        <References>
        </References>
index 5f5bb42bd01643bcac7bb9a24a956c6e788f4389..f99833eabe8b8b3c6729fe5a799c0a921b1fda3b 100644 (file)
@@ -4,7 +4,6 @@
        Version="8,00"
        Name="genblitter"
        ProjectGUID="{765B0AF0-B8D3-4998-89AF-D6F939E1CD18}"
-       SignManifests="true"
        >
        <Platforms>
                <Platform
@@ -19,7 +18,7 @@
                        OutputDirectory=".\Release"
                        IntermediateDirectory=".\Release"
                        ConfigurationType="1"
-                       InheritedPropertySheets="UpgradeFromVC71.vsprops"
+                       InheritedPropertySheets="..\..\..\..\..\msvs\VC\VCProjectDefaults\UpgradeFromVC71.vsprops"
                        UseOfMFC="0"
                        ATLMinimizesCRunTimeLibraryUsage="false"
                        CharacterSet="2"
                        OutputDirectory=".\Debug"
                        IntermediateDirectory=".\Debug"
                        ConfigurationType="1"
-                       InheritedPropertySheets="UpgradeFromVC71.vsprops"
+                       InheritedPropertySheets="..\..\..\..\..\msvs\VC\VCProjectDefaults\UpgradeFromVC71.vsprops"
                        UseOfMFC="0"
                        ATLMinimizesCRunTimeLibraryUsage="false"
                        CharacterSet="2"
                        OutputDirectory="$(ConfigurationName)"
                        IntermediateDirectory="$(ConfigurationName)"
                        ConfigurationType="1"
-                       InheritedPropertySheets="UpgradeFromVC71.vsprops"
+                       InheritedPropertySheets="..\..\..\..\..\msvs\VC\VCProjectDefaults\UpgradeFromVC71.vsprops"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               TypeLibraryName=".\Release/genblitter_msvc.tlb"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               AdditionalOptions=""
+                               InlineFunctionExpansion="1"
+                               AdditionalIncludeDirectories="..\..\include,..\..,..\"
+                               PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE"
+                               StringPooling="true"
+                               RuntimeLibrary="0"
+                               EnableFunctionLevelLinking="true"
+                               PrecompiledHeaderFile=".\Release/genblitter_msvc.pch"
+                               AssemblerListingLocation=".\Release/"
+                               ObjectFile=".\Release/"
+                               ProgramDataBaseFileName=".\Release/"
+                               WarningLevel="3"
+                               SuppressStartupBanner="true"
+                               CompileAs="0"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="NDEBUG"
+                               Culture="1033"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                               Description="deleting blitter files"
+                               CommandLine="del ..\..\blit.h&#x0D;&#x0A;del ..\..\blitfunc.c&#x0D;&#x0A;del ..\..\blitfunc.h&#x0D;&#x0A;del ..\..\blittable.c&#x0D;&#x0A;"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalOptions="/MACHINE:I386"
+                               OutputFile="genblitter.exe"
+                               LinkIncremental="1"
+                               SuppressStartupBanner="true"
+                               ProgramDatabaseFile=".\Release/genblitter.pdb"
+                               SubSystem="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                               Description="generating blitter files"
+                               CommandLine="genblitter.exe i &gt;..\..\blit.h&#x0D;&#x0A;genblitter.exe f &gt;..\..\blitfunc.c&#x0D;&#x0A;genblitter.exe h &gt;..\..\blitfunc.h&#x0D;&#x0A;genblitter.exe t &gt;..\..\blittable.c&#x0D;&#x0A;"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="FullRelease|Win32"
+                       OutputDirectory="$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="1"
+                       InheritedPropertySheets="..\..\..\..\..\msvs\VC\VCProjectDefaults\UpgradeFromVC71.vsprops"
                        UseOfMFC="0"
                        ATLMinimizesCRunTimeLibraryUsage="false"
                        CharacterSet="2"
index b9395e09fcf09c3dc8058bbdd99a269164db241e..3a1cc5b3d8f5f039998adf52264ec48961a3a3d5 100644 (file)
                                CommandLine="cd ..\..&#x0D;&#x0A;od-win32\gencomp_msvc\gencomp.exe&#x0D;&#x0A;"
                        />
                </Configuration>
+               <Configuration
+                       Name="FullRelease|Win32"
+                       OutputDirectory="$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="1"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               TypeLibraryName=".\Release/gencomp_msvc.tlb"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               AdditionalOptions=""
+                               InlineFunctionExpansion="1"
+                               AdditionalIncludeDirectories="..\..\include,..\..,..\"
+                               PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE"
+                               StringPooling="true"
+                               RuntimeLibrary="0"
+                               EnableFunctionLevelLinking="true"
+                               PrecompiledHeaderFile=".\Release/gencomp_msvc.pch"
+                               AssemblerListingLocation=".\Release/"
+                               ObjectFile=".\Release/"
+                               ProgramDataBaseFileName=".\Release/"
+                               WarningLevel="3"
+                               SuppressStartupBanner="true"
+                               CompileAs="0"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="NDEBUG"
+                               Culture="1033"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalOptions="/MACHINE:I386"
+                               OutputFile="gencomp.exe"
+                               LinkIncremental="1"
+                               SuppressStartupBanner="true"
+                               ProgramDatabaseFile=".\Release/gencomp.pdb"
+                               SubSystem="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                               Description="generating gencomp files"
+                               CommandLine="cd ..\..&#x0D;&#x0A;od-win32\gencomp_msvc\gencomp.exe&#x0D;&#x0A;"
+                       />
+               </Configuration>
        </Configurations>
        <References>
        </References>
index 1c26a0b223e4b0e8870107780e38cd2d005b806e..a5ad9d74fb09cbab3756e133bc558d69c7fccda6 100644 (file)
                                CommandLine="cd ..\..&#x0D;&#x0A;od-win32\gencpu_msvc\gencpu.exe&#x0D;&#x0A;"
                        />
                </Configuration>
+               <Configuration
+                       Name="FullRelease|Win32"
+                       OutputDirectory="$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="1"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               TypeLibraryName=".\Release/gencpu_msvc.tlb"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               AdditionalOptions=""
+                               InlineFunctionExpansion="1"
+                               AdditionalIncludeDirectories="..\..\include,..\..,..\"
+                               PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE"
+                               StringPooling="true"
+                               RuntimeLibrary="0"
+                               EnableFunctionLevelLinking="true"
+                               PrecompiledHeaderFile=".\Release/gencpu_msvc.pch"
+                               AssemblerListingLocation=".\Release/"
+                               ObjectFile=".\Release/"
+                               ProgramDataBaseFileName=".\Release/"
+                               WarningLevel="3"
+                               SuppressStartupBanner="true"
+                               CompileAs="0"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="NDEBUG"
+                               Culture="1033"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                               Description="deleting gencpu files"
+                               CommandLine="del ..\..\cputbl.h&#x0D;&#x0A;del ..\..\cpustbl.c&#x0D;&#x0A;del ..\..\cpuemu.c&#x0D;&#x0A;"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalOptions="/MACHINE:I386"
+                               OutputFile="gencpu.exe"
+                               LinkIncremental="1"
+                               SuppressStartupBanner="true"
+                               ProgramDatabaseFile=".\Release/gencpu.pdb"
+                               SubSystem="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                               Description="generating gencpu files"
+                               CommandLine="cd ..\..&#x0D;&#x0A;od-win32\gencpu_msvc\gencpu.exe&#x0D;&#x0A;"
+                       />
+               </Configuration>
        </Configurations>
        <References>
        </References>
index 8c461f1315adac676108e29361289d82cd2fa0d5..fa6e6257cd5db9b59a92c52fd6bf48cb24815f1c 100644 (file)
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               Description=""
+                               CommandLine=""
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+                               RuntimeLibrary="2"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="true"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                               Description="deleteing linetoscr.c"
+                               CommandLine="del ..\..\linetoscr.c"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               OutputFile="genlinetoscr.exe"
+                               LinkIncremental="1"
+                               GenerateDebugInformation="true"
+                               SubSystem="1"
+                               OptimizeReferences="2"
+                               EnableCOMDATFolding="2"
+                               TargetMachine="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                               Description="generating linetoscr.c"
+                               CommandLine="genlinetoscr.exe &gt;..\..\linetoscr.c"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="FullRelease|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="1"
+                       CharacterSet="1"
+                       WholeProgramOptimization="1"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
                                CommandLine=""
                        />
                        <Tool
index deca87a8f0b8411494129544aa365c2af85ee9df..1eef96ad0f566e55a81450743cb2266dfbe2b0e7 100644 (file)
@@ -21,6 +21,8 @@
 #include <sys/stat.h>
 #include <io.h>
 
+#include <setupapi.h>
+
 #include "sysdeps.h"
 #include "options.h"
 #include "gensound.h"
@@ -751,11 +753,8 @@ static writepending;
 
 int openser (char *sername)
 {
-    char buf[32];
     COMMTIMEOUTS CommTimeOuts;
 
-    sprintf (buf, "\\.\\\\%s", sername);
-
     if (!(readevent = CreateEvent (NULL, TRUE, FALSE, NULL))) {
        write_log ("SERIAL: Failed to create r event!\n");
        return 0;
@@ -771,14 +770,14 @@ int openser (char *sername)
 
     uartbreak = 0;
 
-    hCom = CreateFile (buf, GENERIC_READ | GENERIC_WRITE,
+    hCom = CreateFile (sername, GENERIC_READ | GENERIC_WRITE,
                            0,
                            NULL,
                            OPEN_EXISTING,
                            FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED,
                            NULL);
     if (hCom == INVALID_HANDLE_VALUE) {
-       write_log ("SERIAL: failed to open '%s' err=%d\n", buf, GetLastError());
+       write_log ("SERIAL: failed to open '%s' err=%d\n", sername, GetLastError());
        closeser();
        return 0;
     }
@@ -841,7 +840,7 @@ void closeser (void)
        hCom = INVALID_HANDLE_VALUE;
     }
     if (midi_ready) {
-       extern int serper;
+       extern uae_u16 serper;
        Midi_Close();
        //need for camd Midi Stuff(it close midi and reopen it but serial.c think the baudrate
        //is the same and do not open midi), so setting serper to different value helps
@@ -1097,3 +1096,128 @@ void hsyncstuff(void)
     }
 #endif
 }
+
+static int enumserialports_2(void)
+{
+    // Create a device information set that will be the container for 
+    // the device interfaces.
+    HDEVINFO hDevInfo = INVALID_HANDLE_VALUE;
+    SP_DEVICE_INTERFACE_DETAIL_DATA *pDetData = NULL;
+    BOOL bOk = TRUE;
+    SP_DEVICE_INTERFACE_DATA ifcData;
+    DWORD dwDetDataSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA) + 256;
+    DWORD ii;
+    int cnt = 0;
+
+    hDevInfo = SetupDiGetClassDevs(&GUID_CLASS_COMPORT, NULL, NULL, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
+    if(hDevInfo == INVALID_HANDLE_VALUE)
+        return 0;
+    // Enumerate the serial ports
+    pDetData = xmalloc (dwDetDataSize);
+    // This is required, according to the documentation. Yes,
+    // it's weird.
+    ifcData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
+    pDetData->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA);
+    for (ii = 0; bOk; ii++) {
+        bOk = SetupDiEnumDeviceInterfaces(hDevInfo, NULL, &GUID_CLASS_COMPORT, ii, &ifcData);
+        if (bOk) {
+           // Got a device. Get the details.
+           SP_DEVINFO_DATA devdata = {sizeof(SP_DEVINFO_DATA)};
+           bOk = SetupDiGetDeviceInterfaceDetail(hDevInfo,
+               &ifcData, pDetData, dwDetDataSize, NULL, &devdata);
+           if (bOk) {
+               // Got a path to the device. Try to get some more info.
+               TCHAR fname[256];
+               TCHAR desc[256];
+               BOOL bSuccess = SetupDiGetDeviceRegistryProperty(
+                   hDevInfo, &devdata, SPDRP_FRIENDLYNAME, NULL,
+                   (PBYTE)fname, sizeof(fname), NULL);
+               bSuccess = bSuccess && SetupDiGetDeviceRegistryProperty(
+                   hDevInfo, &devdata, SPDRP_DEVICEDESC, NULL,
+                   (PBYTE)desc, sizeof(desc), NULL);
+               if (bSuccess && cnt < MAX_SERIAL_PORTS) {
+                   char *p;
+                   comports[cnt].dev = my_strdup (pDetData->DevicePath);
+                   comports[cnt].name = my_strdup (fname);
+                   p = strstr(fname,"(COM");
+                   if (p && (p[5] == ')' || p[6] == ')')) {
+                       comports[cnt].cfgname = xmalloc (100);
+                       if (isdigit(p[5]))
+                           sprintf(comports[cnt].cfgname, "COM%c%c", p[4], p[5]);
+                       else
+                           sprintf(comports[cnt].cfgname, "COM%c", p[4]);
+                   } else {
+                       comports[cnt].cfgname = my_strdup (pDetData->DevicePath);
+                   }
+                   write_log("SERPORT: '%s' = '%s' = '%s'\n", comports[cnt].name, comports[cnt].cfgname, comports[cnt].dev);
+                   cnt++;
+               }
+           } else {
+               write_log("SetupDiGetDeviceInterfaceDetail failed, err=%d", GetLastError());
+               goto end;
+           }
+       } else {
+           DWORD err = GetLastError();
+           if (err != ERROR_NO_MORE_ITEMS) {
+               write_log("SetupDiEnumDeviceInterfaces failed, err=%d", err);
+               goto end;
+           }
+       }
+    }
+end:
+    xfree(pDetData);
+    if (hDevInfo != INVALID_HANDLE_VALUE)
+       SetupDiDestroyDeviceInfoList(hDevInfo);
+    return cnt;
+}
+
+int enumserialports(void)
+{
+    int port, cnt;
+    char name[256];
+    COMMCONFIG cc;
+    DWORD size = sizeof(COMMCONFIG);
+
+    write_log("Serial port enumeration..\n");
+    if (os_winnt) {
+       cnt = enumserialports_2();
+    } else {
+       cnt = 0;
+       for(port = 0; port < MAX_SERIAL_PORTS; port++) {
+           sprintf(name, "COM%d", port);
+           if(GetDefaultCommConfig(name, &cc, &size)) {
+               if (cnt < MAX_SERIAL_PORTS) {
+                   comports[cnt].dev = xmalloc(100);
+                   sprintf(comports[cnt].dev, "\\.\\\\%s", name);
+                   comports[cnt].cfgname = my_strdup (name);
+                   comports[cnt].name = my_strdup (name);
+                   write_log("SERPORT: '%s' = '%s'\n", comports[cnt].name, comports[cnt].dev);
+                   cnt++;
+               }
+           }
+       }
+    }
+    write_log("Serial port enumeration end\n");
+    return cnt;
+}
+
+void sernametodev(char *sername)
+{
+    int i;
+    for (i = 0; i < MAX_SERIAL_PORTS && comports[i].name; i++) {
+       if (!strcmp(sername, comports[i].cfgname)) {
+           strcpy (sername, comports[i].dev);
+           return;
+       }
+    }
+}
+void serdevtoname(char *sername)
+{
+    int i;
+    for (i = 0; i < MAX_SERIAL_PORTS && comports[i].name; i++) {
+       if (!strcmp(sername, comports[i].dev)) {
+           strcpy (sername, comports[i].cfgname);
+           return;
+       }
+    }
+}
index 867187fcafbcdedfcc072f1daaa05cec422f9240..5c801f4dbb6bb609b5c792e6ae5e7cfca60ff050 100644 (file)
@@ -32,3 +32,17 @@ void serialuartbreak (int);
 
 extern void unload_ghostscript (void);
 extern int load_ghostscript (void);
+
+#define MAX_SERIAL_PORTS 8
+struct serialportinfo
+{
+    char *dev;
+    char *cfgname;
+    char *name;
+};
+extern struct serialportinfo comports[MAX_SERIAL_PORTS];
+
+extern int enumserialports(void);
+extern void sernametodev(char*);
+extern void serdevtoname(char*);
+
index a8967aadce534b86f388941a2194e68775a7436f..43197b51a78d298955fcbbbff0154285d086e52d 100644 (file)
@@ -306,11 +306,11 @@ BEGIN
     RTEXT           "Ghostscript extra parameters:",IDC_STATIC,12,49,91,15,SS_CENTERIMAGE
     EDITTEXT        IDC_PS_PARAMS,120,50,169,12,ES_AUTOHSCROLL
     GROUPBOX        "Serial Port",IDC_SERIALFRAME,4,72,292,48
-    COMBOBOX        IDC_SERIAL,19,84,95,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
-    CONTROL         "Shared",IDC_SER_SHARED,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,132,83,48,13
-    CONTROL         "RTS/CTS",IDC_SER_CTSRTS,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,185,83,53,12
+    COMBOBOX        IDC_SERIAL,49,84,232,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "Shared",IDC_SER_SHARED,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,11,102,48,13
+    CONTROL         "RTS/CTS",IDC_SER_CTSRTS,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,65,102,55,12
     CONTROL         "Direct []Use when emulating serial-link games on two PCs running WinUAE",IDC_SER_DIRECT,
-                    "Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,243,83,46,12
+                    "Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,132,103,65,12
     GROUPBOX        "MIDI",IDC_MIDIFRAME,4,123,292,33
     RTEXT           "Out:",IDC_MIDI,10,134,34,15,SS_CENTERIMAGE
     COMBOBOX        IDC_MIDIOUTLIST,50,134,95,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
@@ -323,7 +323,7 @@ BEGIN
     RTEXT           "Port 0:",IDC_STATIC,11,173,25,15,SS_CENTERIMAGE
     RTEXT           "Port 1:",IDC_STATIC,11,194,25,15,SS_CENTERIMAGE
     LTEXT           "X-Arcade layout information []#1",IDC_STATIC,16,213,106,15,SS_NOTIFY | SS_CENTERIMAGE
-    CONTROL         "uaeserial.device",IDC_UAESERIAL,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,132,100,131,13
+    CONTROL         "uaeserial.device",IDC_UAESERIAL,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,207,101,78,13
 END
 
 IDD_CONTRIBUTORS DIALOGEX 0, 0, 411, 242
@@ -1022,7 +1022,7 @@ BEGIN
     IDS_COULDNOTLOADCONFIG  "Could not load the selected configuration!\n"
     IDS_NOHELP              "Online help is disabled because the HTML Help functionality is not installed on this system. HTML Help is available from http://www.microsoft.com/downloads/.\n"
     IDS_MUSTSELECTCONFIG    "You must select a configuration or enter a name before selecting Load...\n"
-    IDS_INVALIDCOMPORT      "The COM port you have in this configuration is not valid on this machine.\n"
+    IDS_INVALIDCOMPORT      "The serial port you have in this configuration is not valid on this machine.\n"
 END
 
 STRINGTABLE 
index 1c2b9d10752a1d326156e2f3ba78abc8c2cfed38..8c2b90d86914baa398ba853301b9c94c9c04fbce 100644 (file)
@@ -291,7 +291,7 @@ BEGIN
     PUSHBUTTON      "Save As...",IDC_SAVE,175,225,40,15
 END
 
-IDD_PORTS DIALOGEX 0, 0, 300, 222
+IDD_PORTS DIALOGEX 0, 0, 300, 238
 STYLE DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
 FONT 8, "MS Sans Serif", 0, 0, 0x1
 BEGIN
@@ -305,24 +305,25 @@ BEGIN
     EDITTEXT        IDC_PRINTERAUTOFLUSH,263,33,25,12,ES_NUMBER
     RTEXT           "Ghostscript extra parameters:",IDC_STATIC,12,49,91,15,SS_CENTERIMAGE
     EDITTEXT        IDC_PS_PARAMS,120,50,169,12,ES_AUTOHSCROLL
-    GROUPBOX        "Serial Port",IDC_SERIALFRAME,4,72,292,29
-    COMBOBOX        IDC_SERIAL,19,83,95,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
-    CONTROL         "Shared",IDC_SHARED,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,132,83,48,13
-    CONTROL         "RTS/CTS",IDC_SER_CTSRTS,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,185,83,53,12
-    CONTROL         "Direct []Use when emulating serial-link games on two PCs running WinUAE",IDC_SERIAL_DIRECT,
-                    "Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,243,83,46,12
-    GROUPBOX        "MIDI",IDC_MIDIFRAME,4,104,292,33
-    RTEXT           "Out:",IDC_MIDI,10,115,34,15,SS_CENTERIMAGE
-    COMBOBOX        IDC_MIDIOUTLIST,50,115,95,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
-    RTEXT           "In:",IDC_MIDI2,150,115,29,15,SS_CENTERIMAGE
-    COMBOBOX        IDC_MIDIINLIST,185,115,95,134,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
-    GROUPBOX        "Mouse/Joystick Ports",IDC_PORT0,4,139,292,75
-    COMBOBOX        IDC_PORT0_JOYS,45,155,241,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
-    COMBOBOX        IDC_PORT1_JOYS,45,176,241,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
-    PUSHBUTTON      "Swap ports",IDC_SWAP,211,195,75,14
-    RTEXT           "Port 0:",IDC_STATIC,11,154,25,15,SS_CENTERIMAGE
-    RTEXT           "Port 1:",IDC_STATIC,11,175,25,15,SS_CENTERIMAGE
-    LTEXT           "X-Arcade layout information []#1",IDC_STATIC,16,195,106,15,SS_NOTIFY | SS_CENTERIMAGE
+    GROUPBOX        "Serial Port",IDC_SERIALFRAME,4,72,292,48
+    COMBOBOX        IDC_SERIAL,49,84,232,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "Shared",IDC_SER_SHARED,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,11,102,48,13
+    CONTROL         "RTS/CTS",IDC_SER_CTSRTS,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,65,102,55,12
+    CONTROL         "Direct []Use when emulating serial-link games on two PCs running WinUAE",IDC_SER_DIRECT,
+                    "Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,132,103,65,12
+    GROUPBOX        "MIDI",IDC_MIDIFRAME,4,123,292,33
+    RTEXT           "Out:",IDC_MIDI,10,134,34,15,SS_CENTERIMAGE
+    COMBOBOX        IDC_MIDIOUTLIST,50,134,95,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    RTEXT           "In:",IDC_MIDI2,150,134,29,15,SS_CENTERIMAGE
+    COMBOBOX        IDC_MIDIINLIST,185,134,95,134,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    GROUPBOX        "Mouse/Joystick Ports",IDC_PORT0,4,158,292,75
+    COMBOBOX        IDC_PORT0_JOYS,45,174,241,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_PORT1_JOYS,45,195,241,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    PUSHBUTTON      "Swap ports",IDC_SWAP,211,214,75,14
+    RTEXT           "Port 0:",IDC_STATIC,11,173,25,15,SS_CENTERIMAGE
+    RTEXT           "Port 1:",IDC_STATIC,11,194,25,15,SS_CENTERIMAGE
+    LTEXT           "X-Arcade layout information []#1",IDC_STATIC,16,213,106,15,SS_NOTIFY | SS_CENTERIMAGE
+    CONTROL         "uaeserial.device",IDC_UAESERIAL,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,207,101,78,13
 END
 
 IDD_CONTRIBUTORS DIALOGEX 0, 0, 411, 242
@@ -535,8 +536,8 @@ STYLE DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
 FONT 8, "MS Sans Serif", 0, 0, 0x1
 BEGIN
     COMBOBOX        IDC_INPUTTYPE,5,5,98,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
-    COMBOBOX        IDC_INPUTDEVICE,109,4,167,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
-    CONTROL         "",IDC_INPUTDEVICEDISABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,282,7,9,8
+    COMBOBOX        IDC_INPUTDEVICE,109,5,167,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "",IDC_INPUTDEVICEDISABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,282,8,9,8
     CONTROL         "List1",IDC_INPUTLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,5,22,290,146
     COMBOBOX        IDC_INPUTAMIGACNT,5,174,24,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
     COMBOBOX        IDC_INPUTAMIGA,33,174,262,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
@@ -765,7 +766,7 @@ BEGIN
 
     IDD_INPUT, DIALOG
     BEGIN
-        BOTTOMMARGIN, 187
+        BOTTOMMARGIN, 240
     END
 
     IDD_QUICKSTART, DIALOG
@@ -838,8 +839,8 @@ IDI_PATHS               ICON                    "paths.ico"
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,3,3,0
- PRODUCTVERSION 1,3,3,0
+ FILEVERSION 1,3,4,0
+ PRODUCTVERSION 1,3,4,0
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -855,12 +856,12 @@ BEGIN
         BLOCK "040904b0"
         BEGIN
             VALUE "FileDescription", "WinUAE"
-            VALUE "FileVersion", "1.3.3"
+            VALUE "FileVersion", "1.3.4"
             VALUE "InternalName", "WinUAE"
             VALUE "LegalCopyright", "© 1996-2006 under the GNU Public License (GPL)"
             VALUE "OriginalFilename", "WinUAE.exe"
             VALUE "ProductName", "WinUAE"
-            VALUE "ProductVersion", "1.3.3"
+            VALUE "ProductVersion", "1.3.4"
         END
     END
     BLOCK "VarFileInfo"
@@ -1002,7 +1003,7 @@ BEGIN
     IDS_COULDNOTLOADCONFIG  "Could not load the selected configuration!\n"
     IDS_NOHELP              "Online help is disabled because the HTML Help functionality is not installed on this system. HTML Help is available from http://www.microsoft.com/downloads/.\n"
     IDS_MUSTSELECTCONFIG    "You must select a configuration or enter a name before selecting Load...\n"
-    IDS_INVALIDCOMPORT      "The COM port you have in this configuration is not valid on this machine.\n"
+    IDS_INVALIDCOMPORT      "The serial port you have in this configuration is not valid on this machine.\n"
 END
 
 STRINGTABLE 
@@ -1034,7 +1035,7 @@ BEGIN
     IDS_DELETECONFIGCONFIRMATION 
                             "Are you sure you want to Delete this configuration?\n"
     IDS_DELETECONFIGTITLE   "Confirm Delete"
-    IDS_GFXCARDCHECK        "WinUAE will now determine the 16-bit pixel format of your graphics card. Your\nscreen will go black for two seconds, with a resolution of 640x480 @ 60Hz. This\nprocedure is required for best rendering of the emulation environment on 16-bit\ndisplay-modes, and should be done whenever you run WinUAE for the first time, or\ninstall a new graphics card in your PC. Proceed with this test?"
+    IDS_GFXCARDCHECK        "WinUAE will now determine the 16-bit pixel format of your graphics card. Your screen will go black for two seconds, with a resolution of 640x480 @ 60Hz. This procedure is required for best rendering of the emulation environment on 16-bit display-modes, and should be done whenever you run WinUAE for the first time, or install a new graphics card in your PC. Proceed with this test?"
     IDS_GFXCARDTITLE        "Pixel format detection"
     IDS_MUSTSELECTPATH      "You must select a path!"
     IDS_SETTINGSERROR       "Settings error"
index 362776cd1092cb81bfa43db06f79232204a6d859..229a89b9c339fa06766e8141dff34d10ff0a05c1 100644 (file)
@@ -439,9 +439,8 @@ void serial_open(void)
     if (serdev)
        return;
     serper = 0;
-    if( !openser( currprefs.sername ) )
-    {
-        write_log( "SERIAL: Could not open device %s\n", currprefs.sername );
+    if(!openser(currprefs.sername)) {
+        write_log("SERIAL: Could not open device %s\n", currprefs.sername);
         return;
     }
     serdev = 1;
index 8247be5e2e842b4a6dddc323167ec1cf6bfe0292..f9a772273f77ad38eba0984526458d2d9d64f567 100644 (file)
@@ -1730,7 +1730,9 @@ void target_save_options (struct zfile *f, struct uae_prefs *p)
     cfgfile_target_write (f, "logfile=%s\n", p->win32_logfile ? "true" : "false");
     cfgfile_target_write (f, "map_drives=%s\n", p->win32_automount_drives ? "true" : "false");
     cfgfile_target_write (f, "map_net_drives=%s\n", p->win32_automount_netdrives ? "true" : "false");
+    serdevtoname(p->sername);
     cfgfile_target_write (f, "serial_port=%s\n", p->sername[0] ? p->sername : "none" );
+    sernametodev(p->sername);
     cfgfile_target_write (f, "parallel_port=%s\n", p->prtname[0] ? p->prtname : "none" );
 
     cfgfile_target_write (f, "active_priority=%d\n", priorities[p->win32_active_priority].value);
@@ -1833,8 +1835,7 @@ int target_parse_option (struct uae_prefs *p, char *option, char *value)
     }
 
     if (cfgfile_string (option, value, "serial_port", &p->sername[0], 256)) {
-       if (!strcmp(p->sername, "none"))
-           p->sername[0] = 0;
+       sernametodev(p->sername);
        if (p->sername[0])
            p->use_serial = 1;
        else
@@ -2716,7 +2717,7 @@ static int PASCAL WinMain2 (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR
        write_log ("Sorting devices and modes..\n");
        sortdisplays ();
        write_log ("done\n");
-           
+
        memset (&devmode, 0, sizeof(devmode));
        devmode.dmSize = sizeof(DEVMODE);
        if (EnumDisplaySettings (NULL, ENUM_CURRENT_SETTINGS, &devmode)) {
@@ -2739,6 +2740,7 @@ static int PASCAL WinMain2 (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR
            paraport_mask = paraport_init ();
 #endif
            createIPC();
+           enumserialports();
            real_main (argc, argv);
        }
     }
index 7339e6de7f8d96edf3f3dee8d0a378ed93374f70..a13fff1e5890a83ac8466fcfa65e846a8bc9c6ab 100644 (file)
@@ -15,9 +15,9 @@
 #define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100)
 #define GETBDD(x) ((x) % 100)
 
-#define WINUAEBETA 5
+#define WINUAEBETA 6
 #define WINUAEPUBLICBETA 1
-#define WINUAEDATE MAKEBD(2006, 12, 21)
+#define WINUAEDATE MAKEBD(2006, 12, 24)
 
 #define IHF_WINDOWHIDDEN 6
 #define NORMAL_WINDOW_STYLE (WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU)
index 676c191fb35a6468e8fc285000f0892459249632..155c0532b1668d2a4f0793fdca2b19d9bcdc1a43 100644 (file)
@@ -394,7 +394,7 @@ static struct romdata *scan_single_rom_2 (struct zfile *f)
     zfile_fseek (f, 0, SEEK_END);
     size = zfile_ftell (f);
     zfile_fseek (f, 0, SEEK_SET);
-    if (size > 1760 * 512)  {/* don't skip KICK disks */
+    if (size > 524288 * 2)  {/* don't skip KICK disks or 1M ROMs */
        write_log ("'%s': too big %d, ignored\n", zfile_getname(f), size);
        return 0;
     }
@@ -6855,8 +6855,7 @@ static INT_PTR CALLBACK SwapperDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPAR
 static PRINTER_INFO_1 *pInfo = NULL;
 static DWORD dwEnumeratedPrinters = 0;
 #define MAX_PRINTERS 10
-#define MAX_SERIALS 8
-static char comports[MAX_SERIALS][8];
+struct serialportinfo comports[MAX_SERIAL_PORTS];
 static int ghostscript_available;
 
 static int joy0previous, joy1previous;
@@ -7067,7 +7066,7 @@ static void values_from_portsdlg (HWND hDlg)
     item = SendDlgItemMessage (hDlg, IDC_SERIAL, CB_GETCURSEL, 0, 0L);
     if (item != CB_ERR && item > 0) {
         workprefs.use_serial = 1;
-        strcpy (workprefs.sername, comports[item - 1]);
+       strcpy (workprefs.sername, comports[item - 1].dev);
     } else {
         workprefs.use_serial = 0;
         workprefs.sername[0] = 0;
@@ -7144,8 +7143,8 @@ static void values_to_portsdlg (HWND hDlg)
     } else {
        int i;
        LRESULT result = -1;
-       for (i = 0; i < MAX_SERIALS; i++) {
-           if (!strcmp (comports[i], workprefs.sername)) {
+       for (i = 0; i < MAX_SERIAL_PORTS && comports[i].name; i++) {
+           if (!strcmp (comports[i].dev, workprefs.sername)) {
                result = SendDlgItemMessage(hDlg, IDC_SERIAL, CB_SETCURSEL, i + 1, 0L);
                break;
            }
@@ -7169,9 +7168,7 @@ static void values_to_portsdlg (HWND hDlg)
 static void init_portsdlg( HWND hDlg )
 {
     static int first;
-    int port, portcnt, numdevs;
-    COMMCONFIG cc;
-    DWORD size = sizeof(COMMCONFIG);
+    int port, numdevs;
     MIDIOUTCAPS midiOutCaps;
     MIDIINCAPS midiInCaps;
 
@@ -7190,12 +7187,8 @@ static void init_portsdlg( HWND hDlg )
 
     SendDlgItemMessage (hDlg, IDC_SERIAL, CB_RESETCONTENT, 0, 0L);
     SendDlgItemMessage (hDlg, IDC_SERIAL, CB_ADDSTRING, 0, (LPARAM)szNone);
-    portcnt = 0;
-    for(port = 0; port < MAX_SERIALS; port++) {
-       sprintf(comports[portcnt], "COM%d", port);
-       if(GetDefaultCommConfig(comports[portcnt], &cc, &size)) {
-           SendDlgItemMessage(hDlg, IDC_SERIAL, CB_ADDSTRING, 0, (LPARAM)comports[portcnt++]);
-       }
+    for (port = 0; port < MAX_SERIAL_PORTS && comports[port].name; port++) {
+        SendDlgItemMessage(hDlg, IDC_SERIAL, CB_ADDSTRING, 0, (LPARAM)comports[port].name);
     }
 
     SendDlgItemMessage (hDlg, IDC_PRINTERLIST, CB_RESETCONTENT, 0, 0L);
@@ -8110,7 +8103,7 @@ static void values_to_avioutputdlg(HWND hDlg)
     }
        
     CheckDlgButton (hDlg, IDC_AVIOUTPUT_FRAMELIMITER, avioutput_framelimiter ? FALSE : TRUE);
-    CheckDlgButton (hDlg, IDC_AVIOUTPUT_FRAMELIMITER, avioutput_nosoundoutput ? TRUE : FALSE);
+    CheckDlgButton (hDlg, IDC_AVIOUTPUT_NOSOUNDOUTPUT, avioutput_nosoundoutput ? TRUE : FALSE);
     CheckDlgButton (hDlg, IDC_AVIOUTPUT_ACTIVATED, avioutput_requested ? BST_CHECKED : BST_UNCHECKED);
     CheckDlgButton (hDlg, IDC_SAMPLERIPPER_ACTIVATED, sampleripper_enabled ? BST_CHECKED : BST_UNCHECKED);
 }
@@ -8174,6 +8167,7 @@ static void enable_for_avioutputdlg(HWND hDlg)
     SetWindowText(GetDlgItem(hDlg, IDC_AVIOUTPUT_VIDEO_STATIC), tmp);
 
     EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_NOSOUNDOUTPUT), avioutput_framelimiter ? TRUE : FALSE);
+
     if (!avioutput_framelimiter)
        avioutput_nosoundoutput = 1;
     CheckDlgButton (hDlg, IDC_AVIOUTPUT_FRAMELIMITER, avioutput_framelimiter ? FALSE : TRUE);
index bda12a29aa5266e914ac27b742444001737ce372..216bc00d0ff5680c75565383d8a2ec46daaf6db4 100644 (file)
                                Name="VCPostBuildEventTool"
                        />
                </Configuration>
+               <Configuration
+                       Name="FullRelease|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="1"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <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="true"
+                               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="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="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="1"
+                               TargetMachine="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                               AdditionalManifestFiles="..\resources\winuae.exe.manifest"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="FullRelease|x64"
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+                       ConfigurationType="1"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <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"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
        </Configurations>
        <References>
        </References>
                                                        AdditionalIncludeDirectories="\projects\winuae\src\od-win32\resources;$(NoInherit)"
                                                />
                                        </FileConfiguration>
+                                       <FileConfiguration
+                                               Name="FullRelease|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCResourceCompilerTool"
+                                                       AdditionalIncludeDirectories="\projects\winuae\src\od-win32\resources;$(NoInherit)"
+                                               />
+                                       </FileConfiguration>
+                                       <FileConfiguration
+                                               Name="FullRelease|x64"
+                                               >
+                                               <Tool
+                                                       Name="VCResourceCompilerTool"
+                                                       AdditionalIncludeDirectories="\projects\winuae\src\od-win32\resources;$(NoInherit)"
+                                               />
+                                       </FileConfiguration>
                                </File>
                                <File
                                        RelativePath="..\resources\xarcade-winuae.bmp"
index cd6f1062f4e5c87d1a21db14e14976ba0e0dde34..8e5853130393352de9c741073710d2d46ac80452 100644 (file)
@@ -1,4 +1,15 @@
 
+Beta 6: (RC)
+
+- serial port "friendly" names listed in serial port selection,
+  also detects virtual (for example bluetooth) serial ports.
+  Windows 2000+ only. W9X/ME shows normal "legacy" names.
+- more bsdsocket stability fixes
+- 1M ROM image support (upper half maps to regular KS space,
+  lower half to 0xe00000) Apparently A600/A1200/A4000 does the
+  same with 2x512K EPROMs
+- compiler optimization settings changed for release build
+
 Beta 5:
 
 - remove winuae-specific command line parameters before passing
index 93ce312003cba87f1ef810aadafb3fbbcc0166f5..194140fd85f4be2a789a838ff2210aade4e41d46 100644 (file)
@@ -50,9 +50,9 @@ int console_get (char *out, int maxlen)
     DWORD len,totallen;
 
     *out = 0;
-    totallen=0;
+    totallen = 0;
     while(maxlen>0) {
-       ReadConsole(stdinput,out,1,&len,0);
+       ReadConsole(stdinput, out, 1, &len, 0);
        if(*out == 13)
            break;
        out++;
diff --git a/traps.c b/traps.c
index 7085e9c1808a3553ad96d849f5e1aa281f5c563c..b11fbb0deb13e74df432116161e1231af7998622 100644 (file)
--- a/traps.c
+++ b/traps.c
@@ -75,7 +75,7 @@ static struct Trap  traps[MAX_TRAPS];
 static unsigned int trap_count;
 
 
-static const int trace_traps = 1;
+static const int trace_traps = 0;
 
 
 static void trap_HandleExtendedTrap (TrapHandler, int has_retval);