DGen/SDL
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions | Variables
pd.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include "md.h"

Go to the source code of this file.

Functions

unsigned long pd_usecs (void)
 Elapsed time in microseconds.
int pd_graphics_init (int want_sound, int want_pal, int hz)
 Initialize SDL, and the graphics.
int pd_graphics_reinit (int want_sound, int want_pal, int hz)
 Reinitialize graphics.
void pd_graphics_palette_update ()
 Update palette.
void pd_graphics_update (bool update)
 Display screen.
int pd_sound_init (long &freq, unsigned int &samples)
 Initialize the sound.
void pd_sound_deinit ()
 Deinitialize sound subsystem.
void pd_sound_start ()
 Start/stop audio processing.
void pd_sound_pause ()
 Pause sound.
unsigned int pd_sound_rp ()
 Return samples read/write indices in the buffer.
unsigned int pd_sound_wp ()
void pd_sound_write ()
 Write contents of sndi to sound.cbuf.
void pd_rc ()
 Handle rc variables.
void pd_option (char c, const char *optarg)
 Handle the switches.
void pd_help ()
 SDL flags help.
int pd_handle_events (md &megad)
int pd_stopped ()
 Tells whether DGen stopped intentionally so emulation can resume without skipping frames.
void pd_message (const char *fmt,...)
 Write a message to the status bar.
void pd_clear_message ()
void pd_show_carthead (md &megad)
void pd_quit ()

Variables

struct bmap mdscr
unsigned char * mdpal
struct sndinfo sndi
const char * pd_options
bool pd_freeze
 Enable emulation by default.

Function Documentation

void pd_clear_message ( )
int pd_graphics_init ( int  want_sound,
int  want_pal,
int  hz 
)

Initialize SDL, and the graphics.

Parameters:
want_soundNonzero if we want sound.
want_palNonzero for PAL mode.
hzRequested frame rate (between 0 and 1000).
Returns:
Nonzero if successful.
void pd_graphics_palette_update ( )

Update palette.

int pd_graphics_reinit ( int  ,
int  want_pal,
int  hz 
)

Reinitialize graphics.

Parameters:
want_palNonzero for PAL mode.
hzRequested frame rate (between 0 and 1000).
Returns:
Nonzero if successful.
void pd_graphics_update ( bool  update)

Display screen.

Parameters:
updateFalse if screen buffer is garbage and must be updated first.
int pd_handle_events ( md megad)
void pd_help ( )

SDL flags help.

void pd_message ( const char *  fmt,
  ... 
)

Write a message to the status bar.

void pd_option ( char  c,
const char *   
)

Handle the switches.

Parameters:
cSwitch's value.
void pd_quit ( )
void pd_rc ( )

Handle rc variables.

void pd_show_carthead ( md megad)
void pd_sound_deinit ( )

Deinitialize sound subsystem.

int pd_sound_init ( long &  freq,
unsigned int &  samples 
)

Initialize the sound.

Parameters:
freqSound samples rate.
[in,out]samplesMinimum buffer size in samples.
Returns:
Nonzero on success.
void pd_sound_pause ( )

Pause sound.

unsigned int pd_sound_rp ( )

Return samples read/write indices in the buffer.

void pd_sound_start ( )

Start/stop audio processing.

unsigned int pd_sound_wp ( )
void pd_sound_write ( )

Write contents of sndi to sound.cbuf.

int pd_stopped ( )

Tells whether DGen stopped intentionally so emulation can resume without skipping frames.

unsigned long pd_usecs ( void  )

Elapsed time in microseconds.

Returns:
Microseconds.

Variable Documentation

unsigned char* mdpal
struct bmap mdscr
bool pd_freeze

Enable emulation by default.

const char* pd_options
struct sndinfo sndi