m68kops.c : m68kmake
./$<
+m68kmake : m68kmake.c m68k_in.c
+ $(CC) -o $@ $<
+
+
clean:
$(RM) m68kops.c m68kops.h m68kmake *.o
M68KMAKE_OP(adda, 32, ., .)\r
{\r
uint* r_dst = &AX;\r
+ uint src = M68KMAKE_GET_OPER_AY_32; // notaz\r
\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + M68KMAKE_GET_OPER_AY_32);\r
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);\r
}\r
\r
\r
if(register_list & (1 << i))\r
{\r
ea -= 4;\r
- m68ki_write_16(ea+2, REG_DA[15-i] & 0xFFFF );\r
- m68ki_write_16(ea, (REG_DA[15-i] >> 16) & 0xFFFF );\r
+ m68ki_write_16(ea, REG_DA[15-i] ); // notaz Cyclone hack\r
+ //m68ki_write_16(ea+2, REG_DA[15-i] & 0xFFFF );\r
+ //m68ki_write_16(ea, (REG_DA[15-i] >> 16) & 0xFFFF );\r
count++;\r
}\r
AY = ea;\r
M68KMAKE_OP(suba, 32, ., .)\r
{\r
uint* r_dst = &AX;\r
+ uint src = M68KMAKE_GET_OPER_AY_32; // notaz\r
\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - M68KMAKE_GET_OPER_AY_32);\r
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);\r
}\r
\r
\r
\r
/* If ON, the CPU will monitor the trace flags and take trace exceptions\r
*/\r
-#define M68K_EMULATE_TRACE OPT_OFF\r
+#define M68K_EMULATE_TRACE OPT_ON\r
\r
\r
/* If ON, CPU will call the output reset callback when it encounters a reset\r
/* Make sure we're not stopped */\r
if(!CPU_STOPPED)\r
{\r
+ // notaz\r
+ m68ki_check_interrupts();\r
+\r
/* Set our pool of clock cycles available */\r
SET_CYCLES(num_cycles);\r
m68ki_initial_cycles = num_cycles;\r
\r
/* Main loop. Keep going until we run out of clock cycles */\r
// notaz\r
+ m68ki_trace_t1();\r
+\r
while(GET_CYCLES() >= 0)\r
// do\r
{\r
/* Set tracing accodring to T1. (T0 is done inside instruction) */\r
- m68ki_trace_t1(); /* auto-disable (see m68kcpu.h) */\r
+ //m68ki_trace_t1(); /* auto-disable (see m68kcpu.h) */\r
\r
/* Set the address space for reads */\r
m68ki_use_data_space(); /* auto-disable (see m68kcpu.h) */\r
\r
/* Read an instruction and call its handler */\r
REG_IR = m68ki_read_imm_16();\r
+ USE_CYCLES(CYC_INSTRUCTION[REG_IR]); // notaz\r
m68ki_instruction_jump_table[REG_IR]();\r
- USE_CYCLES(CYC_INSTRUCTION[REG_IR]);\r
\r
/* Trace m68k_exception, if necessary */\r
m68ki_exception_if_trace(); /* auto-disable (see m68kcpu.h) */\r
+\r
+ m68ki_trace_t1(); /* notaz */\r
} // while(GET_CYCLES() > 0); // notaz\r
\r
/* set previous PC to current PC for the next entry into the loop */\r
INLINE void m68ki_set_sr(uint value)\r
{\r
m68ki_set_sr_noint(value);\r
- m68ki_check_interrupts();\r
+ if (GET_CYCLES() >= 0) // notaz\r
+ m68ki_check_interrupts();\r
}\r
\r
\r