fixed 68k reset exception timing (unused)

This commit is contained in:
ekeeke31 2010-01-13 22:08:05 +00:00
parent 11d8b55139
commit 7a4c208a34
2 changed files with 11 additions and 12 deletions

View File

@ -127,7 +127,7 @@ const uint m68ki_shift_32_table[65] =
const uint8 m68ki_exception_cycle_table[4][256] =
{
{ /* 000 */
4, /* 0: Reset - Initial Stack Pointer */
40, /* 0: Reset - Initial Stack Pointer */
4, /* 1: Reset - Initial Program Counter */
50, /* 2: Bus Error (unemulated) */
50, /* 3: Address Error (unemulated) */
@ -200,7 +200,7 @@ const uint8 m68ki_exception_cycle_table[4][256] =
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4
},
{ /* 010 */
4, /* 0: Reset - Initial Stack Pointer */
40, /* 0: Reset - Initial Stack Pointer */
4, /* 1: Reset - Initial Program Counter */
126, /* 2: Bus Error (unemulated) */
126, /* 3: Address Error (unemulated) */
@ -1025,7 +1025,6 @@ void m68k_state_register(const char *type, int index)
state_save_register_item(type, index, REG_CAAR);
state_save_register_item(type, index, m68k_substate.sr);
state_save_register_item(type, index, CPU_INT_LEVEL);
state_save_register_item(type, index, CPU_INT_CYCLES);
state_save_register_item(type, index, m68k_substate.stopped);
state_save_register_item(type, index, m68k_substate.halted);
state_save_register_item(type, index, CPU_PREF_ADDR);

View File

@ -132,6 +132,7 @@ extern unsigned int count_m68k;
/* ======================================================================== */
/* Exception Vectors handled by emulation */
#define EXCEPTION_RESET 0
#define EXCEPTION_BUS_ERROR 2 /* This one is not emulated! */
#define EXCEPTION_ADDRESS_ERROR 3 /* This one is partially emulated (doesn't stack a proper frame yet) */
#define EXCEPTION_ILLEGAL_INSTRUCTION 4
@ -335,7 +336,6 @@ extern unsigned int count_m68k;
#define FLAG_INT_MASK m68ki_cpu.int_mask
#define CPU_INT_LEVEL m68ki_cpu.int_level /* ASG: changed from CPU_INTS_PENDING */
#define CPU_INT_CYCLES m68ki_cpu.int_cycles /* ASG */
#define CPU_STOPPED m68ki_cpu.stopped
#define CPU_PREF_ADDR m68ki_cpu.pref_addr
#define CPU_PREF_DATA m68ki_cpu.pref_data
@ -565,19 +565,20 @@ extern unsigned int count_m68k;
if(CPU_STOPPED) \
{ \
SET_CYCLES(0); \
CPU_INT_CYCLES = 0; \
} \
}
#define m68ki_check_address_error(ADDR, WRITE_MODE, FC) \
if(((ADDR)&1) && emulate_address_error)\
if((ADDR)&1) \
{ \
m68ki_aerr_address = ADDR; \
m68ki_aerr_write_mode = WRITE_MODE; \
m68ki_aerr_fc = FC; \
longjmp(m68ki_aerr_trap, 1); \
if (emulate_address_error) \
{ \
m68ki_aerr_address = ADDR; \
m68ki_aerr_write_mode = WRITE_MODE; \
m68ki_aerr_fc = FC; \
longjmp(m68ki_aerr_trap, 1); \
} \
}
#define m68ki_check_address_error_010_less(ADDR, WRITE_MODE, FC) \
if (CPU_TYPE_IS_010_LESS(CPU_TYPE)) \
{ \
@ -882,7 +883,6 @@ typedef struct
uint c_flag; /* Carry */
uint int_mask; /* I0-I2 */
uint int_level; /* State of interrupt pins IPL0-IPL2 -- ASG: changed from ints_pending */
uint int_cycles; /* ASG: extra cycles from generated interrupts */
uint stopped; /* Stopped state */
uint pref_addr; /* Last prefetch address */
uint pref_data; /* Data in the prefetch queue */