1 /* FCE Ultra - NES/Famicom Emulator
3 * Copyright notice for this file:
4 * Copyright (C) 2002 Ben Parnell
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 /****************************************************************/
24 /* This file contains code to interface to the standard */
25 /* FCE Ultra configuration file saving/loading code. */
27 /****************************************************************/
28 #include "../common/config.h"
30 static CFGSTRUCT fceuconfig[]={
43 AC(ntsccol),AC(ntsctint),AC(ntschue),
54 NACS("odcheats",DOvers[0]),
55 NACS("odmisc",DOvers[1]),
56 NACS("odnonvol",DOvers[2]),
57 NACS("odstates",DOvers[3]),
58 NACS("odsnaps",DOvers[4]),
59 NACS("odbase",DOvers[5]),
61 NAC("winsizemul",winsizemul),
68 NAC("eoptions",eoptions),
69 NACA("cpalette",cpalette),
72 ACA(joyA),ACA(joyB),ACA(joySelect),ACA(joyStart),
75 ACA(joyUp),ACA(joyDown),ACA(joyLeft),ACA(joyRight),
77 NACA("InputType",UsrInputType),
78 NAC("keyben",keybEnable),
80 NACA("keybm0",keyBMap[0]),
81 NACA("keybm1",keyBMap[1]),
82 NACA("keybm2",keyBMap[2]),
83 NACA("keybm3",keyBMap[3]),
84 NACA("ppasc0",powerpadsc[0]),
85 NACA("ppasc1",powerpadsc[1]),
87 NAC("ppaside",powerpadside),
88 NAC("vmcx",vmodes[0].x),
89 NAC("vmcy",vmodes[0].y),
90 NAC("vmcb",vmodes[0].bpp),
91 NAC("vmcf",vmodes[0].flags),
92 NAC("vmcxs",vmodes[0].xscale),
93 NAC("vmcys",vmodes[0].yscale),
95 NAC("srendline",srendlinen),
96 NAC("erendline",erendlinen),
97 NAC("srendlinep",srendlinep),
98 NAC("erendlinep",erendlinep),
108 static void SaveConfig(char *filename)
110 DriverInterface(DES_GETNTSCTINT,&ntsctint);
111 DriverInterface(DES_GETNTSCHUE,&ntschue);
112 SaveFCEUConfig(filename,fceuconfig);
115 static void LoadConfig(char *filename)
117 DriverInterface(DES_GETNTSCTINT,&ntsctint);
118 DriverInterface(DES_GETNTSCHUE,&ntschue);
119 LoadFCEUConfig(filename,fceuconfig);
120 DriverInterface(DES_NTSCCOL,&ntsccol);
121 DriverInterface(DES_SETNTSCTINT,&ntsctint);
122 DriverInterface(DES_SETNTSCHUE,&ntschue);
125 FCEUI_SetVidSystem(palyo);
127 FCEUI_SetGameGenie(genie);
130 FCEUI_SetSoundVolume(soundvolume);