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;
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;
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;
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;
#include "autoconf.h"
#include "traps.h"
#include "bsdsocket.h"
+#include "threaddep/thread.h"
+#include "native2amiga.h"
#ifdef BSDSOCKET
/* 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;
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;
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 */
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() */
}
}
+#if 0
if (sb == sbsigqueue)
sbsigqueue = sb->next;
else {
}
}
}
+#endif
unlocksigqueue ();
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;
}
socketbases = NULL;
+#if 0
sbsigqueue = NULL;
+#endif
for (i = 0; i < SOCKPOOLSIZE; i++) {
if (sockdata->sockpoolids[i] != UNIQUE_ID) {
m68k_areg (®s, 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;
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;
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;
}
INTREQ (0x8000 | 0x0008);
}
#endif
-#if 1
+#if 0
{
extern volatile int bsd_int_requested;
if (bsd_int_requested) {
//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;
#endif
custom_wput (addr & ~1, rval);
if (warned < 10) {
- if (m68k_getpc(®s) < 0xe00000 || m68k_getpc(®s) >= 0x10000000) {
- write_log ("Byte put to custom register %04.4X PC=%08.8X\n", addr, m68k_getpc(®s));
+ if (M68K_GETPC < 0xe00000 || M68K_GETPC >= 0x10000000) {
+ write_log ("Byte put to custom register %04.4X PC=%08.8X\n", addr, M68K_GETPC);
warned++;
}
}
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)
#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;
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;
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;
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;
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;
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;
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
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
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;
#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 = {
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;
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;
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;
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;
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;
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);
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 */
return (dmamask & dmacon) && (dmacon & 0x200);
}
-#define SPCFLAG_UAE_INT 1
#define SPCFLAG_STOP 2
#define SPCFLAG_COPPER 4
#define SPCFLAG_INT 8
}
}
-uae_u32 REGPARAM2 dummy_lget (uaecptr addr)
+static uae_u32 REGPARAM2 dummy_lget (uaecptr addr)
{
#ifdef JIT
special_mem |= S_READ;
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;
return regs.irc;
}
-uae_u32 REGPARAM2 dummy_bget (uaecptr addr)
+static uae_u32 REGPARAM2 dummy_bget (uaecptr addr)
{
#ifdef JIT
special_mem |= S_READ;
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;
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;
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;
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;
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;
return 0;
}
-uae_u32 REGPARAM2 mbres_wget (uaecptr addr)
+static uae_u32 REGPARAM2 mbres_wget (uaecptr addr)
{
#ifdef JIT
special_mem |= S_READ;
return 0;
}
-uae_u32 REGPARAM2 mbres_bget (uaecptr addr)
+static uae_u32 REGPARAM2 mbres_bget (uaecptr addr)
{
#ifdef JIT
special_mem |= S_READ;
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;
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;
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;
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);
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;
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;
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;
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;
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;
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;
return do_get_mem_long (m);
}
-uae_u32 REGPARAM2 chipmem_wget (uaecptr addr)
+static uae_u32 REGPARAM2 chipmem_wget (uaecptr addr)
{
uae_u16 *m;
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;
chipmemory[addr] = b;
}
-uae_u32 REGPARAM2 chipmem_agnus_lget (uaecptr addr)
+static uae_u32 REGPARAM2 chipmem_agnus_lget (uaecptr addr)
{
uae_u32 *m;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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
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
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;
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
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
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;
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;
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;
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;
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;
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;
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;
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;
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;
}
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)
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;
}
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;
}
}
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");
}
read_kickstart (f, extendedkickmemory, extendedkickmem_size, 0, 0);
extendedkickmem_mask = extendedkickmem_size - 1;
+ zfile_fclose (f);
return 1;
}
}
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)
#endif
kickstart_version = (kickmemory[12] << 8) | kickmemory[13];
+ zfile_fclose (f);
return 1;
err:
strcpy (currprefs.romfile, tmprom);
+ zfile_fclose (f);
return 0;
}
xfree (extendedkickmemory);
extendedkickmemory = 0;
extendedkickmem_size = 0;
+ extendedkickmem_type = 0;
load_extendedkickstart ();
kickmem_mask = 524288 - 1;
if (!load_kickstart ()) {
cloanto_rom = 1;
}
}
- if (kickmem_size >= 524288) {
+ if (kickmem_size == 524288) {
int patched = 0;
if (currprefs.kickshifter)
patched += patch_shapeshifter (kickmemory);
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);
break;
#endif
default:
- if (cloanto_rom && !currprefs.maprom)
+ if (cloanto_rom && !currprefs.maprom && !extendedkickmem_type)
map_banks (&kickmem_bank, 0xE0, 8, 0);
}
kickmemory = 0;
extendedkickmemory = 0;
extendedkickmem_size = 0;
+ extendedkickmem_type = 0;
chipmemory = 0;
#ifdef AUTOCONFIG
allocated_a3000mem = 0;
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;
void native2amiga_install (void)
{
- init_comm_pipe (&native2amiga_pending, 10, 2);
+ init_comm_pipe (&native2amiga_pending, 100, 2);
uae_sem_init (&n2asem, 0, 1);
}
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++;
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 */
}
intreq |= 0x0008;
set_special (®s, SPCFLAG_INT);
}
+#if 0
if (bsd_int_requested) {
intreq |= 0x2000;
set_special (®s, SPCFLAG_INT);
}
+#endif
if (regs.spcflags) {
if (do_specialties (0, ®s)) {
return;
};
static struct bsdsockdata *bsd;
+static int threadindextable[MAX_GET_THREADS];
static unsigned int __stdcall sock_thread(void *);
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();
}
int isfullscreen (void);
-BOOL CheckOnline(SB)
+static BOOL CheckOnline(SB)
{
DWORD dwFlags;
BOOL bReturn = TRUE;
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;
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",
CommandLine="build68k.exe >..\..\cpudefs.c <..\..\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 >..\..\cpudefs.c <..\..\table68k"
+ />
+ </Configuration>
</Configurations>
<References>
</References>
Version="8,00"
Name="genblitter"
ProjectGUID="{765B0AF0-B8D3-4998-89AF-D6F939E1CD18}"
- SignManifests="true"
>
<Platforms>
<Platform
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
del ..\..\blitfunc.c
del ..\..\blitfunc.h
del ..\..\blittable.c
"
+ />
+ <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 >..\..\blit.h
genblitter.exe f >..\..\blitfunc.c
genblitter.exe h >..\..\blitfunc.h
genblitter.exe t >..\..\blittable.c
"
+ />
+ </Configuration>
+ <Configuration
+ Name="FullRelease|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="..\..\..\..\..\msvs\VC\VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
CommandLine="cd ..\..
od-win32\gencomp_msvc\gencomp.exe
"
/>
</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 ..\..
od-win32\gencomp_msvc\gencomp.exe
"
+ />
+ </Configuration>
</Configurations>
<References>
</References>
CommandLine="cd ..\..
od-win32\gencpu_msvc\gencpu.exe
"
/>
</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
del ..\..\cpustbl.c
del ..\..\cpuemu.c
"
+ />
+ <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 ..\..
od-win32\gencpu_msvc\gencpu.exe
"
+ />
+ </Configuration>
</Configurations>
<References>
</References>
>
<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 >..\..\linetoscr.c"
+ />
+ </Configuration>
+ <Configuration
+ Name="FullRelease|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
CommandLine=""
/>
<Tool
#include <sys/stat.h>
#include <io.h>
+#include <setupapi.h>
+
#include "sysdeps.h"
#include "options.h"
#include "gensound.h"
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;
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;
}
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
}
#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;
+ }
+ }
+}
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*);
+
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
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
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
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
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
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
IDD_INPUT, DIALOG
BEGIN
- BOTTOMMARGIN, 187
+ BOTTOMMARGIN, 240
END
IDD_QUICKSTART, DIALOG
//
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
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"
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
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"
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;
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);
}
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
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)) {
paraport_mask = paraport_init ();
#endif
createIPC();
+ enumserialports();
real_main (argc, argv);
}
}
#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)
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;
}
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;
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;
} 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;
}
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;
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);
}
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);
}
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);
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"
+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
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++;
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);