Пример #1
0
static int framecounter = 0;
static long time1 = 0;
static int volume = 30;
static int saveslot = 1;

static int vmode[3] = { 0, 0, 16 };
bool startpressed = false;
bool selectpressed = false;
extern bool emuquit;
char * datfile;
static int startvolume=50;

rcvar_t vid_exports[] =
{
	RCV_VECTOR("vmode", &vmode, 3),
	RCV_BOOL("yuv", &use_yuv),
	RCV_BOOL("fullscreen", &fullscreen),
	RCV_BOOL("altenter", &use_altenter),
	RCV_END
};

rcvar_t joy_exports[] =
{
	RCV_BOOL("joy", &use_joy),
	RCV_END
};

/* keymap - mappings of the form { scancode, localcode } - from sdl/keymap.c */
extern int keymap[][2];

#include "../../pcm.h"
Пример #2
0
	rtcfile = malloc(strlen(saveprefix) + 5);
	strcpy(rtcfile, saveprefix);
	strcat(rtcfile, ".rtc");
	
	sram_load();
	rtc_load();

	atexit(cleanup);
}

rcvar_t loader_exports[] =
{
	RCV_STRING("savedir", &savedir),
	RCV_STRING("savename", &savename),
	RCV_INT("saveslot", &saveslot),
	RCV_BOOL("forcebatt", &forcebatt),
	RCV_BOOL("nobatt", &nobatt),
	RCV_BOOL("forcedmg", &forcedmg),
	RCV_BOOL("gbamode", &gbamode),
	RCV_INT("memfill", &memfill),
	RCV_INT("memrand", &memrand),
	RCV_END
};







Пример #3
0
Файл: rtc.c Проект: r043v/yAnl
#include <stdio.h>
//#include "time.h"

#include "defs.h"
#include "mem.h"
#include "rtc.h"
#include "rc.h"

struct rtc rtc;

static int syncrtc = 1;

rcvar_t rtc_exports[] =
{
	RCV_BOOL("syncrtc", &syncrtc),
	RCV_END
};


void rtc_latch(byte b)
{
	if ((rtc.latch ^ b) & b & 1)
	{
		rtc.regs[0] = rtc.s;
		rtc.regs[1] = rtc.m;
		rtc.regs[2] = rtc.h;
		rtc.regs[3] = rtc.d;
		rtc.regs[4] = (rtc.d>>9) | (rtc.stop<<6) | (rtc.carry<<7);
		rtc.regs[5] = 0xff;
		rtc.regs[6] = 0xff;
Пример #4
0
	rtcfile = malloc(strlen(saveprefix) + 5);
	strcpy(rtcfile, saveprefix);
	strcat(rtcfile, ".rtc");
	
	sram_load();
	rtc_load();

	atexit(cleanup);
}

rcvar_t loader_exports[] =
{
	RCV_STRING("savedir", &savedir),
	RCV_STRING("savename", &savename),
	RCV_INT("saveslot", &saveslot),
	RCV_BOOL("forcebatt", &forcebatt),
	RCV_BOOL("nobatt", &nobatt),
	RCV_BOOL("forcedmg", &forcedmg),
	RCV_INT("memfill", &memfill),
	RCV_INT("memrand", &memrand),
	RCV_END
};








Пример #5
0
/* FIXME - all this code is VERY basic, improve it! */


struct pcm pcm;

static char *dsp_device;
static int stereo = 0;
static int samplerate = 11025;
static int sound = 1;

snd_pcm_t *playback_handle;
#define DSP_DEVICE "hw:0,0"

rcvar_t pcm_exports[] =
{
	RCV_BOOL("sound", &sound),
	RCV_INT("stereo", &stereo),
	RCV_INT("samplerate", &samplerate),
	RCV_STRING("alsa_device", &dsp_device),
	RCV_END
};


void pcm_init()
{
	int n, m, err;
	snd_pcm_hw_params_t *hw_params;

	if (!sound)
	{
		pcm.hz = 11025;
Пример #6
0
Файл: fbdev.c Проект: Jakz/ohboy
static byte *mmio;
static int bes;
static int base;
static int use_yuv = -1;
static int use_interp = 1;

static struct fb_fix_screeninfo fi;
static struct fb_var_screeninfo vi, initial_vi;

rcvar_t vid_exports[] =
{
	RCV_VECTOR("vmode", &vmode, 3),
	RCV_STRING("fb_device", &fb_device),
	RCV_STRING("fb_mode", &fb_mode),
	RCV_INT("fb_depth", &fb_depth),
	RCV_BOOL("yuv", &use_yuv),
	RCV_BOOL("yuvinterp", &use_interp),
	RCV_END
};



static void wrio4(int a, int v)
{
#ifndef IS_LITTLE_ENDIAN
	v = (v<<24) | ((v&0xff00)<<8) | ((v&0xff0000)>>8) | (v>>24);
#endif
	*(int*)(mmio+a) = v;
}

static void overlay_switch()