Search
lxdream.org :: lxdream/src/dreamcast.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/dreamcast.c
changeset 585:371342a39c09
prev561:533f6b478071
next1065:bc1cc0c54917
author nkeynes
date Tue Jan 15 11:07:32 2008 +0000 (13 years ago)
branchlxdream-mmu
permissions -rw-r--r--
last change Handle sh4 aborts/reset within the translator
file annotate diff log raw
1.1 --- a/src/dreamcast.c Tue Jan 01 05:08:38 2008 +0000
1.2 +++ b/src/dreamcast.c Tue Jan 15 11:07:32 2008 +0000
1.3 @@ -27,6 +27,7 @@
1.4 #include "dreamcast.h"
1.5 #include "gdrom/ide.h"
1.6 #include "maple/maple.h"
1.7 +#include "sh4/sh4trans.h"
1.8
1.9 /**
1.10 * Current state of the DC virtual machine
1.11 @@ -131,6 +132,9 @@
1.12 void dreamcast_reset( void )
1.13 {
1.14 int i;
1.15 + if( sh4_xlat_is_running() ) {
1.16 + sh4_translate_exit( XLAT_EXIT_SYSRESET );
1.17 + }
1.18 for( i=0; i<num_modules; i++ ) {
1.19 if( modules[i]->reset != NULL )
1.20 modules[i]->reset();
1.21 @@ -201,6 +205,9 @@
1.22
1.23 void dreamcast_stop( void )
1.24 {
1.25 + if( sh4_xlat_is_running() ) {
1.26 + sh4_translate_exit( XLAT_EXIT_HALT );
1.27 + }
1.28 if( dreamcast_state == STATE_RUNNING )
1.29 dreamcast_state = STATE_STOPPING;
1.30 }
1.31 @@ -219,9 +226,7 @@
1.32 dreamcast_program_name = g_strdup(name);
1.33 dreamcast_entry_point = entry_point;
1.34 sh4_set_pc(entry_point);
1.35 - if( !dreamcast_has_bios ) {
1.36 - bios_install();
1.37 - }
1.38 + bios_install();
1.39 dcload_install();
1.40 gui_update_state();
1.41 }
.