From: notaz Date: Sat, 8 Aug 2009 13:19:47 +0000 (+0000) Subject: final tweaks for 1.55 release X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bd165c8d8bce1946558c22bcb9a001754115d81;p=libpicofe.git final tweaks for 1.55 release git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@741 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/common/emu.c b/common/emu.c index 118dc38..167f2f0 100644 --- a/common/emu.c +++ b/common/emu.c @@ -407,8 +407,8 @@ int emu_reload_rom(char *rom_fname) // valid CD image, check for BIOS.. // we need to have config loaded at this point - ret = emu_read_config(1, 1); - if (!ret) emu_read_config(0, 1); + ret = emu_read_config(1, 0); + if (!ret) emu_read_config(0, 0); cfg_loaded = 1; if (PicoRegionOverride) { @@ -465,8 +465,8 @@ int emu_reload_rom(char *rom_fname) if (!(PicoAHW & PAHW_MCD)) memcpy(id_header, rom_data + 0x100, sizeof(id_header)); if (!cfg_loaded) { - ret = emu_read_config(1, 1); - if (!ret) emu_read_config(0, 1); + ret = emu_read_config(1, 0); + if (!ret) emu_read_config(0, 0); } lprintf("PicoCartInsert(%p, %d);\n", rom_data, rom_size); @@ -613,10 +613,11 @@ int emu_read_config(int game, int no_defaults) char cfg[512]; int ret; + if (!no_defaults) + emu_set_defconfig(); + if (!game) { - if (!no_defaults) - emu_set_defconfig(); make_config_cfg(cfg); ret = config_readsect(cfg, NULL); } diff --git a/gp2x/Makefile b/gp2x/Makefile index 54c806a..6e899f2 100644 --- a/gp2x/Makefile +++ b/gp2x/Makefile @@ -1,8 +1,4 @@ - -# you may or may not need to change this -#devkit_path = x:/stuff/dev/devkitgp2x/ export CROSS = arm-linux- -#CROSS = $(devkit_path)bin/arm-linux- # settings #mz80 = 1 @@ -14,7 +10,7 @@ asm_misc = 1 asm_cdpico = 1 asm_cdmemory = 1 amalgamate = 0 -profile = 2 +#profile = 1 #use_musashi = 1 #up = 1 @@ -34,7 +30,6 @@ endif DEFINC = -I../.. -I. -DARM -D__GP2X__ -DIN_GP2X -DIN_EVDEV # -DBENCHMARK CFLAGS += -Wall -Winline ifeq ($(DEBUG),) -# -ftracer -fstrength-reduce # TODO measure impact CFLAGS += -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math else CFLAGS += -ggdb @@ -60,18 +55,17 @@ OBJS += plat.o warm.o pollux_set.o soc.o soc_mmsp2.o soc_pollux.o emu.o in_gp2x. OBJS += 940ctl.o # common -OBJS += platform/common/emu.o platform/common/input.o platform/common/menu.o \ - platform/common/fonts.o platform/common/config.o platform/common/arm_utils.o \ - platform/common/arm_linux.o platform/common/readpng.o \ - platform/common/mp3_helix.o platform/common/main.o \ +OBJS += platform/common/emu.o platform/common/menu.o platform/common/fonts.o platform/common/config.o \ + platform/common/arm_utils.o platform/common/arm_linux.o platform/common/readpng.o \ + platform/common/mp3_helix.o platform/common/input.o platform/common/main.o \ platform/linux/sndout_oss.o platform/linux/plat.o platform/linux/in_evdev.o # Pico ifeq "$(amalgamate)" "1" OBJS += ../../picoAll.o else -OBJS += pico/memory.o pico/videoport.o pico/draw.o pico/draw2.o pico/pico.o pico/sek.o \ - pico/area.o pico/cart.o pico/misc.o pico/patch.o pico/debug.o +OBJS += pico/area.o pico/cart.o pico/memory.o pico/misc.o pico/pico.o pico/sek.o \ + pico/videoport.o pico/draw2.o pico/draw.o pico/patch.o pico/debug.o # Pico - CD OBJS += pico/cd/pico.o pico/cd/memory.o pico/cd/sek.o pico/cd/LC89510.o \ pico/cd/cd_sys.o pico/cd/cd_file.o pico/cd/cue.o pico/cd/gfx_cd.o \ @@ -98,14 +92,7 @@ OBJS += zlib/gzio.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o \ ifeq "$(debug_cyclone)" "1" OBJS += pico/DebugCPU.o cpu/musashi/m68kdasm.o endif -# drz80/mz80 -ifeq "$(mz80)" "1" -DEFINC += -D_USE_MZ80 -OBJS += cpu/mz80/mz80.o -else -DEFINC += -D_USE_DRZ80 -OBJS += cpu/DrZ80/drz80.o -endif +# CPU cores ifeq "$(use_musashi)" "1" DEFINC += -DEMU_M68K OBJS += cpu/musashi/m68kops.o cpu/musashi/m68kcpu.o @@ -114,31 +101,33 @@ ifeq "$(use_cyclone)" "1" DEFINC += -DEMU_C68K OBJS += cpu/Cyclone/proj/Cyclone.o cpu/Cyclone/tools/idle.o endif +ifeq "$(mz80)" "1" +DEFINC += -D_USE_MZ80 +OBJS += cpu/mz80/mz80.o +else +DEFINC += -D_USE_DRZ80 +OBJS += cpu/DrZ80/drz80.o +endif vpath %.c = ../.. vpath %.s = ../.. vpath %.S = ../.. + DIRS = platform platform/gp2x platform/linux platform/common pico pico/cd pico/pico pico/sound \ pico/carthw/svp zlib unzip cpu cpu/musashi cpu/Cyclone/proj cpu/Cyclone/tools cpu/mz80 cpu/DrZ80 -all: mkdirs PicoDrive_dyn PicoDrive_sta +all: mkdirs PicoDrive include ../common/common_arm.mak +# partial linking helps profiled builds due to section merging PicoDrive.o : $(OBJS) ../common/helix/$(CROSS)helix-mp3.a $(LD) -r -o $@ $^ -PicoDrive_dyn : PicoDrive.o - @echo ">>>" $@ - $(CC) -o $@ $(CFLAGS) $^ -Wl,-Bstatic -lm -Wl,-Bdynamic -lpng -Wl,-Map=$@.map -ifeq ($(DEBUG),) - $(STRIP) $@ -endif -# $(CC) -o $@ $(CFLAGS) $^ -lm -lpng -Wl,-Map=$@.map -# $(CC) -o $@ $(CFLAGS) $^ -Wl,-Bstatic -lm -Wl,-Bdynamic -lpng -Wl,-Map=$@.map - -PicoDrive_sta : PicoDrive.o +# still using static, dynamic linking slows Wiz 1-10% +# also libm on F100 is not compatible +PicoDrive : PicoDrive.o @echo ">>>" $@ $(CC) -static -o $@ $(CFLAGS) $^ -lm -lpng -Wl,-Map=$@.map ifeq ($(DEBUG),) @@ -163,8 +152,9 @@ $(error need VER) endif endif -rel: PicoDrive PicoDrive.gpe code940/pico940_v3.bin readme.txt PicoDrive.man.txt PicoDrive.png ../game_def.cfg - zip -9 -j ../../PicoDrive_$(VER).zip $^ mmuhack.o +rel: PicoDrive PicoDrive.gpe code940/pico940_v3.bin readme.txt PicoDrive.png ../game_def.cfg \ + warm_2.4.25.o warm_2.4.26-open2x.o warm_2.6.24.ko + zip -9 -j ../../PicoDrive_$(VER).zip $^ zip -9 -r ../../PicoDrive_$(VER).zip skin -i \*.png -i \*.txt mkdir bin_to_cso_mp3 cp ../../tools/bin_to_cso_mp3/* bin_to_cso_mp3/