4 * Public interface for dreamcast.c -
5 * Central switchboard for the system. This pulls all the individual modules
6 * together into some kind of coherent structure. This is also where you'd
7 * add Naomi support, if I ever get a board to play with...
9 * Copyright (c) 2005 Nathan Keynes.
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
32 #define DEFAULT_TIMESLICE_LENGTH 1000000 /* nanoseconds */
34 #define XLAT_NEW_CACHE_SIZE 32 MB
35 #define XLAT_TEMP_CACHE_SIZE 2 MB
36 #define XLAT_OLD_CACHE_SIZE 8 MB
38 void dreamcast_configure(void);
39 void dreamcast_configure_aica_only(void);
40 void dreamcast_init(void);
41 void dreamcast_reset(void);
42 void dreamcast_run(void);
43 void dreamcast_run_for( unsigned int seconds, unsigned int nanosecs );
44 void dreamcast_stop(void);
45 void dreamcast_shutdown(void);
46 void dreamcast_config_changed(void);
47 gboolean dreamcast_is_running(void);
50 * Return if it's possible to start the VM - currently this requires
51 * a) A configured system
52 * b) Some code to run (either a user program or a ROM)
54 gboolean dreamcast_can_run(void);
57 * Notify the VM that a program (ELF or other binary) has been loaded.
60 void dreamcast_program_loaded( const gchar *name, sh4addr_t entry_point );
62 #define DREAMCAST_SAVE_MAGIC "%!-lxDream!Save\0"
63 #define DREAMCAST_SAVE_VERSION 0x00010003
65 int dreamcast_save_state( const gchar *filename );
66 int dreamcast_load_state( const gchar *filename );
69 * Load the front-buffer image from the specified file.
70 * If the file is not a valid save state, returns NULL. Otherwise,
71 * returns a newly allocated frame_buffer that should be freed
72 * by the caller. (The data buffer is contained within the
73 * allocation and does not need to be freed separately)
75 frame_buffer_t dreamcast_load_preview( const gchar *filename );
77 #define SCENE_SAVE_MAGIC "%!-lxDream!Scene"
78 #define SCENE_SAVE_VERSION 0x00010000
84 #endif /* !dreamcast_H */
.