Search
lxdream.org :: lxdream/src/dreamcast.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/dreamcast.c
changeset 586:2a3ba82cf243
prev543:361ec0a70cf2
next669:ab344e42bca9
author nkeynes
date Mon Jan 28 02:37:09 2008 +0000 (16 years ago)
permissions -rw-r--r--
last change Add general purpose relative filename helper
file annotate diff log raw
1.1 --- a/src/dreamcast.c Thu Nov 22 11:10:15 2007 +0000
1.2 +++ b/src/dreamcast.c Mon Jan 28 02:37:09 2008 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: dreamcast.c,v 1.28 2007-10-31 11:53:35 nkeynes Exp $
1.6 + * $Id$
1.7 * Central switchboard for the system. This pulls all the individual modules
1.8 * together into some kind of coherent structure. This is also where you'd
1.9 * add Naomi support, if I ever get a board to play with...
1.10 @@ -27,6 +27,7 @@
1.11 #include "dreamcast.h"
1.12 #include "gdrom/ide.h"
1.13 #include "maple/maple.h"
1.14 +#include "sh4/sh4trans.h"
1.15
1.16 /**
1.17 * Current state of the DC virtual machine
1.18 @@ -131,6 +132,9 @@
1.19 void dreamcast_reset( void )
1.20 {
1.21 int i;
1.22 + if( sh4_xlat_is_running() ) {
1.23 + sh4_translate_exit( XLAT_EXIT_SYSRESET );
1.24 + }
1.25 for( i=0; i<num_modules; i++ ) {
1.26 if( modules[i]->reset != NULL )
1.27 modules[i]->reset();
1.28 @@ -201,6 +205,9 @@
1.29
1.30 void dreamcast_stop( void )
1.31 {
1.32 + if( sh4_xlat_is_running() ) {
1.33 + sh4_translate_exit( XLAT_EXIT_HALT );
1.34 + }
1.35 if( dreamcast_state == STATE_RUNNING )
1.36 dreamcast_state = STATE_STOPPING;
1.37 }
1.38 @@ -219,9 +226,7 @@
1.39 dreamcast_program_name = g_strdup(name);
1.40 dreamcast_entry_point = entry_point;
1.41 sh4_set_pc(entry_point);
1.42 - if( !dreamcast_has_bios ) {
1.43 - bios_install();
1.44 - }
1.45 + bios_install();
1.46 dcload_install();
1.47 gui_update_state();
1.48 }
.