Search
lxdream.org :: lxdream/src/dreamcast.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/dreamcast.c
changeset 277:fcc1274776cb
prev265:5daf59b7f31b
next295:6637664291a8
author nkeynes
date Mon Jan 15 08:32:09 2007 +0000 (17 years ago)
permissions -rw-r--r--
last change Break vram routines out into pvr2mem.c
Initial (untested) implementation of stride textures
Hookup YUV converter code in pvr2.c
file annotate diff log raw
1.1 --- a/src/dreamcast.c Sat Jan 06 04:06:36 2007 +0000
1.2 +++ b/src/dreamcast.c Mon Jan 15 08:32:09 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: dreamcast.c,v 1.19 2007-01-06 04:06:36 nkeynes Exp $
1.6 + * $Id: dreamcast.c,v 1.20 2007-01-12 10:16:02 nkeynes Exp $
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 @@ -85,6 +85,12 @@
1.11 dreamcast_register_module( &ide_module );
1.12 }
1.13
1.14 +void dreamcast_save_flash()
1.15 +{
1.16 + char *file = dreamcast_get_config_value(CONFIG_FLASH_PATH);
1.17 + mem_save_block( file, 0x00200000, 0x00020000 );
1.18 +}
1.19 +
1.20 /**
1.21 * Constructs a system configuration for the AICA in standalone mode,
1.22 * ie sound chip only.
1.23 @@ -154,6 +160,13 @@
1.24 dreamcast_state = STATE_STOPPING;
1.25 }
1.26
1.27 +void dreamcast_shutdown()
1.28 +{
1.29 + dreamcast_stop();
1.30 + sh4_stop();
1.31 + dreamcast_save_flash();
1.32 +}
1.33 +
1.34 gboolean dreamcast_is_running( void )
1.35 {
1.36 return dreamcast_state == STATE_RUNNING;
.