diff options
author | 2008-11-22 19:29:29 +0000 | |
---|---|---|
committer | 2008-11-22 19:29:29 +0000 | |
commit | 8b675335b5b95c3805eb482b38ef30c6cc9b46cb (patch) | |
tree | 4d73b77f5c87417b0840c12a61bbbeb396ec9fdd /src/emu/cpu/konami | |
parent | 9ee2f770aa2c3f2dfbb9b6a65a689b68bc0aa4dd (diff) |
More conversion to the new memory functions.
And I will resist the urge to personally throttle those responsible
for copying and pasting the m6502 core 4 times. What a disaster.
Diffstat (limited to 'src/emu/cpu/konami')
-rw-r--r-- | src/emu/cpu/konami/konami.c | 3 | ||||
-rw-r--r-- | src/emu/cpu/konami/konami.h | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/emu/cpu/konami/konami.c b/src/emu/cpu/konami/konami.c index 0505955f80b..5c3db5ab29e 100644 --- a/src/emu/cpu/konami/konami.c +++ b/src/emu/cpu/konami/konami.c @@ -34,6 +34,7 @@ *****************************************************************************/ +#define NO_LEGACY_MEMORY_HANDLERS 1 #include "debugger.h" #include "konami.h" @@ -56,6 +57,7 @@ typedef struct int extra_cycles; /* cycles used up by interrupts */ cpu_irq_callback irq_callback; const device_config *device; + const address_space *program; UINT8 int_state; /* SYNC and CWAI flags */ UINT8 nmi_state; void (*setlines_callback)( int lines ); /* callback called when A16-A23 are set */ @@ -392,6 +394,7 @@ static CPU_INIT( konami ) { konami.irq_callback = irqcallback; konami.device = device; + konami.program = memory_find_address_space(device, ADDRESS_SPACE_PROGRAM); state_save_register_item("KONAMI", device->tag, 0, PC); state_save_register_item("KONAMI", device->tag, 0, U); diff --git a/src/emu/cpu/konami/konami.h b/src/emu/cpu/konami/konami.h index 3c05cc1e296..fee0f96ed5f 100644 --- a/src/emu/cpu/konami/konami.h +++ b/src/emu/cpu/konami/konami.h @@ -27,26 +27,26 @@ CPU_GET_INFO( konami ); /****************************************************************************/ /* Read a byte from given memory location */ /****************************************************************************/ -#define KONAMI_RDMEM(Addr) ((unsigned)program_read_byte_8be(Addr)) +#define KONAMI_RDMEM(Addr) ((unsigned)memory_read_byte_8be(konami.program, Addr)) /****************************************************************************/ /* Write a byte to given memory location */ /****************************************************************************/ -#define KONAMI_WRMEM(Addr,Value) (program_write_byte_8be(Addr,Value)) +#define KONAMI_WRMEM(Addr,Value) (memory_write_byte_8be(konami.program, Addr,Value)) /****************************************************************************/ /* Z80_RDOP() is identical to Z80_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 KONAMI_RDOP(Addr) ((unsigned)program_decrypted_read_byte(Addr)) +#define KONAMI_RDOP(Addr) ((unsigned)memory_decrypted_read_byte(konami.program, Addr)) /****************************************************************************/ /* Z80_RDOP_ARG() is identical to Z80_RDOP() except it is used for reading */ /* opcode arguments. This difference can be used to support systems that */ /* use different encoding mechanisms for opcodes and opcode arguments */ /****************************************************************************/ -#define KONAMI_RDOP_ARG(Addr) ((unsigned)program_raw_read_byte(Addr)) +#define KONAMI_RDOP_ARG(Addr) ((unsigned)memory_raw_read_byte(konami.program, Addr)) #ifndef FALSE # define FALSE 0 |