Interpreter and dynamic recompiler now present in a single binary.

This commit is contained in:
TomW 2015-08-21 20:55:36 +01:00
commit f339f00315
25 changed files with 365 additions and 1208 deletions

View file

@ -8,11 +8,9 @@
#include "video.h"
#include "resources.h"
#include "win.h"
#ifdef DYNAREC
#include "x86_ops.h"
#include "mem.h"
#include "codegen.h"
#endif
HWND status_hwnd;
int status_is_open = 0;
@ -37,33 +35,32 @@ static BOOL CALLBACK status_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
sprintf(device_s,
"CPU speed : %f MIPS\n"
"FPU speed : %f MFLOPS\n\n"
#ifndef DYNAREC
"Cache misses (read) : %i/sec\n"
"Cache misses (write) : %i/sec\n\n"
#endif
/* "Cache misses (read) : %i/sec\n"
"Cache misses (write) : %i/sec\n\n"*/
"Video throughput (read) : %i bytes/sec\n"
"Video throughput (write) : %i bytes/sec\n\n"
"Effective clockspeed : %iHz\n\n"
"Timer 0 frequency : %fHz\n\n"
"CPU time : %f%% (%f%%)\n"
#ifdef DYNAREC
"New blocks : %i\nOld blocks : %i\nRecompiled speed : %f MIPS\nAverage size : %f\n"
"Flushes : %i\nEvicted : %i\nReused : %i\nRemoved : %i\nReal speed : %f MIPS"
// "\nFully recompiled ins %% : %f%%"
#endif
,mips,
flops,
#ifndef DYNAREC
/*#ifndef DYNAREC
sreadlnum,
swritelnum,
#endif
#endif*/
segareads,
segawrites,
clockrate - (sreadlnum*memwaitstate) - (swritelnum*memwaitstate) - scycles_lost,
pit_timer0_freq(),
((double)main_time * 100.0) / status_diff,
((double)main_time * 100.0) / timer_freq
#ifdef DYNAREC
, cpu_new_blocks_latched, cpu_recomp_blocks_latched, (double)cpu_recomp_ins_latched / 1000000.0, (double)cpu_recomp_ins_latched/cpu_recomp_blocks_latched,
cpu_recomp_flushes_latched, cpu_recomp_evicted_latched,
cpu_recomp_reuse_latched, cpu_recomp_removed_latched,
@ -71,18 +68,16 @@ static BOOL CALLBACK status_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
((double)cpu_recomp_ins_latched / 1000000.0) / ((double)main_time / timer_freq)
// ((double)cpu_recomp_full_ins_latched / (double)cpu_recomp_ins_latched) * 100.0
// cpu_reps_latched, cpu_notreps_latched
#endif
);
main_time = 0;
#ifndef DYNAREC
/*#ifndef DYNAREC
device_add_status_info(device_s, 4096);
#endif
#endif*/
SendDlgItemMessage(hdlg, IDC_STEXT_DEVICE, WM_SETTEXT, (WPARAM)NULL, (LPARAM)device_s);
#ifdef DYNAREC
device_s[0] = 0;
device_add_status_info(device_s, 4096);
SendDlgItemMessage(hdlg, IDC_STEXT1, WM_SETTEXT, (WPARAM)NULL, (LPARAM)device_s);
#endif
}
return TRUE;