summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-11-22 20:08:41 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-11-22 20:08:41 +0000
commit0dcc155498bacd2bd99ac49945bf1aaf58a8eae1 (patch)
tree4b6fb7a86cde4d0060d760b561ddf09fcf4039cf /src/emu
parent5ca71f2d981e08f8ace01ea07e745f41fa90006c (diff)
And the 6805 core.
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/cpu/m68000/m68kcpu.c1
-rw-r--r--src/emu/cpu/m6805/m6805.c5
-rw-r--r--src/emu/cpu/m6805/m6805.h8
3 files changed, 9 insertions, 5 deletions
diff --git a/src/emu/cpu/m68000/m68kcpu.c b/src/emu/cpu/m68000/m68kcpu.c
index dc3fb6f1fdf..75ccd16d62e 100644
--- a/src/emu/cpu/m68000/m68kcpu.c
+++ b/src/emu/cpu/m68000/m68kcpu.c
@@ -32,6 +32,7 @@ static const char copyright_notice[] =
/* ================================ INCLUDES ============================== */
/* ======================================================================== */
+#define NO_LEGACY_MEMORY_HANDLERS 1
#include <setjmp.h>
#include "m68kcpu.h"
#include "m68kops.h"
diff --git a/src/emu/cpu/m6805/m6805.c b/src/emu/cpu/m6805/m6805.c
index cfb37fca137..fdd95367fa3 100644
--- a/src/emu/cpu/m6805/m6805.c
+++ b/src/emu/cpu/m6805/m6805.c
@@ -30,7 +30,7 @@
*****************************************************************************/
-
+#define NO_LEGACY_MEMORY_HANDLERS 1
#include "debugger.h"
#include "m6805.h"
@@ -58,6 +58,7 @@ typedef struct
UINT16 pending_interrupts; /* MB */
cpu_irq_callback irq_callback;
const device_config *device;
+ const address_space *program;
int irq_state[9]; /* KW Additional lines for HD63705 */
int nmi_state;
} m6805_Regs;
@@ -445,6 +446,7 @@ static CPU_INIT( m6805 )
state_register("m6805", device);
m6805.irq_callback = irqcallback;
m6805.device = device;
+ m6805.program = memory_find_address_space(m6805.device, ADDRESS_SPACE_PROGRAM);
}
static CPU_RESET( m6805 )
@@ -453,6 +455,7 @@ static CPU_RESET( m6805 )
memset(&m6805, 0, sizeof(m6805));
m6805.irq_callback = save_irqcallback;
m6805.device = device;
+ m6805.program = memory_find_address_space(m6805.device, ADDRESS_SPACE_PROGRAM);
/* Force CPU sub-type and relevant masks */
m6805.subtype = SUBTYPE_M6805;
SP_MASK = 0x07f;
diff --git a/src/emu/cpu/m6805/m6805.h b/src/emu/cpu/m6805/m6805.h
index 7649bafc3dd..cffb9feb459 100644
--- a/src/emu/cpu/m6805/m6805.h
+++ b/src/emu/cpu/m6805/m6805.h
@@ -63,26 +63,26 @@ extern CPU_GET_INFO( hd63705 );
/****************************************************************************/
/* Read a byte from given memory location */
/****************************************************************************/
-#define M6805_RDMEM(Addr) ((unsigned)program_read_byte_8be(Addr))
+#define M6805_RDMEM(Addr) ((unsigned)memory_read_byte_8be(m6805.program, Addr))
/****************************************************************************/
/* Write a byte to given memory location */
/****************************************************************************/
-#define M6805_WRMEM(Addr,Value) (program_write_byte_8be(Addr,Value))
+#define M6805_WRMEM(Addr,Value) (memory_write_byte_8be(m6805.program, Addr,Value))
/****************************************************************************/
/* M6805_RDOP() is identical to M6805_RDMEM() except it is used for reading */
/* opcodes. In case of system with memory mapped I/O, this function can be */
/* used to greatly speed up emulation */
/****************************************************************************/
-#define M6805_RDOP(Addr) ((unsigned)program_decrypted_read_byte(Addr))
+#define M6805_RDOP(Addr) ((unsigned)memory_decrypted_read_byte(m6805.program, Addr))
/****************************************************************************/
/* M6805_RDOP_ARG() is identical to M6805_RDOP() but it's used for reading */
/* opcode arguments. This difference can be used to support systems that */
/* use different encoding mechanisms for opcodes and opcode arguments */
/****************************************************************************/
-#define M6805_RDOP_ARG(Addr) ((unsigned)program_raw_read_byte(Addr))
+#define M6805_RDOP_ARG(Addr) ((unsigned)memory_raw_read_byte(m6805.program, Addr))
CPU_DISASSEMBLE( m6805 );