mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-26 17:32:40 +00:00
Merge x86-specific apple2.h stuff into cpu-regs.h
This commit is contained in:
parent
cec638b959
commit
cf79056b28
@ -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 \
|
||||
\
|
||||
|
55
src/apple2.h
55
src/apple2.h
@ -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_ */
|
@ -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
|
||||
|
@ -15,7 +15,6 @@
|
||||
*/
|
||||
|
||||
#include "cpu-regs.h"
|
||||
#include "apple2.h"
|
||||
#include "misc.h"
|
||||
|
||||
#define DebugCurrEA SN(cpu65_ea)
|
||||
|
@ -15,7 +15,6 @@
|
||||
*/
|
||||
|
||||
#define __ASSEMBLY__
|
||||
#include "apple2.h"
|
||||
#include "misc.h"
|
||||
#include "cpu-regs.h"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user