diff --git a/Makefile.am b/Makefile.am index 73edf4ae..0a2c9ae2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,7 +9,7 @@ AM_LFLAGS = -i ############################################################################### # No install -noinst_HEADERS = src/apple2.h src/common.h src/cpu.h src/disk.h src/glue.h \ +noinst_HEADERS = src/common.h src/cpu.h src/disk.h src/glue.h \ src/interface.h src/joystick.h src/keys.h src/misc.h src/prefs.h \ src/timing.h src/uthash.h src/video/video.h src/zlib-helpers.h \ \ diff --git a/src/apple2.h b/src/apple2.h deleted file mode 100644 index 67a1c2ec..00000000 --- a/src/apple2.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Apple // emulator for Linux: Common definitions - * - * Copyright 1994 Alexander Jean-Claude Bottema - * Copyright 1995 Stephen Lee - * Copyright 1997, 1998 Aaron Culliney - * Copyright 1998, 1999, 2000 Michael Deutschmann - * - * This software package is subject to the GNU General Public License - * version 2 or later (your choice) as published by the Free Software - * Foundation. - * - * THERE ARE NO WARRANTIES WHATSOEVER. - * - */ - -#ifndef _A2_H_ -#define _A2_H_ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -// Virtual machine is an Apple ][ (not an NES, etc...) -#define APPLE2_VM 1 - -/* Symbol naming issues */ -#ifdef NO_UNDERSCORES -#define SN(foo) foo -#define SNX(foo, INDEX, SCALE) foo(,INDEX,SCALE) -#define SNX_PROLOGUE(foo) -#define E(foo) .globl foo; .balign 16; foo##: -#define CALL(foo) foo -#else /* !NO_UNDERSCORES */ -#if defined(__APPLE__) -# warning "2014/06/22 -- Apple's clang appears to not like certain manipulations of %_h register values (for example %ah, %ch) that are valid on *nix ... and it creates bizarre bytecode -# define APPLE_ASSEMBLER_IS_BROKEN 1 -# define SN(foo) _##foo(%rip) -# define SNX(foo, INDEX, SCALE) (_X8,INDEX,SCALE) -# ifdef __LP64__ -# define SNX_PROLOGUE(foo) leaLQ _##foo(%rip), _X8; -# else -# error "Building 32bit Darwin/x86 is not supported (unless you're a go-getter and make it supported)" -# endif -# define E(foo) .globl _##foo; .balign 4; _##foo##: -#else -# define SN(foo) _##foo -# define SNX(foo, INDEX, SCALE) _##foo(,INDEX,SCALE) -# define SNX_PROLOGUE(foo) -# define E(foo) .globl _##foo; .balign 16; _##foo##: -#endif -#define CALL(foo) _##foo -#endif /* !NO_UNDERSCORES */ - -#endif /* _A2_H_ */ diff --git a/src/x86/cpu-regs.h b/src/x86/cpu-regs.h index 2f082f13..fdef2af6 100644 --- a/src/x86/cpu-regs.h +++ b/src/x86/cpu-regs.h @@ -12,8 +12,15 @@ #ifndef _CPU_REGS_H_ #define _CPU_REGS_H_ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "cpu.h" +// Virtual machine is an Apple ][ (not an NES, etc...) +#define APPLE2_VM 1 + #define X_Reg %bl /* 6502 X register in %bl */ #define Y_Reg %bh /* 6502 Y register in %bh */ #define A_Reg %cl /* 6502 A register in %cl */ @@ -109,4 +116,32 @@ # define xorLQ xorl #endif +/* Symbol naming issues */ +#ifdef NO_UNDERSCORES +#define SN(foo) foo +#define SNX(foo, INDEX, SCALE) foo(,INDEX,SCALE) +#define SNX_PROLOGUE(foo) +#define E(foo) .globl foo; .balign 16; foo##: +#define CALL(foo) foo +#else /* !NO_UNDERSCORES */ +#if defined(__APPLE__) +# warning "2014/06/22 -- Apple's clang appears to not like certain manipulations of %_h register values (for example %ah, %ch) that are valid on *nix ... and it creates bizarre bytecode +# define APPLE_ASSEMBLER_IS_BROKEN 1 +# define SN(foo) _##foo(%rip) +# define SNX(foo, INDEX, SCALE) (_X8,INDEX,SCALE) +# ifdef __LP64__ +# define SNX_PROLOGUE(foo) leaLQ _##foo(%rip), _X8; +# else +# error "Building 32bit Darwin/x86 is not supported (unless you're a go-getter and make it supported)" +# endif +# define E(foo) .globl _##foo; .balign 4; _##foo##: +#else +# define SN(foo) _##foo +# define SNX(foo, INDEX, SCALE) _##foo(,INDEX,SCALE) +# define SNX_PROLOGUE(foo) +# define E(foo) .globl _##foo; .balign 16; _##foo##: +#endif +#define CALL(foo) _##foo +#endif /* !NO_UNDERSCORES */ + #endif // whole file diff --git a/src/x86/cpu.S b/src/x86/cpu.S index 86d7f251..0ca9efe1 100644 --- a/src/x86/cpu.S +++ b/src/x86/cpu.S @@ -15,7 +15,6 @@ */ #include "cpu-regs.h" -#include "apple2.h" #include "misc.h" #define DebugCurrEA SN(cpu65_ea) diff --git a/src/x86/glue-prologue.h b/src/x86/glue-prologue.h index f89a5566..cea63a2a 100644 --- a/src/x86/glue-prologue.h +++ b/src/x86/glue-prologue.h @@ -15,7 +15,6 @@ */ #define __ASSEMBLY__ -#include "apple2.h" #include "misc.h" #include "cpu-regs.h"