X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2Fmusashi%2Fm68kcpu.h;h=63055cbe23f64c4a962c9a1799c13fe78b0ea05f;hb=9db6a54485501b56b0f2f5db4d093c38fe495bda;hp=350c975f39fa03489cf231db13042ca0793551b0;hpb=c6a4c892866387e150ffcaa3af8b8c18d9ec6d58;p=picodrive.git diff --git a/cpu/musashi/m68kcpu.h b/cpu/musashi/m68kcpu.h index 350c975..63055cb 100644 --- a/cpu/musashi/m68kcpu.h +++ b/cpu/musashi/m68kcpu.h @@ -27,8 +27,10 @@ #define M68KCPU__HEADER // notaz: something's missing this -#ifndef UINT16 +#ifndef UINT64 #define UINT64 unsigned long long +#endif +#ifndef UINT16 #define UINT32 unsigned int #define UINT16 unsigned short #define UINT8 unsigned char @@ -917,6 +919,7 @@ typedef struct // notaz sint cyc_remaining_cycles; + sint not_polling; } m68ki_cpu_core; // notaz @@ -1534,7 +1537,8 @@ INLINE void m68ki_set_sr_noint_nosp(uint value) INLINE void m68ki_set_sr(uint value) { m68ki_set_sr_noint(value); - m68ki_check_interrupts(); + if (GET_CYCLES() >= 0) // notaz + m68ki_check_interrupts(); } @@ -1619,7 +1623,7 @@ INLINE void m68ki_stack_frame_buserr(uint sr) /* Format 8 stack frame (68010). * 68010 only. This is the 29 word bus/address error frame. */ -void m68ki_stack_frame_1000(uint pc, uint sr, uint vector) +INLINE void m68ki_stack_frame_1000(uint pc, uint sr, uint vector) { /* VERSION * NUMBER @@ -1673,7 +1677,7 @@ void m68ki_stack_frame_1000(uint pc, uint sr, uint vector) * if the error happens at an instruction boundary. * PC stacked is address of next instruction. */ -void m68ki_stack_frame_1010(uint sr, uint vector, uint pc) +INLINE void m68ki_stack_frame_1010(uint sr, uint vector, uint pc) { /* INTERNAL REGISTER */ m68ki_push_16(0); @@ -1720,7 +1724,7 @@ void m68ki_stack_frame_1010(uint sr, uint vector, uint pc) * if the error happens during instruction execution. * PC stacked is address of instruction in progress. */ -void m68ki_stack_frame_1011(uint sr, uint vector, uint pc) +INLINE void m68ki_stack_frame_1011(uint sr, uint vector, uint pc) { /* INTERNAL REGISTERS (18 words) */ m68ki_push_32(0); @@ -1964,7 +1968,7 @@ m68k_read_memory_8(0x00ffff01); /* Service an interrupt request and start exception processing */ -void m68ki_exception_interrupt(uint int_level) +INLINE void m68ki_exception_interrupt(uint int_level) { uint vector; uint sr; @@ -2009,6 +2013,7 @@ void m68ki_exception_interrupt(uint int_level) /* Get the new PC */ new_pc = m68ki_read_data_32((vector<<2) + REG_VBR); + //new_pc = m68k_read_immediate_32((vector<<2) + REG_VBR); // notaz hack /* If vector is uninitialized, call the uninitialized interrupt vector */ if(new_pc == 0)