summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/t11
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-11-23 00:05:00 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-11-23 00:05:00 +0000
commitcf2bb4f315bb15b991e22665838f62f6792001e2 (patch)
tree41589dc7872cee72972878990691ab4507e4111a /src/emu/cpu/t11
parent2d5bd758dee8247a5b0ce096963962d32738fa11 (diff)
More memory conversions.
Diffstat (limited to 'src/emu/cpu/t11')
-rw-r--r--src/emu/cpu/t11/t11.c5
-rw-r--r--src/emu/cpu/t11/t11.h8
2 files changed, 8 insertions, 5 deletions
diff --git a/src/emu/cpu/t11/t11.c b/src/emu/cpu/t11/t11.c
index da4366abc82..e316a8482b8 100644
--- a/src/emu/cpu/t11/t11.c
+++ b/src/emu/cpu/t11/t11.c
@@ -11,6 +11,7 @@
*****************************************************************************/
+#define NO_LEGACY_MEMORY_HANDLERS 1
#include "debugger.h"
#include "t11.h"
@@ -33,6 +34,7 @@ typedef struct
INT32 interrupt_cycles;
cpu_irq_callback irq_callback;
const device_config *device;
+ const address_space *program;
} t11_Regs;
static t11_Regs t11;
@@ -77,7 +79,7 @@ static int t11_ICount;
INLINE int ROPCODE(void)
{
- int val = program_decrypted_read_word(PC);
+ int val = memory_decrypted_read_word(t11.program, PC);
PC += 2;
return val;
}
@@ -296,6 +298,7 @@ static CPU_INIT( t11 )
t11.initial_pc = initial_pc[setup->mode >> 13];
t11.irq_callback = irqcallback;
t11.device = device;
+ t11.program = memory_find_address_space(device, ADDRESS_SPACE_PROGRAM);
state_save_register_item("t11", device->tag, 0, t11.ppc.w.l);
state_save_register_item("t11", device->tag, 0, t11.reg[0].w.l);
diff --git a/src/emu/cpu/t11/t11.h b/src/emu/cpu/t11/t11.h
index dbb8dcb1810..06204b4d08d 100644
--- a/src/emu/cpu/t11/t11.h
+++ b/src/emu/cpu/t11/t11.h
@@ -38,14 +38,14 @@ extern CPU_GET_INFO( t11 );
/****************************************************************************/
/* Read a byte from given memory location */
/****************************************************************************/
-#define T11_RDMEM(A) ((unsigned)program_read_byte_16le(A))
-#define T11_RDMEM_WORD(A) ((unsigned)program_read_word_16le(A))
+#define T11_RDMEM(A) ((unsigned)memory_read_byte_16le(t11.program, A))
+#define T11_RDMEM_WORD(A) ((unsigned)memory_read_word_16le(t11.program, A))
/****************************************************************************/
/* Write a byte to given memory location */
/****************************************************************************/
-#define T11_WRMEM(A,V) (program_write_byte_16le(A,V))
-#define T11_WRMEM_WORD(A,V) (program_write_word_16le(A,V))
+#define T11_WRMEM(A,V) (memory_write_byte_16le(t11.program, A,V))
+#define T11_WRMEM_WORD(A,V) (memory_write_word_16le(t11.program, A,V))
CPU_DISASSEMBLE( t11 );