mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-06-26 00:29:27 +00:00
Add but disable CPU trace on Android
This commit is contained in:
parent
b9acdc7d4c
commit
1358a52eee
|
@ -173,6 +173,15 @@ void Java_org_deadc0de_apple2ix_Apple2Activity_nativeOnCreate(JNIEnv *env, jclas
|
|||
|
||||
joydriver_setClampBeyondRadius(true);
|
||||
|
||||
//#define DO_CPU65_TRACING 1
|
||||
#if DO_CPU65_TRACING
|
||||
# warning !!!!!!!!!! this will quickly eat up disk space !!!!!!!!!!
|
||||
char *trfile = NULL;
|
||||
asprintf(&trfile, "%s/%s", data_dir, "cpu_trace.txt");
|
||||
cpu65_trace_begin(trfile);
|
||||
ASPRINTF_FREE(trfile);
|
||||
#endif
|
||||
|
||||
#if !TESTING
|
||||
cpu_pause();
|
||||
emulator_start();
|
||||
|
@ -215,6 +224,10 @@ void Java_org_deadc0de_apple2ix_Apple2Activity_nativeEmulationPause(JNIEnv *env,
|
|||
return;
|
||||
}
|
||||
|
||||
#if DO_CPU65_TRACING
|
||||
cpu65_trace_checkpoint();
|
||||
#endif
|
||||
|
||||
disk6_flush(0);
|
||||
disk6_flush(1);
|
||||
|
||||
|
@ -277,6 +290,10 @@ void Java_org_deadc0de_apple2ix_Apple2Activity_nativeOnQuit(JNIEnv *env, jclass
|
|||
disk6_eject(0);
|
||||
disk6_eject(1);
|
||||
|
||||
#if DO_CPU65_TRACING
|
||||
cpu65_trace_end();
|
||||
#endif
|
||||
|
||||
cpu_resume();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -923,7 +923,7 @@ GLUE_C_WRITE(cpu65_trace_epilogue)
|
|||
|
||||
void cpu65_trace_checkpoint(void) {
|
||||
if (cpu_trace_fp) {
|
||||
fprintf(cpu_trace_fp, "---TOTAL CYC:%lu\n",cycles_count_total);
|
||||
//fprintf(cpu_trace_fp, "---TOTAL CYC:%lu\n",cycles_count_total);
|
||||
fflush(cpu_trace_fp);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -406,9 +406,6 @@ static void *cpu_thread(void *dummyptr) {
|
|||
#endif
|
||||
|
||||
timing_checkpoint_cycles();
|
||||
#if CPU_TRACING
|
||||
cpu65_trace_checkpoint();
|
||||
#endif
|
||||
|
||||
#ifdef AUDIO_ENABLED
|
||||
speaker_flush(); // play audio
|
||||
|
|
Loading…
Reference in New Issue
Block a user