Search
lxdream.org :: lxdream/src/dreamcast.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/dreamcast.h
changeset 493:c8183f888b14
prev477:9a373f2ff009
next543:361ec0a70cf2
author nkeynes
date Tue Nov 06 08:35:33 2007 +0000 (12 years ago)
permissions -rw-r--r--
last change Implement mode select command
file annotate diff log raw
nkeynes@26
     1
/**
nkeynes@493
     2
 * $Id: dreamcast.h,v 1.22 2007-11-06 08:35:33 nkeynes Exp $
nkeynes@26
     3
 *
nkeynes@26
     4
 * Public interface for dreamcast.c -
nkeynes@26
     5
 * Central switchboard for the system. This pulls all the individual modules
nkeynes@26
     6
 * together into some kind of coherent structure. This is also where you'd
nkeynes@26
     7
 * add Naomi support, if I ever get a board to play with...
nkeynes@26
     8
 *
nkeynes@26
     9
 * Copyright (c) 2005 Nathan Keynes.
nkeynes@26
    10
 *
nkeynes@26
    11
 * This program is free software; you can redistribute it and/or modify
nkeynes@26
    12
 * it under the terms of the GNU General Public License as published by
nkeynes@26
    13
 * the Free Software Foundation; either version 2 of the License, or
nkeynes@26
    14
 * (at your option) any later version.
nkeynes@26
    15
 *
nkeynes@26
    16
 * This program is distributed in the hope that it will be useful,
nkeynes@26
    17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@26
    18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@26
    19
 * GNU General Public License for more details.
nkeynes@26
    20
 */
nkeynes@2
    21
nkeynes@2
    22
#ifndef dreamcast_H
nkeynes@2
    23
#define dreamcast_H 1
nkeynes@2
    24
nkeynes@15
    25
#include <stdio.h>
nkeynes@477
    26
#include "lxdream.h"
nkeynes@15
    27
nkeynes@15
    28
#ifdef __cplusplus
nkeynes@15
    29
extern "C" {
nkeynes@15
    30
#endif
nkeynes@15
    31
nkeynes@30
    32
#define DEFAULT_TIMESLICE_LENGTH 1000000 /* nanoseconds */
nkeynes@359
    33
nkeynes@422
    34
#define XLAT_NEW_CACHE_SIZE 32 MB
nkeynes@359
    35
#define XLAT_TEMP_CACHE_SIZE 2 MB
nkeynes@359
    36
#define XLAT_OLD_CACHE_SIZE 8 MB
nkeynes@359
    37
nkeynes@422
    38
void dreamcast_configure(void);
nkeynes@422
    39
void dreamcast_configure_aica_only(void);
nkeynes@2
    40
void dreamcast_init(void);
nkeynes@2
    41
void dreamcast_reset(void);
nkeynes@23
    42
void dreamcast_run(void);
nkeynes@372
    43
void dreamcast_run_for( unsigned int seconds, unsigned int nanosecs );
nkeynes@2
    44
void dreamcast_stop(void);
nkeynes@429
    45
void dreamcast_shutdown(void);
nkeynes@461
    46
void dreamcast_config_changed(void);
nkeynes@431
    47
gboolean dreamcast_is_running(void);
nkeynes@2
    48
nkeynes@295
    49
#define DREAMCAST_SAVE_MAGIC "%!-lxDream!Save\0"
nkeynes@493
    50
#define DREAMCAST_SAVE_VERSION 0x00010002
nkeynes@295
    51
nkeynes@18
    52
int dreamcast_save_state( const gchar *filename );
nkeynes@18
    53
int dreamcast_load_state( const gchar *filename );
nkeynes@18
    54
nkeynes@477
    55
/**
nkeynes@477
    56
 * Load the front-buffer image from the specified file.
nkeynes@477
    57
 * If the file is not a valid save state, returns NULL. Otherwise,
nkeynes@477
    58
 * returns a newly allocated frame_buffer that should be freed
nkeynes@477
    59
 * by the caller. (The data buffer is contained within the
nkeynes@477
    60
 * allocation and does not need to be freed separately)
nkeynes@477
    61
 */
nkeynes@477
    62
frame_buffer_t dreamcast_load_preview( const gchar *filename );
nkeynes@477
    63
nkeynes@295
    64
#define SCENE_SAVE_MAGIC "%!-lxDream!Scene"
nkeynes@295
    65
#define SCENE_SAVE_VERSION 0x00010000
nkeynes@295
    66
nkeynes@15
    67
#ifdef __cplusplus
nkeynes@15
    68
}
nkeynes@15
    69
#endif
nkeynes@15
    70
nkeynes@26
    71
#endif /* !dreamcast_H */
.