filename | src/dreamcast.h |
changeset | 359:c588dce7ebde |
prev | 295:6637664291a8 |
next | 372:86aa060ddcec |
author | nkeynes |
date | Thu Aug 23 12:33:27 2007 +0000 (16 years ago) |
permissions | -rw-r--r-- |
last change | Commit decoder generator Translator work in progress Fix mac.l, mac.w in emu core |
view | annotate | diff | log | raw |
1 /**
2 * $Id: dreamcast.h,v 1.13 2007-08-23 12:33:27 nkeynes Exp $
3 *
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...
8 *
9 * Copyright (c) 2005 Nathan Keynes.
10 *
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.
15 *
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.
20 */
22 #ifndef dreamcast_H
23 #define dreamcast_H 1
25 #include <stdio.h>
26 #include <glib/gtypes.h>
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
32 #define DEFAULT_TIMESLICE_LENGTH 1000000 /* nanoseconds */
34 #ifndef MB
35 #define MB *1024*1024
36 #endif
38 #define XLAT_NEW_CACHE_SIZE 8 MB
39 #define XLAT_TEMP_CACHE_SIZE 2 MB
40 #define XLAT_OLD_CACHE_SIZE 8 MB
42 #define CONFIG_TYPE_NONE 0
43 #define CONFIG_TYPE_FILE 1
44 #define CONFIG_TYPE_PATH 2
45 #define CONFIG_TYPE_KEY 3
47 #define DEFAULT_CONFIG_FILENAME "lxdream.rc"
49 typedef struct dreamcast_config_entry {
50 const gchar *key;
51 const int type;
52 const gchar *default_value;
53 gchar *value;
54 } *dreamcast_config_entry_t;
56 typedef struct dreamcast_config_group {
57 const gchar *key;
58 struct dreamcast_config_entry *params;
59 } *dreamcast_config_group_t;
62 void dreamcast_init(void);
63 void dreamcast_reset(void);
64 void dreamcast_run(void);
65 void dreamcast_stop(void);
67 gboolean dreamcast_load_config( const gchar *filename );
68 gboolean dreamcast_save_config( const gchar *filename );
70 #define DREAMCAST_SAVE_MAGIC "%!-lxDream!Save\0"
71 #define DREAMCAST_SAVE_VERSION 0x00010000
73 int dreamcast_save_state( const gchar *filename );
74 int dreamcast_load_state( const gchar *filename );
76 #define SCENE_SAVE_MAGIC "%!-lxDream!Scene"
77 #define SCENE_SAVE_VERSION 0x00010000
79 extern struct dreamcast_config_group dreamcast_config_root[];
81 /* Global config values */
82 const gchar *dreamcast_get_config_value( int key );
83 #define CONFIG_BIOS_PATH 0
84 #define CONFIG_FLASH_PATH 1
85 #define CONFIG_DEFAULT_PATH 2
86 #define CONFIG_SAVE_PATH 3
87 #define CONFIG_BOOTSTRAP 4
89 #ifdef __cplusplus
90 }
91 #endif
93 #endif /* !dreamcast_H */
.