Search
lxdream.org :: lxdream/src/dreamcast.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/dreamcast.h
changeset 180:e6dcf9b65658
prev167:71c0cc416a64
next295:6637664291a8
author nkeynes
date Sat Aug 05 00:18:21 2006 +0000 (17 years ago)
permissions -rw-r--r--
last change Add error lines to tests with incomplete polys
Split clip tests to separate data file
Add tests for cmd bit 23 ("use list size field")
view annotate diff log raw
     1 /**
     2  * $Id: dreamcast.h,v 1.11 2006-07-02 04:59:00 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 */
    33 #define CONFIG_TYPE_NONE 0
    34 #define CONFIG_TYPE_FILE 1
    35 #define CONFIG_TYPE_PATH 2
    36 #define CONFIG_TYPE_KEY 3
    38 #define DEFAULT_CONFIG_FILENAME "lxdream.rc"
    40 typedef struct dreamcast_config_entry {
    41     const gchar *key;
    42     const int type;
    43     const gchar *default_value;
    44     gchar *value;
    45 } *dreamcast_config_entry_t;
    47 typedef struct dreamcast_config_group {
    48     const gchar *key;
    49     struct dreamcast_config_entry *params;
    50 } *dreamcast_config_group_t;
    53 void dreamcast_init(void);
    54 void dreamcast_reset(void);
    55 void dreamcast_run(void);
    56 void dreamcast_stop(void);
    58 gboolean dreamcast_load_config( const gchar *filename );
    59 gboolean dreamcast_save_config( const gchar *filename );
    61 int dreamcast_save_state( const gchar *filename );
    62 int dreamcast_load_state( const gchar *filename );
    64 extern struct dreamcast_config_group dreamcast_config_root[];
    66 /* Global config values */
    67 const gchar *dreamcast_get_config_value( int key );
    68 #define CONFIG_BIOS_PATH 0
    69 #define CONFIG_FLASH_PATH 1
    70 #define CONFIG_DEFAULT_PATH 2
    71 #define CONFIG_SAVE_PATH 3
    72 #define CONFIG_BOOTSTRAP 4
    74 #ifdef __cplusplus
    75 }
    76 #endif
    78 #endif /* !dreamcast_H */
.