updated libretro & win32 ports

This commit is contained in:
EkeEke 2012-10-14 19:16:31 +02:00
parent 375c43c275
commit 3ffad6b6c6
4 changed files with 89 additions and 94 deletions

View File

@ -6,9 +6,9 @@
# #
# Defines : # Defines :
# -DLSB_FIRST : for little endian systems. # -DLSB_FIRST : for little endian systems.
# -DBUILD_TABLES: do not use const tables for 68k instructions (obsolete)
# -DLOGERROR : enable message logging # -DLOGERROR : enable message logging
# -DLOGVDP : enable VDP debug messages # -DLOGVDP : enable VDP debug messages
# -DLOGSOUND : enable AUDIO debug messages
# -DLOG_SCD : enable SCD debug messages # -DLOG_SCD : enable SCD debug messages
# -DLOG_CDD : enable CDD debug messages # -DLOG_CDD : enable CDD debug messages
# -DLOG_CDC : enable CDC debug messages # -DLOG_CDC : enable CDC debug messages
@ -23,125 +23,124 @@ NAME = gen_sdl.exe
CC = gcc CC = gcc
CFLAGS = `sdl-config --cflags` -march=i686 -O6 -fomit-frame-pointer -Wall -Wno-strict-aliasing -ansi -std=c89 -pedantic-errors CFLAGS = `sdl-config --cflags` -march=i686 -O6 -fomit-frame-pointer -Wall -Wno-strict-aliasing -ansi -std=c89 -pedantic-errors
#-ansi -pedantic-errors
#-g -ggdb -pg #-g -ggdb -pg
#-fomit-frame-pointer #-fomit-frame-pointer
LDFLAGS = #LDFLAGS = -pg
DEFINES = -DLSB_FIRST -DUSE_16BPP_RENDERING DEFINES = -DLSB_FIRST -DUSE_16BPP_RENDERING
INCLUDES = -I. -I.. -I../z80 -I../m68k -I../sound -I../input_hw -I../cart_hw -I../cd_hw -I../cart_hw/svp -I../ntsc INCLUDES = -Isource -Isource/z80 -Isource/m68k -Isource/sound -Isource/input_hw -Isource/cart_hw -Isource/cd_hw -Isource/cart_hw/svp -Isource/ntsc -Isource/win
LIBS = `sdl-config --libs` -lz -lm LIBS = `sdl-config --libs` -lz -lm
OBJECTS = obj/z80.o OBJDIR = ./build_sdl
OBJECTS += obj/m68kcpu.o \ OBJECTS = $(OBJDIR)/z80.o
obj/s68kcpu.o \
OBJECTS += obj/genesis.o \ OBJECTS += $(OBJDIR)/m68kcpu.o \
obj/vdp_ctrl.o \ $(OBJDIR)/s68kcpu.o
obj/vdp_render.o \
obj/system.o \
obj/io_ctrl.o \
obj/mem68k.o \
obj/memz80.o \
obj/membnk.o \
obj/state.o
OBJECTS += obj/input.o \ OBJECTS += $(OBJDIR)/genesis.o \
obj/gamepad.o \ $(OBJDIR)/vdp_ctrl.o \
obj/lightgun.o \ $(OBJDIR)/vdp_render.o \
obj/mouse.o \ $(OBJDIR)/system.o \
obj/activator.o \ $(OBJDIR)/io_ctrl.o \
obj/xe_a1p.o \ $(OBJDIR)/mem68k.o \
obj/teamplayer.o \ $(OBJDIR)/memz80.o \
obj/paddle.o \ $(OBJDIR)/membnk.o \
obj/sportspad.o \ $(OBJDIR)/state.o \
obj/terebi_oekaki.o $(OBJDIR)/loadrom.o
OBJECTS += $(OBJDIR)/input.o \
$(OBJDIR)/gamepad.o \
$(OBJDIR)/lightgun.o \
$(OBJDIR)/mouse.o \
$(OBJDIR)/activator.o \
$(OBJDIR)/xe_a1p.o \
$(OBJDIR)/teamplayer.o \
$(OBJDIR)/paddle.o \
$(OBJDIR)/sportspad.o \
$(OBJDIR)/terebi_oekaki.o
OBJECTS += obj/sound.o \ OBJECTS += $(OBJDIR)/sound.o \
obj/sn76489.o \ $(OBJDIR)/sn76489.o \
obj/ym2413.o \ $(OBJDIR)/ym2413.o \
obj/ym2612.o $(OBJDIR)/ym2612.o
OBJECTS += obj/blip_buf.o OBJECTS += $(OBJDIR)/blip_buf.o
OBJECTS += obj/eq.o \ OBJECTS += $(OBJDIR)/eq.o
OBJECTS += obj/sram.o \ OBJECTS += $(OBJDIR)/sram.o \
obj/svp.o \ $(OBJDIR)/svp.o \
obj/ssp16.o \ $(OBJDIR)/ssp16.o \
obj/ggenie.o \ $(OBJDIR)/ggenie.o \
obj/areplay.o \ $(OBJDIR)/areplay.o \
obj/eeprom_93c.o \ $(OBJDIR)/eeprom_93c.o \
obj/eeprom_i2c.o \ $(OBJDIR)/eeprom_i2c.o \
obj/eeprom_spi.o \ $(OBJDIR)/eeprom_spi.o \
obj/md_cart.o \ $(OBJDIR)/md_cart.o \
obj/sms_cart.o $(OBJDIR)/sms_cart.o
OBJECTS += obj/scd.o \ OBJECTS += $(OBJDIR)/scd.o \
obj/cdd.o \ $(OBJDIR)/cdd.o \
obj/cdc.o \ $(OBJDIR)/cdc.o \
obj/gfx.o \ $(OBJDIR)/gfx.o \
obj/pcm.o \ $(OBJDIR)/pcm.o \
obj/cd_cart.o $(OBJDIR)/cd_cart.o
OBJECTS += obj/main.o \ OBJECTS += $(OBJDIR)/sms_ntsc.o \
obj/config.o \ $(OBJDIR)/md_ntsc.o
obj/error.o \
obj/unzip.o \
obj/fileio.o \
obj/loadrom.o
OBJECTS += obj/sms_ntsc.o \ OBJECTS += $(OBJDIR)/main.o \
obj/md_ntsc.o $(OBJDIR)/config.o \
$(OBJDIR)/error.o \
$(OBJDIR)/unzip.o \
$(OBJDIR)/fileio.o
OBJECTS += obj/icon.o OBJECTS += $(OBJDIR)/icon.o
all: $(NAME) all: $(NAME)
$(NAME): $(OBJECTS) $(NAME): $(OBJDIR) $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@ -Wl,-Map,genplus.map $(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@
obj/%.o : ../%.c ../%.h $(OBJDIR) :
@[ -d $@ ] || mkdir -p $@
$(OBJDIR)/%.o : source/%.c source/%.h
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@ $(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
obj/%.o : ../asm/%.s $(OBJDIR)/%.o : source/sound/%.c source/sound/%.h
$(AS) $< -o $@
obj/%.o : ../sound/%.c ../sound/%.h
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
obj/%.o : ../sound/%.c
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@ $(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
obj/%.o : ../input_hw/%.c ../input_hw/%.h $(OBJDIR)/%.o : source/input_hw/%.c source/input_hw/%.h
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@ $(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
obj/%.o : ../cart_hw/%.c ../cart_hw/%.h $(OBJDIR)/%.o : source/cart_hw/%.c source/cart_hw/%.h
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@ $(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
obj/%.o : ../cart_hw/svp/%.c $(OBJDIR)/%.o : source/cart_hw/svp/%.c
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
obj/%.o : ../cart_hw/svp/%.c ../cart_hw/svp/%.h
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@ $(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
obj/%.o : ../cd_hw/%.c $(OBJDIR)/%.o : source/cart_hw/svp/%.c source/cart_hw/svp/%.h
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@ $(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
obj/%.o : ../z80/%.c ../z80/%.h $(OBJDIR)/%.o : source/cd_hw/%.c source/cd_hw/%.h
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@ $(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
obj/%.o : ../m68k/%.c $(OBJDIR)/%.o : source/z80/%.c source/z80/%.h
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@ $(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
obj/%.o : ./%.c ./%.h $(OBJDIR)/%.o : source/m68k/%.c
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@ $(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
obj/%.o : ../ntsc/%.c ../ntsc/%.h $(OBJDIR)/%.o : source/ntsc/%.c source/ntsc/%.h
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@ $(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
obj/icon.o : $(OBJDIR)/%.o : source/win/%.c source/win/%.h
windres icon.rc $@ $(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
$(OBJDIR)/icon.o :
windres source/win/icon.rc $@
pack : pack :
strip $(NAME) strip $(NAME)

View File

@ -211,7 +211,7 @@ static void config_default(void)
config.psg_preamp = 150; config.psg_preamp = 150;
config.fm_preamp = 100; config.fm_preamp = 100;
config.hq_fm = 1; config.hq_fm = 1;
config.psgBoostNoise = 0; config.psgBoostNoise = 1;
config.filter = 0; config.filter = 0;
config.lp_range = 50; config.lp_range = 50;
config.low_freq = 880; config.low_freq = 880;
@ -219,7 +219,6 @@ static void config_default(void)
config.lg = 1.0; config.lg = 1.0;
config.mg = 1.0; config.mg = 1.0;
config.hg = 1.0; config.hg = 1.0;
config.rolloff = 0.990;
config.dac_bits = 14; config.dac_bits = 14;
config.ym2413 = 2; /* AUTO */ config.ym2413 = 2; /* AUTO */
@ -241,6 +240,7 @@ static void config_default(void)
config.yscale = 0; config.yscale = 0;
config.aspect = 0; config.aspect = 0;
config.overscan = 0; /* 3 == FULL */ config.overscan = 0; /* 3 == FULL */
config.gg_extra = 0; /* 1 = show extended Game Gear screen (256x192) */
#if defined(USE_NTSC) #if defined(USE_NTSC)
config.ntsc = 1; config.ntsc = 1;
#endif #endif
@ -270,12 +270,9 @@ static void config_default(void)
config.hot_swap &= 1; config.hot_swap &= 1;
} }
static const double pal_fps = 53203424.0 / (3420.0 * 313.0);
static const double ntsc_fps = 53693175.0 / (3420.0 * 262.0);
static void init_audio(void) static void init_audio(void)
{ {
audio_init(44100, vdp_pal ? pal_fps : ntsc_fps); audio_init(44100, 0);
} }
static void configure_controls(void) static void configure_controls(void)
@ -951,7 +948,7 @@ void retro_init(void)
void retro_deinit(void) void retro_deinit(void)
{ {
system_shutdown(); audio_shutdown();
#if defined(USE_NTSC) #if defined(USE_NTSC)
free(md_ntsc); free(md_ntsc);
free(sms_ntsc); free(sms_ntsc);

View File

@ -12,8 +12,8 @@ void set_config_defaults(void)
config.psg_preamp = 150; config.psg_preamp = 150;
config.fm_preamp = 100; config.fm_preamp = 100;
config.hq_fm = 1; config.hq_fm = 1;
config.psgBoostNoise = 0; config.psgBoostNoise = 1;
config.filter = 1; config.filter = 0;
config.low_freq = 200; config.low_freq = 200;
config.high_freq = 8000; config.high_freq = 8000;
config.lg = 1.0; config.lg = 1.0;
@ -34,7 +34,7 @@ void set_config_defaults(void)
config.lock_on = 0; /* = OFF (can be TYPE_SK, TYPE_GG & TYPE_AR) */ config.lock_on = 0; /* = OFF (can be TYPE_SK, TYPE_GG & TYPE_AR) */
/* display options */ /* display options */
config.overscan = 0; /* = both ON (0 = no borders , 1 = vertical borders only, 2 = horizontal borders only) */ config.overscan = 0; /* 3 = all borders (0 = no borders , 1 = vertical borders only, 2 = horizontal borders only) */
config.gg_extra = 0; /* 1 = show extended Game Gear screen (256x192) */ config.gg_extra = 0; /* 1 = show extended Game Gear screen (256x192) */
config.render = 0; /* 1 = double resolution output (only when interlaced mode 2 is enabled) */ config.render = 0; /* 1 = double resolution output (only when interlaced mode 2 is enabled) */

View File

@ -892,7 +892,6 @@ int main (int argc, char **argv)
} }
} }
system_shutdown();
audio_shutdown(); audio_shutdown();
error_shutdown(); error_shutdown();