// valid CD image, check for BIOS..\r
\r
// we need to have config loaded at this point\r
- ret = emu_read_config(1, 1);\r
- if (!ret) emu_read_config(0, 1);\r
+ ret = emu_read_config(1, 0);\r
+ if (!ret) emu_read_config(0, 0);\r
cfg_loaded = 1;\r
\r
if (PicoRegionOverride) {\r
if (!(PicoAHW & PAHW_MCD))\r
memcpy(id_header, rom_data + 0x100, sizeof(id_header));\r
if (!cfg_loaded) {\r
- ret = emu_read_config(1, 1);\r
- if (!ret) emu_read_config(0, 1);\r
+ ret = emu_read_config(1, 0);\r
+ if (!ret) emu_read_config(0, 0);\r
}\r
\r
lprintf("PicoCartInsert(%p, %d);\n", rom_data, rom_size);\r
char cfg[512];\r
int ret;\r
\r
+ if (!no_defaults)\r
+ emu_set_defconfig();\r
+\r
if (!game)\r
{\r
- if (!no_defaults)\r
- emu_set_defconfig();\r
make_config_cfg(cfg);\r
ret = config_readsect(cfg, NULL);\r
}\r
-\r
-# you may or may not need to change this\r
-#devkit_path = x:/stuff/dev/devkitgp2x/\r
export CROSS = arm-linux-\r
-#CROSS = $(devkit_path)bin/arm-linux-\r
\r
# settings\r
#mz80 = 1\r
asm_cdpico = 1\r
asm_cdmemory = 1\r
amalgamate = 0\r
-profile = 2\r
+#profile = 1\r
#use_musashi = 1\r
#up = 1\r
\r
DEFINC = -I../.. -I. -DARM -D__GP2X__ -DIN_GP2X -DIN_EVDEV # -DBENCHMARK\r
CFLAGS += -Wall -Winline\r
ifeq ($(DEBUG),)\r
-# -ftracer -fstrength-reduce # TODO measure impact\r
CFLAGS += -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math\r
else\r
CFLAGS += -ggdb\r
OBJS += 940ctl.o\r
\r
# common\r
-OBJS += platform/common/emu.o platform/common/input.o platform/common/menu.o \\r
- platform/common/fonts.o platform/common/config.o platform/common/arm_utils.o \\r
- platform/common/arm_linux.o platform/common/readpng.o \\r
- platform/common/mp3_helix.o platform/common/main.o \\r
+OBJS += platform/common/emu.o platform/common/menu.o platform/common/fonts.o platform/common/config.o \\r
+ platform/common/arm_utils.o platform/common/arm_linux.o platform/common/readpng.o \\r
+ platform/common/mp3_helix.o platform/common/input.o platform/common/main.o \\r
platform/linux/sndout_oss.o platform/linux/plat.o platform/linux/in_evdev.o\r
\r
# Pico\r
ifeq "$(amalgamate)" "1"\r
OBJS += ../../picoAll.o\r
else\r
-OBJS += pico/memory.o pico/videoport.o pico/draw.o pico/draw2.o pico/pico.o pico/sek.o \\r
- pico/area.o pico/cart.o pico/misc.o pico/patch.o pico/debug.o\r
+OBJS += pico/area.o pico/cart.o pico/memory.o pico/misc.o pico/pico.o pico/sek.o \\r
+ pico/videoport.o pico/draw2.o pico/draw.o pico/patch.o pico/debug.o\r
# Pico - CD\r
OBJS += pico/cd/pico.o pico/cd/memory.o pico/cd/sek.o pico/cd/LC89510.o \\r
pico/cd/cd_sys.o pico/cd/cd_file.o pico/cd/cue.o pico/cd/gfx_cd.o \\r
ifeq "$(debug_cyclone)" "1"\r
OBJS += pico/DebugCPU.o cpu/musashi/m68kdasm.o\r
endif\r
-# drz80/mz80\r
-ifeq "$(mz80)" "1"\r
-DEFINC += -D_USE_MZ80\r
-OBJS += cpu/mz80/mz80.o\r
-else\r
-DEFINC += -D_USE_DRZ80\r
-OBJS += cpu/DrZ80/drz80.o\r
-endif\r
+# CPU cores\r
ifeq "$(use_musashi)" "1"\r
DEFINC += -DEMU_M68K\r
OBJS += cpu/musashi/m68kops.o cpu/musashi/m68kcpu.o\r
DEFINC += -DEMU_C68K\r
OBJS += cpu/Cyclone/proj/Cyclone.o cpu/Cyclone/tools/idle.o\r
endif\r
+ifeq "$(mz80)" "1"\r
+DEFINC += -D_USE_MZ80\r
+OBJS += cpu/mz80/mz80.o\r
+else\r
+DEFINC += -D_USE_DRZ80\r
+OBJS += cpu/DrZ80/drz80.o\r
+endif\r
\r
vpath %.c = ../..\r
vpath %.s = ../..\r
vpath %.S = ../..\r
+\r
DIRS = platform platform/gp2x platform/linux platform/common pico pico/cd pico/pico pico/sound \\r
pico/carthw/svp zlib unzip cpu cpu/musashi cpu/Cyclone/proj cpu/Cyclone/tools cpu/mz80 cpu/DrZ80\r
\r
\r
-all: mkdirs PicoDrive_dyn PicoDrive_sta\r
+all: mkdirs PicoDrive\r
\r
include ../common/common_arm.mak\r
\r
+# partial linking helps profiled builds due to section merging\r
PicoDrive.o : $(OBJS) ../common/helix/$(CROSS)helix-mp3.a\r
$(LD) -r -o $@ $^\r
\r
-PicoDrive_dyn : PicoDrive.o\r
- @echo ">>>" $@\r
- $(CC) -o $@ $(CFLAGS) $^ -Wl,-Bstatic -lm -Wl,-Bdynamic -lpng -Wl,-Map=$@.map\r
-ifeq ($(DEBUG),)\r
- $(STRIP) $@\r
-endif\r
-# $(CC) -o $@ $(CFLAGS) $^ -lm -lpng -Wl,-Map=$@.map\r
-# $(CC) -o $@ $(CFLAGS) $^ -Wl,-Bstatic -lm -Wl,-Bdynamic -lpng -Wl,-Map=$@.map\r
-\r
-PicoDrive_sta : PicoDrive.o\r
+# still using static, dynamic linking slows Wiz 1-10%\r
+# also libm on F100 is not compatible\r
+PicoDrive : PicoDrive.o\r
@echo ">>>" $@\r
$(CC) -static -o $@ $(CFLAGS) $^ -lm -lpng -Wl,-Map=$@.map\r
ifeq ($(DEBUG),)\r
endif\r
endif\r
\r
-rel: PicoDrive PicoDrive.gpe code940/pico940_v3.bin readme.txt PicoDrive.man.txt PicoDrive.png ../game_def.cfg\r
- zip -9 -j ../../PicoDrive_$(VER).zip $^ mmuhack.o\r
+rel: PicoDrive PicoDrive.gpe code940/pico940_v3.bin readme.txt PicoDrive.png ../game_def.cfg \\r
+ warm_2.4.25.o warm_2.4.26-open2x.o warm_2.6.24.ko\r
+ zip -9 -j ../../PicoDrive_$(VER).zip $^\r
zip -9 -r ../../PicoDrive_$(VER).zip skin -i \*.png -i \*.txt\r
mkdir bin_to_cso_mp3\r
cp ../../tools/bin_to_cso_mp3/* bin_to_cso_mp3/\r