Merge pull request #35 from meepingsnesroms/devel

Enable Cyclone68k
This commit is contained in:
meepingsnesroms
2018-12-08 08:35:13 +00:00
committed by GitHub
9 changed files with 8728 additions and 2170 deletions

View File

@@ -19,6 +19,10 @@ else ifeq ($(platform),mingw_x86)
include $(BUILD_DIR)/Makefile.mingw_x86
else ifeq ($(platform),mingw_x86_64)
include $(BUILD_DIR)/Makefile.mingw_x86_64
else ifeq ($(platform),ps3_ppc)
include $(BUILD_DIR)/Makefile.ps3_ppc
else ifeq ($(platform),vita_arm)
include $(BUILD_DIR)/Makefile.vita_arm
else ifeq ($(platform),wii_ppc)
include $(BUILD_DIR)/Makefile.wii_ppc
else ifeq ($(platform),windows_x86)
@@ -139,6 +143,7 @@ ifeq ($(platform),ios-arm64)
CC = cc -arch arm64 -isysroot $(IOSSDK)
else
CC = cc -arch armv7 -isysroot $(IOSSDK)
EMU_OPTIMIZE_FOR_ARM = 1
endif
LD = armv7-apple-darwin11-ld
@@ -168,10 +173,10 @@ else ifeq ($(platform), qnx)
TARGET := $(TARGET_NAME)_libretro_qnx.$(EXT)
fpic := -fPIC
SHARED := -shared -Wl,--version-script=$(BUILD_DIR)/link.T
CC = qcc -Vgcc_ntoarmv7le
AR = qcc -Vgcc_ntoarmv7le
CFLAGS += -D__BLACKBERRY_QNX__
EMU_OPTIMIZE_FOR_ARM = 1
# PS3
else ifeq ($(platform), ps3)
@@ -180,8 +185,8 @@ else ifeq ($(platform), ps3)
CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe
CFLAGS += -D__ppc__ -DMSB_FIRST -DWORDS_BIGENDIAN=1 -DEMU_BIG_ENDIAN
STATIC_LINKING=1
STATIC_LINKING_LINK=1
STATIC_LINKING = 1
STATIC_LINKING_LINK = 1
# PS3 (SNC)
else ifeq ($(platform), sncps3)
@@ -190,8 +195,8 @@ else ifeq ($(platform), sncps3)
CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
AR = $(CELL_SDK)/host-win32/sn/bin/ps3snarl.exe
CFLAGS += -D__ppc__ -DMSB_FIRST -DWORDS_BIGENDIAN=1 -DEMU_BIG_ENDIAN
STATIC_LINKING=1
STATIC_LINKING_LINK=1
STATIC_LINKING = 1
STATIC_LINKING_LINK = 1
# Lightweight PS3 Homebrew SDK
else ifeq ($(platform), psl1ght)
@@ -200,8 +205,8 @@ else ifeq ($(platform), psl1ght)
CC = $(PS3DEV)/ppu/bin/ppu-gcc$(EXE_EXT)
AR = $(PS3DEV)/ppu/bin/ppu-ar$(EXE_EXT)
CFLAGS += -D__ppc__ -DMSB_FIRST -DWORDS_BIGENDIAN=1 -DEMU_BIG_ENDIAN
STATIC_LINKING=1
STATIC_LINKING_LINK=1
STATIC_LINKING = 1
STATIC_LINKING_LINK = 1
# PSP
else ifeq ($(platform), psp1)
@@ -210,8 +215,8 @@ else ifeq ($(platform), psp1)
CC = psp-gcc$(EXE_EXT)
AR = psp-ar$(EXE_EXT)
CFLAGS += -DPSP -G0
STATIC_LINKING=1
STATIC_LINKING_LINK=1
STATIC_LINKING = 1
STATIC_LINKING_LINK = 1
# DOS
else ifeq ($(platform), dos)
@@ -219,9 +224,9 @@ else ifeq ($(platform), dos)
TARGET := $(TARGET_NAME)_libretro_$(platform).$(EXT)
CC = i686-pc-msdosdjgpp-gcc
AR = i686-pc-msdosdjgpp-ar
STATIC_LINKING=1
STATIC_LINKING_LINK=1
CFLAGS += -march=i386
STATIC_LINKING = 1
STATIC_LINKING_LINK = 1
# Vita
else ifeq ($(platform), vita)
@@ -230,8 +235,9 @@ else ifeq ($(platform), vita)
CC = arm-vita-eabi-gcc$(EXE_EXT)
AR = arm-vita-eabi-ar$(EXE_EXT)
CFLAGS += -DVITA
STATIC_LINKING=1
STATIC_LINKING_LINK=1
STATIC_LINKING = 1
STATIC_LINKING_LINK = 1
EMU_OPTIMIZE_FOR_ARM = 1
# CTR (3DS)
else ifeq ($(platform), ctr)
@@ -244,8 +250,9 @@ else ifeq ($(platform), ctr)
CFLAGS += -Wall -mword-relocations
CFLAGS += -fomit-frame-pointer -ffast-math
CFLAGS += -D_3DS
STATIC_LINKING=1
STATIC_LINKING_LINK=1
STATIC_LINKING = 1
STATIC_LINKING_LINK = 1
EMU_OPTIMIZE_FOR_ARM = 1
# Raspberry Pi 2
else ifeq ($(platform), rpi2)
@@ -256,6 +263,7 @@ else ifeq ($(platform), rpi2)
CFLAGS += -marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -funsafe-math-optimizations
CFLAGS += -fomit-frame-pointer -ffast-math
HAVE_NEON = 1
EMU_OPTIMIZE_FOR_ARM = 1
# Raspberry Pi 3
else ifeq ($(platform), rpi3)
@@ -268,7 +276,7 @@ else ifeq ($(platform), rpi3)
HAVE_NEON = 1
# Classic Platforms ####################
# Platform affix = classic_<ISA>_<µARCH>
# Platform affix = classic_<ISA>_<uARCH>
# Help at https://modmyclassic.com/comp
# (armv7 a7, hard point, neon based) ###
# NESC, SNESC, C64 mini
@@ -298,6 +306,7 @@ else ifeq ($(platform), classic_armv7_a7)
LDFLAGS += -static-libgcc -static-libstdc++
endif
endif
EMU_OPTIMIZE_FOR_ARM = 1
# Xbox 360
else ifeq ($(platform), xenon)
@@ -306,8 +315,8 @@ else ifeq ($(platform), xenon)
CC = xenon-gcc$(EXE_EXT)
AR = xenon-ar$(EXE_EXT)
CFLAGS += -D__LIBXENON__ -m32 -D__ppc__
STATIC_LINKING=1
STATIC_LINKING_LINK=1
STATIC_LINKING = 1
STATIC_LINKING_LINK = 1
# Nintendo Game Cube
else ifeq ($(platform), ngc)
@@ -317,8 +326,8 @@ else ifeq ($(platform), ngc)
AR = $(DEVKITPPC)/bin/powerpc-eabi-ar$(EXE_EXT)
CFLAGS += -DGEKKO -DHW_DOL -mrvl -mcpu=750 -meabi -mhard-float -D__ppc__ -DMSB_FIRST -DWORDS_BIGENDIAN=1 -DEMU_BIG_ENDIAN
CFLAGS += -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int
STATIC_LINKING=1
STATIC_LINKING_LINK=1
STATIC_LINKING = 1
STATIC_LINKING_LINK = 1
# Nintendo Wii
else ifeq ($(platform), wii)
@@ -328,8 +337,8 @@ else ifeq ($(platform), wii)
AR = $(DEVKITPPC)/bin/powerpc-eabi-ar$(EXE_EXT)
CFLAGS += -DGEKKO -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float -D__ppc__ -DMSB_FIRST -DWORDS_BIGENDIAN=1 -DEMU_BIG_ENDIAN
CFLAGS += -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int
STATIC_LINKING=1
STATIC_LINKING_LINK=1
STATIC_LINKING = 1
STATIC_LINKING_LINK = 1
# Nintendo WiiU
else ifeq ($(platform), wiiu)
@@ -339,8 +348,8 @@ else ifeq ($(platform), wiiu)
AR = $(DEVKITPPC)/bin/powerpc-eabi-ar$(EXE_EXT)
CFLAGS += -DGEKKO -DHW_RVL -mwup -mcpu=750 -meabi -mhard-float -D__ppc__ -DMSB_FIRST -DWORDS_BIGENDIAN=1 -DEMU_BIG_ENDIAN
CFLAGS += -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int
STATIC_LINKING=1
STATIC_LINKING_LINK=1
STATIC_LINKING = 1
STATIC_LINKING_LINK = 1
# ARM
else ifneq (,$(findstring armv,$(platform)))
@@ -374,7 +383,7 @@ else ifneq (,$(findstring armv,$(platform)))
# Emscripten
else ifeq ($(platform), emscripten)
TARGET := $(TARGET_NAME)_libretro_emscripten.bc
STATIC_LINKING=1
STATIC_LINKING = 1
# GCW0
else ifeq ($(platform), gcw0)
@@ -395,8 +404,8 @@ else ifeq ($(platform), switch)
EXT=a
TARGET := $(TARGET_NAME)_libretro_$(platform).$(EXT)
include $(LIBTRANSISTOR_HOME)/libtransistor.mk
STATIC_LINKING=1
STATIC_LINKING_LINK=1
STATIC_LINKING = 1
STATIC_LINKING_LINK = 1
# Nintendo Switch (libnx)
else ifeq ($(platform), libnx)
@@ -412,7 +421,7 @@ else ifeq ($(platform), libnx)
CXXFLAGS := $(ASFLAGS) $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
CFLAGS += -std=gnu11
STATIC_LINKING = 1
STATIC_LINKING_LINK=1
STATIC_LINKING_LINK = 1
# Windows MSVC 2003 Xbox 1
else ifeq ($(platform), xbox1_msvc2003)
@@ -428,8 +437,8 @@ else ifeq ($(platform), xbox1_msvc2003)
PSS_STYLE :=2
CFLAGS += -D_XBOX -D_XBOX1
CXXFLAGS += -D_XBOX -D_XBOX1
STATIC_LINKING=1
STATIC_LINKING_LINK=1
STATIC_LINKING = 1
STATIC_LINKING_LINK = 1
# Windows
else
@@ -440,7 +449,7 @@ else
CFLAGS += -D__WIN32__ -D__WIN32_LIBRETRO__
endif
ifeq ($(STATIC_LINKING),1)
ifeq ($(STATIC_LINKING), 1)
SHARED=
fpic=
endif
@@ -453,11 +462,11 @@ endif
include $(BUILD_DIR)/Makefile.common
OBJECTS := $(SOURCES_C:.c=.o) $(SOURCES_ASM:.s=.o)
OBJECTS := $(SOURCES_C:.c=.o) $(SOURCES_ASM:.S=.o)
DEFINES = $(COREDEFINES)
ifeq ($(STATIC_LINKING),1)
ifeq ($(STATIC_LINKING), 1)
DEFINES += -DSTATIC_LINKING
endif
@@ -506,7 +515,7 @@ $(TARGET): $(OBJECTS)
@echo "** BUILDING $(TARGET) FOR PLATFORM $(platform) **"
ifeq ($(platform), emscripten)
$(CC) $(CFLAGS) $(OBJOUT)$@ $^
else ifeq ($(STATIC_LINKING_LINK),1)
else ifeq ($(STATIC_LINKING_LINK), 1)
ifneq (,$(findstring msvc,$(platform)))
$(LD) $(LINKOUT)$@ $(OBJECTS)
else

View File

@@ -13,7 +13,7 @@ LDFLAGS +=
OBJOUT = -o
LINKOUT = -o
OBJS = $(SOURCES_C:.c=$(OBJEXT)) $(SOURCES_CXX:.cpp=$(OBJEXT))
OBJS = $(SOURCES_C:.c=$(OBJEXT)) $(SOURCES_CXX:.cpp=$(OBJEXT)) $(SOURCES_ASM:.S=$(OBJEXT))
ifneq (,$(findstring msvc,$(platform)))
OBJOUT = -Fo
@@ -30,7 +30,7 @@ endif
$(CC) -c $(OBJOUT)$@ $< $(INCFLAGS) $(CFLAGS)
%$(OBJEXT): %.S
$(CC_AS) -c $(OBJOUT)$@ $< $(CFLAGS)
$(CC) -c $(OBJOUT)$@ $< $(INCFLAGS) $(CFLAGS)
all: $(TARGET)

View File

@@ -46,6 +46,7 @@ PLATCFLAGS = -ftree-vectorize -mfloat-abi=hard -ffast-math -fsingle-precisio
PLATCXXFLAGS = -ftree-vectorize -mfloat-abi=hard -ffast-math -fsingle-precision-constant -funroll-loops -fno-short-enums
PLATLDFLAGS = -shared -lm -mthumb -mcpu=cortex-a9 -mfloat-abi=hard
PLATLDXFLAGS = -shared -lm -mthumb -mcpu=cortex-a9 -mfloat-abi=hard
EMU_OPTIMIZE_FOR_ARM = 1
################
# libretro setup

View File

@@ -8,15 +8,14 @@ COREFLAGS := -ffast-math -funroll-loops -D__LIBRETRO__ -DINLINE=inline -DFRONTEN
GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)"
ifneq ($(GIT_VERSION)," unknown")
COREFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
COREFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
endif
#set ASM CPU core
#set ASM CPU core, only use with ARMv4<->7, ARMv8 is its own architecture
ifeq ($(TARGET_ARCH),arm)
ifneq ($(TARGET_ARCH_ABI),arm64-v8a)
#armv8 is 64 bit, it cant run < armv8 assembly outside of legacy emulation mode
#EMU_OPTIMIZE_FOR_ARM = true #disable until the SIGSEGVs are fixed
endif
ifneq ($(TARGET_ARCH_ABI),arm64-v8a)
EMU_OPTIMIZE_FOR_ARM = 1
endif
endif
include $(CLEAR_VARS)
@@ -26,7 +25,7 @@ LOCAL_CFLAGS := $(COREFLAGS)
LOCAL_LDFLAGS := -Wl,-version-script=$(CORE_DIR)/build/link.T
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
LOCAL_ARM_NEON := true
LOCAL_ARM_NEON := true
endif
include $(BUILD_SHARED_LIBRARY)

View File

@@ -51,7 +51,7 @@ android{
QMAKE_CXXFLAGS += -fopenmp
QMAKE_LFLAGS += -fopenmp
DEFINES += EMU_MULTITHREADED
# CONFIG += optimize_for_arm # for now, later this will check if building for ARM
# CONFIG += optimize_for_arm # for now, later this will check if building for ARMv4<->7
}
# ios{
@@ -83,8 +83,9 @@ CONFIG += c++11
INCLUDEPATH += $$PWD/qt-common/include
# only use with ARMv4<->7, ARMv8 is its own architecture
optimize_for_arm{
SOURCES += ../../src/m68k/cyclone/Cyclone.s
SOURCES += ../../src/m68k/cyclone/Cyclone.S
DEFINES += EMU_OPTIMIZE_FOR_ARM
}else{
SOURCES += ../../src/m68k/musashi/m68kcpu.c \

View File

@@ -26,20 +26,20 @@ extern void m68k_write_memory_16(unsigned int address, unsigned short value);
extern void m68k_write_memory_32(unsigned int address, unsigned int value);
unsigned int checkPc(unsigned int pc){
unsigned int dataBuffer;
unsigned int dataBufferAddress;
unsigned int dataBufferHost;
unsigned int dataBufferGuest;
unsigned int windowSize;
pc -= cycloneCpu.membase;//get the real program counter
if(chips[CHIP_A0_ROM].inBootMode || pc >= chips[CHIP_A0_ROM].start && pc < chips[CHIP_A0_ROM].start + chips[CHIP_A0_ROM].lineSize){
dataBuffer = (unsigned int)palmRom;
dataBufferAddress = chips[CHIP_A0_ROM].start;
dataBufferHost = (unsigned int)palmRom;
dataBufferGuest = chips[CHIP_A0_ROM].start;
windowSize = chips[CHIP_A0_ROM].mask + 1;
}
else if(pc >= chips[CHIP_DX_RAM].start && pc < chips[CHIP_DX_RAM].start + chips[CHIP_DX_RAM].lineSize){
dataBuffer = (unsigned int)palmRam;
dataBufferAddress = chips[CHIP_DX_RAM].start;
dataBufferHost = (unsigned int)palmRam;
dataBufferGuest = chips[CHIP_DX_RAM].start;
windowSize = chips[CHIP_DX_RAM].mask + 1;
}
else{
@@ -47,7 +47,7 @@ unsigned int checkPc(unsigned int pc){
exit(1);
}
cycloneCpu.membase = dataBuffer - dataBufferAddress - windowSize * ((pc - dataBufferAddress) / windowSize);
cycloneCpu.membase = dataBufferHost - dataBufferGuest - windowSize * ((pc - dataBufferGuest) / windowSize);
return cycloneCpu.membase + pc;//new program counter
}

File diff suppressed because it is too large Load Diff

192
src/m68k/cyclone/config.h Normal file
View File

@@ -0,0 +1,192 @@
/**
* Cyclone 68000 configuration file
**/
/*
* By default, only ARMv4 instructions are used.
* If you want Cyclone to make use of newer ARM instructions, enable the
* options(s) below. You can also override this using make argument:
* make HAVE_ARMv6=1
*/
#ifndef HAVE_ARMv6
#define HAVE_ARMv6 0
#endif
/*
* If this option is enabled, Microsoft ARMASM compatible output is generated
* (output file - Cyclone.asm). Otherwise GNU as syntax is used (Cyclone.s).
*/
#define USE_MS_SYNTAX 0
/*
* Enable this option if you are going to use Cyclone to emulate Genesis /
* Mega Drive system. As VDP chip in these systems had control of the bus,
* several instructions were acting differently, for example TAS did'n have
* the write-back phase. That will be emulated, if this option is enabled.
*/
#define CYCLONE_FOR_GENESIS 0
/*
* This option compresses Cyclone's jumptable. Because of this the executable
* will be smaller and load slightly faster and less relocations will be needed.
* This also fixes the crash problem with 0xfffe and 0xffff opcodes.
* Warning: if you enable this, you MUST call CycloneInit() before calling
* CycloneRun(), or else it will crash, also seems to cause SIGSEGVs when enabled.
*/
#define COMPRESS_JUMPTABLE 0
/*
* Address mask for memory hadlers. The bits set will be masked out of address
* parameter, which is passed to r/w memory handlers.
* Using 0xff000000 means that only 24 least significant bits should be used.
* Set to 0 if you want to mask unused address bits in the memory handlers yourself.
*/
#define MEMHANDLERS_ADDR_MASK 0
/*
* Cyclone keeps the 4 least significant bits of SR, PC+membase and it's cycle
* counter in ARM registers instead of the context for performance reasons. If you for
* any reason need to access them in your memory handlers, enable the options below,
* otherwise disable them to improve performance.
*
* MEMHANDLERS_NEED_PC updates .pc context field with PC value effective at the time
* when memhandler was called (opcode address + 2-10 bytes).
* MEMHANDLERS_NEED_PREV_PC updates .prev_pc context field to currently executed
* opcode address + 2.
* Note that .pc and .prev_pc values are always real pointers to memory, so you must
* subtract .membase to get M68k PC value.
*
* Warning: updating PC in memhandlers is dangerous, as Cyclone may internally
* increment the PC before fetching the next instruction and continue executing
* at wrong location. It's better to wait until Cyclone CycloneRun() finishes.
*
* Warning: if you enable MEMHANDLERS_CHANGE_CYCLES, you must also enable
* MEMHANDLERS_NEED_CYCLES, or else Cyclone will keep reloading the same cycle
* count and this will screw timing (if not cause a deadlock).
*/
#define MEMHANDLERS_NEED_PC 0
#define MEMHANDLERS_NEED_PREV_PC 0
#define MEMHANDLERS_NEED_FLAGS 0
#define MEMHANDLERS_NEED_CYCLES 0
#define MEMHANDLERS_CHANGE_PC 0
#define MEMHANDLERS_CHANGE_FLAGS 0
#define MEMHANDLERS_CHANGE_CYCLES 0
/*
* If the following macro is defined, Cyclone no longer calls read*, write*,
* fetch* and checkpc from it's context, it calls these functions directly
* instead, prefixed with prefix selected below. For example, if
* MEMHANDLERS_DIRECT_PREFIX is set to cyclone_, it will call cyclone_read8
* on byte reads.
* This is to avoid indirect jumps, which are slower. It also saves one ARM
* instruction.
*/
/* MEMHANDLERS_DIRECT_PREFIX "cyclone_" */
/*
* If enabled, Cyclone will call .IrqCallback routine from it's context whenever it
* acknowledges an IRQ. IRQ level (.irq) is not cleared automatically, do this in your
* handler if needed.
* This function must either return vector number to use for interrupt exception,
* CYCLONE_INT_ACK_AUTOVECTOR to use autovector (this is the most common case), or
* CYCLONE_INT_ACK_SPURIOUS (least common case).
* If disabled, it simply uses appropriate autovector, clears the IRQ level and
* continues execution.
*/
#define USE_INT_ACK_CALLBACK 1
/*
* Enable this if you need old PC, flags or cycles;
* or you change cycles in your IrqCallback function.
*/
#define INT_ACK_NEEDS_STUFF 0
#define INT_ACK_CHANGES_CYCLES 0
/*
* If enabled, .ResetCallback is called from the context, whenever RESET opcode is
* encountered. All context members are valid and can be changed.
* If disabled, RESET opcode acts as an NOP.
*/
#define USE_RESET_CALLBACK 1
/*
* If enabled, UnrecognizedCallback is called if an invalid opcode is
* encountered. All context members are valid and can be changed. The handler
* should return zero if you want Cyclone to gererate "Illegal Instruction"
* exception after this, or nonzero if not. In the later case you should change
* the PC by yourself, or else Cyclone will keep executing that opcode all over
* again.
* If disabled, "Illegal Instruction" exception is generated and execution is
* continued.
*/
#define USE_UNRECOGNIZED_CALLBACK 0
/*
* This option will also call UnrecognizedCallback for a-line and f-line
* (0xa*** and 0xf***) opcodes the same way as described above, only appropriate
* exceptions will be generated.
*/
#define USE_AFLINE_CALLBACK 0
/*
* This makes Cyclone to call checkpc from it's context whenever it changes the PC
* by a large value. It takes and should return the PC value in PC+membase form.
* The flags and cycle counter are not valid in this function.
*/
#define USE_CHECKPC_CALLBACK 1
/*
* This determines if checkpc() should be called after jumps when 8 and 16 bit
* displacement values were used.
*/
#define USE_CHECKPC_OFFSETBITS_16 1
#define USE_CHECKPC_OFFSETBITS_8 0
/*
* Call checkpc() after DBcc jumps (which use 16bit displacement). Cyclone prior to
* 0.0087 never did that.
*/
#define USE_CHECKPC_DBRA 1
/*
* When this option is enabled Cyclone will do two word writes instead of one
* long write when handling MOVE.L or MOVEM.L with pre-decrementing destination,
* as described in Bart Trzynadlowski's doc (http://www.trzy.org/files/68knotes.txt).
* Enable this if you are emulating a 16 bit system.
*/
#define SPLIT_MOVEL_PD 1
/*
* Enable emulation of trace mode. Shouldn't cause any performance decrease, so it
* should be safe to keep this ON.
*/
#define EMULATE_TRACE 1
/*
* If enabled, address error exception will be generated if 68k code jumps to an
* odd address. Causes very small performance hit (2 ARM instructions for every
* emulated jump/return/exception in normal case).
* Note: checkpc() must not clear least significant bit of rebased address
* for this to work, as checks are performed after calling checkpc().
*/
#define EMULATE_ADDRESS_ERRORS_JUMP 1
/*
* If enabled, address error exception will be generated if 68k code tries to
* access a word or longword at an odd address. The performance cost is also 2 ARM
* instructions per access (for address error checks).
*/
#define EMULATE_ADDRESS_ERRORS_IO 0
/*
* If an address error happens during another address error processing,
* the processor halts until it is reset (catastrophic system failure, as the manual
* states). This option enables halt emulation.
* Note that this might be not desired if it is known that emulated system should
* never reach this state.
*/
#define EMULATE_HALT 1

View File

@@ -12,9 +12,10 @@ EMU_SOURCES_C := $(EMU_PATH)/emulator.c \
$(EMU_PATH)/audio/blip_buf.c \
$(EMU_PATH)/debug/sandbox.c
ifeq ($(EMU_OPTIMIZE_FOR_ARM), true)
#only use with ARMv4<->7, ARMv8 is its own architecture
ifeq ($(EMU_OPTIMIZE_FOR_ARM), 1)
EMU_DEFINES += -DEMU_OPTIMIZE_FOR_ARM
EMU_SOURCES_ASM += $(EMU_PATH)/m68k/cyclone/Cyclone.s
EMU_SOURCES_ASM += $(EMU_PATH)/m68k/cyclone/Cyclone.S
else
EMU_SOURCES_C += $(EMU_PATH)/m68k/musashi/m68kops.c \
$(EMU_PATH)/m68k/musashi/m68kopnz.c \