C = drivers/common/
L = drivers/libpicofe/
+TFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfloat-abi=softfp -mfpu=neon -ffast-math
ifdef DEBUG
TFLAGS += -ggdb
LDRIVER += -ggdb
else
-TFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfloat-abi=softfp -mfpu=neon -ffast-math
TFLAGS += -O2
LDRIVER += -O2
endif
ASFLAGS += -mcpu=cortex-a8
NOSTRIP = 1
+asm_6502=1
all: fceu
include zlib/Makefile
-OBJDRIVER = drivers/pandora/pandora.o drivers/sdl/throttle.o drivers/arm/asmutils.o \
- ${L}fonts.o ${L}readpng.o ${L}input.o ${L}linux/in_evdev.o ${L}linux/plat.o \
- ${L}linux/sndout_oss.o ${L}linux/fbdev.o ${L}linux/xenv.o ${L}pandora/plat.o \
+OBJDRIVER = drivers/pandora/pandora.o drivers/arm/asmutils.o \
+ ${L}fonts.o ${L}readpng.o ${L}input.o ${L}config_file.o \
+ ${L}linux/in_evdev.o ${L}linux/plat.o ${L}linux/sndout_oss.o \
+ ${L}linux/fbdev.o ${L}linux/xenv.o ${L}pandora/plat.o \
${C}main.o ${C}menu.o ${C}sound-oss.o \
${C}cheat.o ${C}config.o ${C}args.o ${C}vidblit.o ${C}unix-netplay.o \
${UNZIPOBJS} \
ppu.o movie.o fceu098.o ppu098.o
LDRIVER += -lm -lz -lpng `sdl-config --libs`
+ifeq ($(asm_6502),1)
+TFLAGS += -DASM_6502
+OBJDRIVER += ncpu.o
+else
OBJDRIVER += x6502.o
+endif
+
x6502.o: x6502.c x6502.h ops.h fce.h sound.h dprintf.h
include Makefile.base
${C}menu.o: ${C}revision.h
+${C}main.o: ${C}input.c
ppu.o: ppu.c ppu.h
x6502.o: TFLAGS += -Wno-inline
include zlib/Makefile
OBJDRIVER = drivers/sdl/sdl.o drivers/sdl/throttle.o \
- ${L}fonts.o ${L}readpng.o ${L}input.o ${L}in_sdl.o ${L}linux/plat.o \
- ${L}linux/sndout_oss.o \
+ ${L}fonts.o ${L}readpng.o ${L}input.o ${L}config_file.o ${L}in_sdl.o \
+ ${L}linux/plat.o ${L}linux/sndout_oss.o \
${C}main.o ${C}menu.o ${C}sound-oss.o \
${C}cheat.o ${C}config.o ${C}args.o ${C}vidblit.o ${C}unix-netplay.o \
${UNZIPOBJS} \
#include "platform.h"
#include "menu.h"
#include "settings.h"
+#include "../libpicofe/config_file.h"
#include "../../fce.h"
#include "../../cart.h"
AC(Settings.gamma),
AC(Settings.perfect_vsync),
AC(Settings.accurate_mode),
+ AC(Settings.hw_filter),
ENDCFGSTRUCT
};
{
const char *name = skip_path(llgn_path);
char tdir[2048];
+ FILE *f;
int ret;
+
if (name)
sprintf(tdir,"%s"PSS"cfg"PSS"%s.cfg",BaseDirectory,name);
else sprintf(tdir,"%s"PSS"fceu2.cfg",BaseDirectory);
FCEUI_GetNTSCTH(&ntsctint, &ntschue);
ret=SaveFCEUConfig(tdir,fceuconfig);
printf(ret == 0 ? "done\n" : "failed\n");
+
+ // keys
+ if (name)
+ sprintf(tdir,"%s"PSS"cfg"PSS"%s_keys.cfg",BaseDirectory,name);
+ else sprintf(tdir,"%s"PSS"fceu_keys.cfg",BaseDirectory);
+ f=fopen(tdir, "w");
+ if (f!=NULL) {
+ config_write_keys(f);
+ fclose(f);
+ }
+
return ret;
}
{
const char *name = skip_path(llgn_path);
char tdir[2048];
- int ret;
+ FILE *f;
+ int ret, l;
+
if (name)
sprintf(tdir,"%s"PSS"cfg"PSS"%s.cfg",BaseDirectory,name);
else sprintf(tdir,"%s"PSS"fceu2.cfg",BaseDirectory);
ret=LoadFCEUConfig(tdir,fceuconfig);
FCEUI_SetNTSCTH(ntsccol, ntsctint, ntschue);
printf(ret == 0 ? "done\n" : "failed\n");
+
+ // keys
+ if (name)
+ sprintf(tdir,"%s"PSS"cfg"PSS"%s_keys.cfg",BaseDirectory,name);
+ else sprintf(tdir,"%s"PSS"fceu_keys.cfg",BaseDirectory);
+ f=fopen(tdir, "r");
+ if (f!=NULL) {
+ l=fread(tdir,1,sizeof(tdir)-1,f);
+ tdir[l]=0;
+ config_read_keys(tdir);
+ fclose(f);
+ }
+
return ret;
}
ret = menu_loop();
if (ret == 1) break; // exit emu
if (ret == 2) { // reload ROM
+ SaveLLGN();
Exit = 0;
continue;
}
if (fceugi)
CloseGame();
- SaveLLGN();
FCEUI_Kill();
DriverKill();
platform_finish();