This commit is contained in:
Mustafa Tufan 2014-02-06 02:04:12 +02:00
parent f4fa9b5d40
commit 1574c898ee
64 changed files with 453 additions and 165 deletions

3
.gitignore vendored
View File

@ -66,3 +66,6 @@ ui_puae_mainwindow.h
*.depend
*.cbp
*.layout
# macos
.DS_Store

2
config.sub vendored
View File

@ -1151,7 +1151,7 @@ case $os in
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -nacl*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)

View File

@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
dnl Written 1996, 1997, 1998 Bernd Schmidt
dnl
dnl Updated, re-written and generally mauled 2003 Richard Drummond
dnl Updated and generally mauled 2008-2013 Mustafa Tufan
dnl Updated and generally mauled 2008-2014 Mustafa Tufan
dnl
AC_PREREQ(2.55)
@ -112,7 +112,6 @@ fi
dnl
dnl if QT
dnl
if [[ "x$HAVE_QT" = "xyes" ]]; then
AC_MSG_CHECKING(QT: Meta Object Compiler)
if test -z "$QT_MOC"; then
@ -161,7 +160,6 @@ fi
dnl
dnl
dnl
if [[ "x$HAVE_QT" = "xno" ]]; then
if [[ "x$WANT_QT" = "xyes" ]]; then
WANT_QT=no
@ -297,7 +295,6 @@ dnl
ACX_PTHREAD(HAVE_PTHREAD=yes,HAVE_PTHREAD=no)
dnl Solaris, for example, needs additional libs to use POSIX semaphores.
if [[ "x$HAVE_PTHREAD" = "xyes" ]]; then
SAVE_CFLAGS="$CFLAGS"
SAVE_LIBS="$LIBS"
@ -378,6 +375,14 @@ case $host_os in
HOST_OS=morphos
OSDEP=od-amiga
;;
nacl*)
HOST_OS=nacl
OSDEP=od-linux
;;
pnacl*)
HOST_OS=nacl
OSDEP=od-linux
;;
aros)
HOST_OS=aros
OSDEP=od-amiga
@ -487,7 +492,6 @@ fi
dnl
dnl Now we know the compiler, check some compiler options
dnl
if [[ "x$HAVEGCC27" = "xyes" -a "$HOST_CPU" = "i386" ]]; then
SAVECFLAGS=$CFLAGS
CFLAGS="$CFLAGS -mno-schedule-prologue"
@ -597,7 +601,6 @@ MATHLIB=-lm
dnl
dnl Override defaults for specific targets
dnl
if [[ "$HOST_OS" = "linux" ]]; then
JOY_DEP=jd-linuxold
JOY_NAME="linux"
@ -643,6 +646,13 @@ else if [[ "$OSDEP" = "od-amiga" ]]; then
JOY_NAME="Amiga lowlevel.library"
fi
WANT_BSDSOCK=no
else if [[ "$HOST_OS" = "nacl" ]]; then
WANT_JIT=no
WANT_AUTOCONFIG=no
GUI_DEP=gui-html
GUI_LIBS="-lppapi -lppapi_cpp -lppapi_gles2"
GUI_NAME="HTML"
fi
fi
fi
fi
@ -712,6 +722,10 @@ AC_ARG_WITH(cocoa-gfx,
AS_HELP_STRING([--with-cocoa-gfx], [Use Cocoa library for graphics]),
[WANT_COCOAGFX=$withval], [])
AC_ARG_WITH(pepper,
AS_HELP_STRING([--with-pepper], [Use Pepper for graphics/sound/input (NaCl only)]),
[WANT_PEPPER=$withval], [])
AC_ARG_WITH(qt,
AS_HELP_STRING([--with-qt], [Use QT library for graphics/ui]),
[WANT_QT=$withval], [])
@ -791,7 +805,6 @@ AC_CHECK_LIB(ncurses, waddch, HAVE_NCURSES_LIB=yes, HAVE_NCURSES_LIB=no)
dnl
dnl Check for SDL
dnl
if [[ "x$WANT_SDL" != "xno" ]]; then
if [[ "$HOST_OS" = "darwin" ]]; then
@ -914,7 +927,6 @@ CPUOBJS='cpuemu_0.$(OBJEXT)'
dnl
dnl CPUEMU_11: 68000/68010 prefetch
dnl
if [[ "x$WANT_COMPATIBLE" != "xno" ]]; then
UAE_DEFINES="$UAE_DEFINES -DCPUEMU_11"
CPUOBJS="$CPUOBJS cpuemu_11.\$(OBJEXT)"
@ -926,7 +938,6 @@ dnl CPUEMU_20: 68020 prefetch
dnl CPUEMU_21: 68020 CE + blitter
dnl CPUEMU_22: 68030 (040/060) CE + blitter
dnl
if [[ "x$WANT_CYCLEEXACT" != "xno" ]]; then
UAE_DEFINES="$UAE_DEFINES -DCPUEMU_13 -DCPUEMU_20 -DCPUEMU_21 -DCPUEMU_22"
CPUOBJS="$CPUOBJS cpuemu_13.\$(OBJEXT) cpuemu_20.\$(OBJEXT) cpuemu_21.\$(OBJEXT) cpuemu_22.\$(OBJEXT)"
@ -965,7 +976,6 @@ fi
dnl
dnl Check whether to build with optimized CCR flags handling
dnl
if [[ "x$HAVE_GCC27" = "xyes" ]]; then
if [[ "$HOST_CPU" = "i386" -o "$HOST_CPU" = "ppc" -o "$HOST_CPU" = "68k" ]]; then
GENCPUOPTS="--optimized-flags"
@ -1025,7 +1035,6 @@ dnl Check whether we wanted to use ncurses
dnl
dnl First check if we need to uses ncurses because no
dnl other gfx support is available
if [[ "x$WANT_NCURSES" != "xno" -a "x$WANT_SDL" = "xno" -a "x$GFX_DEP" = "x" ]]; then
WANT_NCURSES=yes
fi
@ -1059,7 +1068,6 @@ dnl Check whether we actually wanted to use SDL or whether
dnl we need to use SDL because we couldn't find any other
dnl graphics support
dnl
if [[ "x$WANT_SDL" = "xyes" -o "x$GFX_DEP" = "x" ]]; then
if [[ "x$HAVE_SDL" = "xyes" -a "x$WANT_SDLGFX" != "xno" ]]; then
WANT_SDL=yes
@ -1074,7 +1082,9 @@ if [[ "x$WANT_SDL" = "xyes" -o "x$GFX_DEP" = "x" ]]; then
if [[ "x$OSDEP" = "xod-macosx" ]]; then
GFX_LIBS="-framework OpenGL"
else
GFX_LIBS="-lGL -lGLU"
if [[ "$HOST_OS" != "nacl" ]]; then
GFX_LIBS="-lGL -lGLU"
fi
fi
fi
fi
@ -1091,10 +1101,25 @@ GFX_CPPFLAGS=""
GFX_LIBS="-framework OpenGL"
fi
dnl
if [[ "x$WANT_PEPPER" = "xyes" ]]; then
GFX_DEP="gfx-pepper"
GFX_LIBS="-lppapi -lppapi_gles2"
GFX_NAME="Pepper (PPAPI)"
SND_DEP="sd-pepper"
SND_LIBS="-lppapi"
SND_NAME="Pepper (PPAPI)"
JOY_DEP="jd-pepper"
JOY_LIBS="-lppapi"
JOY_NAME="Pepper (PPAPI)"
NEED_THREAD_SUPPORT=yes
THREADDEP="td-posix"
THREADNAME="POSIX"
fi
dnl If we got here and we still haven't found a graphics target
dnl then bail out.
dnl
if [[ "x$GFX_DEP" = "x" ]]; then
AC_MSG_RESULT(none)
AC_MSG_ERROR([Could not find a useable graphics target])
@ -2048,7 +2073,6 @@ dnl -O?
dnl while in gcc 3.x, -O3 creates faster executable, this is no longer the case with 4.x
dnl (using -O3 is not recommended for gcc 4.x, so we don't)
dnl
if [[ "x$HAVE_GCC40" = "xyes" ]]; then
OPTIMIZED_FLAGS="-O2 -ffast-math -ftree-vectorize"
else
@ -2150,6 +2174,7 @@ AC_CONFIG_FILES([Makefile
src/td-sdl/Makefile
src/gfx-amigaos/Makefile
src/gfx-beos/Makefile
src/gfx-pepper/Makefile
src/gfx-x11/Makefile
src/gfx-sdl/Makefile
src/gfx-curses/Makefile
@ -2158,6 +2183,7 @@ AC_CONFIG_FILES([Makefile
src/sd-amigaos/Makefile
src/sd-beos/Makefile
src/sd-none/Makefile
src/sd-pepper/Makefile
src/sd-sdl/Makefile
src/sd-solaris/Makefile
src/sd-uss/Makefile
@ -2166,11 +2192,13 @@ AC_CONFIG_FILES([Makefile
src/jd-amigaos/Makefile
src/jd-beos/Makefile
src/jd-linuxold/Makefile
src/jd-pepper/Makefile
src/jd-sdl/Makefile
src/gui-none/Makefile
src/gui-beos/Makefile
src/gui-cocoa/Makefile
src/gui-gtk/Makefile
src/gui-html/Makefile
src/gui-muirexx/Makefile
src/gui-qt/Makefile
src/gui-sdl/Makefile
@ -2184,6 +2212,7 @@ AM_CONDITIONAL(TARGET_LINUX, test x$OSDEP = xod-linux)
AM_CONDITIONAL(BUILD_MACOSX_BUNDLE, test x$OSDEP = xod-macosx)
AM_CONDITIONAL(ANDROID, test x$WANT_ANDROID = xyes)
AM_CONDITIONAL(IS_QT, test x$WANT_QT = xyes)
AM_CONDITIONAL(TARGET_NACL, test x$HOST_OS = xnacl)
AM_CONDITIONAL(SDL_UI, test x$WANT_SDL_UI = xyes)
AC_SUBST(UAE_CFLAGS)
@ -2221,7 +2250,6 @@ AC_SUBST(top_srcdir)
dnl If we're not cross-compiling then, the config script in src/tools
dnl can be called by config.status as normal
dnl
if [[ "x$cross_compiling" != "xyes" ]]; then
AC_CONFIG_SUBDIRS(src/tools)
fi
@ -2234,7 +2262,6 @@ dnl autoconf currently has no support for building host tools
dnl when cross-compiling. Okay. This is a hack. But it works. Can
dnl anybody think of a better way of doing this?
dnl
if [[ "x$cross_compiling" = "xyes" ]]; then
export CC=$CC_FOR_BUILD
export CFLAGS=$CFLAGS_FOR_BUILD

View File

@ -140,6 +140,42 @@ I've not tested this myself, however, since I don't have a MacIntel
box.
Compiling for Portable Native Client
------------------------------------
Download and install the Native Client SDK from
https://developers.google.com/native-client/sdk/download
Check out naclports from
https://code.google.com/p/naclports/wiki/HowTo_Checkout?tm=4
(Last version of naclports confirmed to work:
c55e3d617ee59617097a1f8a4ee52afa4feddc16)
Adjust the paths in the configuration section of build_native_client.sh and
then run
./build_native_client.sh pnacl
Incremental builds can be done with
./build_native_client.sh incremental
To test, make the content of the WEB_SERVER_DESTINATION directory configured in
the build_native_client.sh script available through a web server, e.g., by
executing (from that same directory):
python -m SimpleHTTPServer 8080
Then use the following to deploy the files to the directory and run Chrome:
./build_native_client.sh run
For further instructions see build_native_client.sh.
Building the SCSI emulation
---------------------------

View File

@ -3,10 +3,14 @@ AM_CPPFLAGS = @UAE_CPPFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/include -I$(top_builddir)/src -I$(top_srcdir)/src -I$(top_srcdir)
AM_CXXFLAGS = @UAE_CXXFLAGS@
LIBS = -L/usr/lib -lstdc++
LIBS = -lstdc++
if !TARGET_NACL # Native Client can only use its own versions of the libraries.
LIBS += -L/usr/lib
endif
if !ANDROID
LIBS += -lpthread
endif
if IS_QT
QT_INCPATH = $(shell qmake -query QT_INSTALL_HEADERS)
QT_INSPATH = $(shell qmake -query QT_INSTALL_DATA)
@ -32,10 +36,10 @@ SUBDIRS = \
DIST_SUBDIRS = \
md-generic md-68k md-i386-gcc md-ppc md-ppc-gcc md-amd64-gcc \
gfx-amigaos gfx-beos gfx-x11 gfx-sdl gfx-curses gfx-svga gfx-cocoa \
sd-none sd-alsa sd-amigaos sd-beos sd-sdl sd-solaris sd-uss \
jd-none jd-amigainput jd-amigaos jd-beos jd-linuxold jd-sdl \
gui-none gui-beos gui-cocoa gui-gtk gui-muirexx gui-sdl \
gfx-amigaos gfx-beos gfx-x11 gfx-sdl gfx-curses gfx-svga gfx-cocoa gfx-pepper \
sd-none sd-alsa sd-amigaos sd-beos sd-sdl sd-solaris sd-uss sd-pepper \
jd-none jd-amigainput jd-amigaos jd-beos jd-linuxold jd-sdl jd-pepper \
gui-none gui-beos gui-cocoa gui-gtk gui-muirexx gui-sdl gui-html \
od-generic od-amiga od-beos od-linux od-macosx \
td-none td-amigaos td-beos td-posix td-sdl \
keymap caps archivers/dms archivers/zip
@ -62,8 +66,13 @@ DISTCLEANFILES = \
machdep osdep threaddep gfxdep sounddep joydep guidep \
target.h md-fpp.h
if TARGET_NACL # = Using Native Client/Pepper
bin_PROGRAMS = \
uae
else
bin_PROGRAMS = \
uae readdisk make_hdf
endif
if BUILD_MACOSX_BUNDLE
bundle = @PACKAGE_NAME@.app
@ -122,7 +131,6 @@ noinst_HEADERS = \
include/cia.h include/cfgfile.h \
include/commpipe.h include/compemu.h \
include/cpu_prefetch.h include/custom.h \
include/custom_private.h \
include/crc32.h include/consolehook.h \
include/arcadia.h include/cdtv.h \
include/debug.h include/disk.h \
@ -176,9 +184,11 @@ uae_SOURCES = \
native2amiga.c disk.c crc32.c savestate.c arcadia.c cdtv.c cd32_fmv.c \
uaeexe.c uaelib.c uaeresource.c uaeserial.c fdi2raw.c hotkeys.c amax.c \
ar.c driveclick.c enforcer.c misc.c uaenet.c a2065.c gayle.c blkdev.c blkdev_cdimage.c scsi.c ncr_scsi.c \
missing.c readcpu.c hrtmon.rom.c events.c calc.c aros.rom.c \
specialmonitors.c gfxboard.c qemuvga/cirrus_vga.c qemuvga/qemuuaeglue.c qemuvga/vga.c qemuvga/lsi53c895a.c \
sana2.c
missing.c readcpu.c hrtmon.rom.c events.c calc.c sana2.c \
specialmonitors.c gfxboard.c qemuvga/cirrus_vga.c qemuvga/qemuuaeglue.c qemuvga/vga.c qemuvga/lsi53c895a.c
if !TARGET_NACL # Do not include AROS ROM in Native Client.
uae_SOURCES += aros.rom.c
endif
EXTRA_uae_SOURCES = \
bsdsocket.c bsdsocket-posix-new.c build68k.c catweasel.c cdrom.c \

View File

@ -3,7 +3,7 @@
*
* A590/A2091/A3000/CDTV SCSI expansion (DMAC/SuperDMAC + WD33C93) emulation
*
* Copyright 2007-2013 Toni Wilen
* Copyright 2007-2013 Toni Wilen
*
*/

View File

@ -2148,7 +2148,6 @@ uae_u8 *restore_action_replay (uae_u8 *src)
}
#endif /* SAVESTATE */
#endif /* ACTION_REPLAY */
#define NPSIZE 65536
@ -2240,3 +2239,5 @@ void descramble_nordicpro (uae_u8 *buf, int size, int odd)
descramble1a (buf, size);
}
}
#endif /* ACTION_REPLAY */

View File

@ -16,10 +16,13 @@
#include "u_deep.h"
#include "getbits.h"
#ifdef __pnacl__
#define INLINE /* Redefine INLINE to mean nothing rather than 'inline'. */
#endif /* __pnacl__ */
USHORT DecodeChar(void);
USHORT DecodePosition(void);
void update(USHORT c);
INLINE USHORT DecodeChar(void);
INLINE USHORT DecodePosition(void);
INLINE void update(USHORT c);
static void reconst(void);

View File

@ -15,6 +15,9 @@
#include "getbits.h"
#include "maketbl.h"
#ifdef __pnacl__
#define INLINE /* Redefine INLINE to mean nothing rather than 'inline'. */
#endif /* __pnacl__ */
#define NC 510
#define NPT 20
@ -30,8 +33,8 @@ USHORT dms_heavy_text_loc;
static USHORT read_tree_c(void);
static USHORT read_tree_p(void);
USHORT decode_c(void);
USHORT decode_p(void);
INLINE USHORT decode_c(void);
INLINE USHORT decode_p(void);

View File

@ -1601,8 +1601,9 @@ void set_audio (void)
if (ch >= 0) {
if (currprefs.produce_sound >= 2) {
#ifndef __native_client__
if (!init_audio ()) {
if (! sound_available) {
if (!sound_available) {
write_log (_T("Sound is not supported.\n"));
} else {
write_log (_T("Sorry, can't initialize sound.\n"));
@ -1611,6 +1612,7 @@ void set_audio (void)
changed_prefs.produce_sound = 1;
}
}
#endif
}
next_sample_evtime = scaled_sample_evtime;
last_cycles = get_cycles ();

View File

@ -400,8 +400,10 @@ static void blitter_interrupt (int hpos, int done)
return;
blit_interrupt = 1;
send_interrupt (6, 4 * CYCLE_UNIT);
#ifdef DEBUGGER
if (debug_dma)
record_dma_event (DMA_EVENT_BLITIRQ, hpos, vpos);
#endif
}
static void blitter_done (int hpos)
@ -414,8 +416,8 @@ static void blitter_done (int hpos)
event2_remevent (ev2_blitter);
unset_special (SPCFLAG_BLTNASTY);
#ifdef BLITTER_DEBUG
write_log (_T("cycles %d, missed %d, total %d\n"),
blit_totalcyclecounter, blit_misscyclecounter, blit_totalcyclecounter + blit_misscyclecounter);
write_log (_T("cycles %d, missed %d, total %d\n"),
blit_totalcyclecounter, blit_misscyclecounter, blit_totalcyclecounter + blit_misscyclecounter);
#endif
blitter_dangerous_bpl = 0;
@ -425,8 +427,10 @@ STATIC_INLINE void chipmem_agnus_wput2 (uaecptr addr, uae_u32 w)
{
last_custom_value1 = w;
#ifndef BLITTER_DEBUG_NO_D
chipmem_wput_indirect (addr, w);
debug_wputpeekdma_chipram (addr, w, 0x000);
chipmem_wput_indirect (addr, w);
#ifdef DEBUGGER
debug_wputpeekdma_chipram (addr, w, 0x000);
#endif
#endif
}
@ -1732,8 +1736,10 @@ void blitter_reset (void)
void restore_blitter_finish (void)
{
#ifdef DEBUGGER
record_dma_reset ();
record_dma_reset ();
#endif
if (blt_statefile_type == 0) {
blit_interrupt = 1;
if (bltstate == BLT_init) {

View File

@ -3,7 +3,7 @@
*
* lowlevel cd device glue, scsi emulator
*
* Copyright 2009-2013 Toni Wilen
* Copyright 2009-2013 Toni Wilen
*
*/

View File

@ -927,10 +927,12 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
if (p->romextident[0])
cfgfile_write_str (f, _T("kickstart_ext_rom="), p->romextident);
cfgfile_write_path (f, &p->path_rom, _T("flash_file"), p->flashfile);
cfgfile_write_path (f, &p->path_rom, _T("cart_file"), p->cartfile);
cfgfile_write_path (f, &p->path_rom, _T("rtc_file"), p->rtcfile);
#ifdef ACTION_REPLAY
cfgfile_write_path (f, &p->path_rom, _T("cart_file"), p->cartfile);
if (p->cartident[0])
cfgfile_write_str (f, _T("cart"), p->cartident);
#endif
if (p->amaxromfile[0])
cfgfile_write_path (f, &p->path_rom, _T("amax_rom_file"), p->amaxromfile);
@ -3428,7 +3430,7 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, const TCHAR *option, TCH
return 1;
}
#ifdef ACTION_REPLAY
if (cfgfile_strval (option, value, _T("cart_internal"), &p->cart_internal, cartsmode, 0)) {
if (p->cart_internal) {
struct romdata *rd = getromdatabyid (63);
@ -3437,6 +3439,7 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, const TCHAR *option, TCH
}
return 1;
}
#endif
if (cfgfile_string (option, value, _T("kickstart_rom"), p->romident, sizeof p->romident / sizeof (TCHAR))) {
decode_rom_ident (p->romfile, sizeof p->romfile / sizeof (TCHAR), p->romident, ROMTYPE_ALL_KICK);
return 1;
@ -3445,11 +3448,12 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, const TCHAR *option, TCH
decode_rom_ident (p->romextfile, sizeof p->romextfile / sizeof (TCHAR), p->romextident, ROMTYPE_ALL_EXT);
return 1;
}
#ifdef ACTION_REPLAY
if (cfgfile_string (option, value, _T("cart"), p->cartident, sizeof p->cartident / sizeof (TCHAR))) {
decode_rom_ident (p->cartfile, sizeof p->cartfile / sizeof (TCHAR), p->cartident, ROMTYPE_ALL_CART);
return 1;
}
#endif
for (i = 0; i < 4; i++) {
_stprintf (tmpbuf, _T("floppy%d"), i);
if (cfgfile_path_mp (option, value, tmpbuf, p->floppyslots[i].df, sizeof p->floppyslots[i].df / sizeof (TCHAR), &p->path_floppy))
@ -5103,7 +5107,9 @@ void default_prefs (struct uae_prefs *p, int type)
p->filesys_no_uaefsdb = 0;
p->filesys_custom_uaefsdb = 1;
p->picasso96_nocustom = 1;
#ifdef ACTION_REPLAY
p->cart_internal = 1;
#endif
p->sana2 = 0;
p->clipboard_sharing = false;
p->native_code = false;
@ -5807,7 +5813,9 @@ static int bip_super (struct uae_prefs *p, int config, int compa, int romcheck)
p->scsi = 1;
p->uaeserial = 1;
p->socket_emu = 1;
#ifdef ACTION_REPLAY
p->cart_internal = 0;
#endif
p->picasso96_nocustom = 1;
p->cs_compatible = 1;
built_in_chipset_prefs (p);

View File

@ -56,7 +56,9 @@ void consolehook_config (struct uae_prefs *p)
_tcscpy (ci.devname, _T("DH0"));
ci.bootpri = 15;
ci.type = UAEDEV_DIR;
#ifdef FILESYS
add_filesys_config (p, -1, &ci);
#endif
}
static void *console_thread (void *v)

View File

@ -4173,8 +4173,8 @@ int disk_prevnext_name (TCHAR *imgp, int dir)
wrapped = 0;
retry:
_tcscpy (imgl, img);
for (i = 0; i < (int)_tcslen(imgl); ++i)
imgl[i] = tolower (imgl[i]);
for (i = 0; i < MAX_DPATH && imgl[i] != '\0'; i++)
tolower(imgl[i]);
gotone = 0;
ret = 0;
ps = imgl;

View File

@ -2784,7 +2784,9 @@ static void draw_debug_status_line (int line)
xlinebuffer = gfxvidinfo.linemem;
if (xlinebuffer == 0)
xlinebuffer = row_map[line];
#ifdef DEBUGGER
debug_draw_cycles (xlinebuffer, gfxvidinfo.pixbytes, line, gfxvidinfo.outwidth, gfxvidinfo.outheight, xredcolors, xgreencolors, xbluecolors);
#endif
}
#define LIGHTPEN_HEIGHT 12

View File

@ -270,7 +270,9 @@ static void expamem_init_last (void)
{
expamem_init_clear2 ();
write_log (_T("Memory map after autoconfig:\n"));
#ifdef DEBUGGER
memory_map_dump ();
#endif
}
void expamem_next (void)
@ -1177,10 +1179,12 @@ static uaecptr check_boot_rom (void)
if (valid_address (RTAREA_DEFAULT, 65536))
b = RTAREA_BACKUP;
}
#ifdef FILESYS
if (nr_directory_units (NULL))
return b;
if (nr_directory_units (&currprefs))
return b;
#endif
if (currprefs.socket_emu)
return b;
if (currprefs.uaeserial)

View File

@ -7,7 +7,7 @@
* Copyright 2003-2007 Richard Drummond
* Copyright 2006 Jochen Becher
*
* Partialy based on the UAE X interface (xwin.c)
* Partially based on the UAE X interface (xwin.c)
*
* Copyright 1995, 1996 Bernd Schmidt
* Copyright 1996 Ed Hanway, Andre Beck, Samuel Devulder, Bruno Coste

View File

@ -1,3 +1,11 @@
/*
* UAE - The Un*x Amiga Emulator
*
* A2065 ZorroII Ethernet Card
*
* Copyright 2009 Toni Wilen
*
*/
#ifdef A2065

View File

@ -1,3 +1,11 @@
/*
* UAE - The Un*x Amiga Emulator
*
* A590/A2091/A3000/CDTV SCSI expansion (DMAC/SuperDMAC + WD33C93) emulation
*
* Copyright 2007-2013 Toni Wilen
*
*/
#ifndef A2091_H
#define A2091_H

View File

@ -1,4 +1,15 @@
/*
* UAE - The Un*x Amiga Emulator
*
* CD32 Akiko emulation
*
* - C2P
* - NVRAM
* - CDROM
*
* Copyright 2001-2010 Toni Wilen
*
*/
#define AKIKO_BASE 0xb80000
#define AKIKO_BASE_END 0xb80100 /* ?? */

View File

@ -1,3 +1,10 @@
/*
* UAE Action Replay 1/2/3/1200 and HRTMon support
*
* (c) 2000-2006 Toni Wilen <twilen@arabuusimiehet.com>
* (c) 2003 Mark Cox <markcox@email.com>
*
*/
/* disable HRTMon support by commenting this out */
#define ACTION_REPLAY_HRTMON

View File

@ -1,3 +1,12 @@
/*
* UAE - The Un*x Amiga Emulator
*
* Arcadia emulation
*
* Copyright 2005-2007 Toni Wilen
*
*
*/
#ifdef ARCADIA

View File

@ -6,6 +6,9 @@
* Copyright 1995, 1996, 1997 Bernd Schmidt
*/
#ifndef UAE_AUDIO_H
#define UAE_AUDIO_H
#define PERIOD_MAX ULONG_MAX
extern void pause_sound (void);
@ -86,3 +89,5 @@ STATIC_INLINE int get_audio_ismono (int stereomode)
#define SOUND_MAX_LOG_DELAY 10
#define MIXED_STEREO_MAX 16
#define MIXED_STEREO_SCALE 32
#endif // UAE_AUDIO_H

View File

@ -1,7 +1,3 @@
#pragma once
#ifndef AUTOCONF_H
#define AUTOCONF_H
/*
* UAE - The Un*x Amiga Emulator
*
@ -10,6 +6,10 @@
* (c) 1996 Ed Hanway
*/
#pragma once
#ifndef AUTOCONF_H
#define AUTOCONF_H
#define RTAREA_DEFAULT 0xf00000
#define RTAREA_BACKUP 0xef0000
#define RTAREA_SIZE 0x10000

View File

@ -1,3 +1,11 @@
/*
* UAE - The Un*x Amiga Emulator
*
* lowlevel cd device glue, scsi emulator
*
* Copyright 2009-2013 Toni Wilen
*
*/
#ifndef BLKDEV_H
#define BLKDEV_H

View File

@ -1,16 +1,16 @@
/*
* UAE - The Un*x Amiga Emulator
*
* bsdsocket.library emulation
*
* Copyright 1997,98 Mathias Ortmann
*
*/
#pragma once
#ifndef BSDSOCKET_H
#define BSDSOCKET_H
/*
* UAE - The Un*x Amiga Emulator
*
* bsdsocket.library emulation
*
* Copyright 1997,98 Mathias Ortmann
*
*/
#define BSD_TRACING_ENABLED 0
extern int log_bsd;

View File

@ -1,3 +1,13 @@
/*
* PUAE Catweasel support
*
* Copyright
* Copyright 2011 Mustafa TUFAN
*
* some parts inspired or taken from cwfloppy
* Copyright (C) 1998-2009 Michael Krause
*
*/
#ifdef CATWEASEL

View File

@ -1,2 +1,10 @@
/*
* UAE - The Un*x Amiga Emulator
*
* CD32 FMV cartridge
*
* Copyright 2008-2010 Toni Wilen
*
*/
extern void cd32_fmv_init (uaecptr);

View File

@ -1,3 +1,13 @@
/*
* UAE - The Un*x Amiga Emulator
*
* CDTV DMAC/CDROM controller emulation
*
* Copyright 2004/2007-2010 Toni Wilen
*
* Thanks to Mark Knibbs <markk@clara.co.uk> for CDTV Technical information
*
*/
#ifdef CDTV

View File

@ -1,3 +1,14 @@
/*
* UAE - The Un*x Amiga Emulator
*
* Config file handling
* This still needs some thought before it's complete...
*
* Copyright 1998 Brian King, Bernd Schmidt
* Copyright 2006 Richard Drummond
* Copyright 2008 Mustafa Tufan
*/
#pragma once
#ifndef CFGFILE_H
#define CFGFILE_H

View File

@ -1,7 +1,3 @@
#pragma once
#ifndef CIA_H
#define CIA_H
/*
* UAE - The Un*x Amiga Emulator
*
@ -10,6 +6,10 @@
* (c) 1995 Bernd Schmidt
*/
#pragma once
#ifndef CIA_H
#define CIA_H
void CIA_reset (void);
void CIA_vsync_prehandler (void);
void CIA_hsync_prehandler (void);

View File

@ -1,7 +1,3 @@
#pragma once
#ifndef COMPEMU_H
#define COMPEMU_H
/*
* include/compemu.h - Public interface and definitions
*
@ -15,6 +11,10 @@
* Updated to a unified interface (C) 2013 Sven Eden
*/
#pragma once
#ifndef COMPEMU_H
#define COMPEMU_H
#include "flags_x86.h"
/** REMOVEME:

View File

@ -1,7 +1,3 @@
#pragma once
#ifndef FILESYS_H
#define FILESYS_H
/*
* UAE - The Un*x Amiga Emulator
*
@ -10,6 +6,10 @@
* Copyright 1997 Bernd Schmidt
*/
#pragma once
#ifndef FILESYS_H
#define FILESYS_H
struct hardfilehandle;
struct mountedinfo;
struct uaedev_config_info;

View File

@ -1,7 +1,3 @@
#pragma once
#ifndef FSDB_H
#define FSDB_H
/*
* UAE - The Un*x Amiga Emulator
*
@ -11,6 +7,10 @@
* Copyright 1999 Bernd Schmidt
*/
#pragma once
#ifndef FSDB_H
#define FSDB_H
#ifndef FSDB_FILE
#define FSDB_FILE _T("_UAEFSDB.___")
#endif

View File

@ -1,7 +1,3 @@
#pragma once
#ifndef FSUSAGE_H
#define FSUSAGE_H
/* fsusage.h -- declarations for filesystem space usage info
Copyright (C) 1991, 1992 Free Software Foundation, Inc.
@ -19,6 +15,10 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#pragma once
#ifndef FSUSAGE_H
#define FSUSAGE_H
/* Space usage statistics for a filesystem. Blocks are 512-byte. */
struct fs_usage
{

View File

@ -6,6 +6,7 @@
* See http://dbp-consulting.com/tutorials/SuppressingGCCWarnings.html for
* further information on this.
*/
#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402
#define GCC_DIAG_STR(s) #s
#define GCC_DIAG_JOINSTR(x,y) GCC_DIAG_STR(x ## y)
@ -18,11 +19,10 @@
# else
# define GCC_DIAG_OFF(x) GCC_DIAG_PRAGMA(ignored GCC_DIAG_JOINSTR(-W,x))
# define GCC_DIAG_ON(x) GCC_DIAG_PRAGMA(warning GCC_DIAG_JOINSTR(-W,x))
# endif
# endif // 4.06
#else
# define GCC_DIAG_OFF(x)
# define GCC_DIAG_ON(x)
#endif
#endif // 4.02
#endif // GCC_WARNINGS_H

View File

@ -6,6 +6,9 @@
* Copyright 1996 Bernd Schmidt
*/
#ifndef INCLUDE_GUI_H
#define INCLUDE_GUI_H
extern int gui_init (void);
extern int gui_update (void);
extern void gui_exit (void);
@ -92,3 +95,4 @@ extern void gui_update_gfx (void);
#define NUMSG_KS68030 "The selected system ROM requires a 68030 CPU."
#define NUMSG_KS68030PLUS "The selected system ROM requires a 68030 or higher CPU."
#endif // INCLUDE_GUI_H

View File

@ -9,6 +9,10 @@
* in x11win.c and sdlgfx.c
*/
#ifndef HOTKEYS_H
#define HOTKEYS_H
#include "uae_types.h"
/* Maximum number of keys in a sequence */
#define HOTKEYSEQ_MAXKEYS 4
@ -39,3 +43,5 @@ static inline void handle_hotkey_event (int event, int state)
{
handle_input_event (event, state, 0, 0, false, false);
}
#endif // HOTKEYS_H

View File

@ -11,7 +11,8 @@
#include "machdep/rpt.h"
#include "osdep/hrtimer.h"
/*
#if 0
STATIC_INLINE frame_time_t uae_gethrtime (void)
{
#ifdef HAVE_MACHDEP_TIMER
@ -41,5 +42,6 @@ STATIC_INLINE void uae_inithrtimer (void)
#endif
osdep_inithrtimer ();
}
*/
#endif // 0
#endif

View File

@ -1,4 +1,3 @@
#ifndef _ISOFS_FS_H
#define _ISOFS_FS_H

View File

@ -1,7 +1,3 @@
#pragma once
#ifndef OPTIONS_H
#define OPTIONS_H
/*
* UAE - The Un*x Amiga Emulator
*
@ -11,6 +7,10 @@
* Copyright 1995-2001 Bernd Schmidt
*/
#pragma once
#ifndef OPTIONS_H
#define OPTIONS_H
#define UAEMAJOR 2
#define UAEMINOR 7
#define UAESUBREV 1

View File

@ -1,6 +1,3 @@
#pragma once
#ifndef PICASSO96_H
#define PICASSO96_H
/*
* UAE - The U*nix Amiga Emulator
*
@ -9,6 +6,10 @@
* Copyright 1997 Brian King <Brian_King@Mitel.com, Brian_King@Cloanto.com>
*/
#pragma once
#ifndef PICASSO96_H
#define PICASSO96_H
#if defined PICASSO96_SUPPORTED
#define PICASSO96

View File

@ -1,15 +1,15 @@
/*
* UAE - The Un*x Amiga Emulator
*
* SANAII compatible network driver emulation
*
* (c) 2007 Toni Wilen
*/
#pragma once
#ifndef SANA2_H
#define SANA2_H
/*
* UAE - The Un*x Amiga Emulator
*
* SANAII compatible network driver emulation
*
* (c) 2007 Toni Wilen
*/
uaecptr netdev_startup (uaecptr resaddr);
void netdev_install (void);
void netdev_reset (void);

View File

@ -1,17 +1,17 @@
/*
* UAE - The Un*x Amiga Emulator
*
* a SCSI device
*
* (c) 1995 Bernd Schmidt (hardfile.c)
* (c) 1999 Patrick Ohly
* (c) 2001-2005 Toni Wilen
*/
#pragma once
#ifndef SCSIDEV_H
#define SCSIDEV_H
/*
* UAE - The Un*x Amiga Emulator
*
* a SCSI device
*
* (c) 1995 Bernd Schmidt (hardfile.c)
* (c) 1999 Patrick Ohly
* (c) 2001-2005 Toni Wilen
*/
uaecptr scsidev_startup (uaecptr resaddr);
void scsidev_install (void);
void scsidev_reset (void);

View File

@ -1,6 +1,3 @@
#ifndef UAE_SYSDEPS_H
#define UAE_SYSDEPS_H
/*
* UAE - The Un*x Amiga Emulator
*
@ -15,6 +12,9 @@
* Copyright 1996, 1997 Bernd Schmidt
*/
#ifndef UAE_SYSDEPS_H
#define UAE_SYSDEPS_H
#if defined(__cplusplus)
#include <cstddef>
#include <cstdbool>
@ -499,4 +499,4 @@ typedef int64_t off64_t;
DWORD GetLastError(void);
#endif /* UAE_SYSDEPS_H */
#endif // UAE_SYSDEPS_H

View File

@ -130,7 +130,6 @@ typedef unsigned int uae_uintptr;
# define ENUMNAME(name) ; typedef int name
#endif
/* When using the selective passing of parameters in registers (on x86 and
* 68k hosts with GCC) REGPARAM will be defined by configure to contain the
* necessary storage modifier to be used in a function declaration to specify

View File

@ -1,15 +1,15 @@
/*
* UAE - The Un*x Amiga Emulator
*
* uaeserial.device
*
* (c) 2006 Toni Wilen
*/
#pragma once
#ifndef UAESERIAL_H
#define UAESERIAL_H
/*
* UAE - The Un*x Amiga Emulator
*
* uaeserial.device
*
* (c) 2006 Toni Wilen
*/
uaecptr uaeserialdev_startup (uaecptr resaddr);
void uaeserialdev_install (void);
void uaeserialdev_reset (void);

View File

@ -1,16 +1,16 @@
/*
* UAE - The Un*x Amiga Emulator
*
* Interface to the graphics system (X, SVGAlib)
*
* Copyright 1995-1997 Bernd Schmidt
* Copyright 2005 Richard Drummond
*/
#pragma once
#ifndef XWIN_H
#define XWIN_H
/*
* UAE - The Un*x Amiga Emulator
*
* Interface to the graphics system (X, SVGAlib)
*
* Copyright 1995-1997 Bernd Schmidt
* Copyright 2005 Richard Drummond
*/
#define MAX_UAE_WIDTH 8192
#define MAX_UAE_HEIGHT 8192

View File

@ -1,15 +1,15 @@
/*
* UAE - The Un*x Amiga Emulator
*
* routines to handle compressed file automatically
*
* (c) 1996 Samuel Devulder
*/
#pragma once
#ifndef ZFILE_H
#define ZFILE_H
/*
* UAE - The Un*x Amiga Emulator
*
* routines to handle compressed file automatically
*
* (c) 1996 Samuel Devulder
*/
struct zvolume;
struct zdirectory;
#include "fsdb.h"

View File

@ -1202,6 +1202,7 @@ static bool mousehack_enabled;
static void mousehack_reset (void)
{
#ifdef FILESYS
dimensioninfo_width = dimensioninfo_height = 0;
mouseoffset_x = mouseoffset_y = 0;
dimensioninfo_dbl = 0;
@ -1212,6 +1213,7 @@ static void mousehack_reset (void)
put_byte (mousehack_address + MH_E, 0);
mousehack_address = 0;
mousehack_enabled = false;
#endif
}
static bool mousehack_enable (void)
@ -1245,6 +1247,7 @@ void input_mousehack_mouseoffset (uaecptr pointerprefs)
int input_mousehack_status (int mode, uaecptr diminfo, uaecptr dispinfo, uaecptr vp, uae_u32 moffset)
{
#ifdef FILESYS
if (mode == 4) {
return mousehack_enable () ? 1 : 0;
} else if (mode == 5) {
@ -1288,6 +1291,7 @@ int input_mousehack_status (int mode, uaecptr diminfo, uaecptr dispinfo, uaecptr
else if (mousehack_alive_cnt > 0)
mousehack_alive_cnt = 100;
}
#endif
return 1;
}
@ -1295,6 +1299,7 @@ void get_custom_mouse_limits (int *w, int *h, int *dx, int *dy, int dbl);
void inputdevice_tablet_strobe (void)
{
#ifdef FILESYS
mousehack_enable ();
if (!uae_boot_rom)
return;
@ -1302,10 +1307,12 @@ void inputdevice_tablet_strobe (void)
return;
if (mousehack_address)
put_byte (mousehack_address + MH_CNT, get_byte (mousehack_address + MH_CNT) + 1);
#endif
}
void inputdevice_tablet (int x, int y, int z, int pressure, uae_u32 buttonbits, int inproximity, int ax, int ay, int az)
{
#ifdef FILESYS
uae_u8 *p;
uae_u8 tmp[MH_END];
@ -1395,10 +1402,12 @@ void inputdevice_tablet (int x, int y, int z, int pressure, uae_u32 buttonbits,
p[MH_E] = 0xc0 | 2;
p[MH_CNT]++;
#endif
}
void inputdevice_tablet_info (int maxx, int maxy, int maxz, int maxax, int maxay, int maxaz, int xres, int yres)
{
#ifdef FILESYS
uae_u8 *p;
if (!uae_boot_rom || !mousehack_address)
@ -1425,11 +1434,13 @@ void inputdevice_tablet_info (int maxx, int maxy, int maxz, int maxax, int maxay
p[MH_MAXAY + 1] = maxay;
p[MH_MAXAZ] = maxaz >> 8;
p[MH_MAXAZ + 1] = maxaz;
#endif
}
static void inputdevice_mh_abs (int x, int y, uae_u32 buttonbits)
{
#ifdef FILESYS
uae_u8 *p;
uae_u8 tmp1[4], tmp2[4];
@ -1461,6 +1472,7 @@ static void inputdevice_mh_abs (int x, int y, uae_u32 buttonbits)
p[MH_E] = 0xc0 | 1;
p[MH_CNT]++;
tablet_data = 1;
#endif
}
#ifdef FILESYS
@ -2754,7 +2766,11 @@ static bool inputdevice_handle_inputcode2 (int code, int state)
if (code == 0)
goto end;
if (needcputrace (code) && can_cpu_tracer () == true && is_cpu_tracer () == false && !input_play && !input_record && !debugging) {
if (needcputrace (code) && can_cpu_tracer () == true && is_cpu_tracer () == false && !input_play && !input_record
#ifdef DEBUGGER
&& !debugging
#endif
) {
if (set_cpu_tracer (true)) {
tracer_enable = 1;
return true; // wait for next frame

View File

@ -221,7 +221,7 @@ int input_get_default_joystick (struct uae_input_device *uid, int num, int port,
}
#if 0
for (j = 2; j < MAX_MAPPINGS - 1; j++) {
for (int j = 2; j < MAX_MAPPINGS - 1; j++) {
int am = did->axismappings[j];
if (am == DIJOFS_POV(0) || am == DIJOFS_POV(1) || am == DIJOFS_POV(2) || am == DIJOFS_POV(3)) {
setid (uid, num, ID_AXIS_OFFSET + j + 0, 0, port, h);

View File

@ -275,9 +275,19 @@ static struct uae_input_device_kbr_default *keytrans[] = {
keytrans_pc1
};
/* The format is as follows:
{ <key(s) that should map to 'left'>, -1,
<key(s) that should map to 'right'>, -1,
<key(s) that should map to 'up'>, -1,
<key(s) that should map to 'down'>, -1,
<key(s) that should map to 'button 1'>, -1,
<key(s) that should map to 'button 2'>, -1,
<key(s) that should map to 'button 3'>, -1 }
*/
static int kb_np[] = { DIK_NUMPAD4, -1, DIK_NUMPAD6, -1, DIK_NUMPAD8, -1, DIK_NUMPAD2, -1, DIK_NUMPAD0, DIK_NUMPAD5, -1, DIK_DECIMAL, -1, DIK_NUMPADENTER, -1, -1 };
static int kb_ck[] = { DIK_LEFT, -1, DIK_RIGHT, -1, DIK_UP, -1, DIK_DOWN, -1, DIK_RCONTROL, DIK_RMENU, -1, DIK_RSHIFT, -1, -1 };
static int kb_se[] = { DIK_A, -1, DIK_D, -1, DIK_W, -1, DIK_S, -1, DIK_LMENU, -1, DIK_LSHIFT, -1, -1 };
static int kb_ck[] = { DIK_LEFT, -1, DIK_RIGHT, -1, DIK_UP, -1, DIK_DOWN, -1, DIK_SPACE, DIK_PERIOD, -1, DIK_COMMA, DIK_SLASH, -1, DIK_M, -1 };
static int kb_se[] = { DIK_A, -1, DIK_D, -1, DIK_W, -1, DIK_S, -1, DIK_TAB, -1, DIK_Q, -1, DIK_E, -1 };
static int kb_np3[] = { DIK_NUMPAD4, -1, DIK_NUMPAD6, -1, DIK_NUMPAD8, -1, DIK_NUMPAD2, -1, DIK_NUMPAD0, DIK_NUMPAD5, -1, DIK_DECIMAL, -1, DIK_NUMPADENTER, -1, -1 };
static int kb_ck3[] = { DIK_LEFT, -1, DIK_RIGHT, -1, DIK_UP, -1, DIK_DOWN, -1, DIK_RCONTROL, -1, DIK_RSHIFT, -1, DIK_RMENU, -1, -1 };
static int kb_se3[] = { DIK_A, -1, DIK_D, -1, DIK_W, -1, DIK_S, -1, DIK_LMENU, -1, DIK_LSHIFT, -1, DIK_LCONTROL, -1, -1 };

View File

@ -660,10 +660,12 @@ static int default_config;
void uae_reset (int hardreset, int keyboardreset)
{
#ifdef DEBUGGER
if (debug_dma) {
record_dma_reset ();
record_dma_reset ();
}
#endif
currprefs.quitstatefile[0] = changed_prefs.quitstatefile[0] = 0;
if (quit_program == 0) {
@ -678,7 +680,9 @@ void uae_reset (int hardreset, int keyboardreset)
void uae_quit (void)
{
#ifdef DEBUGGER
deactivate_debugger ();
#endif
if (quit_program != -UAE_QUIT)
quit_program = -UAE_QUIT;
target_quit ();
@ -1233,11 +1237,13 @@ void real_main (int argc, TCHAR **argv)
}
#ifndef NO_MAIN_IN_MAIN_C
#ifndef __native_client__
int main (int argc, TCHAR **argv)
{
real_main (argc, argv);
return 0;
}
#endif /* __native_client */
#endif
#ifdef SINGLEFILE

View File

@ -16,7 +16,11 @@
#define MACHDEP_NAME "x86"
#endif
#ifdef __native_client__
#undef HAVE_MACHDEP_TIMER
#else
#define HAVE_MACHDEP_TIMER
#endif
typedef uae_s64 frame_time_t;
#define MAX_FRAME_TIME 9223372036854775807LL

View File

@ -961,7 +961,9 @@ uae_u8 *REGPARAM2 default_xlate (uaecptr a)
}
write_log (_T("\n"));
}
#ifdef DEBUGGER
memory_map_dump ();
#endif
}
be_cnt++;
if (regs.s || be_cnt > 1000) {
@ -2310,18 +2312,18 @@ void memory_reset (void)
case EXTENDED_ROM_CDTV:
map_banks (&extendedkickmem_bank, 0xF0, extendedkickmem_bank.allocated == 2 * ROM_SIZE_512 ? 16 : 8, 0);
break;
#endif
#endif // CDTV
#ifdef CD32
case EXTENDED_ROM_CD32:
map_banks (&extendedkickmem_bank, 0xE0, 8, 0);
break;
#endif
#endif // CD32
}
#ifdef AUTOCONFIG
if (need_uae_boot_rom ())
map_banks (&rtarea_bank, rtarea_base >> 16, 1, 0);
#endif
#endif // AUTOCONFIG
if ((cloanto_rom || currprefs.cs_ksmirror_e0) && (currprefs.maprom != 0xe00000) && !extendedkickmem_type)
map_banks (&kickmem_bank, 0xE0, 8, 0);
@ -2329,7 +2331,10 @@ void memory_reset (void)
if (extendedkickmem2_bank.allocated) {
map_banks (&extendedkickmem2_bank, 0xa8, 16, 0);
} else {
struct romdata *rd = getromdatabypath (currprefs.cartfile);
struct romdata *rd;
#ifdef ACTION_REPLAY
rd = getromdatabypath (currprefs.cartfile);
#endif
if (!rd || rd->id != 63) {
if (extendedkickmem_type == EXTENDED_ROM_CD32 || extendedkickmem_type == EXTENDED_ROM_KS)
map_banks (&extendedkickmem_bank, 0xb0, 8, 0);
@ -2485,7 +2490,7 @@ void map_banks2 (addrbank *bank, int start, int size, int realsize, int quick)
addrbank *orgbank = bank;
uae_u32 realstart = start;
#ifdef DEBUG
#ifdef DEBUGGER
if (!quick)
old = debug_bankchange (-1);
#endif
@ -2520,7 +2525,7 @@ void map_banks2 (addrbank *bank, int start, int size, int realsize, int quick)
put_mem_bank (bnr << 16, bank, realstart << 16);
real_left--;
}
#ifdef DEBUG
#ifdef DEBUGGER
if (!quick)
debug_bankchange (old);
#endif
@ -2547,7 +2552,7 @@ void map_banks2 (addrbank *bank, int start, int size, int realsize, int quick)
real_left--;
}
}
#ifdef DEBUG
#ifdef DEBUGGER
if (!quick)
debug_bankchange (old);
#endif

View File

@ -2914,8 +2914,8 @@ static void ExceptionX (int nr, uaecptr address)
} else {
Exception_normal (nr);
}
#endif
#endif // MMUEMU
#ifdef DEBUGGER
if (debug_illegal && !in_rom (M68K_GETPC)) {
int v = nr;
if (nr <= 63 && (debug_illegal_mask & ((uae_u64)1 << nr))) {
@ -2923,6 +2923,7 @@ static void ExceptionX (int nr, uaecptr address)
activate_debugger ();
}
}
#endif // DEBUGGER
regs.exception = 0;
if (cpu_tracer) {
cputrace.state = 0;
@ -2936,7 +2937,7 @@ void REGPARAM2 Exception (int nr)
STATIC_INLINE void do_interrupt (int nr)
{
#ifdef DEBUG
#ifdef DEBUGGER
if (debug_dma)
record_dma_event (DMA_EVENT_CPUIRQ, current_hpos (), vpos);
#endif
@ -3940,13 +3941,14 @@ STATIC_INLINE int do_specialties (int cycles)
INTREQ_f (0x8008);
set_special (SPCFLAG_INT);
}
#ifdef BSDSOCKET
{
extern void bsdsock_fake_int_handler (void);
extern int volatile bsd_int_requested;
if (bsd_int_requested)
bsdsock_fake_int_handler ();
}
#endif
if (cpu_tracer > 0) {
cputrace.stopped = regs.stopped;
cputrace.intmask = regs.intmask;
@ -4248,7 +4250,9 @@ cont:
if (cputrace.needendcycles) {
cputrace.needendcycles = 0;
write_log (_T("STARTCYCLES=%08x ENDCYCLES=%08x\n"), cputrace.startcycles, get_cycles ());
#ifdef DEBUGGER
log_dma_record ();
#endif
}
if (r->spcflags || time_for_interrupt ()) {
@ -4879,8 +4883,10 @@ static void m68k_run_mmu (void)
mmu_backup_regs = regs;
cpu_cycles = (*cpufunctbl[opcode])(opcode);
cpu_cycles = adjust_cycles (cpu_cycles);
#ifdef DEBUGGER
if (mmu_triggered)
mmu_do_hit ();
#endif
if (regs.spcflags) {
if (do_specialties (cpu_cycles))
return;
@ -4950,7 +4956,7 @@ void m68k_go (int may_quit)
restore_state (savestate_fname);
else if (savestate_state == STATE_REWIND)
savestate_rewind ();
#endif
#endif // SAVESTATE
set_cycles (start_cycles);
custom_reset (hardreset != 0, kbreset);
m68k_reset (hardreset != 0);
@ -4961,23 +4967,27 @@ void m68k_go (int may_quit)
#ifdef SAVESTATE
/* We may have been restoring state, but we're done now. */
if (isrestore ()) {
#ifdef DEBUGGER
if (debug_dma) {
record_dma_reset ();
record_dma_reset ();
}
#endif // DEBUGGER
savestate_restore_finish ();
#ifdef DEBUGGER
memory_map_dump ();
#endif // DEBUGGER
#ifdef MMUEMU
if (currprefs.mmu_model == 68030) {
mmu030_decode_tc (tc_030);
} else if (currprefs.mmu_model >= 68040) {
mmu_set_tc (regs.tcr);
}
#endif
#endif // MMUEMU
startup = 1;
restored = 1;
}
#endif
#endif // SAVESTATE
if (currprefs.produce_sound == 0)
eventtab[ev_audio].active = 0;
m68k_setpc (regs.pc);

View File

@ -32,14 +32,14 @@ static RETSIGTYPE sigbrkhandler (int foo)
activate_debugger ();
#endif
#if !defined(__unix) || defined(__NeXT__)
#ifndef HAVE_SIGACTION
signal (SIGINT, sigbrkhandler);
#endif
}
void setup_brkhandler (void)
{
#if defined(__unix) && !defined(__NeXT__)
#ifdef HAVE_SIGACTION
struct sigaction sa;
sa.sa_handler = sigbrkhandler;
sa.sa_flags = 0;

View File

@ -14,7 +14,7 @@
#include "options.h"
#include "autoconf.h"
#ifndef ANDROID
#if !defined(ANDROID) && !defined(__native_client__)
#include <sys/sysctl.h>
#endif
#include "include/memory_uae.h"

View File

@ -1006,8 +1006,10 @@ static void descramble (const struct romdata *rd, uae_u8 *data, int size, int od
{
int flags = rd->type;
#ifdef ACTION_REPLAY
if (flags & (ROMTYPE_NORDIC | ROMTYPE_XPOWER))
descramble_nordicpro (data, size, odd);
#endif
}
static int read_rom_file (uae_u8 *buf, const struct romdata *rd)
@ -1300,7 +1302,9 @@ int configure_rom (struct uae_prefs *p, const int *rom, int msg)
_tcscpy (p->romfile, path);
if (rd->type & (ROMTYPE_EXTCD32 | ROMTYPE_EXTCDTV | ROMTYPE_ARCADIABIOS))
_tcscpy (p->romextfile, path);
#ifdef ACTION_REPLAY
if (rd->type & (ROMTYPE_CD32CART | ROMTYPE_ARCADIAGAME | ROMTYPE_HRTMON | ROMTYPE_XPOWER | ROMTYPE_NORDIC | ROMTYPE_AR | ROMTYPE_SUPERIV))
_tcscpy (p->cartfile, path);
#endif
return 1;
}

View File

@ -705,9 +705,10 @@ void restore_state (const TCHAR *filename)
else if (!_tcsncmp (name, _T("2065"), 4))
end = restore_a2065 (chunk);
#endif
#ifdef DEBUGGER
else if (!_tcsncmp (name, _T("DMWP"), 4))
end = restore_debug_memwatch (chunk);
#endif
else if (!_tcscmp (name, _T("CONF")))
end = restore_configuration (chunk);
else if (!_tcscmp (name, _T("LOG ")))
@ -759,7 +760,9 @@ void savestate_restore_finish (void)
restore_a2065_finish ();
#endif
restore_cia_finish ();
#ifdef DEBUGGER
restore_debug_memwatch_finish ();
#endif
savestate_state = 0;
init_hz_full ();
audio_activate ();
@ -1039,7 +1042,9 @@ static int save_state_internal (struct zfile *f, const TCHAR *description, int c
}
}
#endif
#ifdef DEBUGGER
dst = save_debug_memwatch (&len, NULL);
#endif
if (dst) {
save_chunk (f, dst, len, _T("DMWP"), 0);
xfree(dst);
@ -1073,10 +1078,12 @@ int save_state (const TCHAR *filename, const TCHAR *description)
if (!savestate_specialdump && !savestate_nodialogs) {
state_incompatible_warn ();
#ifdef FILESYS
if (!save_filesys_cando ()) {
gui_message (_T("Filesystem active. Try again later."));
return -1;
}
#endif
}
new_blitter = false;
savestate_nodialogs = 0;

View File

@ -348,6 +348,7 @@ static uae_u32 emulib_Minimize (void)
return 0; // OSDEP_minimize_uae();
}
#ifdef FILESYS
static int native_dos_op (uae_u32 mode, uae_u32 p1, uae_u32 p2, uae_u32 p3)
{
TCHAR tmp[MAX_DPATH];
@ -371,6 +372,7 @@ static int native_dos_op (uae_u32 mode, uae_u32 p1, uae_u32 p2, uae_u32 p3)
xfree (s);
return 0;
}
#endif
static uae_u32 REGPARAM2 uaelib_demux2 (TrapContext *context)
{
@ -427,7 +429,9 @@ static uae_u32 REGPARAM2 uaelib_demux2 (TrapContext *context)
#ifdef DEBUGGER
case 84: return mmu_init (ARG1, ARG2, ARG3);
#endif
#ifdef FILESYS
case 85: return native_dos_op (ARG1, ARG2, ARG3, ARG4);
#endif
case 86:
if (valid_address (ARG1, 1)) {
TCHAR *s = au ((char*)get_real_address (ARG1));

View File

@ -32,6 +32,11 @@
#include <stdarg.h>
#include "misc.h"
#ifdef __native_client__
/* guidep == gui-html is currently the only way to build with Native Client. */
#include "guidep/ppapi.h"
#endif /* __native_client__ */
static struct zfile *zlist = 0;
const TCHAR *uae_archive_extensions[] = { _T("zip"), _T("rar"), _T("7z"), _T("lha"), _T("lzh"), _T("lzx"), _T("tar"), NULL };

View File

@ -25,6 +25,10 @@
#include <zlib.h>
#if defined(__native_client__)
#include <sys/nacl_syscalls.h>
#endif
#define unpack_log write_log
#undef unpack_log
#define unpack_log(...) { }
@ -48,7 +52,7 @@ static time_t fromdostime (uae_u32 dd)
struct tm* tm_local;
tm_local = localtime(&time_now);
t -= tm_local->tm_gmtoff;
#else
#elif defined(HAVE_TIMEZONE)
t -= (time_t)timezone;
#endif
return t;
@ -328,7 +332,7 @@ struct zvolume *archive_directory_tar (struct zfile *z)
#if defined(__FreeBSD__)
zai.tv.tv_sec += tm_local->tm_gmtoff;
if (tm_local->tm_isdst)
#else
#elif defined(HAVE_DAYLIGHT) && defined(HAVE_TIMEZONE)
zai.tv.tv_sec += timezone;
if (daylight)
#endif