#define M68KCPU__HEADER\r
\r
// notaz: something's missing this\r
-#ifndef UINT64\r
-#define UINT64 unsigned long long\r
-#endif\r
-#ifndef UINT16\r
-#define UINT32 unsigned int\r
-#define UINT16 unsigned short\r
-#define UINT8 unsigned char\r
-#endif\r
+#include <stdint.h>\r
+typedef uint64_t UINT64;\r
+typedef uint32_t UINT32;\r
+typedef uint16_t UINT16;\r
+typedef uint8_t UINT8;\r
\r
#include "m68k.h"\r
#include <limits.h>\r
#define uint32 unsigned int /* AWJ: changed from long to int */\r
\r
/* signed and unsigned int must be at least 32 bits wide */\r
-#define sint signed int\r
-#define uint unsigned int\r
+//#define sint signed int\r
+//#define uint unsigned int\r
+#define sint _sint\r
+#define uint _uint\r
+typedef signed int sint;\r
+typedef unsigned int uint;\r
\r
\r
#if M68K_USE_64_BIT\r
/* Exception Vectors handled by emulation */\r
#define EXCEPTION_BUS_ERROR 2 /* This one is not emulated! */\r
#define EXCEPTION_ADDRESS_ERROR 3 /* This one is partially emulated (doesn't stack a proper frame yet) */\r
+#undef EXCEPTION_ILLEGAL_INSTRUCTION\r
#define EXCEPTION_ILLEGAL_INSTRUCTION 4\r
#define EXCEPTION_ZERO_DIVIDE 5\r
#define EXCEPTION_CHK 6\r
void (*instr_hook_callback)(void); /* Called every instruction cycle prior to execution */\r
\r
// notaz\r
+ sint cyc_initial_cycles;\r
sint cyc_remaining_cycles;\r
sint not_polling;\r
} m68ki_cpu_core;\r
// notaz\r
extern m68ki_cpu_core *m68ki_cpu_p;\r
#define m68ki_cpu (*m68ki_cpu_p)\r
+#define m68ki_initial_cycles m68ki_cpu_p->cyc_initial_cycles\r
#define m68ki_remaining_cycles m68ki_cpu_p->cyc_remaining_cycles\r
\r
\r
INLINE void m68ki_set_sr(uint value)\r
{\r
m68ki_set_sr_noint(value);\r
- if (GET_CYCLES() >= 0) // notaz\r
+ if (GET_CYCLES() > 0) // notaz\r
m68ki_check_interrupts();\r
}\r
\r