mirror of
https://github.com/holub/mame
synced 2025-05-20 20:58:51 +03:00
And the 6805 core.
This commit is contained in:
parent
5ca71f2d98
commit
0dcc155498
@ -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"
|
||||
|
@ -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;
|
||||
|
@ -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 );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user