mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-28 22:31:11 +00:00
BII: additional delay test
This commit is contained in:
parent
33c3419b08
commit
f07b34a451
@ -374,6 +374,16 @@ void cpu_do_check_ticks(void)
|
||||
if (emulated_ticks <= 0)
|
||||
emulated_ticks += emulated_ticks_quantum;
|
||||
}
|
||||
#else
|
||||
uint16 emulated_ticks;
|
||||
void cpu_do_check_ticks(void)
|
||||
{
|
||||
static int delay = -1;
|
||||
if (delay < 0)
|
||||
delay = PrefsFindInt32("delay");
|
||||
if (delay)
|
||||
usleep(delay);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -190,6 +190,16 @@ static void sigsegv_dump_state(sigsegv_info_t *sip)
|
||||
#endif
|
||||
}
|
||||
|
||||
uint16 emulated_ticks;
|
||||
void cpu_do_check_ticks(void)
|
||||
{
|
||||
static int delay = -1;
|
||||
if (delay < 0)
|
||||
delay = PrefsFindInt32("delay");
|
||||
if (delay)
|
||||
usleep(delay);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Main program
|
||||
|
@ -85,6 +85,7 @@ prefs_desc common_prefs_items[] = {
|
||||
{"title", TYPE_STRING, false, "window title"},
|
||||
{"sound_buffer", TYPE_INT32, false, "sound buffer length"},
|
||||
{"name_encoding", TYPE_INT32, false, "file name encoding"},
|
||||
{"delay", TYPE_INT32, false, "additional delay [uS] every 64k instructions"},
|
||||
{NULL, TYPE_END, false, NULL} // End of list
|
||||
};
|
||||
|
||||
|
@ -338,9 +338,9 @@ extern void m68k_execute(void);
|
||||
#if USE_JIT
|
||||
extern void m68k_compile_execute(void);
|
||||
#endif
|
||||
extern void cpu_do_check_ticks(void);
|
||||
#ifdef USE_CPU_EMUL_SERVICES
|
||||
extern int32 emulated_ticks;
|
||||
extern void cpu_do_check_ticks(void);
|
||||
|
||||
static inline void cpu_check_ticks(void)
|
||||
{
|
||||
@ -348,8 +348,12 @@ static inline void cpu_check_ticks(void)
|
||||
cpu_do_check_ticks();
|
||||
}
|
||||
#else
|
||||
#define cpu_check_ticks()
|
||||
#define cpu_do_check_ticks()
|
||||
extern uint16 emulated_ticks;
|
||||
static inline void cpu_check_ticks(void)
|
||||
{
|
||||
if (!++emulated_ticks)
|
||||
cpu_do_check_ticks();
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* NEWCPU_H */
|
||||
|
@ -316,9 +316,9 @@ extern void m68k_execute(void);
|
||||
extern void m68k_compile_execute(void);
|
||||
extern void m68k_do_compile_execute(void);
|
||||
#endif
|
||||
extern void cpu_do_check_ticks(void);
|
||||
#ifdef USE_CPU_EMUL_SERVICES
|
||||
extern int32 emulated_ticks;
|
||||
extern void cpu_do_check_ticks(void);
|
||||
|
||||
static inline void cpu_check_ticks(void)
|
||||
{
|
||||
@ -326,8 +326,12 @@ static inline void cpu_check_ticks(void)
|
||||
cpu_do_check_ticks();
|
||||
}
|
||||
#else
|
||||
#define cpu_check_ticks()
|
||||
#define cpu_do_check_ticks()
|
||||
extern uint16 emulated_ticks;
|
||||
static inline void cpu_check_ticks(void)
|
||||
{
|
||||
if (!++emulated_ticks)
|
||||
cpu_do_check_ticks();
|
||||
}
|
||||
#endif
|
||||
|
||||
cpuop_func op_illg_1;
|
||||
|
Loading…
Reference in New Issue
Block a user