1.1 --- a/src/sh4/sh4.c Thu Nov 08 11:54:16 2007 +0000
1.2 +++ b/src/sh4/sh4.c Sat Nov 17 06:04:19 2007 +0000
1.4 #define EXV_INTERRUPT 0x600 /* External interrupt vector */
1.6 void sh4_init( void );
1.7 -void sh4_x86_init( void );
1.8 +void sh4_xlat_init( void );
1.9 void sh4_reset( void );
1.10 void sh4_start( void );
1.11 void sh4_stop( void );
1.13 struct breakpoint_struct sh4_breakpoints[MAX_BREAKPOINTS];
1.14 int sh4_breakpoint_count = 0;
1.15 extern sh4ptr_t sh4_main_ram;
1.16 +static gboolean sh4_use_translator = FALSE;
1.18 void sh4_set_use_xlat( gboolean use )
1.20 +// No-op if the translator was not built
1.21 +#ifdef SH4_TRANSLATOR
1.27 sh4_module.run_time_slice = sh4_run_slice;
1.29 + sh4_use_translator = use;
1.36 void sh4_reset(void)
1.38 - if( sh4_module.run_time_slice == sh4_xlat_run_slice ) {
1.39 + if( sh4_use_translator ) {
1.47 - if( sh4_module.run_time_slice == sh4_xlat_run_slice ) {
1.48 + if( sh4_use_translator ) {
1.49 /* If we were running with the translator, update new_pc and in_delay_slot */
1.50 sh4r.new_pc = sh4r.pc+2;
1.51 sh4r.in_delay_slot = FALSE;
1.54 void sh4_save_state( FILE *f )
1.56 - if( sh4_module.run_time_slice == sh4_xlat_run_slice ) {
1.57 + if( sh4_use_translator ) {
1.58 /* If we were running with the translator, update new_pc and in_delay_slot */
1.59 sh4r.new_pc = sh4r.pc+2;
1.60 sh4r.in_delay_slot = FALSE;
1.63 int sh4_load_state( FILE * f )
1.65 - if( sh4_module.run_time_slice == sh4_xlat_run_slice ) {
1.66 + if( sh4_use_translator ) {
1.69 fread( &sh4r, sizeof(sh4r), 1, f );