From 09192eb0e3e509b5ce19c6b03a8b7f2796038b5d Mon Sep 17 00:00:00 2001 From: cebix <> Date: Mon, 25 Sep 2000 17:54:01 +0000 Subject: [PATCH] - adapted for mon V3.0 which is now the required minimum - fixed gcc 2.96 compiler warnings --- BasiliskII/ChangeLog | 1 + BasiliskII/src/Unix/BasiliskII.1 | 4 ++-- BasiliskII/src/Unix/configure.in | 19 ++++++++++--------- BasiliskII/src/Unix/main_unix.cpp | 10 +++++----- BasiliskII/src/Unix/serial_unix.cpp | 8 ++++---- BasiliskII/src/emul_op.cpp | 8 ++++---- 6 files changed, 26 insertions(+), 24 deletions(-) diff --git a/BasiliskII/ChangeLog b/BasiliskII/ChangeLog index a274409e..cb2f19ab 100644 --- a/BasiliskII/ChangeLog +++ b/BasiliskII/ChangeLog @@ -1,4 +1,5 @@ V0.8 (snapshot) - + - adapted for mon V3.0 which is now the required minimum - UAE cpu: fixed a bug in the memory handlers preventing from correctly updating 15 and 16 bpp displays on big endian systems - Unix: added (experimental) real addressing mode [Gwenole Beauchesne] diff --git a/BasiliskII/src/Unix/BasiliskII.1 b/BasiliskII/src/Unix/BasiliskII.1 index 7b93f2d3..10d47589 100644 --- a/BasiliskII/src/Unix/BasiliskII.1 +++ b/BasiliskII/src/Unix/BasiliskII.1 @@ -10,8 +10,8 @@ Basilisk II \- a free, portable Mac II emulator [\-rominfo] .SH DESCRIPTION .B Basilisk II -is an attempt at creating a free, portable 68k Mac emulator. -For more information, see the included "README" file. +is a free, portable 68k Mac emulator. For more information, see the included +"README" file. .SH OPTIONS .TP .BI "\-display " display-name diff --git a/BasiliskII/src/Unix/configure.in b/BasiliskII/src/Unix/configure.in index f12afb3f..29adc25d 100644 --- a/BasiliskII/src/Unix/configure.in +++ b/BasiliskII/src/Unix/configure.in @@ -14,12 +14,12 @@ AC_ARG_ENABLE(16bit-vidmode, [ --enable-16bit-vidmode enable 16-bit video if p AC_ARG_ENABLE(addressing, [ --enable-addressing=mode specify the addressing mode to use [default=fastest]], [ case "$enableval" in - real) ADDRESSING_TEST_ORDER="real";; - direct) ADDRESSING_TEST_ORDER="direct";; - banks) ADDRESSING_TEST_ORDER="banks";; -dnl fastest) ADDRESSING_TEST_ORDER="real direct banks";; gb-- will enable later... - fastest) ADDRESSING_TEST_ORDER="direct banks";; - *) AC_MSG_ERROR([--enable-mem-addressing takes only one of the following values: fastest, real, direct, banks]);; + real) ADDRESSING_TEST_ORDER="real";; + direct) ADDRESSING_TEST_ORDER="direct";; + banks) ADDRESSING_TEST_ORDER="banks";; +dnl fastest) ADDRESSING_TEST_ORDER="real direct banks";; gb-- will enable later... + fastest) ADDRESSING_TEST_ORDER="direct banks";; + *) AC_MSG_ERROR([--enable-mem-addressing takes only one of the following values: fastest, real, direct, banks]);; esac ], dnl [ ADDRESSING_TEST_ORDER="real direct banks" gb-- will probably reactivate later @@ -67,11 +67,12 @@ dnl We use mon if possible. MONSRCS= if [[ "x$WANT_MON" = "xyes" ]]; then AC_MSG_CHECKING(for mon) - if grep mon_init ../../../mon/src/mon.h >/dev/null 2>/dev/null; then + mon_srcdir=../../../mon/src + if grep mon_init $mon_srcdir/mon.h >/dev/null 2>/dev/null; then AC_MSG_RESULT(yes) AC_DEFINE(ENABLE_MON) - MONSRCS="../../../mon/src/mon.cpp ../../../mon/src/mon_6502.cpp ../../../mon/src/mon_68k.cpp ../../../mon/src/mon_8080.cpp ../../../mon/src/mon_cmd.cpp ../../../mon/src/mon_ppc.cpp ../../../mon/src/mon_x86.cpp" - CXXFLAGS="$CXXFLAGS -I../../../mon/src" + MONSRCS="$mon_srcdir/mon.cpp $mon_srcdir/mon_6502.cpp $mon_srcdir/mon_8080.cpp $mon_srcdir/mon_cmd.cpp $mon_srcdir/mon_disass.cpp $mon_srcdir/mon_ppc.cpp $mon_srcdir/disass/floatformat.c $mon_srcdir/disass/i386-dis.c $mon_srcdir/disass/m68k-dis.c $mon_srcdir/disass/m68k-opc.c" + CXXFLAGS="$CXXFLAGS -I$mon_srcdir -I$mon_srcdir/disass" AC_CHECK_LIB(readline, readline) AC_CHECK_LIB(termcap, tputs) AC_CHECK_HEADERS(readline.h history.h readline/readline.h readline/history.h) diff --git a/BasiliskII/src/Unix/main_unix.cpp b/BasiliskII/src/Unix/main_unix.cpp index 186f2353..1f166921 100644 --- a/BasiliskII/src/Unix/main_unix.cpp +++ b/BasiliskII/src/Unix/main_unix.cpp @@ -479,7 +479,7 @@ int main(int argc, char **argv) #ifdef ENABLE_MON // Setup SIGINT handler to enter mon sigemptyset(&sigint_sa.sa_mask); - sigint_sa.sa_handler = sigint_handler; + sigint_sa.sa_handler = (void (*)(int))sigint_handler; sigint_sa.sa_flags = 0; sigaction(SIGINT, &sigint_sa, NULL); #endif @@ -701,8 +701,8 @@ static void sigint_handler(...) extern void m68k_dumpstate(uaecptr *nextpc); m68k_dumpstate(&nextpc); #else - char *arg[2] = {"rmon", NULL}; - mon(1, arg); + char *arg[4] = {"mon", "-m", "-r", NULL}; + mon(3, arg); QuitEmulator(); #endif } @@ -1161,8 +1161,8 @@ ill: printf("SIGILL num %d, code %d\n", sig, code); printf(" a%d %08x\n", i, state->ss_frame.f_regs[i+8]); #ifdef ENABLE_MON - char *arg[2] = {"rmon", NULL}; - mon(1, arg); + char *arg[4] = {"mon", "-m", "-r", NULL}; + mon(3, arg); #endif QuitEmulator(); break; diff --git a/BasiliskII/src/Unix/serial_unix.cpp b/BasiliskII/src/Unix/serial_unix.cpp index 3111aff5..4378b825 100644 --- a/BasiliskII/src/Unix/serial_unix.cpp +++ b/BasiliskII/src/Unix/serial_unix.cpp @@ -663,7 +663,7 @@ void *XSERDPort::input_func(void *arg) // KillIO called? Then simply return if (s->io_killed) { - WriteMacInt16(s->input_pb + ioResult, abortErr); + WriteMacInt16(s->input_pb + ioResult, uint16(abortErr)); WriteMacInt32(s->input_pb + ioActCount, 0); s->read_pending = s->read_done = false; @@ -675,7 +675,7 @@ void *XSERDPort::input_func(void *arg) WriteMacInt32(s->input_dt + serdtResult, noErr); } else { WriteMacInt32(s->input_pb + ioActCount, 0); - WriteMacInt32(s->input_dt + serdtResult, readErr); + WriteMacInt32(s->input_dt + serdtResult, uint16(readErr)); } // Trigger serial interrupt @@ -723,7 +723,7 @@ void *XSERDPort::output_func(void *arg) // KillIO called? Then simply return if (s->io_killed) { - WriteMacInt16(s->output_pb + ioResult, abortErr); + WriteMacInt16(s->output_pb + ioResult, uint16(abortErr)); WriteMacInt32(s->output_pb + ioActCount, 0); s->write_pending = s->write_done = false; @@ -735,7 +735,7 @@ void *XSERDPort::output_func(void *arg) WriteMacInt32(s->output_dt + serdtResult, noErr); } else { WriteMacInt32(s->output_pb + ioActCount, 0); - WriteMacInt32(s->output_dt + serdtResult, writErr); + WriteMacInt32(s->output_dt + serdtResult, uint16(writErr)); } // Trigger serial interrupt diff --git a/BasiliskII/src/emul_op.cpp b/BasiliskII/src/emul_op.cpp index d6ae8486..5873763e 100644 --- a/BasiliskII/src/emul_op.cpp +++ b/BasiliskII/src/emul_op.cpp @@ -69,8 +69,8 @@ void EmulOp(uint16 opcode, M68kRegisters *r) r->a[0], r->a[1], r->a[2], r->a[3], r->a[4], r->a[5], r->a[6], r->a[7], r->sr); #ifdef ENABLE_MON - char *arg[2] = {"rmon", NULL}; - mon(1, arg); + char *arg[4] = {"mon", "-m", "-r", NULL}; + mon(3, arg); #endif QuitEmulator(); break; @@ -543,8 +543,8 @@ void EmulOp(uint16 opcode, M68kRegisters *r) r->a[0], r->a[1], r->a[2], r->a[3], r->a[4], r->a[5], r->a[6], r->a[7], r->sr); #ifdef ENABLE_MON - char *arg[2] = {"rmon", NULL}; - mon(1, arg); + char *arg[4] = {"mon", "-m", "-r", NULL}; + mon(3, arg); #endif QuitEmulator(); break;