mirror of
https://github.com/holub/mame
synced 2025-05-14 18:08:13 +03:00
Added CPU device parameters to all CPU callbacks except for the
context ones (which are going away), the disassembler (which should have no dependencies on the live CPU), and the validity check. Removed global token from all pointer-ified CPU cores that don't have internal read/write callbacks (which still need to reference it).
This commit is contained in:
parent
92f3053105
commit
6f4ee44948
@ -269,8 +269,6 @@ typedef struct
|
|||||||
PRIVATE GLOBAL VARIABLES
|
PRIVATE GLOBAL VARIABLES
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
static void *token;
|
|
||||||
|
|
||||||
static UINT16 *reverse_table = 0;
|
static UINT16 *reverse_table = 0;
|
||||||
static UINT16 *mask_table = 0;
|
static UINT16 *mask_table = 0;
|
||||||
static UINT8 *condition_table = 0;
|
static UINT8 *condition_table = 0;
|
||||||
@ -557,15 +555,6 @@ static CPU_GET_CONTEXT( adsp21xx )
|
|||||||
|
|
||||||
static CPU_SET_CONTEXT( adsp21xx )
|
static CPU_SET_CONTEXT( adsp21xx )
|
||||||
{
|
{
|
||||||
/* copy the context */
|
|
||||||
if (src)
|
|
||||||
{
|
|
||||||
adsp2100_state *adsp;
|
|
||||||
token = src;
|
|
||||||
adsp = token;
|
|
||||||
CHANGEPC(adsp);
|
|
||||||
check_irqs(adsp);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -578,8 +567,6 @@ static adsp2100_state *adsp21xx_init(const device_config *device, int index, int
|
|||||||
{
|
{
|
||||||
adsp2100_state *adsp = device->token;
|
adsp2100_state *adsp = device->token;
|
||||||
|
|
||||||
token = device->token; // temporary
|
|
||||||
|
|
||||||
/* create the tables */
|
/* create the tables */
|
||||||
if (!create_tables())
|
if (!create_tables())
|
||||||
fatalerror("creating adsp2100 tables failed");
|
fatalerror("creating adsp2100 tables failed");
|
||||||
@ -917,14 +904,15 @@ static CPU_EXECUTE( adsp21xx )
|
|||||||
int check_debugger = ((Machine->debug_flags & DEBUG_FLAG_ENABLED) != 0);
|
int check_debugger = ((Machine->debug_flags & DEBUG_FLAG_ENABLED) != 0);
|
||||||
adsp2100_state *adsp = device->token;
|
adsp2100_state *adsp = device->token;
|
||||||
|
|
||||||
|
CHANGEPC(adsp);
|
||||||
|
check_irqs(adsp);
|
||||||
|
|
||||||
/* reset the core */
|
/* reset the core */
|
||||||
set_mstat(adsp, adsp->mstat);
|
set_mstat(adsp, adsp->mstat);
|
||||||
|
|
||||||
/* count cycles and interrupt cycles */
|
/* count cycles and interrupt cycles */
|
||||||
adsp->icount = cycles;
|
adsp->icount = cycles;
|
||||||
|
|
||||||
CHANGEPC(adsp);
|
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
UINT32 temp;
|
UINT32 temp;
|
||||||
@ -1679,7 +1667,7 @@ extern CPU_DISASSEMBLE( adsp21xx );
|
|||||||
|
|
||||||
static CPU_SET_INFO( adsp21xx )
|
static CPU_SET_INFO( adsp21xx )
|
||||||
{
|
{
|
||||||
adsp2100_state *adsp = token;
|
adsp2100_state *adsp = device->token;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are set as 64-bit signed integers --- */
|
/* --- the following bits of info are set as 64-bit signed integers --- */
|
||||||
@ -1792,7 +1780,7 @@ static CPU_SET_INFO( adsp21xx )
|
|||||||
|
|
||||||
static CPU_GET_INFO( adsp21xx )
|
static CPU_GET_INFO( adsp21xx )
|
||||||
{
|
{
|
||||||
adsp2100_state *adsp = token;
|
adsp2100_state *adsp = (device != NULL) ? device->token : NULL;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
||||||
@ -2076,7 +2064,7 @@ static CPU_INIT( adsp2100 )
|
|||||||
|
|
||||||
static CPU_SET_INFO( adsp2100 )
|
static CPU_SET_INFO( adsp2100 )
|
||||||
{
|
{
|
||||||
adsp2100_state *adsp = token;
|
adsp2100_state *adsp = device->token;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are set as 64-bit signed integers --- */
|
/* --- the following bits of info are set as 64-bit signed integers --- */
|
||||||
@ -2093,7 +2081,7 @@ static CPU_SET_INFO( adsp2100 )
|
|||||||
|
|
||||||
CPU_GET_INFO( adsp2100 )
|
CPU_GET_INFO( adsp2100 )
|
||||||
{
|
{
|
||||||
adsp2100_state *adsp = token;
|
adsp2100_state *adsp = (device != NULL) ? device->token : NULL;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
||||||
@ -2134,7 +2122,7 @@ static CPU_INIT( adsp2101 )
|
|||||||
|
|
||||||
static CPU_SET_INFO( adsp2101 )
|
static CPU_SET_INFO( adsp2101 )
|
||||||
{
|
{
|
||||||
adsp2100_state *adsp = token;
|
adsp2100_state *adsp = device->token;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are set as 64-bit signed integers --- */
|
/* --- the following bits of info are set as 64-bit signed integers --- */
|
||||||
@ -2158,7 +2146,7 @@ static CPU_SET_INFO( adsp2101 )
|
|||||||
|
|
||||||
CPU_GET_INFO( adsp2101 )
|
CPU_GET_INFO( adsp2101 )
|
||||||
{
|
{
|
||||||
adsp2100_state *adsp = token;
|
adsp2100_state *adsp = (device != NULL) ? device->token : NULL;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
||||||
@ -2209,7 +2197,7 @@ void adsp2104_load_boot_data(UINT8 *srcdata, UINT32 *dstdata)
|
|||||||
|
|
||||||
static CPU_SET_INFO( adsp2104 )
|
static CPU_SET_INFO( adsp2104 )
|
||||||
{
|
{
|
||||||
adsp2100_state *adsp = token;
|
adsp2100_state *adsp = device->token;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are set as 64-bit signed integers --- */
|
/* --- the following bits of info are set as 64-bit signed integers --- */
|
||||||
@ -2233,7 +2221,7 @@ static CPU_SET_INFO( adsp2104 )
|
|||||||
|
|
||||||
CPU_GET_INFO( adsp2104 )
|
CPU_GET_INFO( adsp2104 )
|
||||||
{
|
{
|
||||||
adsp2100_state *adsp = token;
|
adsp2100_state *adsp = (device != NULL) ? device->token : NULL;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
||||||
@ -2284,7 +2272,7 @@ void adsp2105_load_boot_data(UINT8 *srcdata, UINT32 *dstdata)
|
|||||||
|
|
||||||
static CPU_SET_INFO( adsp2105 )
|
static CPU_SET_INFO( adsp2105 )
|
||||||
{
|
{
|
||||||
adsp2100_state *adsp = token;
|
adsp2100_state *adsp = device->token;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are set as 64-bit signed integers --- */
|
/* --- the following bits of info are set as 64-bit signed integers --- */
|
||||||
@ -2305,7 +2293,7 @@ static CPU_SET_INFO( adsp2105 )
|
|||||||
|
|
||||||
CPU_GET_INFO( adsp2105 )
|
CPU_GET_INFO( adsp2105 )
|
||||||
{
|
{
|
||||||
adsp2100_state *adsp = token;
|
adsp2100_state *adsp = (device != NULL) ? device->token : NULL;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
||||||
@ -2353,7 +2341,7 @@ void adsp2115_load_boot_data(UINT8 *srcdata, UINT32 *dstdata)
|
|||||||
|
|
||||||
static CPU_SET_INFO( adsp2115 )
|
static CPU_SET_INFO( adsp2115 )
|
||||||
{
|
{
|
||||||
adsp2100_state *adsp = token;
|
adsp2100_state *adsp = device->token;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are set as 64-bit signed integers --- */
|
/* --- the following bits of info are set as 64-bit signed integers --- */
|
||||||
@ -2377,7 +2365,7 @@ static CPU_SET_INFO( adsp2115 )
|
|||||||
|
|
||||||
CPU_GET_INFO( adsp2115 )
|
CPU_GET_INFO( adsp2115 )
|
||||||
{
|
{
|
||||||
adsp2100_state *adsp = token;
|
adsp2100_state *adsp = (device != NULL) ? device->token : NULL;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
||||||
@ -2428,7 +2416,7 @@ void adsp2181_load_boot_data(UINT8 *srcdata, UINT32 *dstdata)
|
|||||||
|
|
||||||
static CPU_SET_INFO( adsp2181 )
|
static CPU_SET_INFO( adsp2181 )
|
||||||
{
|
{
|
||||||
adsp2100_state *adsp = token;
|
adsp2100_state *adsp = device->token;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are set as 64-bit signed integers --- */
|
/* --- the following bits of info are set as 64-bit signed integers --- */
|
||||||
@ -2455,7 +2443,7 @@ static CPU_SET_INFO( adsp2181 )
|
|||||||
|
|
||||||
CPU_GET_INFO( adsp2181 )
|
CPU_GET_INFO( adsp2181 )
|
||||||
{
|
{
|
||||||
adsp2100_state *adsp = token;
|
adsp2100_state *adsp = (device != NULL) ? device->token : NULL;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
||||||
@ -2491,22 +2479,22 @@ CPU_GET_INFO( adsp2181 )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void adsp2181_idma_addr_w(UINT16 data)
|
void adsp2181_idma_addr_w(const device_config *device, UINT16 data)
|
||||||
{
|
{
|
||||||
adsp2100_state *adsp = token;
|
adsp2100_state *adsp = device->token;
|
||||||
adsp->idma_addr = data;
|
adsp->idma_addr = data;
|
||||||
adsp->idma_offs = 0;
|
adsp->idma_offs = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT16 adsp2181_idma_addr_r(void)
|
UINT16 adsp2181_idma_addr_r(const device_config *device)
|
||||||
{
|
{
|
||||||
adsp2100_state *adsp = token;
|
adsp2100_state *adsp = device->token;
|
||||||
return adsp->idma_addr;
|
return adsp->idma_addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void adsp2181_idma_data_w(UINT16 data)
|
void adsp2181_idma_data_w(const device_config *device, UINT16 data)
|
||||||
{
|
{
|
||||||
adsp2100_state *adsp = token;
|
adsp2100_state *adsp = device->token;
|
||||||
|
|
||||||
/* program memory? */
|
/* program memory? */
|
||||||
if (!(adsp->idma_addr & 0x4000))
|
if (!(adsp->idma_addr & 0x4000))
|
||||||
@ -2531,9 +2519,9 @@ void adsp2181_idma_data_w(UINT16 data)
|
|||||||
WWORD_DATA(adsp->idma_addr++ & 0x3fff, data);
|
WWORD_DATA(adsp->idma_addr++ & 0x3fff, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT16 adsp2181_idma_data_r(void)
|
UINT16 adsp2181_idma_data_r(const device_config *device)
|
||||||
{
|
{
|
||||||
adsp2100_state *adsp = token;
|
adsp2100_state *adsp = device->token;
|
||||||
UINT16 result = 0xffff;
|
UINT16 result = 0xffff;
|
||||||
|
|
||||||
/* program memory? */
|
/* program memory? */
|
||||||
|
@ -157,10 +157,10 @@ extern void adsp2115_load_boot_data(UINT8 *srcdata, UINT32 *dstdata);
|
|||||||
|
|
||||||
extern CPU_GET_INFO( adsp2181 );
|
extern CPU_GET_INFO( adsp2181 );
|
||||||
extern void adsp2181_load_boot_data(UINT8 *srcdata, UINT32 *dstdata);
|
extern void adsp2181_load_boot_data(UINT8 *srcdata, UINT32 *dstdata);
|
||||||
extern void adsp2181_idma_addr_w(UINT16 data);
|
extern void adsp2181_idma_addr_w(const device_config *device, UINT16 data);
|
||||||
extern UINT16 adsp2181_idma_addr_r(void);
|
extern UINT16 adsp2181_idma_addr_r(const device_config *device);
|
||||||
extern void adsp2181_idma_data_w(UINT16 data);
|
extern void adsp2181_idma_data_w(const device_config *device, UINT16 data);
|
||||||
extern UINT16 adsp2181_idma_data_r(void);
|
extern UINT16 adsp2181_idma_data_r(const device_config *device);
|
||||||
#endif /* (HAS_ADSP2181) */
|
#endif /* (HAS_ADSP2181) */
|
||||||
|
|
||||||
#endif /* __ADSP2100_H__ */
|
#endif /* __ADSP2100_H__ */
|
||||||
|
@ -56,6 +56,7 @@ struct _drcfe_state
|
|||||||
void * param; /* parameter for the callback */
|
void * param; /* parameter for the callback */
|
||||||
|
|
||||||
/* CPU parameters */
|
/* CPU parameters */
|
||||||
|
const device_config *device; /* CPU device object */
|
||||||
offs_t pageshift; /* shift to convert address to a page index */
|
offs_t pageshift; /* shift to convert address to a page index */
|
||||||
cpu_translate_func translate; /* pointer to translation function */
|
cpu_translate_func translate; /* pointer to translation function */
|
||||||
offs_t codexor; /* XOR to reach code */
|
offs_t codexor; /* XOR to reach code */
|
||||||
@ -142,6 +143,7 @@ drcfe_state *drcfe_init(const device_config *cpu, const drcfe_config *config, vo
|
|||||||
drcfe->param = param;
|
drcfe->param = param;
|
||||||
|
|
||||||
/* initialize the state */
|
/* initialize the state */
|
||||||
|
drcfe->device = cpu;
|
||||||
drcfe->pageshift = cpu_get_page_shift(cpu, ADDRESS_SPACE_PROGRAM);
|
drcfe->pageshift = cpu_get_page_shift(cpu, ADDRESS_SPACE_PROGRAM);
|
||||||
drcfe->translate = (cpu_translate_func)cpu_get_info_fct(cpu, CPUINFO_PTR_TRANSLATE);
|
drcfe->translate = (cpu_translate_func)cpu_get_info_fct(cpu, CPUINFO_PTR_TRANSLATE);
|
||||||
#ifdef LSB_FIRST
|
#ifdef LSB_FIRST
|
||||||
@ -288,7 +290,7 @@ static opcode_desc *describe_one(drcfe_state *drcfe, offs_t curpc, const opcode_
|
|||||||
desc->targetpc = BRANCH_TARGET_DYNAMIC;
|
desc->targetpc = BRANCH_TARGET_DYNAMIC;
|
||||||
|
|
||||||
/* compute the physical PC */
|
/* compute the physical PC */
|
||||||
if (drcfe->translate != NULL && !(*drcfe->translate)(ADDRESS_SPACE_PROGRAM, TRANSLATE_FETCH, &desc->physpc))
|
if (drcfe->translate != NULL && !(*drcfe->translate)(drcfe->device, ADDRESS_SPACE_PROGRAM, TRANSLATE_FETCH, &desc->physpc))
|
||||||
{
|
{
|
||||||
/* uh-oh: a page fault; leave the description empty and just if this is the first instruction, leave it empty and */
|
/* uh-oh: a page fault; leave the description empty and just if this is the first instruction, leave it empty and */
|
||||||
/* mark as needing to validate; otherwise, just end the sequence here */
|
/* mark as needing to validate; otherwise, just end the sequence here */
|
||||||
|
@ -141,8 +141,6 @@ struct _upi41_state_t {
|
|||||||
int icount;
|
int icount;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void *token;
|
|
||||||
|
|
||||||
#define RM(a) program_read_byte_8le(a)
|
#define RM(a) program_read_byte_8le(a)
|
||||||
|
|
||||||
#define IRAM_R(a) data_read_byte_8le((a) & upi41_state->ram_mask)
|
#define IRAM_R(a) data_read_byte_8le((a) & upi41_state->ram_mask)
|
||||||
@ -840,8 +838,6 @@ static CPU_INIT( i8x41 )
|
|||||||
{
|
{
|
||||||
upi41_state_t *upi41_state = device->token;
|
upi41_state_t *upi41_state = device->token;
|
||||||
|
|
||||||
token = device->token;
|
|
||||||
|
|
||||||
upi41_state->irq_callback = irqcallback;
|
upi41_state->irq_callback = irqcallback;
|
||||||
upi41_state->device = device;
|
upi41_state->device = device;
|
||||||
upi41_state->subtype = 8041;
|
upi41_state->subtype = 8041;
|
||||||
@ -866,9 +862,8 @@ static CPU_INIT( i8x41 )
|
|||||||
|
|
||||||
static CPU_INIT( i8042 )
|
static CPU_INIT( i8042 )
|
||||||
{
|
{
|
||||||
upi41_state_t *upi41_state;
|
upi41_state_t *upi41_state = device->token;
|
||||||
CPU_INIT_CALL(i8x41);
|
CPU_INIT_CALL(i8x41);
|
||||||
upi41_state = token;
|
|
||||||
upi41_state->subtype = 8042;
|
upi41_state->subtype = 8042;
|
||||||
upi41_state->ram_mask = I8X42_intRAM_MASK;
|
upi41_state->ram_mask = I8X42_intRAM_MASK;
|
||||||
}
|
}
|
||||||
@ -1023,7 +1018,6 @@ static CPU_GET_CONTEXT( i8x41 )
|
|||||||
|
|
||||||
static CPU_SET_CONTEXT( i8x41 )
|
static CPU_SET_CONTEXT( i8x41 )
|
||||||
{
|
{
|
||||||
token = src;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -1103,7 +1097,7 @@ ADDRESS_MAP_END
|
|||||||
|
|
||||||
static CPU_SET_INFO( i8x41 )
|
static CPU_SET_INFO( i8x41 )
|
||||||
{
|
{
|
||||||
upi41_state_t *upi41_state = token;
|
upi41_state_t *upi41_state = device->token;
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
@ -1195,7 +1189,7 @@ static CPU_SET_INFO( i8x41 )
|
|||||||
|
|
||||||
CPU_GET_INFO( i8041 )
|
CPU_GET_INFO( i8041 )
|
||||||
{
|
{
|
||||||
upi41_state_t *upi41_state = token;
|
upi41_state_t *upi41_state = (device != NULL) ? device->token : NULL;
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
|
@ -39,8 +39,6 @@ struct _i960_state_t {
|
|||||||
int icount;
|
int icount;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void *token;
|
|
||||||
|
|
||||||
static void do_call(i960_state_t *i960_state, UINT32 adr, int type, UINT32 stack);
|
static void do_call(i960_state_t *i960_state, UINT32 adr, int type, UINT32 stack);
|
||||||
|
|
||||||
INLINE UINT32 i960_read_dword_unaligned(UINT32 address)
|
INLINE UINT32 i960_read_dword_unaligned(UINT32 address)
|
||||||
@ -1954,8 +1952,8 @@ INLINE void execute_op(i960_state_t *i960_state, UINT32 opcode)
|
|||||||
|
|
||||||
static CPU_EXECUTE( i960 )
|
static CPU_EXECUTE( i960 )
|
||||||
{
|
{
|
||||||
UINT32 opcode;
|
|
||||||
i960_state_t *i960_state = device->token;
|
i960_state_t *i960_state = device->token;
|
||||||
|
UINT32 opcode;
|
||||||
|
|
||||||
i960_state->icount = cycles;
|
i960_state->icount = cycles;
|
||||||
check_irqs(i960_state);
|
check_irqs(i960_state);
|
||||||
@ -1979,7 +1977,6 @@ static CPU_GET_CONTEXT( i960 )
|
|||||||
|
|
||||||
static CPU_SET_CONTEXT( i960 )
|
static CPU_SET_CONTEXT( i960 )
|
||||||
{
|
{
|
||||||
token = src;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_irq_line(i960_state_t *i960_state, int irqline, int state)
|
static void set_irq_line(i960_state_t *i960_state, int irqline, int state)
|
||||||
@ -2052,7 +2049,7 @@ static void set_irq_line(i960_state_t *i960_state, int irqline, int state)
|
|||||||
|
|
||||||
static CPU_SET_INFO( i960 )
|
static CPU_SET_INFO( i960 )
|
||||||
{
|
{
|
||||||
i960_state_t *i960_state = token;
|
i960_state_t *i960_state = device->token;
|
||||||
|
|
||||||
if(state >= CPUINFO_INT_REGISTER+I960_R0 && state <= CPUINFO_INT_REGISTER + I960_G15) {
|
if(state >= CPUINFO_INT_REGISTER+I960_R0 && state <= CPUINFO_INT_REGISTER + I960_G15) {
|
||||||
i960_state->r[state - (CPUINFO_INT_REGISTER + I960_R0)] = info->i;
|
i960_state->r[state - (CPUINFO_INT_REGISTER + I960_R0)] = info->i;
|
||||||
@ -2079,8 +2076,6 @@ static CPU_INIT( i960 )
|
|||||||
i960_state->irq_cb = irqcallback;
|
i960_state->irq_cb = irqcallback;
|
||||||
i960_state->device = device;
|
i960_state->device = device;
|
||||||
|
|
||||||
token = device->token;
|
|
||||||
|
|
||||||
state_save_register_item("i960", index, i960_state->PIP);
|
state_save_register_item("i960", index, i960_state->PIP);
|
||||||
state_save_register_item("i960", index, i960_state->SAT);
|
state_save_register_item("i960", index, i960_state->SAT);
|
||||||
state_save_register_item("i960", index, i960_state->PRCB);
|
state_save_register_item("i960", index, i960_state->PRCB);
|
||||||
@ -2129,7 +2124,7 @@ static CPU_RESET( i960 )
|
|||||||
|
|
||||||
CPU_GET_INFO( i960 )
|
CPU_GET_INFO( i960 )
|
||||||
{
|
{
|
||||||
i960_state_t *i960_state = token;
|
i960_state_t *i960_state = (device != NULL) ? device->token : NULL;
|
||||||
|
|
||||||
if(state >= CPUINFO_INT_REGISTER+I960_R0 && state <= CPUINFO_INT_REGISTER + I960_G15) {
|
if(state >= CPUINFO_INT_REGISTER+I960_R0 && state <= CPUINFO_INT_REGISTER + I960_G15) {
|
||||||
info->i = i960_state->r[state - (CPUINFO_INT_REGISTER + I960_R0)];
|
info->i = i960_state->r[state - (CPUINFO_INT_REGISTER + I960_R0)];
|
||||||
@ -2242,14 +2237,14 @@ CPU_GET_INFO( i960 )
|
|||||||
|
|
||||||
// call from any read/write handler for a memory area that can't be bursted
|
// call from any read/write handler for a memory area that can't be bursted
|
||||||
// on the real hardware (e.g. Model 2's interrupt control registers)
|
// on the real hardware (e.g. Model 2's interrupt control registers)
|
||||||
void i960_noburst(void)
|
void i960_noburst(const device_config *device)
|
||||||
{
|
{
|
||||||
i960_state_t *i960_state = token;
|
i960_state_t *i960_state = device->token;
|
||||||
i960_state->bursting = 0;
|
i960_state->bursting = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void i960_stall(void)
|
void i960_stall(const device_config *device)
|
||||||
{
|
{
|
||||||
i960_state_t *i960_state = token;
|
i960_state_t *i960_state = device->token;
|
||||||
i960_state->IP = i960_state->PIP;
|
i960_state->IP = i960_state->PIP;
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ enum
|
|||||||
};
|
};
|
||||||
|
|
||||||
CPU_GET_INFO( i960 );
|
CPU_GET_INFO( i960 );
|
||||||
void i960_noburst(void);
|
void i960_noburst(const device_config *device);
|
||||||
void i960_stall(void);
|
void i960_stall(const device_config *device);
|
||||||
|
|
||||||
#endif /* __I960_H__ */
|
#endif /* __I960_H__ */
|
||||||
|
@ -275,7 +275,7 @@ INLINE void m4510_take_irq(m4510_Regs *m4510)
|
|||||||
|
|
||||||
static CPU_EXECUTE( m4510 )
|
static CPU_EXECUTE( m4510 )
|
||||||
{
|
{
|
||||||
m4510_Regs *m4510 = token;
|
m4510_Regs *m4510 = device->token;
|
||||||
|
|
||||||
m4510->icount = cycles;
|
m4510->icount = cycles;
|
||||||
|
|
||||||
@ -399,7 +399,7 @@ ADDRESS_MAP_END
|
|||||||
|
|
||||||
static CPU_TRANSLATE( m4510 )
|
static CPU_TRANSLATE( m4510 )
|
||||||
{
|
{
|
||||||
m4510_Regs *m4510 = token;
|
m4510_Regs *m4510 = device->token;
|
||||||
|
|
||||||
if (space == ADDRESS_SPACE_PROGRAM)
|
if (space == ADDRESS_SPACE_PROGRAM)
|
||||||
*address = M4510_MEM(*address);
|
*address = M4510_MEM(*address);
|
||||||
@ -412,7 +412,7 @@ static CPU_TRANSLATE( m4510 )
|
|||||||
|
|
||||||
static CPU_SET_INFO( m4510 )
|
static CPU_SET_INFO( m4510 )
|
||||||
{
|
{
|
||||||
m4510_Regs *m4510 = token;
|
m4510_Regs *m4510 = device->token;
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
@ -459,7 +459,7 @@ static CPU_SET_INFO( m4510 )
|
|||||||
|
|
||||||
CPU_GET_INFO( m4510 )
|
CPU_GET_INFO( m4510 )
|
||||||
{
|
{
|
||||||
m4510_Regs *m4510 = token;
|
m4510_Regs *m4510 = (device != NULL) ? device->token : NULL;
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
|
@ -345,9 +345,9 @@ static CPU_INIT( n2a03 )
|
|||||||
Bit 7 of address $4011 (the PSG's DPCM control register), when set,
|
Bit 7 of address $4011 (the PSG's DPCM control register), when set,
|
||||||
causes an IRQ to be generated. This function allows the IRQ to be called
|
causes an IRQ to be generated. This function allows the IRQ to be called
|
||||||
from the PSG core when such an occasion arises. */
|
from the PSG core when such an occasion arises. */
|
||||||
void n2a03_irq()
|
void n2a03_irq(const device_config *device)
|
||||||
{
|
{
|
||||||
m6502_Regs *m6502 = token;
|
m6502_Regs *m6502 = device->token;
|
||||||
|
|
||||||
m6502_take_irq(m6502);
|
m6502_take_irq(m6502);
|
||||||
}
|
}
|
||||||
@ -692,7 +692,7 @@ static CPU_EXECUTE( deco16 )
|
|||||||
|
|
||||||
static CPU_SET_INFO( m6502 )
|
static CPU_SET_INFO( m6502 )
|
||||||
{
|
{
|
||||||
m6502_Regs *m6502 = token;
|
m6502_Regs *m6502 = device->token;
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
@ -726,7 +726,7 @@ static CPU_SET_INFO( m6502 )
|
|||||||
|
|
||||||
CPU_GET_INFO( m6502 )
|
CPU_GET_INFO( m6502 )
|
||||||
{
|
{
|
||||||
m6502_Regs *m6502 = token;
|
m6502_Regs *m6502 = (device != NULL) ? device->token : NULL;
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
@ -843,7 +843,7 @@ CPU_GET_INFO( n2a03 )
|
|||||||
|
|
||||||
static CPU_SET_INFO( m6510 )
|
static CPU_SET_INFO( m6510 )
|
||||||
{
|
{
|
||||||
m6502_Regs *m6502 = token;
|
m6502_Regs *m6502 = device->token;
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
@ -857,7 +857,7 @@ static CPU_SET_INFO( m6510 )
|
|||||||
|
|
||||||
CPU_GET_INFO( m6510 )
|
CPU_GET_INFO( m6510 )
|
||||||
{
|
{
|
||||||
m6502_Regs *m6502 = token;
|
m6502_Regs *m6502 = (device != NULL) ? device->token : NULL;
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
@ -943,7 +943,7 @@ CPU_GET_INFO( m8502 )
|
|||||||
|
|
||||||
static CPU_SET_INFO( m65c02 )
|
static CPU_SET_INFO( m65c02 )
|
||||||
{
|
{
|
||||||
m6502_Regs *m6502 = token;
|
m6502_Regs *m6502 = device->token;
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
@ -1007,7 +1007,7 @@ CPU_GET_INFO( m65sc02 )
|
|||||||
|
|
||||||
static CPU_SET_INFO( deco16 )
|
static CPU_SET_INFO( deco16 )
|
||||||
{
|
{
|
||||||
m6502_Regs *m6502 = token;
|
m6502_Regs *m6502 = device->token;
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
|
@ -177,7 +177,7 @@ extern CPU_GET_INFO( n2a03 );
|
|||||||
Bit 7 of address $4011 (the PSG's DPCM control register), when set,
|
Bit 7 of address $4011 (the PSG's DPCM control register), when set,
|
||||||
causes an IRQ to be generated. This function allows the IRQ to be called
|
causes an IRQ to be generated. This function allows the IRQ to be called
|
||||||
from the PSG core when such an occasion arises. */
|
from the PSG core when such an occasion arises. */
|
||||||
extern void n2a03_irq(void);
|
extern void n2a03_irq(const device_config *device);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -313,7 +313,7 @@ static void m6509_set_irq_line(m6509_Regs *m6509, int irqline, int state)
|
|||||||
|
|
||||||
static CPU_SET_INFO( m6509 )
|
static CPU_SET_INFO( m6509 )
|
||||||
{
|
{
|
||||||
m6509_Regs *m6509 = token;
|
m6509_Regs *m6509 = device->token;
|
||||||
m6509_Regs *m6502 = m6509;
|
m6509_Regs *m6502 = m6509;
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
@ -350,7 +350,7 @@ static CPU_SET_INFO( m6509 )
|
|||||||
|
|
||||||
CPU_GET_INFO( m6509 )
|
CPU_GET_INFO( m6509 )
|
||||||
{
|
{
|
||||||
m6509_Regs *m6502 = token;
|
m6509_Regs *m6502 = (device != NULL) ? device->token : NULL;
|
||||||
m6509_Regs *m6509 = m6502;
|
m6509_Regs *m6509 = m6502;
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
|
@ -5,8 +5,6 @@
|
|||||||
|
|
||||||
/* global access */
|
/* global access */
|
||||||
|
|
||||||
static void *token;
|
|
||||||
|
|
||||||
m68k_memory_interface m68k_memory_intf;
|
m68k_memory_interface m68k_memory_intf;
|
||||||
offs_t m68k_encrypted_opcode_start[MAX_CPU];
|
offs_t m68k_encrypted_opcode_start[MAX_CPU];
|
||||||
offs_t m68k_encrypted_opcode_end[MAX_CPU];
|
offs_t m68k_encrypted_opcode_end[MAX_CPU];
|
||||||
@ -156,7 +154,6 @@ static void set_irq_line(m68ki_cpu_core *m68k, int irqline, int state)
|
|||||||
static CPU_INIT( m68000 )
|
static CPU_INIT( m68000 )
|
||||||
{
|
{
|
||||||
m68ki_cpu_core *m68k = device->token;
|
m68ki_cpu_core *m68k = device->token;
|
||||||
token = device->token; // temporary
|
|
||||||
m68k_init(m68k);
|
m68k_init(m68k);
|
||||||
m68k_set_cpu_type(m68k, M68K_CPU_TYPE_68000);
|
m68k_set_cpu_type(m68k, M68K_CPU_TYPE_68000);
|
||||||
m68k_memory_intf = interface_d16;
|
m68k_memory_intf = interface_d16;
|
||||||
@ -187,7 +184,6 @@ static CPU_SET_CONTEXT( m68000 )
|
|||||||
{
|
{
|
||||||
if (m68k_memory_intf.read8 != program_read_byte_16be)
|
if (m68k_memory_intf.read8 != program_read_byte_16be)
|
||||||
m68k_memory_intf = interface_d16;
|
m68k_memory_intf = interface_d16;
|
||||||
token = src;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static CPU_DISASSEMBLE( m68000 )
|
static CPU_DISASSEMBLE( m68000 )
|
||||||
@ -203,7 +199,6 @@ static CPU_DISASSEMBLE( m68000 )
|
|||||||
static CPU_INIT( m68008 )
|
static CPU_INIT( m68008 )
|
||||||
{
|
{
|
||||||
m68ki_cpu_core *m68k = device->token;
|
m68ki_cpu_core *m68k = device->token;
|
||||||
token = device->token; // temporary
|
|
||||||
m68k_init(m68k);
|
m68k_init(m68k);
|
||||||
m68k_set_cpu_type(m68k, M68K_CPU_TYPE_68008);
|
m68k_set_cpu_type(m68k, M68K_CPU_TYPE_68008);
|
||||||
m68k_memory_intf = interface_d8;
|
m68k_memory_intf = interface_d8;
|
||||||
@ -234,7 +229,6 @@ static CPU_SET_CONTEXT( m68008 )
|
|||||||
{
|
{
|
||||||
if (m68k_memory_intf.read8 != program_read_byte_8be)
|
if (m68k_memory_intf.read8 != program_read_byte_8be)
|
||||||
m68k_memory_intf = interface_d8;
|
m68k_memory_intf = interface_d8;
|
||||||
token = src;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static CPU_DISASSEMBLE( m68008 )
|
static CPU_DISASSEMBLE( m68008 )
|
||||||
@ -252,7 +246,6 @@ static CPU_DISASSEMBLE( m68008 )
|
|||||||
static CPU_INIT( m68010 )
|
static CPU_INIT( m68010 )
|
||||||
{
|
{
|
||||||
m68ki_cpu_core *m68k = device->token;
|
m68ki_cpu_core *m68k = device->token;
|
||||||
token = device->token; // temporary
|
|
||||||
m68k_init(m68k);
|
m68k_init(m68k);
|
||||||
m68k_set_cpu_type(m68k, M68K_CPU_TYPE_68010);
|
m68k_set_cpu_type(m68k, M68K_CPU_TYPE_68010);
|
||||||
m68k_memory_intf = interface_d16;
|
m68k_memory_intf = interface_d16;
|
||||||
@ -274,7 +267,6 @@ static CPU_DISASSEMBLE( m68010 )
|
|||||||
static CPU_INIT( m68020 )
|
static CPU_INIT( m68020 )
|
||||||
{
|
{
|
||||||
m68ki_cpu_core *m68k = device->token;
|
m68ki_cpu_core *m68k = device->token;
|
||||||
token = device->token; // temporary
|
|
||||||
m68k_init(m68k);
|
m68k_init(m68k);
|
||||||
m68k_set_cpu_type(m68k, M68K_CPU_TYPE_68020);
|
m68k_set_cpu_type(m68k, M68K_CPU_TYPE_68020);
|
||||||
m68k_memory_intf = interface_d32;
|
m68k_memory_intf = interface_d32;
|
||||||
@ -305,7 +297,6 @@ static CPU_SET_CONTEXT( m68020 )
|
|||||||
{
|
{
|
||||||
if (m68k_memory_intf.read8 != program_read_byte_32be)
|
if (m68k_memory_intf.read8 != program_read_byte_32be)
|
||||||
m68k_memory_intf = interface_d32;
|
m68k_memory_intf = interface_d32;
|
||||||
token = src;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static CPU_DISASSEMBLE( m68020 )
|
static CPU_DISASSEMBLE( m68020 )
|
||||||
@ -322,7 +313,6 @@ static CPU_DISASSEMBLE( m68020 )
|
|||||||
static CPU_INIT( m68ec020 )
|
static CPU_INIT( m68ec020 )
|
||||||
{
|
{
|
||||||
m68ki_cpu_core *m68k = device->token;
|
m68ki_cpu_core *m68k = device->token;
|
||||||
token = device->token; // temporary
|
|
||||||
m68k_init(m68k);
|
m68k_init(m68k);
|
||||||
m68k_set_cpu_type(m68k, M68K_CPU_TYPE_68EC020);
|
m68k_set_cpu_type(m68k, M68K_CPU_TYPE_68EC020);
|
||||||
m68k_memory_intf = interface_d32;
|
m68k_memory_intf = interface_d32;
|
||||||
@ -345,7 +335,6 @@ static CPU_DISASSEMBLE( m68ec020 )
|
|||||||
static CPU_INIT( m68040 )
|
static CPU_INIT( m68040 )
|
||||||
{
|
{
|
||||||
m68ki_cpu_core *m68k = device->token;
|
m68ki_cpu_core *m68k = device->token;
|
||||||
token = device->token; // temporary
|
|
||||||
m68k_init(m68k);
|
m68k_init(m68k);
|
||||||
m68k_set_cpu_type(m68k, M68K_CPU_TYPE_68040);
|
m68k_set_cpu_type(m68k, M68K_CPU_TYPE_68040);
|
||||||
m68k_memory_intf = interface_d32;
|
m68k_memory_intf = interface_d32;
|
||||||
@ -376,7 +365,6 @@ static CPU_SET_CONTEXT( m68040 )
|
|||||||
{
|
{
|
||||||
if (m68k_memory_intf.read8 != program_read_byte_32be)
|
if (m68k_memory_intf.read8 != program_read_byte_32be)
|
||||||
m68k_memory_intf = interface_d32;
|
m68k_memory_intf = interface_d32;
|
||||||
token = src;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static CPU_DISASSEMBLE( m68040 )
|
static CPU_DISASSEMBLE( m68040 )
|
||||||
@ -392,7 +380,7 @@ static CPU_DISASSEMBLE( m68040 )
|
|||||||
|
|
||||||
static CPU_SET_INFO( m68000 )
|
static CPU_SET_INFO( m68000 )
|
||||||
{
|
{
|
||||||
m68ki_cpu_core *m68k = token;
|
m68ki_cpu_core *m68k = device->token;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are set as 64-bit signed integers --- */
|
/* --- the following bits of info are set as 64-bit signed integers --- */
|
||||||
@ -444,7 +432,7 @@ static CPU_SET_INFO( m68000 )
|
|||||||
|
|
||||||
CPU_GET_INFO( m68000 )
|
CPU_GET_INFO( m68000 )
|
||||||
{
|
{
|
||||||
m68ki_cpu_core *m68k = token;
|
m68ki_cpu_core *m68k = (device != NULL) ? device->token : NULL;
|
||||||
int sr;
|
int sr;
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
@ -578,7 +566,7 @@ CPU_GET_INFO( m68000 )
|
|||||||
|
|
||||||
static CPU_SET_INFO( m68008 )
|
static CPU_SET_INFO( m68008 )
|
||||||
{
|
{
|
||||||
m68ki_cpu_core *m68k = token;
|
m68ki_cpu_core *m68k = device->token;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are set as 64-bit signed integers --- */
|
/* --- the following bits of info are set as 64-bit signed integers --- */
|
||||||
@ -624,7 +612,7 @@ static CPU_SET_INFO( m68008 )
|
|||||||
|
|
||||||
CPU_GET_INFO( m68008 )
|
CPU_GET_INFO( m68008 )
|
||||||
{
|
{
|
||||||
m68ki_cpu_core *m68k = token;
|
m68ki_cpu_core *m68k = (device != NULL) ? device->token : NULL;
|
||||||
int sr;
|
int sr;
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
@ -763,7 +751,7 @@ CPU_GET_INFO( m68008 )
|
|||||||
|
|
||||||
static CPU_SET_INFO( m68010 )
|
static CPU_SET_INFO( m68010 )
|
||||||
{
|
{
|
||||||
m68ki_cpu_core *m68k = token;
|
m68ki_cpu_core *m68k = device->token;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are set as 64-bit signed integers --- */
|
/* --- the following bits of info are set as 64-bit signed integers --- */
|
||||||
@ -777,7 +765,7 @@ static CPU_SET_INFO( m68010 )
|
|||||||
|
|
||||||
CPU_GET_INFO( m68010 )
|
CPU_GET_INFO( m68010 )
|
||||||
{
|
{
|
||||||
m68ki_cpu_core *m68k = token;
|
m68ki_cpu_core *m68k = (device != NULL) ? device->token : NULL;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
||||||
@ -808,7 +796,7 @@ CPU_GET_INFO( m68010 )
|
|||||||
|
|
||||||
static CPU_SET_INFO( m68020 )
|
static CPU_SET_INFO( m68020 )
|
||||||
{
|
{
|
||||||
m68ki_cpu_core *m68k = token;
|
m68ki_cpu_core *m68k = device->token;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are set as 64-bit signed integers --- */
|
/* --- the following bits of info are set as 64-bit signed integers --- */
|
||||||
@ -860,7 +848,7 @@ static CPU_SET_INFO( m68020 )
|
|||||||
|
|
||||||
CPU_GET_INFO( m68020 )
|
CPU_GET_INFO( m68020 )
|
||||||
{
|
{
|
||||||
m68ki_cpu_core *m68k = token;
|
m68ki_cpu_core *m68k = (device != NULL) ? device->token : NULL;
|
||||||
int sr;
|
int sr;
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
@ -1010,7 +998,7 @@ CPU_GET_INFO( m68020 )
|
|||||||
|
|
||||||
static CPU_SET_INFO( m68ec020 )
|
static CPU_SET_INFO( m68ec020 )
|
||||||
{
|
{
|
||||||
m68ki_cpu_core *m68k = token;
|
m68ki_cpu_core *m68k = device->token;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are set as 64-bit signed integers --- */
|
/* --- the following bits of info are set as 64-bit signed integers --- */
|
||||||
@ -1022,7 +1010,7 @@ static CPU_SET_INFO( m68ec020 )
|
|||||||
|
|
||||||
CPU_GET_INFO( m68ec020 )
|
CPU_GET_INFO( m68ec020 )
|
||||||
{
|
{
|
||||||
m68ki_cpu_core *m68k = token;
|
m68ki_cpu_core *m68k = (device != NULL) ? device->token : NULL;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
||||||
@ -1050,7 +1038,7 @@ CPU_GET_INFO( m68ec020 )
|
|||||||
#if HAS_M68040
|
#if HAS_M68040
|
||||||
static CPU_SET_INFO( m68040 )
|
static CPU_SET_INFO( m68040 )
|
||||||
{
|
{
|
||||||
m68ki_cpu_core *m68k = token;
|
m68ki_cpu_core *m68k = device->token;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are set as 64-bit signed integers --- */
|
/* --- the following bits of info are set as 64-bit signed integers --- */
|
||||||
@ -1102,7 +1090,7 @@ static CPU_SET_INFO( m68040 )
|
|||||||
|
|
||||||
CPU_GET_INFO( m68040 )
|
CPU_GET_INFO( m68040 )
|
||||||
{
|
{
|
||||||
m68ki_cpu_core *m68k = token;
|
m68ki_cpu_core *m68k = (device != NULL) ? device->token : NULL;
|
||||||
int sr;
|
int sr;
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
|
@ -170,12 +170,6 @@ struct _mcs48_opcode
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************
|
|
||||||
GLOBAL VARIABLES
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
static void *token;
|
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
FUNCTION PROTOTYPES
|
FUNCTION PROTOTYPES
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
@ -703,8 +697,6 @@ static void mcs48_init(const device_config *device, int index, int clock, cpu_ir
|
|||||||
{
|
{
|
||||||
mcs48_state *mcs48 = device->token;
|
mcs48_state *mcs48 = device->token;
|
||||||
|
|
||||||
token = device->token; // temporary
|
|
||||||
|
|
||||||
/* External access line
|
/* External access line
|
||||||
* EA=1 : read from external rom
|
* EA=1 : read from external rom
|
||||||
* EA=0 : read from internal rom
|
* EA=0 : read from internal rom
|
||||||
@ -925,6 +917,9 @@ static CPU_EXECUTE( mcs48 )
|
|||||||
mcs48_state *mcs48 = device->token;
|
mcs48_state *mcs48 = device->token;
|
||||||
unsigned opcode;
|
unsigned opcode;
|
||||||
|
|
||||||
|
update_regptr(mcs48);
|
||||||
|
change_pc(PC);
|
||||||
|
|
||||||
mcs48->icount = cycles;
|
mcs48->icount = cycles;
|
||||||
|
|
||||||
/* external interrupts may have been set since we last checked */
|
/* external interrupts may have been set since we last checked */
|
||||||
@ -1002,12 +997,6 @@ static CPU_GET_CONTEXT( mcs48 )
|
|||||||
|
|
||||||
static CPU_SET_CONTEXT( mcs48 )
|
static CPU_SET_CONTEXT( mcs48 )
|
||||||
{
|
{
|
||||||
mcs48_state *mcs48;
|
|
||||||
if( src )
|
|
||||||
token = src;
|
|
||||||
mcs48 = token;
|
|
||||||
update_regptr(mcs48);
|
|
||||||
change_pc(PC);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-------------------------------------------------
|
/*-------------------------------------------------
|
||||||
@ -1017,7 +1006,7 @@ static CPU_SET_CONTEXT( mcs48 )
|
|||||||
|
|
||||||
static CPU_SET_INFO( mcs48 )
|
static CPU_SET_INFO( mcs48 )
|
||||||
{
|
{
|
||||||
mcs48_state *mcs48 = token;
|
mcs48_state *mcs48 = device->token;
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
@ -1053,7 +1042,7 @@ static CPU_SET_INFO( mcs48 )
|
|||||||
|
|
||||||
static CPU_GET_INFO( mcs48 )
|
static CPU_GET_INFO( mcs48 )
|
||||||
{
|
{
|
||||||
mcs48_state *mcs48 = token;
|
mcs48_state *mcs48 = (device != NULL) ? device->token : NULL;
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
|
@ -636,8 +636,6 @@ struct _mcs51_state_t
|
|||||||
GLOBAL VARIABLES
|
GLOBAL VARIABLES
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
static void *token;
|
|
||||||
|
|
||||||
static void (*hold_serial_tx_callback)(int data);
|
static void (*hold_serial_tx_callback)(int data);
|
||||||
static int (*hold_serial_rx_callback)(void);
|
static int (*hold_serial_rx_callback)(void);
|
||||||
|
|
||||||
@ -1909,6 +1907,9 @@ static CPU_EXECUTE( mcs51 )
|
|||||||
mcs51_state_t *mcs51_state = device->token;
|
mcs51_state_t *mcs51_state = device->token;
|
||||||
UINT8 op;
|
UINT8 op;
|
||||||
|
|
||||||
|
change_pc(PC);
|
||||||
|
update_ptrs(mcs51_state);
|
||||||
|
|
||||||
mcs51_state->icount = cycles;
|
mcs51_state->icount = cycles;
|
||||||
|
|
||||||
/* external interrupts may have been set since we last checked */
|
/* external interrupts may have been set since we last checked */
|
||||||
@ -2057,8 +2058,6 @@ static CPU_INIT( mcs51 )
|
|||||||
{
|
{
|
||||||
mcs51_state_t *mcs51_state = device->token;
|
mcs51_state_t *mcs51_state = device->token;
|
||||||
|
|
||||||
token = device->token; // temporary
|
|
||||||
|
|
||||||
mcs51_state->irq_callback = irqcallback;
|
mcs51_state->irq_callback = irqcallback;
|
||||||
mcs51_state->device = device;
|
mcs51_state->device = device;
|
||||||
|
|
||||||
@ -2419,14 +2418,6 @@ static CPU_GET_CONTEXT( mcs51 )
|
|||||||
|
|
||||||
static CPU_SET_CONTEXT( mcs51 )
|
static CPU_SET_CONTEXT( mcs51 )
|
||||||
{
|
{
|
||||||
mcs51_state_t *mcs51_state;
|
|
||||||
|
|
||||||
if( src )
|
|
||||||
token = src;
|
|
||||||
|
|
||||||
mcs51_state = token;
|
|
||||||
change_pc(PC);
|
|
||||||
update_ptrs(mcs51_state);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
@ -2435,7 +2426,7 @@ static CPU_SET_CONTEXT( mcs51 )
|
|||||||
|
|
||||||
static CPU_SET_INFO( mcs51 )
|
static CPU_SET_INFO( mcs51 )
|
||||||
{
|
{
|
||||||
mcs51_state_t *mcs51_state = token;
|
mcs51_state_t *mcs51_state = device->token;
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
@ -2477,7 +2468,7 @@ static CPU_SET_INFO( mcs51 )
|
|||||||
|
|
||||||
static CPU_GET_INFO( mcs51 )
|
static CPU_GET_INFO( mcs51 )
|
||||||
{
|
{
|
||||||
mcs51_state_t *mcs51_state = token;
|
mcs51_state_t *mcs51_state = (device != NULL) ? device->token : NULL;
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
|
@ -209,7 +209,6 @@ static void writecache_le_dword(offs_t offset, UINT32 data);
|
|||||||
|
|
||||||
static void *token;
|
static void *token;
|
||||||
|
|
||||||
|
|
||||||
static const memory_accessors be_memory =
|
static const memory_accessors be_memory =
|
||||||
{
|
{
|
||||||
program_read_byte_32be, program_read_word_32be, program_read_dword_32be,
|
program_read_byte_32be, program_read_word_32be, program_read_dword_32be,
|
||||||
@ -321,17 +320,6 @@ static CPU_GET_CONTEXT( r3000 )
|
|||||||
|
|
||||||
static CPU_SET_CONTEXT( r3000 )
|
static CPU_SET_CONTEXT( r3000 )
|
||||||
{
|
{
|
||||||
r3000_state *r3000;
|
|
||||||
|
|
||||||
/* copy the context */
|
|
||||||
if (src)
|
|
||||||
token = src;
|
|
||||||
|
|
||||||
r3000 = token;
|
|
||||||
change_pc(r3000->pc);
|
|
||||||
|
|
||||||
/* check for IRQs */
|
|
||||||
check_irqs(r3000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -736,6 +724,8 @@ INLINE void handle_cop3(r3000_state *r3000, UINT32 op)
|
|||||||
static CPU_EXECUTE( r3000 )
|
static CPU_EXECUTE( r3000 )
|
||||||
{
|
{
|
||||||
r3000_state *r3000 = device->token;
|
r3000_state *r3000 = device->token;
|
||||||
|
|
||||||
|
token = device->token;
|
||||||
|
|
||||||
/* count cycles and interrupt cycles */
|
/* count cycles and interrupt cycles */
|
||||||
r3000->icount = cycles;
|
r3000->icount = cycles;
|
||||||
@ -743,6 +733,9 @@ static CPU_EXECUTE( r3000 )
|
|||||||
r3000->interrupt_cycles = 0;
|
r3000->interrupt_cycles = 0;
|
||||||
change_pc(r3000->pc);
|
change_pc(r3000->pc);
|
||||||
|
|
||||||
|
/* check for IRQs */
|
||||||
|
check_irqs(r3000);
|
||||||
|
|
||||||
/* core execution loop */
|
/* core execution loop */
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@ -934,16 +927,20 @@ static CPU_EXECUTE( r3000 )
|
|||||||
DISASSEMBLY HOOK
|
DISASSEMBLY HOOK
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
static CPU_DISASSEMBLE( r3000 )
|
static CPU_DISASSEMBLE( r3000be )
|
||||||
{
|
{
|
||||||
extern unsigned dasmr3k(char *, unsigned, UINT32);
|
extern unsigned dasmr3k(char *, unsigned, UINT32);
|
||||||
r3000_state *r3000 = token;
|
|
||||||
UINT32 op = *(UINT32 *)oprom;
|
UINT32 op = *(UINT32 *)oprom;
|
||||||
if (r3000->bigendian)
|
op = BIG_ENDIANIZE_INT32(op);
|
||||||
op = BIG_ENDIANIZE_INT32(op);
|
return dasmr3k(buffer, pc, op);
|
||||||
else
|
}
|
||||||
op = LITTLE_ENDIANIZE_INT32(op);
|
|
||||||
|
|
||||||
|
|
||||||
|
static CPU_DISASSEMBLE( r3000le )
|
||||||
|
{
|
||||||
|
extern unsigned dasmr3k(char *, unsigned, UINT32);
|
||||||
|
UINT32 op = *(UINT32 *)oprom;
|
||||||
|
op = LITTLE_ENDIANIZE_INT32(op);
|
||||||
return dasmr3k(buffer, pc, op);
|
return dasmr3k(buffer, pc, op);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1162,7 +1159,7 @@ static void swr_le(r3000_state *r3000, UINT32 op)
|
|||||||
|
|
||||||
static CPU_SET_INFO( r3000 )
|
static CPU_SET_INFO( r3000 )
|
||||||
{
|
{
|
||||||
r3000_state *r3000 = token;
|
r3000_state *r3000 = device->token;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are set as 64-bit signed integers --- */
|
/* --- the following bits of info are set as 64-bit signed integers --- */
|
||||||
@ -1221,7 +1218,7 @@ static CPU_SET_INFO( r3000 )
|
|||||||
|
|
||||||
static CPU_GET_INFO( r3000 )
|
static CPU_GET_INFO( r3000 )
|
||||||
{
|
{
|
||||||
r3000_state *r3000 = token;
|
r3000_state *r3000 = (device != NULL) ? device->token : NULL;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
||||||
@ -1302,7 +1299,7 @@ static CPU_GET_INFO( r3000 )
|
|||||||
case CPUINFO_PTR_EXIT: info->exit = CPU_EXIT_NAME(r3000); break;
|
case CPUINFO_PTR_EXIT: info->exit = CPU_EXIT_NAME(r3000); break;
|
||||||
case CPUINFO_PTR_EXECUTE: info->execute = CPU_EXECUTE_NAME(r3000); break;
|
case CPUINFO_PTR_EXECUTE: info->execute = CPU_EXECUTE_NAME(r3000); break;
|
||||||
case CPUINFO_PTR_BURN: info->burn = NULL; break;
|
case CPUINFO_PTR_BURN: info->burn = NULL; break;
|
||||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(r3000); break;
|
case CPUINFO_PTR_DISASSEMBLE: /* provided per-CPU */ break;
|
||||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &r3000->icount; break;
|
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &r3000->icount; break;
|
||||||
|
|
||||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||||
@ -1366,6 +1363,7 @@ CPU_GET_INFO( r3000be )
|
|||||||
|
|
||||||
/* --- the following bits of info are returned as pointers to data or functions --- */
|
/* --- the following bits of info are returned as pointers to data or functions --- */
|
||||||
case CPUINFO_PTR_RESET: info->reset = CPU_RESET_NAME(r3000be); break;
|
case CPUINFO_PTR_RESET: info->reset = CPU_RESET_NAME(r3000be); break;
|
||||||
|
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(r3000be); break;
|
||||||
|
|
||||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||||
case CPUINFO_STR_NAME: strcpy(info->s, "R3000 (big)"); break;
|
case CPUINFO_STR_NAME: strcpy(info->s, "R3000 (big)"); break;
|
||||||
@ -1384,6 +1382,7 @@ CPU_GET_INFO( r3000le )
|
|||||||
|
|
||||||
/* --- the following bits of info are returned as pointers to data or functions --- */
|
/* --- the following bits of info are returned as pointers to data or functions --- */
|
||||||
case CPUINFO_PTR_RESET: info->reset = CPU_RESET_NAME(r3000le); break;
|
case CPUINFO_PTR_RESET: info->reset = CPU_RESET_NAME(r3000le); break;
|
||||||
|
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(r3000le); break;
|
||||||
|
|
||||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||||
case CPUINFO_STR_NAME: strcpy(info->s, "R3000 (little)"); break;
|
case CPUINFO_STR_NAME: strcpy(info->s, "R3000 (little)"); break;
|
||||||
@ -1402,6 +1401,7 @@ CPU_GET_INFO( r3041be )
|
|||||||
|
|
||||||
/* --- the following bits of info are returned as pointers to data or functions --- */
|
/* --- the following bits of info are returned as pointers to data or functions --- */
|
||||||
case CPUINFO_PTR_RESET: info->reset = CPU_RESET_NAME(r3000be); break;
|
case CPUINFO_PTR_RESET: info->reset = CPU_RESET_NAME(r3000be); break;
|
||||||
|
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(r3000be); break;
|
||||||
|
|
||||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||||
case CPUINFO_STR_NAME: strcpy(info->s, "R3041 (big)"); break;
|
case CPUINFO_STR_NAME: strcpy(info->s, "R3041 (big)"); break;
|
||||||
@ -1420,6 +1420,7 @@ CPU_GET_INFO( r3041le )
|
|||||||
|
|
||||||
/* --- the following bits of info are returned as pointers to data or functions --- */
|
/* --- the following bits of info are returned as pointers to data or functions --- */
|
||||||
case CPUINFO_PTR_RESET: info->reset = CPU_RESET_NAME(r3000le); break;
|
case CPUINFO_PTR_RESET: info->reset = CPU_RESET_NAME(r3000le); break;
|
||||||
|
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(r3000le); break;
|
||||||
|
|
||||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||||
case CPUINFO_STR_NAME: strcpy(info->s, "R3041 (little)"); break;
|
case CPUINFO_STR_NAME: strcpy(info->s, "R3041 (little)"); break;
|
||||||
|
@ -2191,15 +2191,15 @@ static CPU_READ( tms32025 )
|
|||||||
*value = ((UINT16 *)ptr)[(offset & 0xff) / 2];
|
*value = ((UINT16 *)ptr)[(offset & 0xff) / 2];
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
CPU_READ_NAME(tms32025)(space, offset + 0, 2, &temp);
|
CPU_READ_NAME(tms32025)(device, space, offset + 0, 2, &temp);
|
||||||
*value = temp << 16;
|
*value = temp << 16;
|
||||||
CPU_READ_NAME(tms32025)(space, offset + 2, 2, &temp);
|
CPU_READ_NAME(tms32025)(device, space, offset + 2, 2, &temp);
|
||||||
*value |= temp & 0xffff;
|
*value |= temp & 0xffff;
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
CPU_READ_NAME(tms32025)(space, offset + 0, 4, &temp);
|
CPU_READ_NAME(tms32025)(device, space, offset + 0, 4, &temp);
|
||||||
*value = temp << 32;
|
*value = temp << 32;
|
||||||
CPU_READ_NAME(tms32025)(space, offset + 4, 4, &temp);
|
CPU_READ_NAME(tms32025)(device, space, offset + 4, 4, &temp);
|
||||||
*value |= temp & 0xffffffff;
|
*value |= temp & 0xffffffff;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2241,12 +2241,12 @@ static CPU_WRITE( tms32025 )
|
|||||||
((UINT16 *)ptr)[(offset & 0xff) / 2] = value;
|
((UINT16 *)ptr)[(offset & 0xff) / 2] = value;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
CPU_WRITE_NAME(tms32025)(space, offset + 0, 2, value >> 16);
|
CPU_WRITE_NAME(tms32025)(device, space, offset + 0, 2, value >> 16);
|
||||||
CPU_WRITE_NAME(tms32025)(space, offset + 2, 2, value);
|
CPU_WRITE_NAME(tms32025)(device, space, offset + 2, 2, value);
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
CPU_WRITE_NAME(tms32025)(space, offset + 0, 4, value >> 32);
|
CPU_WRITE_NAME(tms32025)(device, space, offset + 0, 4, value >> 32);
|
||||||
CPU_WRITE_NAME(tms32025)(space, offset + 4, 4, value);
|
CPU_WRITE_NAME(tms32025)(device, space, offset + 4, 4, value);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -4679,7 +4679,7 @@ static CPU_SET_INFO( tms99xx )
|
|||||||
* Generic get_info
|
* Generic get_info
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
void TMS99XX_GET_INFO(UINT32 state, cpuinfo *info)
|
void TMS99XX_GET_INFO(const device_config *device, UINT32 state, cpuinfo *info)
|
||||||
{
|
{
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
/* VTLB state */
|
/* VTLB state */
|
||||||
struct _vtlb_state
|
struct _vtlb_state
|
||||||
{
|
{
|
||||||
|
const device_config *device; /* CPU device */
|
||||||
int space; /* address space */
|
int space; /* address space */
|
||||||
int dynamic; /* number of dynamic entries */
|
int dynamic; /* number of dynamic entries */
|
||||||
int fixed; /* number of fixed entries */
|
int fixed; /* number of fixed entries */
|
||||||
@ -64,6 +65,7 @@ vtlb_state *vtlb_alloc(const device_config *cpu, int space, int fixed_entries, i
|
|||||||
memset(vtlb, 0, sizeof(*vtlb));
|
memset(vtlb, 0, sizeof(*vtlb));
|
||||||
|
|
||||||
/* fill in CPU information */
|
/* fill in CPU information */
|
||||||
|
vtlb->device = cpu;
|
||||||
vtlb->space = space;
|
vtlb->space = space;
|
||||||
vtlb->dynamic = dynamic_entries;
|
vtlb->dynamic = dynamic_entries;
|
||||||
vtlb->fixed = fixed_entries;
|
vtlb->fixed = fixed_entries;
|
||||||
@ -152,7 +154,7 @@ int vtlb_fill(vtlb_state *vtlb, offs_t address, int intention)
|
|||||||
|
|
||||||
/* ask the CPU core to translate for us */
|
/* ask the CPU core to translate for us */
|
||||||
taddress = address;
|
taddress = address;
|
||||||
if (!(*vtlb->translate)(vtlb->space, intention, &taddress))
|
if (!(*vtlb->translate)(vtlb->device, vtlb->space, intention, &taddress))
|
||||||
{
|
{
|
||||||
if (PRINTF_TLB)
|
if (PRINTF_TLB)
|
||||||
printf("failed: no translation\n");
|
printf("failed: no translation\n");
|
||||||
|
@ -207,8 +207,6 @@ struct _z80_state
|
|||||||
#define IFF2 z80->iff2
|
#define IFF2 z80->iff2
|
||||||
#define HALT z80->halt
|
#define HALT z80->halt
|
||||||
|
|
||||||
static z80_state *token;
|
|
||||||
|
|
||||||
static UINT8 SZ[256]; /* zero and sign flags */
|
static UINT8 SZ[256]; /* zero and sign flags */
|
||||||
static UINT8 SZ_BIT[256]; /* zero, sign and parity/overflow (=zero) flags for BIT opcode */
|
static UINT8 SZ_BIT[256]; /* zero, sign and parity/overflow (=zero) flags for BIT opcode */
|
||||||
static UINT8 SZP[256]; /* zero, sign and parity flags */
|
static UINT8 SZP[256]; /* zero, sign and parity flags */
|
||||||
@ -3430,8 +3428,6 @@ static CPU_INIT( z80 )
|
|||||||
z80_state *z80 = device->token;
|
z80_state *z80 = device->token;
|
||||||
int i, p;
|
int i, p;
|
||||||
|
|
||||||
token = device->token; // temporary
|
|
||||||
|
|
||||||
/* setup cycle tables */
|
/* setup cycle tables */
|
||||||
cc[Z80_TABLE_op] = cc_op;
|
cc[Z80_TABLE_op] = cc_op;
|
||||||
cc[Z80_TABLE_cb] = cc_cb;
|
cc[Z80_TABLE_cb] = cc_cb;
|
||||||
@ -3600,6 +3596,7 @@ static CPU_EXECUTE( z80 )
|
|||||||
z80_state *z80 = device->token;
|
z80_state *z80 = device->token;
|
||||||
|
|
||||||
z80->icount = cycles;
|
z80->icount = cycles;
|
||||||
|
change_pc(PCD);
|
||||||
|
|
||||||
/* check for NMIs on the way in; they can only be set externally */
|
/* check for NMIs on the way in; they can only be set externally */
|
||||||
/* via timers, and can't be dynamically enabled, so it is safe */
|
/* via timers, and can't be dynamically enabled, so it is safe */
|
||||||
@ -3640,7 +3637,7 @@ static CPU_EXECUTE( z80 )
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
static CPU_BURN( z80 )
|
static CPU_BURN( z80 )
|
||||||
{
|
{
|
||||||
z80_state *z80 = token;
|
z80_state *z80 = device->token;
|
||||||
|
|
||||||
if( cycles > 0 )
|
if( cycles > 0 )
|
||||||
{
|
{
|
||||||
@ -3663,11 +3660,6 @@ static CPU_GET_CONTEXT( z80 )
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
static CPU_SET_CONTEXT( z80 )
|
static CPU_SET_CONTEXT( z80 )
|
||||||
{
|
{
|
||||||
z80_state *z80;
|
|
||||||
if( src )
|
|
||||||
token = src;
|
|
||||||
z80 = token;
|
|
||||||
change_pc(PCD);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -3701,7 +3693,7 @@ static void set_irq_line(z80_state *z80, int irqline, int state)
|
|||||||
|
|
||||||
static CPU_SET_INFO( z80 )
|
static CPU_SET_INFO( z80 )
|
||||||
{
|
{
|
||||||
z80_state *z80 = token;
|
z80_state *z80 = device->token;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are set as 64-bit signed integers --- */
|
/* --- the following bits of info are set as 64-bit signed integers --- */
|
||||||
@ -3755,7 +3747,7 @@ static CPU_SET_INFO( z80 )
|
|||||||
|
|
||||||
CPU_GET_INFO( z80 )
|
CPU_GET_INFO( z80 )
|
||||||
{
|
{
|
||||||
z80_state *z80 = token;
|
z80_state *z80 = (device != NULL) ? device->token : NULL;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
||||||
|
@ -304,8 +304,8 @@ cpu_interface cpuintrf[CPU_COUNT];
|
|||||||
|
|
||||||
static const struct
|
static const struct
|
||||||
{
|
{
|
||||||
int cputype;
|
int cputype;
|
||||||
void (*get_info)(UINT32 state, cpuinfo *info);
|
cpu_get_info_func get_info;
|
||||||
} cpuintrf_map[] =
|
} cpuintrf_map[] =
|
||||||
{
|
{
|
||||||
{ CPU_DUMMY, CPU_GET_INFO_NAME(dummy) },
|
{ CPU_DUMMY, CPU_GET_INFO_NAME(dummy) },
|
||||||
@ -1062,43 +1062,43 @@ void cpuintrf_init(running_machine *machine)
|
|||||||
|
|
||||||
/* bootstrap the rest of the function pointers */
|
/* bootstrap the rest of the function pointers */
|
||||||
info.setinfo = NULL;
|
info.setinfo = NULL;
|
||||||
(*intf->get_info)(CPUINFO_PTR_SET_INFO, &info);
|
(*intf->get_info)(NULL, CPUINFO_PTR_SET_INFO, &info);
|
||||||
intf->set_info = info.setinfo;
|
intf->set_info = info.setinfo;
|
||||||
|
|
||||||
info.getcontext = NULL;
|
info.getcontext = NULL;
|
||||||
(*intf->get_info)(CPUINFO_PTR_GET_CONTEXT, &info);
|
(*intf->get_info)(NULL, CPUINFO_PTR_GET_CONTEXT, &info);
|
||||||
intf->get_context = info.getcontext;
|
intf->get_context = info.getcontext;
|
||||||
|
|
||||||
info.setcontext = NULL;
|
info.setcontext = NULL;
|
||||||
(*intf->get_info)(CPUINFO_PTR_SET_CONTEXT, &info);
|
(*intf->get_info)(NULL, CPUINFO_PTR_SET_CONTEXT, &info);
|
||||||
intf->set_context = info.setcontext;
|
intf->set_context = info.setcontext;
|
||||||
|
|
||||||
info.init = NULL;
|
info.init = NULL;
|
||||||
(*intf->get_info)(CPUINFO_PTR_INIT, &info);
|
(*intf->get_info)(NULL, CPUINFO_PTR_INIT, &info);
|
||||||
intf->init = info.init;
|
intf->init = info.init;
|
||||||
|
|
||||||
info.reset = NULL;
|
info.reset = NULL;
|
||||||
(*intf->get_info)(CPUINFO_PTR_RESET, &info);
|
(*intf->get_info)(NULL, CPUINFO_PTR_RESET, &info);
|
||||||
intf->reset = info.reset;
|
intf->reset = info.reset;
|
||||||
|
|
||||||
info.exit = NULL;
|
info.exit = NULL;
|
||||||
(*intf->get_info)(CPUINFO_PTR_EXIT, &info);
|
(*intf->get_info)(NULL, CPUINFO_PTR_EXIT, &info);
|
||||||
intf->exit = info.exit;
|
intf->exit = info.exit;
|
||||||
|
|
||||||
info.execute = NULL;
|
info.execute = NULL;
|
||||||
(*intf->get_info)(CPUINFO_PTR_EXECUTE, &info);
|
(*intf->get_info)(NULL, CPUINFO_PTR_EXECUTE, &info);
|
||||||
intf->execute = info.execute;
|
intf->execute = info.execute;
|
||||||
|
|
||||||
info.burn = NULL;
|
info.burn = NULL;
|
||||||
(*intf->get_info)(CPUINFO_PTR_BURN, &info);
|
(*intf->get_info)(NULL, CPUINFO_PTR_BURN, &info);
|
||||||
intf->burn = info.burn;
|
intf->burn = info.burn;
|
||||||
|
|
||||||
info.disassemble = NULL;
|
info.disassemble = NULL;
|
||||||
(*intf->get_info)(CPUINFO_PTR_DISASSEMBLE, &info);
|
(*intf->get_info)(NULL, CPUINFO_PTR_DISASSEMBLE, &info);
|
||||||
intf->disassemble = info.disassemble;
|
intf->disassemble = info.disassemble;
|
||||||
|
|
||||||
info.translate = NULL;
|
info.translate = NULL;
|
||||||
(*intf->get_info)(CPUINFO_PTR_TRANSLATE, &info);
|
(*intf->get_info)(NULL, CPUINFO_PTR_TRANSLATE, &info);
|
||||||
intf->translate = info.translate;
|
intf->translate = info.translate;
|
||||||
|
|
||||||
/* get other miscellaneous stuff */
|
/* get other miscellaneous stuff */
|
||||||
@ -1215,7 +1215,7 @@ int cpuintrf_init_cpu(int cpunum, cpu_type cputype, int clock, const void *confi
|
|||||||
|
|
||||||
/* get the instruction count pointer */
|
/* get the instruction count pointer */
|
||||||
info.icount = NULL;
|
info.icount = NULL;
|
||||||
(*cpudata->intf.get_info)(CPUINFO_PTR_INSTRUCTION_COUNTER, &info);
|
(*cpudata->intf.get_info)(cpudata->device, CPUINFO_PTR_INSTRUCTION_COUNTER, &info);
|
||||||
cpudata->icount = info.icount;
|
cpudata->icount = info.icount;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1297,7 +1297,7 @@ INT64 cpu_get_info_int(const device_config *cpu, UINT32 state)
|
|||||||
VERIFY_CPU(cpu_get_info_int);
|
VERIFY_CPU(cpu_get_info_int);
|
||||||
cpu_push_context(cpu);
|
cpu_push_context(cpu);
|
||||||
info.i = 0;
|
info.i = 0;
|
||||||
(*cpudata->intf.get_info)(state, &info);
|
(*cpudata->intf.get_info)(cpu, state, &info);
|
||||||
cpu_pop_context();
|
cpu_pop_context();
|
||||||
return info.i;
|
return info.i;
|
||||||
}
|
}
|
||||||
@ -1310,7 +1310,7 @@ void *cpu_get_info_ptr(const device_config *cpu, UINT32 state)
|
|||||||
VERIFY_CPU(cpu_get_info_ptr);
|
VERIFY_CPU(cpu_get_info_ptr);
|
||||||
cpu_push_context(cpu);
|
cpu_push_context(cpu);
|
||||||
info.p = NULL;
|
info.p = NULL;
|
||||||
(*cpudata->intf.get_info)(state, &info);
|
(*cpudata->intf.get_info)(cpu, state, &info);
|
||||||
cpu_pop_context();
|
cpu_pop_context();
|
||||||
return info.p;
|
return info.p;
|
||||||
}
|
}
|
||||||
@ -1323,7 +1323,7 @@ genf *cpu_get_info_fct(const device_config *cpu, UINT32 state)
|
|||||||
VERIFY_CPU(cpu_get_info_fct);
|
VERIFY_CPU(cpu_get_info_fct);
|
||||||
cpu_push_context(cpu);
|
cpu_push_context(cpu);
|
||||||
info.f = NULL;
|
info.f = NULL;
|
||||||
(*cpudata->intf.get_info)(state, &info);
|
(*cpudata->intf.get_info)(cpu, state, &info);
|
||||||
cpu_pop_context();
|
cpu_pop_context();
|
||||||
return info.f;
|
return info.f;
|
||||||
}
|
}
|
||||||
@ -1336,7 +1336,7 @@ const char *cpu_get_info_string(const device_config *cpu, UINT32 state)
|
|||||||
VERIFY_CPU(cpu_get_info_string);
|
VERIFY_CPU(cpu_get_info_string);
|
||||||
cpu_push_context(cpu);
|
cpu_push_context(cpu);
|
||||||
info.s = cpuintrf_temp_str();
|
info.s = cpuintrf_temp_str();
|
||||||
(*cpudata->intf.get_info)(state, &info);
|
(*cpudata->intf.get_info)(cpu, state, &info);
|
||||||
cpu_pop_context();
|
cpu_pop_context();
|
||||||
return info.s;
|
return info.s;
|
||||||
}
|
}
|
||||||
@ -1354,7 +1354,7 @@ void cpu_set_info_int(const device_config *cpu, UINT32 state, INT64 data)
|
|||||||
VERIFY_CPU(cpu_set_info_int);
|
VERIFY_CPU(cpu_set_info_int);
|
||||||
info.i = data;
|
info.i = data;
|
||||||
cpu_push_context(cpu);
|
cpu_push_context(cpu);
|
||||||
(*cpudata->intf.set_info)(state, &info);
|
(*cpudata->intf.set_info)(cpu, state, &info);
|
||||||
cpu_pop_context();
|
cpu_pop_context();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1366,7 +1366,7 @@ void cpu_set_info_ptr(const device_config *cpu, UINT32 state, void *data)
|
|||||||
VERIFY_CPU(cpu_set_info_ptr);
|
VERIFY_CPU(cpu_set_info_ptr);
|
||||||
info.p = data;
|
info.p = data;
|
||||||
cpu_push_context(cpu);
|
cpu_push_context(cpu);
|
||||||
(*cpudata->intf.set_info)(state, &info);
|
(*cpudata->intf.set_info)(cpu, state, &info);
|
||||||
cpu_pop_context();
|
cpu_pop_context();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1378,7 +1378,7 @@ void cpu_set_info_fct(const device_config *cpu, UINT32 state, genf *data)
|
|||||||
VERIFY_CPU(cpu_set_info_ptr);
|
VERIFY_CPU(cpu_set_info_ptr);
|
||||||
info.f = data;
|
info.f = data;
|
||||||
cpu_push_context(cpu);
|
cpu_push_context(cpu);
|
||||||
(*cpudata->intf.set_info)(state, &info);
|
(*cpudata->intf.set_info)(cpu, state, &info);
|
||||||
cpu_pop_context();
|
cpu_pop_context();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1470,7 +1470,7 @@ offs_t cpu_get_physical_pc_byte(const device_config *cpu)
|
|||||||
else
|
else
|
||||||
pc >>= shift;
|
pc >>= shift;
|
||||||
if (cpudata->intf.translate != NULL)
|
if (cpudata->intf.translate != NULL)
|
||||||
(cpudata->intf.translate)(ADDRESS_SPACE_PROGRAM, TRANSLATE_FETCH, &pc);
|
(cpudata->intf.translate)(cpu, ADDRESS_SPACE_PROGRAM, TRANSLATE_FETCH, &pc);
|
||||||
cpu_pop_context();
|
cpu_pop_context();
|
||||||
return pc;
|
return pc;
|
||||||
}
|
}
|
||||||
@ -1566,7 +1566,7 @@ INT64 cputype_get_info_int(cpu_type cputype, UINT32 state)
|
|||||||
|
|
||||||
VERIFY_CPUTYPE(cputype_get_info_int);
|
VERIFY_CPUTYPE(cputype_get_info_int);
|
||||||
info.i = 0;
|
info.i = 0;
|
||||||
(*cpuintrf[cputype].get_info)(state, &info);
|
(*cpuintrf[cputype].get_info)(NULL, state, &info);
|
||||||
return info.i;
|
return info.i;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1576,7 +1576,7 @@ void *cputype_get_info_ptr(cpu_type cputype, UINT32 state)
|
|||||||
|
|
||||||
VERIFY_CPUTYPE(cputype_get_info_ptr);
|
VERIFY_CPUTYPE(cputype_get_info_ptr);
|
||||||
info.p = NULL;
|
info.p = NULL;
|
||||||
(*cpuintrf[cputype].get_info)(state, &info);
|
(*cpuintrf[cputype].get_info)(NULL, state, &info);
|
||||||
return info.p;
|
return info.p;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1586,7 +1586,7 @@ genf *cputype_get_info_fct(cpu_type cputype, UINT32 state)
|
|||||||
|
|
||||||
VERIFY_CPUTYPE(cputype_get_info_fct);
|
VERIFY_CPUTYPE(cputype_get_info_fct);
|
||||||
info.f = NULL;
|
info.f = NULL;
|
||||||
(*cpuintrf[cputype].get_info)(state, &info);
|
(*cpuintrf[cputype].get_info)(NULL, state, &info);
|
||||||
return info.f;
|
return info.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1596,7 +1596,7 @@ const char *cputype_get_info_string(cpu_type cputype, UINT32 state)
|
|||||||
|
|
||||||
VERIFY_CPUTYPE(cputype_get_info_string);
|
VERIFY_CPUTYPE(cputype_get_info_string);
|
||||||
info.s = cpuintrf_temp_str();
|
info.s = cpuintrf_temp_str();
|
||||||
(*cpuintrf[cputype].get_info)(state, &info);
|
(*cpuintrf[cputype].get_info)(NULL, state, &info);
|
||||||
return info.s;
|
return info.s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,20 +207,12 @@ enum
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#define CPU_GET_INFO_NAME(name) cpu_get_info_##name
|
#define CPU_GET_INFO_NAME(name) cpu_get_info_##name
|
||||||
#define CPU_GET_INFO(name) void CPU_GET_INFO_NAME(name)(UINT32 state, cpuinfo *info)
|
#define CPU_GET_INFO(name) void CPU_GET_INFO_NAME(name)(const device_config *device, UINT32 state, cpuinfo *info)
|
||||||
#define CPU_GET_INFO_CALL(name) CPU_GET_INFO_NAME(name)(state, info)
|
#define CPU_GET_INFO_CALL(name) CPU_GET_INFO_NAME(name)(device, state, info)
|
||||||
|
|
||||||
#define CPU_SET_INFO_NAME(name) cpu_set_info_##name
|
#define CPU_SET_INFO_NAME(name) cpu_set_info_##name
|
||||||
#define CPU_SET_INFO(name) void CPU_SET_INFO_NAME(name)(UINT32 state, cpuinfo *info)
|
#define CPU_SET_INFO(name) void CPU_SET_INFO_NAME(name)(const device_config *device, UINT32 state, cpuinfo *info)
|
||||||
#define CPU_SET_INFO_CALL(name) CPU_SET_INFO_NAME(name)(state, info)
|
#define CPU_SET_INFO_CALL(name) CPU_SET_INFO_NAME(name)(device, state, info)
|
||||||
|
|
||||||
#define CPU_GET_CONTEXT_NAME(name) cpu_get_context_##name
|
|
||||||
#define CPU_GET_CONTEXT(name) void CPU_GET_CONTEXT_NAME(name)(void *dst)
|
|
||||||
#define CPU_GET_CONTEXT_CALL(name) CPU_GET_CONTEXT_NAME(name)(buffer)
|
|
||||||
|
|
||||||
#define CPU_SET_CONTEXT_NAME(name) cpu_set_context_##name
|
|
||||||
#define CPU_SET_CONTEXT(name) void CPU_SET_CONTEXT_NAME(name)(void *src)
|
|
||||||
#define CPU_SET_CONTEXT_CALL(name) CPU_SET_CONTEXT_NAME(name)(buffer)
|
|
||||||
|
|
||||||
#define CPU_INIT_NAME(name) cpu_init_##name
|
#define CPU_INIT_NAME(name) cpu_init_##name
|
||||||
#define CPU_INIT(name) void CPU_INIT_NAME(name)(const device_config *device, int index, int clock, cpu_irq_callback irqcallback)
|
#define CPU_INIT(name) void CPU_INIT_NAME(name)(const device_config *device, int index, int clock, cpu_irq_callback irqcallback)
|
||||||
@ -242,34 +234,42 @@ enum
|
|||||||
#define CPU_BURN(name) void CPU_BURN_NAME(name)(const device_config *device, int cycles)
|
#define CPU_BURN(name) void CPU_BURN_NAME(name)(const device_config *device, int cycles)
|
||||||
#define CPU_BURN_CALL(name) CPU_BURN_NAME(name)(device, cycles)
|
#define CPU_BURN_CALL(name) CPU_BURN_NAME(name)(device, cycles)
|
||||||
|
|
||||||
|
#define CPU_TRANSLATE_NAME(name) cpu_translate_##name
|
||||||
|
#define CPU_TRANSLATE(name) int CPU_TRANSLATE_NAME(name)(const device_config *device, int space, int intention, offs_t *address)
|
||||||
|
#define CPU_TRANSLATE_CALL(name) CPU_TRANSLATE_NAME(name)(device, space, intention, address)
|
||||||
|
|
||||||
|
#define CPU_READ_NAME(name) cpu_read_##name
|
||||||
|
#define CPU_READ(name) int CPU_READ_NAME(name)(const device_config *device, int space, UINT32 offset, int size, UINT64 *value)
|
||||||
|
#define CPU_READ_CALL(name) CPU_READ_NAME(name)(device, space, offset, size, value)
|
||||||
|
|
||||||
|
#define CPU_WRITE_NAME(name) cpu_write_##name
|
||||||
|
#define CPU_WRITE(name) int CPU_WRITE_NAME(name)(const device_config *device, int space, UINT32 offset, int size, UINT64 value)
|
||||||
|
#define CPU_WRITE_CALL(name) CPU_WRITE_NAME(name)(device, space, offset, size, value)
|
||||||
|
|
||||||
|
#define CPU_READOP_NAME(name) cpu_readop_##name
|
||||||
|
#define CPU_READOP(name) int CPU_READOP_NAME(name)(const device_config *device, UINT32 offset, int size, UINT64 *value)
|
||||||
|
#define CPU_READOP_CALL(name) CPU_READOP_NAME(name)(device, offset, size, value)
|
||||||
|
|
||||||
|
#define CPU_DEBUG_INIT_NAME(name) cpu_debug_init_##name
|
||||||
|
#define CPU_DEBUG_INIT(name) void CPU_DEBUG_INIT_NAME(name)(const device_config *device)
|
||||||
|
#define CPU_DEBUG_INIT_CALL(name) CPU_DEBUG_INIT_NAME(name)(device)
|
||||||
|
|
||||||
#define CPU_DISASSEMBLE_NAME(name) cpu_disassemble_##name
|
#define CPU_DISASSEMBLE_NAME(name) cpu_disassemble_##name
|
||||||
#define CPU_DISASSEMBLE(name) offs_t CPU_DISASSEMBLE_NAME(name)(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram)
|
#define CPU_DISASSEMBLE(name) offs_t CPU_DISASSEMBLE_NAME(name)(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram)
|
||||||
#define CPU_DISASSEMBLE_CALL(name) CPU_DISASSEMBLE_NAME(name)(buffer, pc, oprom, opram)
|
#define CPU_DISASSEMBLE_CALL(name) CPU_DISASSEMBLE_NAME(name)(buffer, pc, oprom, opram)
|
||||||
|
|
||||||
#define CPU_TRANSLATE_NAME(name) cpu_translate_##name
|
|
||||||
#define CPU_TRANSLATE(name) int CPU_TRANSLATE_NAME(name)(int space, int intention, offs_t *address)
|
|
||||||
#define CPU_TRANSLATE_CALL(name) CPU_TRANSLATE_NAME(name)(space, intention, address)
|
|
||||||
|
|
||||||
#define CPU_READ_NAME(name) cpu_read_##name
|
|
||||||
#define CPU_READ(name) int CPU_READ_NAME(name)(int space, UINT32 offset, int size, UINT64 *value)
|
|
||||||
#define CPU_READ_CALL(name) CPU_READ_NAME(name)(space, offset, size, value)
|
|
||||||
|
|
||||||
#define CPU_WRITE_NAME(name) cpu_write_##name
|
|
||||||
#define CPU_WRITE(name) int CPU_WRITE_NAME(name)(int space, UINT32 offset, int size, UINT64 value)
|
|
||||||
#define CPU_WRITE_CALL(name) CPU_WRITE_NAME(name)(space, offset, size, value)
|
|
||||||
|
|
||||||
#define CPU_READOP_NAME(name) cpu_readop_##name
|
|
||||||
#define CPU_READOP(name) int CPU_READOP_NAME(name)(UINT32 offset, int size, UINT64 *value)
|
|
||||||
#define CPU_READOP_CALL(name) CPU_READOP_NAME(name)(offset, size, value)
|
|
||||||
|
|
||||||
#define CPU_DEBUG_INIT_NAME(name) cpu_debug_init_##name
|
|
||||||
#define CPU_DEBUG_INIT(name) void CPU_DEBUG_INIT_NAME(name)(void)
|
|
||||||
#define CPU_DEBUG_INIT_CALL(name) CPU_DEBUG_INIT_NAME(name)()
|
|
||||||
|
|
||||||
#define CPU_VALIDITY_CHECK_NAME(name) cpu_validity_check_##name
|
#define CPU_VALIDITY_CHECK_NAME(name) cpu_validity_check_##name
|
||||||
#define CPU_VALIDITY_CHECK(name) int CPU_VALIDITY_CHECK_NAME(name)(const game_driver *driver, const void *config)
|
#define CPU_VALIDITY_CHECK(name) int CPU_VALIDITY_CHECK_NAME(name)(const game_driver *driver, const void *config)
|
||||||
#define CPU_VALIDITY_CHECK_CALL(name) CPU_VALIDITY_CHECK_NAME(name)(driver, config)
|
#define CPU_VALIDITY_CHECK_CALL(name) CPU_VALIDITY_CHECK_NAME(name)(driver, config)
|
||||||
|
|
||||||
|
#define CPU_GET_CONTEXT_NAME(name) cpu_get_context_##name
|
||||||
|
#define CPU_GET_CONTEXT(name) void CPU_GET_CONTEXT_NAME(name)(void *dst)
|
||||||
|
#define CPU_GET_CONTEXT_CALL(name) CPU_GET_CONTEXT_NAME(name)(buffer)
|
||||||
|
|
||||||
|
#define CPU_SET_CONTEXT_NAME(name) cpu_set_context_##name
|
||||||
|
#define CPU_SET_CONTEXT(name) void CPU_SET_CONTEXT_NAME(name)(void *src)
|
||||||
|
#define CPU_SET_CONTEXT_CALL(name) CPU_SET_CONTEXT_NAME(name)(buffer)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
@ -283,22 +283,23 @@ typedef union _cpuinfo cpuinfo;
|
|||||||
/* define the various callback functions */
|
/* define the various callback functions */
|
||||||
typedef int (*cpu_irq_callback)(const device_config *device, int irqnum);
|
typedef int (*cpu_irq_callback)(const device_config *device, int irqnum);
|
||||||
|
|
||||||
typedef void (*cpu_get_info_func)(UINT32 state, cpuinfo *info);
|
typedef void (*cpu_get_info_func)(const device_config *device, UINT32 state, cpuinfo *info);
|
||||||
typedef void (*cpu_set_info_func)(UINT32 state, cpuinfo *info);
|
typedef void (*cpu_set_info_func)(const device_config *device, UINT32 state, cpuinfo *info);
|
||||||
typedef void (*cpu_get_context_func)(void *buffer);
|
|
||||||
typedef void (*cpu_set_context_func)(void *buffer);
|
|
||||||
typedef void (*cpu_init_func)(const device_config *device, int index, int clock, cpu_irq_callback irqcallback);
|
typedef void (*cpu_init_func)(const device_config *device, int index, int clock, cpu_irq_callback irqcallback);
|
||||||
typedef void (*cpu_reset_func)(const device_config *device);
|
typedef void (*cpu_reset_func)(const device_config *device);
|
||||||
typedef void (*cpu_exit_func)(const device_config *device);
|
typedef void (*cpu_exit_func)(const device_config *device);
|
||||||
typedef int (*cpu_execute_func)(const device_config *device, int cycles);
|
typedef int (*cpu_execute_func)(const device_config *device, int cycles);
|
||||||
typedef void (*cpu_burn_func)(const device_config *device, int cycles);
|
typedef void (*cpu_burn_func)(const device_config *device, int cycles);
|
||||||
typedef offs_t (*cpu_disassemble_func)(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
typedef int (*cpu_translate_func)(const device_config *device, int space, int intention, offs_t *address);
|
||||||
typedef int (*cpu_translate_func)(int space, int intention, offs_t *address);
|
typedef int (*cpu_read_func)(const device_config *device, int space, UINT32 offset, int size, UINT64 *value);
|
||||||
typedef int (*cpu_read_func)(int space, UINT32 offset, int size, UINT64 *value);
|
typedef int (*cpu_write_func)(const device_config *device, int space, UINT32 offset, int size, UINT64 value);
|
||||||
typedef int (*cpu_write_func)(int space, UINT32 offset, int size, UINT64 value);
|
typedef int (*cpu_readop_func)(const device_config *device, UINT32 offset, int size, UINT64 *value);
|
||||||
typedef int (*cpu_readop_func)(UINT32 offset, int size, UINT64 *value);
|
typedef void (*cpu_debug_init_func)(const device_config *device);
|
||||||
typedef void (*cpu_debug_init_func)(void);
|
|
||||||
typedef int (*cpu_validity_check_func)(const game_driver *driver, const void *config);
|
typedef int (*cpu_validity_check_func)(const game_driver *driver, const void *config);
|
||||||
|
typedef offs_t (*cpu_disassemble_func)(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||||
|
typedef void (*cpu_get_context_func)(void *buffer);
|
||||||
|
typedef void (*cpu_set_context_func)(void *buffer);
|
||||||
|
|
||||||
|
|
||||||
/* cpuinfo union used to pass data to/from the get_info/set_info functions */
|
/* cpuinfo union used to pass data to/from the get_info/set_info functions */
|
||||||
@ -317,12 +318,12 @@ union _cpuinfo
|
|||||||
cpu_exit_func exit; /* CPUINFO_PTR_EXIT */
|
cpu_exit_func exit; /* CPUINFO_PTR_EXIT */
|
||||||
cpu_execute_func execute; /* CPUINFO_PTR_EXECUTE */
|
cpu_execute_func execute; /* CPUINFO_PTR_EXECUTE */
|
||||||
cpu_burn_func burn; /* CPUINFO_PTR_BURN */
|
cpu_burn_func burn; /* CPUINFO_PTR_BURN */
|
||||||
cpu_disassemble_func disassemble; /* CPUINFO_PTR_DISASSEMBLE */
|
|
||||||
cpu_translate_func translate; /* CPUINFO_PTR_TRANSLATE */
|
cpu_translate_func translate; /* CPUINFO_PTR_TRANSLATE */
|
||||||
cpu_read_func read; /* CPUINFO_PTR_READ */
|
cpu_read_func read; /* CPUINFO_PTR_READ */
|
||||||
cpu_write_func write; /* CPUINFO_PTR_WRITE */
|
cpu_write_func write; /* CPUINFO_PTR_WRITE */
|
||||||
cpu_readop_func readop; /* CPUINFO_PTR_READOP */
|
cpu_readop_func readop; /* CPUINFO_PTR_READOP */
|
||||||
cpu_debug_init_func debug_init; /* CPUINFO_PTR_DEBUG_INIT */
|
cpu_debug_init_func debug_init; /* CPUINFO_PTR_DEBUG_INIT */
|
||||||
|
cpu_disassemble_func disassemble; /* CPUINFO_PTR_DISASSEMBLE */
|
||||||
cpu_validity_check_func validity_check; /* CPUINFO_PTR_VALIDITY_CHECK */
|
cpu_validity_check_func validity_check; /* CPUINFO_PTR_VALIDITY_CHECK */
|
||||||
int * icount; /* CPUINFO_PTR_INSTRUCTION_COUNTER */
|
int * icount; /* CPUINFO_PTR_INSTRUCTION_COUNTER */
|
||||||
const addrmap8_token * internal_map8; /* CPUINFO_PTR_INTERNAL_MEMORY_MAP */
|
const addrmap8_token * internal_map8; /* CPUINFO_PTR_INTERNAL_MEMORY_MAP */
|
||||||
@ -345,8 +346,8 @@ struct _cpu_interface
|
|||||||
cpu_exit_func exit;
|
cpu_exit_func exit;
|
||||||
cpu_execute_func execute;
|
cpu_execute_func execute;
|
||||||
cpu_burn_func burn;
|
cpu_burn_func burn;
|
||||||
cpu_disassemble_func disassemble;
|
|
||||||
cpu_translate_func translate;
|
cpu_translate_func translate;
|
||||||
|
cpu_disassemble_func disassemble;
|
||||||
|
|
||||||
/* other info */
|
/* other info */
|
||||||
size_t context_size;
|
size_t context_size;
|
||||||
|
@ -250,7 +250,7 @@ void debug_command_init(running_machine *machine)
|
|||||||
cpu_debug_init_func debug_init;
|
cpu_debug_init_func debug_init;
|
||||||
debug_init = cpu_get_info_fct(machine->cpu[cpunum], CPUINFO_PTR_DEBUG_INIT);
|
debug_init = cpu_get_info_fct(machine->cpu[cpunum], CPUINFO_PTR_DEBUG_INIT);
|
||||||
if (debug_init != NULL)
|
if (debug_init != NULL)
|
||||||
(*debug_init)();
|
(*debug_init)(machine->cpu[cpunum]);
|
||||||
}
|
}
|
||||||
|
|
||||||
add_exit_callback(machine, debug_command_exit);
|
add_exit_callback(machine, debug_command_exit);
|
||||||
@ -1498,7 +1498,7 @@ static void execute_dump(running_machine *machine, int ref, int params, const ch
|
|||||||
if (i + j <= endoffset)
|
if (i + j <= endoffset)
|
||||||
{
|
{
|
||||||
offs_t curaddr = i + j;
|
offs_t curaddr = i + j;
|
||||||
if (info->translate == NULL || (*info->translate)(spacenum, TRANSLATE_READ, &curaddr))
|
if (info->translate == NULL || (*info->translate)(info->device, spacenum, TRANSLATE_READ, &curaddr))
|
||||||
{
|
{
|
||||||
UINT8 byte = debug_read_byte(ref, i + j, TRUE);
|
UINT8 byte = debug_read_byte(ref, i + j, TRUE);
|
||||||
outdex += sprintf(&output[outdex], " %02X", byte);
|
outdex += sprintf(&output[outdex], " %02X", byte);
|
||||||
@ -1517,7 +1517,7 @@ static void execute_dump(running_machine *machine, int ref, int params, const ch
|
|||||||
if (i + j <= endoffset)
|
if (i + j <= endoffset)
|
||||||
{
|
{
|
||||||
offs_t curaddr = i + j;
|
offs_t curaddr = i + j;
|
||||||
if (info->translate == NULL || (*info->translate)(spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
if (info->translate == NULL || (*info->translate)(info->device, spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
||||||
{
|
{
|
||||||
UINT16 word = debug_read_word(ref, i + j, TRUE);
|
UINT16 word = debug_read_word(ref, i + j, TRUE);
|
||||||
outdex += sprintf(&output[outdex], " %04X", word);
|
outdex += sprintf(&output[outdex], " %04X", word);
|
||||||
@ -1536,7 +1536,7 @@ static void execute_dump(running_machine *machine, int ref, int params, const ch
|
|||||||
if (i + j <= endoffset)
|
if (i + j <= endoffset)
|
||||||
{
|
{
|
||||||
offs_t curaddr = i + j;
|
offs_t curaddr = i + j;
|
||||||
if (info->translate == NULL || (*info->translate)(spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
if (info->translate == NULL || (*info->translate)(info->device, spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
||||||
{
|
{
|
||||||
UINT32 dword = debug_read_dword(ref, i + j, TRUE);
|
UINT32 dword = debug_read_dword(ref, i + j, TRUE);
|
||||||
outdex += sprintf(&output[outdex], " %08X", dword);
|
outdex += sprintf(&output[outdex], " %08X", dword);
|
||||||
@ -1555,7 +1555,7 @@ static void execute_dump(running_machine *machine, int ref, int params, const ch
|
|||||||
if (i + j <= endoffset)
|
if (i + j <= endoffset)
|
||||||
{
|
{
|
||||||
offs_t curaddr = i + j;
|
offs_t curaddr = i + j;
|
||||||
if (info->translate == NULL || (*info->translate)(spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
if (info->translate == NULL || (*info->translate)(info->device, spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
||||||
{
|
{
|
||||||
UINT64 qword = debug_read_qword(ref, i + j, TRUE);
|
UINT64 qword = debug_read_qword(ref, i + j, TRUE);
|
||||||
outdex += sprintf(&output[outdex], " %08X%08X", (UINT32)(qword >> 32), (UINT32)qword);
|
outdex += sprintf(&output[outdex], " %08X%08X", (UINT32)(qword >> 32), (UINT32)qword);
|
||||||
@ -1576,7 +1576,7 @@ static void execute_dump(running_machine *machine, int ref, int params, const ch
|
|||||||
for (j = 0; j < 16 && (i + j) <= endoffset; j++)
|
for (j = 0; j < 16 && (i + j) <= endoffset; j++)
|
||||||
{
|
{
|
||||||
offs_t curaddr = i + j;
|
offs_t curaddr = i + j;
|
||||||
if (info->translate == NULL || (*info->translate)(spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
if (info->translate == NULL || (*info->translate)(info->device, spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
||||||
{
|
{
|
||||||
UINT8 byte = debug_read_byte(ref, i + j, TRUE);
|
UINT8 byte = debug_read_byte(ref, i + j, TRUE);
|
||||||
outdex += sprintf(&output[outdex], "%c", (byte >= 32 && byte < 128) ? byte : '.');
|
outdex += sprintf(&output[outdex], "%c", (byte >= 32 && byte < 128) ? byte : '.');
|
||||||
@ -1767,7 +1767,7 @@ static void execute_dasm(running_machine *machine, int ref, int params, const ch
|
|||||||
|
|
||||||
/* make sure we can translate the address */
|
/* make sure we can translate the address */
|
||||||
tempaddr = pcbyte;
|
tempaddr = pcbyte;
|
||||||
if (info->translate == NULL || (*info->translate)(ADDRESS_SPACE_PROGRAM, TRANSLATE_FETCH_DEBUG, &tempaddr))
|
if (info->translate == NULL || (*info->translate)(info->device, ADDRESS_SPACE_PROGRAM, TRANSLATE_FETCH_DEBUG, &tempaddr))
|
||||||
{
|
{
|
||||||
UINT8 opbuf[64], argbuf[64];
|
UINT8 opbuf[64], argbuf[64];
|
||||||
|
|
||||||
@ -2077,7 +2077,7 @@ static void execute_map(running_machine *machine, int ref, int params, const cha
|
|||||||
taddress = ADDR2BYTE_MASKED(address, info, spacenum);
|
taddress = ADDR2BYTE_MASKED(address, info, spacenum);
|
||||||
if (info->translate != NULL)
|
if (info->translate != NULL)
|
||||||
{
|
{
|
||||||
if ((*info->translate)(spacenum, intention, &taddress))
|
if ((*info->translate)(info->device, spacenum, intention, &taddress))
|
||||||
{
|
{
|
||||||
const char *mapname = memory_get_handler_string(intention == TRANSLATE_WRITE_DEBUG, cpunum, spacenum, taddress);
|
const char *mapname = memory_get_handler_string(intention == TRANSLATE_WRITE_DEBUG, cpunum, spacenum, taddress);
|
||||||
debug_console_printf("%7s: %08X logical == %08X physical -> %s\n", intnames[intention & 3], (UINT32)address, BYTE2ADDR(taddress, info, spacenum), mapname);
|
debug_console_printf("%7s: %08X logical == %08X physical -> %s\n", intnames[intention & 3], (UINT32)address, BYTE2ADDR(taddress, info, spacenum), mapname);
|
||||||
|
@ -226,14 +226,15 @@ void debug_cpu_init(running_machine *machine)
|
|||||||
/* reset the PC data */
|
/* reset the PC data */
|
||||||
info->valid = TRUE;
|
info->valid = TRUE;
|
||||||
info->flags = DEBUG_FLAG_OBSERVING | DEBUG_FLAG_HISTORY;
|
info->flags = DEBUG_FLAG_OBSERVING | DEBUG_FLAG_HISTORY;
|
||||||
info->endianness = cpu_get_endianness(machine->cpu[cpunum]);
|
info->device = machine->cpu[cpunum];
|
||||||
info->opwidth = cpu_get_min_opcode_bytes(machine->cpu[cpunum]);
|
info->endianness = cpu_get_endianness(info->device);
|
||||||
|
info->opwidth = cpu_get_min_opcode_bytes(info->device);
|
||||||
|
|
||||||
/* fetch the memory accessors */
|
/* fetch the memory accessors */
|
||||||
info->translate = (cpu_translate_func)cpu_get_info_fct(machine->cpu[cpunum], CPUINFO_PTR_TRANSLATE);
|
info->translate = (cpu_translate_func)cpu_get_info_fct(info->device, CPUINFO_PTR_TRANSLATE);
|
||||||
info->read = (cpu_read_func)cpu_get_info_fct(machine->cpu[cpunum], CPUINFO_PTR_READ);
|
info->read = (cpu_read_func)cpu_get_info_fct(info->device, CPUINFO_PTR_READ);
|
||||||
info->write = (cpu_write_func)cpu_get_info_fct(machine->cpu[cpunum], CPUINFO_PTR_WRITE);
|
info->write = (cpu_write_func)cpu_get_info_fct(info->device, CPUINFO_PTR_WRITE);
|
||||||
info->readop = (cpu_readop_func)cpu_get_info_fct(machine->cpu[cpunum], CPUINFO_PTR_READOP);
|
info->readop = (cpu_readop_func)cpu_get_info_fct(info->device, CPUINFO_PTR_READOP);
|
||||||
|
|
||||||
/* allocate a symbol table */
|
/* allocate a symbol table */
|
||||||
info->symtable = symtable_alloc(global_symtable);
|
info->symtable = symtable_alloc(global_symtable);
|
||||||
@ -244,7 +245,7 @@ void debug_cpu_init(running_machine *machine)
|
|||||||
/* add all registers into it */
|
/* add all registers into it */
|
||||||
for (regnum = 0; regnum < MAX_REGS; regnum++)
|
for (regnum = 0; regnum < MAX_REGS; regnum++)
|
||||||
{
|
{
|
||||||
const char *str = cpu_get_reg_string(machine->cpu[cpunum], regnum);
|
const char *str = cpu_get_reg_string(info->device, regnum);
|
||||||
const char *colon;
|
const char *colon;
|
||||||
char symname[256];
|
char symname[256];
|
||||||
int charnum;
|
int charnum;
|
||||||
@ -272,11 +273,11 @@ void debug_cpu_init(running_machine *machine)
|
|||||||
for (spacenum = 0; spacenum < ADDRESS_SPACES; spacenum++)
|
for (spacenum = 0; spacenum < ADDRESS_SPACES; spacenum++)
|
||||||
{
|
{
|
||||||
debug_space_info *spaceinfo = &info->space[spacenum];
|
debug_space_info *spaceinfo = &info->space[spacenum];
|
||||||
int datawidth = cpu_get_databus_width(machine->cpu[cpunum], spacenum);
|
int datawidth = cpu_get_databus_width(info->device, spacenum);
|
||||||
int logwidth = cpu_get_logaddr_width(machine->cpu[cpunum], spacenum);
|
int logwidth = cpu_get_logaddr_width(info->device, spacenum);
|
||||||
int physwidth = cpu_get_addrbus_width(machine->cpu[cpunum], spacenum);
|
int physwidth = cpu_get_addrbus_width(info->device, spacenum);
|
||||||
int addrshift = cpu_get_addrbus_shift(machine->cpu[cpunum], spacenum);
|
int addrshift = cpu_get_addrbus_shift(info->device, spacenum);
|
||||||
int pageshift = cpu_get_page_shift(machine->cpu[cpunum], spacenum);
|
int pageshift = cpu_get_page_shift(info->device, spacenum);
|
||||||
|
|
||||||
if (logwidth == 0)
|
if (logwidth == 0)
|
||||||
logwidth = physwidth;
|
logwidth = physwidth;
|
||||||
@ -1678,11 +1679,11 @@ UINT8 debug_read_byte(int spacenum, offs_t address, int apply_translation)
|
|||||||
memory_set_debugger_access(global.debugger_access = TRUE);
|
memory_set_debugger_access(global.debugger_access = TRUE);
|
||||||
|
|
||||||
/* translate if necessary; if not mapped, return 0xff */
|
/* translate if necessary; if not mapped, return 0xff */
|
||||||
if (apply_translation && info->translate != NULL && !(*info->translate)(spacenum, TRANSLATE_READ_DEBUG, &address))
|
if (apply_translation && info->translate != NULL && !(*info->translate)(info->device, spacenum, TRANSLATE_READ_DEBUG, &address))
|
||||||
result = 0xff;
|
result = 0xff;
|
||||||
|
|
||||||
/* if there is a custom read handler, and it returns TRUE, use that value */
|
/* if there is a custom read handler, and it returns TRUE, use that value */
|
||||||
else if (info->read && (*info->read)(spacenum, address, 1, &custom))
|
else if (info->read && (*info->read)(info->device, spacenum, address, 1, &custom))
|
||||||
result = custom;
|
result = custom;
|
||||||
|
|
||||||
/* otherwise, call the byte reading function for the translated address */
|
/* otherwise, call the byte reading function for the translated address */
|
||||||
@ -1729,11 +1730,11 @@ UINT16 debug_read_word(int spacenum, offs_t address, int apply_translation)
|
|||||||
memory_set_debugger_access(global.debugger_access = TRUE);
|
memory_set_debugger_access(global.debugger_access = TRUE);
|
||||||
|
|
||||||
/* translate if necessary; if not mapped, return 0xffff */
|
/* translate if necessary; if not mapped, return 0xffff */
|
||||||
if (apply_translation && info->translate != NULL && !(*info->translate)(spacenum, TRANSLATE_READ_DEBUG, &address))
|
if (apply_translation && info->translate != NULL && !(*info->translate)(info->device, spacenum, TRANSLATE_READ_DEBUG, &address))
|
||||||
result = 0xffff;
|
result = 0xffff;
|
||||||
|
|
||||||
/* if there is a custom read handler, and it returns TRUE, use that value */
|
/* if there is a custom read handler, and it returns TRUE, use that value */
|
||||||
else if (info->read && (*info->read)(spacenum, address, 2, &custom))
|
else if (info->read && (*info->read)(info->device, spacenum, address, 2, &custom))
|
||||||
result = custom;
|
result = custom;
|
||||||
|
|
||||||
/* otherwise, call the byte reading function for the translated address */
|
/* otherwise, call the byte reading function for the translated address */
|
||||||
@ -1782,11 +1783,11 @@ UINT32 debug_read_dword(int spacenum, offs_t address, int apply_translation)
|
|||||||
memory_set_debugger_access(global.debugger_access = TRUE);
|
memory_set_debugger_access(global.debugger_access = TRUE);
|
||||||
|
|
||||||
/* translate if necessary; if not mapped, return 0xffffffff */
|
/* translate if necessary; if not mapped, return 0xffffffff */
|
||||||
if (apply_translation && info->translate != NULL && !(*info->translate)(spacenum, TRANSLATE_READ_DEBUG, &address))
|
if (apply_translation && info->translate != NULL && !(*info->translate)(info->device, spacenum, TRANSLATE_READ_DEBUG, &address))
|
||||||
result = 0xffffffff;
|
result = 0xffffffff;
|
||||||
|
|
||||||
/* if there is a custom read handler, and it returns TRUE, use that value */
|
/* if there is a custom read handler, and it returns TRUE, use that value */
|
||||||
else if (info->read && (*info->read)(spacenum, address, 4, &custom))
|
else if (info->read && (*info->read)(info->device, spacenum, address, 4, &custom))
|
||||||
result = custom;
|
result = custom;
|
||||||
|
|
||||||
/* otherwise, call the byte reading function for the translated address */
|
/* otherwise, call the byte reading function for the translated address */
|
||||||
@ -1835,11 +1836,11 @@ UINT64 debug_read_qword(int spacenum, offs_t address, int apply_translation)
|
|||||||
memory_set_debugger_access(global.debugger_access = TRUE);
|
memory_set_debugger_access(global.debugger_access = TRUE);
|
||||||
|
|
||||||
/* translate if necessary; if not mapped, return 0xffffffffffffffff */
|
/* translate if necessary; if not mapped, return 0xffffffffffffffff */
|
||||||
if (apply_translation && info->translate != NULL && !(*info->translate)(spacenum, TRANSLATE_READ_DEBUG, &address))
|
if (apply_translation && info->translate != NULL && !(*info->translate)(info->device, spacenum, TRANSLATE_READ_DEBUG, &address))
|
||||||
result = ~(UINT64)0;
|
result = ~(UINT64)0;
|
||||||
|
|
||||||
/* if there is a custom read handler, and it returns TRUE, use that value */
|
/* if there is a custom read handler, and it returns TRUE, use that value */
|
||||||
else if (info->read && (*info->read)(spacenum, address, 8, &custom))
|
else if (info->read && (*info->read)(info->device, spacenum, address, 8, &custom))
|
||||||
result = custom;
|
result = custom;
|
||||||
|
|
||||||
/* otherwise, call the byte reading function for the translated address */
|
/* otherwise, call the byte reading function for the translated address */
|
||||||
@ -1870,11 +1871,11 @@ void debug_write_byte(int spacenum, offs_t address, UINT8 data, int apply_transl
|
|||||||
memory_set_debugger_access(global.debugger_access = TRUE);
|
memory_set_debugger_access(global.debugger_access = TRUE);
|
||||||
|
|
||||||
/* translate if necessary; if not mapped, we're done */
|
/* translate if necessary; if not mapped, we're done */
|
||||||
if (apply_translation && info->translate != NULL && !(*info->translate)(spacenum, TRANSLATE_WRITE_DEBUG, &address))
|
if (apply_translation && info->translate != NULL && !(*info->translate)(info->device, spacenum, TRANSLATE_WRITE_DEBUG, &address))
|
||||||
;
|
;
|
||||||
|
|
||||||
/* if there is a custom write handler, and it returns TRUE, use that */
|
/* if there is a custom write handler, and it returns TRUE, use that */
|
||||||
else if (info->write && (*info->write)(spacenum, address, 1, data))
|
else if (info->write && (*info->write)(info->device, spacenum, address, 1, data))
|
||||||
;
|
;
|
||||||
|
|
||||||
/* otherwise, call the byte reading function for the translated address */
|
/* otherwise, call the byte reading function for the translated address */
|
||||||
@ -1921,11 +1922,11 @@ void debug_write_word(int spacenum, offs_t address, UINT16 data, int apply_trans
|
|||||||
memory_set_debugger_access(global.debugger_access = TRUE);
|
memory_set_debugger_access(global.debugger_access = TRUE);
|
||||||
|
|
||||||
/* translate if necessary; if not mapped, we're done */
|
/* translate if necessary; if not mapped, we're done */
|
||||||
if (apply_translation && info->translate && !(*info->translate)(spacenum, TRANSLATE_WRITE_DEBUG, &address))
|
if (apply_translation && info->translate && !(*info->translate)(info->device, spacenum, TRANSLATE_WRITE_DEBUG, &address))
|
||||||
;
|
;
|
||||||
|
|
||||||
/* if there is a custom write handler, and it returns TRUE, use that */
|
/* if there is a custom write handler, and it returns TRUE, use that */
|
||||||
else if (info->write && (*info->write)(spacenum, address, 2, data))
|
else if (info->write && (*info->write)(info->device, spacenum, address, 2, data))
|
||||||
;
|
;
|
||||||
|
|
||||||
/* otherwise, call the byte reading function for the translated address */
|
/* otherwise, call the byte reading function for the translated address */
|
||||||
@ -1973,11 +1974,11 @@ void debug_write_dword(int spacenum, offs_t address, UINT32 data, int apply_tran
|
|||||||
memory_set_debugger_access(global.debugger_access = TRUE);
|
memory_set_debugger_access(global.debugger_access = TRUE);
|
||||||
|
|
||||||
/* translate if necessary; if not mapped, we're done */
|
/* translate if necessary; if not mapped, we're done */
|
||||||
if (apply_translation && info->translate && !(*info->translate)(spacenum, TRANSLATE_WRITE_DEBUG, &address))
|
if (apply_translation && info->translate && !(*info->translate)(info->device, spacenum, TRANSLATE_WRITE_DEBUG, &address))
|
||||||
;
|
;
|
||||||
|
|
||||||
/* if there is a custom write handler, and it returns TRUE, use that */
|
/* if there is a custom write handler, and it returns TRUE, use that */
|
||||||
else if (info->write && (*info->write)(spacenum, address, 4, data))
|
else if (info->write && (*info->write)(info->device, spacenum, address, 4, data))
|
||||||
;
|
;
|
||||||
|
|
||||||
/* otherwise, call the byte reading function for the translated address */
|
/* otherwise, call the byte reading function for the translated address */
|
||||||
@ -2024,11 +2025,11 @@ void debug_write_qword(int spacenum, offs_t address, UINT64 data, int apply_tran
|
|||||||
memory_set_debugger_access(global.debugger_access = TRUE);
|
memory_set_debugger_access(global.debugger_access = TRUE);
|
||||||
|
|
||||||
/* translate if necessary; if not mapped, we're done */
|
/* translate if necessary; if not mapped, we're done */
|
||||||
if (apply_translation && info->translate && !(*info->translate)(spacenum, TRANSLATE_WRITE_DEBUG, &address))
|
if (apply_translation && info->translate && !(*info->translate)(info->device, spacenum, TRANSLATE_WRITE_DEBUG, &address))
|
||||||
;
|
;
|
||||||
|
|
||||||
/* if there is a custom write handler, and it returns TRUE, use that */
|
/* if there is a custom write handler, and it returns TRUE, use that */
|
||||||
else if (info->write && (*info->write)(spacenum, address, 8, data))
|
else if (info->write && (*info->write)(info->device, spacenum, address, 8, data))
|
||||||
;
|
;
|
||||||
|
|
||||||
/* otherwise, call the byte reading function for the translated address */
|
/* otherwise, call the byte reading function for the translated address */
|
||||||
@ -2060,7 +2061,7 @@ UINT64 debug_read_opcode(offs_t address, int size, int arg)
|
|||||||
if (info->readop)
|
if (info->readop)
|
||||||
{
|
{
|
||||||
UINT64 result;
|
UINT64 result;
|
||||||
if ((*info->readop)(address, size, &result))
|
if ((*info->readop)(info->device, address, size, &result))
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2078,7 +2079,7 @@ UINT64 debug_read_opcode(offs_t address, int size, int arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* translate to physical first */
|
/* translate to physical first */
|
||||||
if (info->translate && !(*info->translate)(ADDRESS_SPACE_PROGRAM, TRANSLATE_FETCH_DEBUG, &address))
|
if (info->translate && !(*info->translate)(info->device, ADDRESS_SPACE_PROGRAM, TRANSLATE_FETCH_DEBUG, &address))
|
||||||
return ~(UINT64)0 & (~(UINT64)0 >> (64 - 8*size));
|
return ~(UINT64)0 & (~(UINT64)0 >> (64 - 8*size));
|
||||||
|
|
||||||
/* keep in physical range */
|
/* keep in physical range */
|
||||||
|
@ -165,6 +165,7 @@ struct _debug_cpu_info
|
|||||||
UINT32 pc_history_index; /* current history index */
|
UINT32 pc_history_index; /* current history index */
|
||||||
int hotspot_count; /* number of hotspots */
|
int hotspot_count; /* number of hotspots */
|
||||||
int hotspot_threshhold; /* threshhold for the number of hits to print */
|
int hotspot_threshhold; /* threshhold for the number of hits to print */
|
||||||
|
const device_config *device; /* CPU device object */
|
||||||
cpu_translate_func translate; /* address translation routine */
|
cpu_translate_func translate; /* address translation routine */
|
||||||
cpu_read_func read; /* memory read routine */
|
cpu_read_func read; /* memory read routine */
|
||||||
cpu_write_func write; /* memory write routine */
|
cpu_write_func write; /* memory write routine */
|
||||||
|
@ -1360,7 +1360,7 @@ static offs_t disasm_back_up(int cpunum, const debug_cpu_info *cpuinfo, offs_t s
|
|||||||
|
|
||||||
/* get the disassembly, but only if mapped */
|
/* get the disassembly, but only if mapped */
|
||||||
instlen = 1;
|
instlen = 1;
|
||||||
if (cpuinfo->translate == NULL || (*cpuinfo->translate)(ADDRESS_SPACE_PROGRAM, TRANSLATE_FETCH_DEBUG, &pcbyte))
|
if (cpuinfo->translate == NULL || (*cpuinfo->translate)(cpuinfo->device, ADDRESS_SPACE_PROGRAM, TRANSLATE_FETCH_DEBUG, &pcbyte))
|
||||||
instlen = cpu_dasm(Machine->activecpu, dasmbuffer, testpc & addrmask, &opbuf[1000 + testpc - startpc], &argbuf[1000 + testpc - startpc]) & DASMFLAG_LENGTHMASK;
|
instlen = cpu_dasm(Machine->activecpu, dasmbuffer, testpc & addrmask, &opbuf[1000 + testpc - startpc], &argbuf[1000 + testpc - startpc]) & DASMFLAG_LENGTHMASK;
|
||||||
|
|
||||||
/* count this one */
|
/* count this one */
|
||||||
@ -1538,7 +1538,7 @@ static int disasm_recompute(debug_view *view, offs_t pc, int startline, int line
|
|||||||
|
|
||||||
/* make sure we can translate the address */
|
/* make sure we can translate the address */
|
||||||
tempaddr = pcbyte;
|
tempaddr = pcbyte;
|
||||||
if (cpuinfo->translate == NULL || (*cpuinfo->translate)(ADDRESS_SPACE_PROGRAM, TRANSLATE_FETCH_DEBUG, &tempaddr))
|
if (cpuinfo->translate == NULL || (*cpuinfo->translate)(cpuinfo->device, ADDRESS_SPACE_PROGRAM, TRANSLATE_FETCH_DEBUG, &tempaddr))
|
||||||
{
|
{
|
||||||
UINT8 opbuf[64], argbuf[64];
|
UINT8 opbuf[64], argbuf[64];
|
||||||
|
|
||||||
@ -2771,7 +2771,7 @@ static void memory_update(debug_view *view)
|
|||||||
if (curaddr > maxaddr)
|
if (curaddr > maxaddr)
|
||||||
len += sprintf(&data[len], " ");
|
len += sprintf(&data[len], " ");
|
||||||
else if (memdata->raw_base != NULL || memdata->no_translation ||
|
else if (memdata->raw_base != NULL || memdata->no_translation ||
|
||||||
cpuinfo->translate == NULL || (*cpuinfo->translate)(memdata->spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
cpuinfo->translate == NULL || (*cpuinfo->translate)(cpuinfo->device, memdata->spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
||||||
len += sprintf(&data[len], "%02X ", memory_read_byte(memdata, addrbyte + i, !memdata->no_translation));
|
len += sprintf(&data[len], "%02X ", memory_read_byte(memdata, addrbyte + i, !memdata->no_translation));
|
||||||
else
|
else
|
||||||
len += sprintf(&data[len], "** ");
|
len += sprintf(&data[len], "** ");
|
||||||
@ -2785,7 +2785,7 @@ static void memory_update(debug_view *view)
|
|||||||
if (curaddr > maxaddr)
|
if (curaddr > maxaddr)
|
||||||
len += sprintf(&data[len], " ");
|
len += sprintf(&data[len], " ");
|
||||||
else if (memdata->raw_base != NULL || memdata->no_translation ||
|
else if (memdata->raw_base != NULL || memdata->no_translation ||
|
||||||
cpuinfo->translate == NULL || (*cpuinfo->translate)(memdata->spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
cpuinfo->translate == NULL || (*cpuinfo->translate)(cpuinfo->device, memdata->spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
||||||
len += sprintf(&data[len], " %04X ", memory_read_word(memdata, addrbyte + 2 * i, !memdata->no_translation));
|
len += sprintf(&data[len], " %04X ", memory_read_word(memdata, addrbyte + 2 * i, !memdata->no_translation));
|
||||||
else
|
else
|
||||||
len += sprintf(&data[len], " **** ");
|
len += sprintf(&data[len], " **** ");
|
||||||
@ -2799,7 +2799,7 @@ static void memory_update(debug_view *view)
|
|||||||
if (curaddr > maxaddr)
|
if (curaddr > maxaddr)
|
||||||
len += sprintf(&data[len], " ");
|
len += sprintf(&data[len], " ");
|
||||||
else if (memdata->raw_base != NULL || memdata->no_translation ||
|
else if (memdata->raw_base != NULL || memdata->no_translation ||
|
||||||
cpuinfo->translate == NULL || (*cpuinfo->translate)(memdata->spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
cpuinfo->translate == NULL || (*cpuinfo->translate)(cpuinfo->device, memdata->spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
||||||
len += sprintf(&data[len], " %08X ", memory_read_dword(memdata, addrbyte + 4 * i, !memdata->no_translation));
|
len += sprintf(&data[len], " %08X ", memory_read_dword(memdata, addrbyte + 4 * i, !memdata->no_translation));
|
||||||
else
|
else
|
||||||
len += sprintf(&data[len], " ******** ");
|
len += sprintf(&data[len], " ******** ");
|
||||||
@ -2813,7 +2813,7 @@ static void memory_update(debug_view *view)
|
|||||||
if (curaddr > maxaddr)
|
if (curaddr > maxaddr)
|
||||||
len += sprintf(&data[len], " ");
|
len += sprintf(&data[len], " ");
|
||||||
else if (memdata->raw_base != NULL || memdata->no_translation ||
|
else if (memdata->raw_base != NULL || memdata->no_translation ||
|
||||||
cpuinfo->translate == NULL || (*cpuinfo->translate)(memdata->spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
cpuinfo->translate == NULL || (*cpuinfo->translate)(cpuinfo->device, memdata->spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
||||||
{
|
{
|
||||||
UINT64 qword = memory_read_qword(memdata, addrbyte + 8 * i, !memdata->no_translation);
|
UINT64 qword = memory_read_qword(memdata, addrbyte + 8 * i, !memdata->no_translation);
|
||||||
len += sprintf(&data[len], " %08X%08X ", (UINT32)(qword >> 32), (UINT32)qword);
|
len += sprintf(&data[len], " %08X%08X ", (UINT32)(qword >> 32), (UINT32)qword);
|
||||||
@ -2867,7 +2867,7 @@ static void memory_update(debug_view *view)
|
|||||||
if (curaddr > maxaddr)
|
if (curaddr > maxaddr)
|
||||||
len += sprintf(&data[len], " ");
|
len += sprintf(&data[len], " ");
|
||||||
else if (memdata->raw_base != NULL || memdata->no_translation ||
|
else if (memdata->raw_base != NULL || memdata->no_translation ||
|
||||||
cpuinfo->translate == NULL || (*cpuinfo->translate)(memdata->spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
cpuinfo->translate == NULL || (*cpuinfo->translate)(cpuinfo->device, memdata->spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
||||||
len += sprintf(&data[len], "%02X ", memory_read_byte(memdata, addrbyte + i, !memdata->no_translation));
|
len += sprintf(&data[len], "%02X ", memory_read_byte(memdata, addrbyte + i, !memdata->no_translation));
|
||||||
else
|
else
|
||||||
len += sprintf(&data[len], "** ");
|
len += sprintf(&data[len], "** ");
|
||||||
@ -2881,7 +2881,7 @@ static void memory_update(debug_view *view)
|
|||||||
if (curaddr > maxaddr)
|
if (curaddr > maxaddr)
|
||||||
len += sprintf(&data[len], " ");
|
len += sprintf(&data[len], " ");
|
||||||
else if (memdata->raw_base != NULL || memdata->no_translation ||
|
else if (memdata->raw_base != NULL || memdata->no_translation ||
|
||||||
cpuinfo->translate == NULL || (*cpuinfo->translate)(memdata->spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
cpuinfo->translate == NULL || (*cpuinfo->translate)(cpuinfo->device, memdata->spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
||||||
len += sprintf(&data[len], " %04X ", memory_read_word(memdata, addrbyte + 2 * i, !memdata->no_translation));
|
len += sprintf(&data[len], " %04X ", memory_read_word(memdata, addrbyte + 2 * i, !memdata->no_translation));
|
||||||
else
|
else
|
||||||
len += sprintf(&data[len], " **** ");
|
len += sprintf(&data[len], " **** ");
|
||||||
@ -2895,7 +2895,7 @@ static void memory_update(debug_view *view)
|
|||||||
if (curaddr > maxaddr)
|
if (curaddr > maxaddr)
|
||||||
len += sprintf(&data[len], " ");
|
len += sprintf(&data[len], " ");
|
||||||
else if (memdata->raw_base != NULL || memdata->no_translation ||
|
else if (memdata->raw_base != NULL || memdata->no_translation ||
|
||||||
cpuinfo->translate == NULL || (*cpuinfo->translate)(memdata->spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
cpuinfo->translate == NULL || (*cpuinfo->translate)(cpuinfo->device, memdata->spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
||||||
len += sprintf(&data[len], " %08X ", memory_read_dword(memdata, addrbyte + 4 * i, !memdata->no_translation));
|
len += sprintf(&data[len], " %08X ", memory_read_dword(memdata, addrbyte + 4 * i, !memdata->no_translation));
|
||||||
else
|
else
|
||||||
len += sprintf(&data[len], " ******** ");
|
len += sprintf(&data[len], " ******** ");
|
||||||
@ -2909,7 +2909,7 @@ static void memory_update(debug_view *view)
|
|||||||
if (curaddr > maxaddr)
|
if (curaddr > maxaddr)
|
||||||
len += sprintf(&data[len], " ");
|
len += sprintf(&data[len], " ");
|
||||||
else if (memdata->raw_base != NULL || memdata->no_translation ||
|
else if (memdata->raw_base != NULL || memdata->no_translation ||
|
||||||
cpuinfo->translate == NULL || (*cpuinfo->translate)(memdata->spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
cpuinfo->translate == NULL || (*cpuinfo->translate)(cpuinfo->device, memdata->spacenum, TRANSLATE_READ_DEBUG, &curaddr))
|
||||||
{
|
{
|
||||||
UINT64 qword = memory_read_qword(memdata, addrbyte + 8 * i, !memdata->no_translation);
|
UINT64 qword = memory_read_qword(memdata, addrbyte + 8 * i, !memdata->no_translation);
|
||||||
len += sprintf(&data[len], " %08X%08X ", (UINT32)(qword >> 32), (UINT32)qword);
|
len += sprintf(&data[len], " %08X%08X ", (UINT32)(qword >> 32), (UINT32)qword);
|
||||||
|
@ -366,7 +366,7 @@ static int8 apu_dpcm(struct nesapu_info *info, dpcm_t *chan)
|
|||||||
if (chan->regs[0] & 0x80) /* IRQ Generator */
|
if (chan->regs[0] & 0x80) /* IRQ Generator */
|
||||||
{
|
{
|
||||||
chan->irq_occurred = TRUE;
|
chan->irq_occurred = TRUE;
|
||||||
n2a03_irq();
|
n2a03_irq(Machine->cpu[info->APU.dpcm.cpu_num]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1409,7 @@ WRITE32_HANDLER( dsio_idma_addr_w )
|
|||||||
if (LOG_DCS_TRANSFERS)
|
if (LOG_DCS_TRANSFERS)
|
||||||
logerror("%08X:IDMA_addr = %04X\n", cpu_get_pc(machine->activecpu), data);
|
logerror("%08X:IDMA_addr = %04X\n", cpu_get_pc(machine->activecpu), data);
|
||||||
cpu_push_context(machine->cpu[dcs.cpunum]);
|
cpu_push_context(machine->cpu[dcs.cpunum]);
|
||||||
adsp2181_idma_addr_w(data);
|
adsp2181_idma_addr_w(machine->cpu[dcs.cpunum], data);
|
||||||
if (data == 0)
|
if (data == 0)
|
||||||
dsio.start_on_next_write = 2;
|
dsio.start_on_next_write = 2;
|
||||||
cpu_pop_context();
|
cpu_pop_context();
|
||||||
@ -1423,14 +1423,14 @@ WRITE32_HANDLER( dsio_idma_data_w )
|
|||||||
if (ACCESSING_BITS_0_15)
|
if (ACCESSING_BITS_0_15)
|
||||||
{
|
{
|
||||||
if (LOG_DCS_TRANSFERS)
|
if (LOG_DCS_TRANSFERS)
|
||||||
logerror("%08X:IDMA_data_w(%04X) = %04X\n", pc, adsp2181_idma_addr_r(), data & 0xffff);
|
logerror("%08X:IDMA_data_w(%04X) = %04X\n", pc, adsp2181_idma_addr_r(machine->cpu[dcs.cpunum]), data & 0xffff);
|
||||||
adsp2181_idma_data_w(data & 0xffff);
|
adsp2181_idma_data_w(machine->cpu[dcs.cpunum], data & 0xffff);
|
||||||
}
|
}
|
||||||
if (ACCESSING_BITS_16_31)
|
if (ACCESSING_BITS_16_31)
|
||||||
{
|
{
|
||||||
if (LOG_DCS_TRANSFERS)
|
if (LOG_DCS_TRANSFERS)
|
||||||
logerror("%08X:IDMA_data_w(%04X) = %04X\n", pc, adsp2181_idma_addr_r(), data >> 16);
|
logerror("%08X:IDMA_data_w(%04X) = %04X\n", pc, adsp2181_idma_addr_r(machine->cpu[dcs.cpunum]), data >> 16);
|
||||||
adsp2181_idma_data_w(data >> 16);
|
adsp2181_idma_data_w(machine->cpu[dcs.cpunum], data >> 16);
|
||||||
}
|
}
|
||||||
cpu_pop_context();
|
cpu_pop_context();
|
||||||
if (dsio.start_on_next_write && --dsio.start_on_next_write == 0)
|
if (dsio.start_on_next_write && --dsio.start_on_next_write == 0)
|
||||||
@ -1445,10 +1445,10 @@ READ32_HANDLER( dsio_idma_data_r )
|
|||||||
{
|
{
|
||||||
UINT32 result;
|
UINT32 result;
|
||||||
cpu_push_context(machine->cpu[dcs.cpunum]);
|
cpu_push_context(machine->cpu[dcs.cpunum]);
|
||||||
result = adsp2181_idma_data_r();
|
result = adsp2181_idma_data_r(machine->cpu[dcs.cpunum]);
|
||||||
cpu_pop_context();
|
cpu_pop_context();
|
||||||
if (LOG_DCS_TRANSFERS)
|
if (LOG_DCS_TRANSFERS)
|
||||||
logerror("%08X:IDMA_data_r(%04X) = %04X\n", cpu_get_pc(machine->activecpu), adsp2181_idma_addr_r(), result);
|
logerror("%08X:IDMA_data_r(%04X) = %04X\n", cpu_get_pc(machine->activecpu), adsp2181_idma_addr_r(machine->cpu[dcs.cpunum]), result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1818,7 +1818,7 @@ static READ16_HANDLER( adsp_control_r )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case IDMA_CONTROL_REG:
|
case IDMA_CONTROL_REG:
|
||||||
result = adsp2181_idma_addr_r();
|
result = adsp2181_idma_addr_r(machine->cpu[dcs.cpunum]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TIMER_COUNT_REG:
|
case TIMER_COUNT_REG:
|
||||||
@ -1899,7 +1899,7 @@ static WRITE16_HANDLER( adsp_control_w )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case IDMA_CONTROL_REG:
|
case IDMA_CONTROL_REG:
|
||||||
adsp2181_idma_addr_w(data);
|
adsp2181_idma_addr_w(machine->cpu[dcs.cpunum], data);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -172,7 +172,7 @@ static UINT32 copro_fifoout_pop(void)
|
|||||||
if (copro_fifoout_num == 0)
|
if (copro_fifoout_num == 0)
|
||||||
{
|
{
|
||||||
/* Reading from empty FIFO causes the i960 to enter wait state */
|
/* Reading from empty FIFO causes the i960 to enter wait state */
|
||||||
i960_stall();
|
i960_stall(Machine->activecpu);
|
||||||
|
|
||||||
/* spin the main cpu and let the TGP catch up */
|
/* spin the main cpu and let the TGP catch up */
|
||||||
cpu_spinuntil_time(ATTOTIME_IN_USEC(100));
|
cpu_spinuntil_time(ATTOTIME_IN_USEC(100));
|
||||||
@ -278,7 +278,7 @@ static NVRAM_HANDLER( model2 )
|
|||||||
/* Timers - these count down at 25 MHz and pull IRQ2 when they hit 0 */
|
/* Timers - these count down at 25 MHz and pull IRQ2 when they hit 0 */
|
||||||
static READ32_HANDLER( timers_r )
|
static READ32_HANDLER( timers_r )
|
||||||
{
|
{
|
||||||
i960_noburst();
|
i960_noburst(machine->activecpu);
|
||||||
|
|
||||||
// if timer is running, calculate current value
|
// if timer is running, calculate current value
|
||||||
if (model2_timerrun[offset])
|
if (model2_timerrun[offset])
|
||||||
@ -297,7 +297,7 @@ static WRITE32_HANDLER( timers_w )
|
|||||||
{
|
{
|
||||||
attotime period;
|
attotime period;
|
||||||
|
|
||||||
i960_noburst();
|
i960_noburst(machine->activecpu);
|
||||||
COMBINE_DATA(&model2_timervals[offset]);
|
COMBINE_DATA(&model2_timervals[offset]);
|
||||||
|
|
||||||
model2_timerorig[offset] = model2_timervals[offset];
|
model2_timerorig[offset] = model2_timervals[offset];
|
||||||
@ -874,7 +874,7 @@ static READ32_HANDLER(desert_unk_r)
|
|||||||
|
|
||||||
static READ32_HANDLER(model2_irq_r)
|
static READ32_HANDLER(model2_irq_r)
|
||||||
{
|
{
|
||||||
i960_noburst();
|
i960_noburst(machine->activecpu);
|
||||||
|
|
||||||
if (offset)
|
if (offset)
|
||||||
{
|
{
|
||||||
@ -886,7 +886,7 @@ static READ32_HANDLER(model2_irq_r)
|
|||||||
|
|
||||||
static WRITE32_HANDLER(model2_irq_w)
|
static WRITE32_HANDLER(model2_irq_w)
|
||||||
{
|
{
|
||||||
i960_noburst();
|
i960_noburst(machine->activecpu);
|
||||||
|
|
||||||
if (offset)
|
if (offset)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user