mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-11-04 18:05:06 +01:00
updated libretro & win32 ports
This commit is contained in:
parent
375c43c275
commit
3ffad6b6c6
163
Makefile.win32
163
Makefile.win32
@ -6,9 +6,9 @@
|
||||
#
|
||||
# Defines :
|
||||
# -DLSB_FIRST : for little endian systems.
|
||||
# -DBUILD_TABLES: do not use const tables for 68k instructions (obsolete)
|
||||
# -DLOGERROR : enable message logging
|
||||
# -DLOGVDP : enable VDP debug messages
|
||||
# -DLOGSOUND : enable AUDIO debug messages
|
||||
# -DLOG_SCD : enable SCD debug messages
|
||||
# -DLOG_CDD : enable CDD debug messages
|
||||
# -DLOG_CDC : enable CDC debug messages
|
||||
@ -23,125 +23,124 @@ NAME = gen_sdl.exe
|
||||
|
||||
CC = gcc
|
||||
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
|
||||
#-fomit-frame-pointer
|
||||
LDFLAGS =
|
||||
#LDFLAGS = -pg
|
||||
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
|
||||
|
||||
OBJECTS = obj/z80.o
|
||||
OBJDIR = ./build_sdl
|
||||
|
||||
OBJECTS += obj/m68kcpu.o \
|
||||
obj/s68kcpu.o \
|
||||
OBJECTS = $(OBJDIR)/z80.o
|
||||
|
||||
OBJECTS += obj/genesis.o \
|
||||
obj/vdp_ctrl.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 += $(OBJDIR)/m68kcpu.o \
|
||||
$(OBJDIR)/s68kcpu.o
|
||||
|
||||
OBJECTS += obj/input.o \
|
||||
obj/gamepad.o \
|
||||
obj/lightgun.o \
|
||||
obj/mouse.o \
|
||||
obj/activator.o \
|
||||
obj/xe_a1p.o \
|
||||
obj/teamplayer.o \
|
||||
obj/paddle.o \
|
||||
obj/sportspad.o \
|
||||
obj/terebi_oekaki.o
|
||||
OBJECTS += $(OBJDIR)/genesis.o \
|
||||
$(OBJDIR)/vdp_ctrl.o \
|
||||
$(OBJDIR)/vdp_render.o \
|
||||
$(OBJDIR)/system.o \
|
||||
$(OBJDIR)/io_ctrl.o \
|
||||
$(OBJDIR)/mem68k.o \
|
||||
$(OBJDIR)/memz80.o \
|
||||
$(OBJDIR)/membnk.o \
|
||||
$(OBJDIR)/state.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 \
|
||||
obj/sn76489.o \
|
||||
obj/ym2413.o \
|
||||
obj/ym2612.o
|
||||
OBJECTS += $(OBJDIR)/sound.o \
|
||||
$(OBJDIR)/sn76489.o \
|
||||
$(OBJDIR)/ym2413.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 \
|
||||
obj/svp.o \
|
||||
obj/ssp16.o \
|
||||
obj/ggenie.o \
|
||||
obj/areplay.o \
|
||||
obj/eeprom_93c.o \
|
||||
obj/eeprom_i2c.o \
|
||||
obj/eeprom_spi.o \
|
||||
obj/md_cart.o \
|
||||
obj/sms_cart.o
|
||||
OBJECTS += $(OBJDIR)/sram.o \
|
||||
$(OBJDIR)/svp.o \
|
||||
$(OBJDIR)/ssp16.o \
|
||||
$(OBJDIR)/ggenie.o \
|
||||
$(OBJDIR)/areplay.o \
|
||||
$(OBJDIR)/eeprom_93c.o \
|
||||
$(OBJDIR)/eeprom_i2c.o \
|
||||
$(OBJDIR)/eeprom_spi.o \
|
||||
$(OBJDIR)/md_cart.o \
|
||||
$(OBJDIR)/sms_cart.o
|
||||
|
||||
OBJECTS += $(OBJDIR)/scd.o \
|
||||
$(OBJDIR)/cdd.o \
|
||||
$(OBJDIR)/cdc.o \
|
||||
$(OBJDIR)/gfx.o \
|
||||
$(OBJDIR)/pcm.o \
|
||||
$(OBJDIR)/cd_cart.o
|
||||
|
||||
OBJECTS += obj/scd.o \
|
||||
obj/cdd.o \
|
||||
obj/cdc.o \
|
||||
obj/gfx.o \
|
||||
obj/pcm.o \
|
||||
obj/cd_cart.o
|
||||
OBJECTS += $(OBJDIR)/sms_ntsc.o \
|
||||
$(OBJDIR)/md_ntsc.o
|
||||
|
||||
OBJECTS += obj/main.o \
|
||||
obj/config.o \
|
||||
obj/error.o \
|
||||
obj/unzip.o \
|
||||
obj/fileio.o \
|
||||
obj/loadrom.o
|
||||
OBJECTS += $(OBJDIR)/main.o \
|
||||
$(OBJDIR)/config.o \
|
||||
$(OBJDIR)/error.o \
|
||||
$(OBJDIR)/unzip.o \
|
||||
$(OBJDIR)/fileio.o
|
||||
|
||||
OBJECTS += obj/sms_ntsc.o \
|
||||
obj/md_ntsc.o
|
||||
|
||||
OBJECTS += obj/icon.o
|
||||
OBJECTS += $(OBJDIR)/icon.o
|
||||
|
||||
all: $(NAME)
|
||||
|
||||
$(NAME): $(OBJECTS)
|
||||
$(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@ -Wl,-Map,genplus.map
|
||||
$(NAME): $(OBJDIR) $(OBJECTS)
|
||||
$(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 $@
|
||||
|
||||
obj/%.o : ../asm/%.s
|
||||
$(AS) $< -o $@
|
||||
|
||||
obj/%.o : ../sound/%.c ../sound/%.h
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
|
||||
obj/%.o : ../sound/%.c
|
||||
|
||||
$(OBJDIR)/%.o : source/sound/%.c source/sound/%.h
|
||||
$(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 $@
|
||||
|
||||
obj/%.o : ../cart_hw/%.c ../cart_hw/%.h
|
||||
$(OBJDIR)/%.o : source/cart_hw/%.c source/cart_hw/%.h
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
|
||||
|
||||
obj/%.o : ../cart_hw/svp/%.c
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
|
||||
obj/%.o : ../cart_hw/svp/%.c ../cart_hw/svp/%.h
|
||||
$(OBJDIR)/%.o : source/cart_hw/svp/%.c
|
||||
$(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 $@
|
||||
|
||||
obj/%.o : ../z80/%.c ../z80/%.h
|
||||
$(OBJDIR)/%.o : source/cd_hw/%.c source/cd_hw/%.h
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
|
||||
|
||||
obj/%.o : ../m68k/%.c
|
||||
$(OBJDIR)/%.o : source/z80/%.c source/z80/%.h
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
|
||||
|
||||
obj/%.o : ./%.c ./%.h
|
||||
$(OBJDIR)/%.o : source/m68k/%.c
|
||||
$(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 $@
|
||||
|
||||
obj/icon.o :
|
||||
windres icon.rc $@
|
||||
|
||||
$(OBJDIR)/%.o : source/win/%.c source/win/%.h
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
|
||||
|
||||
$(OBJDIR)/icon.o :
|
||||
windres source/win/icon.rc $@
|
||||
|
||||
pack :
|
||||
strip $(NAME)
|
||||
|
@ -211,7 +211,7 @@ static void config_default(void)
|
||||
config.psg_preamp = 150;
|
||||
config.fm_preamp = 100;
|
||||
config.hq_fm = 1;
|
||||
config.psgBoostNoise = 0;
|
||||
config.psgBoostNoise = 1;
|
||||
config.filter = 0;
|
||||
config.lp_range = 50;
|
||||
config.low_freq = 880;
|
||||
@ -219,8 +219,7 @@ static void config_default(void)
|
||||
config.lg = 1.0;
|
||||
config.mg = 1.0;
|
||||
config.hg = 1.0;
|
||||
config.rolloff = 0.990;
|
||||
config.dac_bits = 14;
|
||||
config.dac_bits = 14;
|
||||
config.ym2413 = 2; /* AUTO */
|
||||
|
||||
/* system options */
|
||||
@ -241,6 +240,7 @@ static void config_default(void)
|
||||
config.yscale = 0;
|
||||
config.aspect = 0;
|
||||
config.overscan = 0; /* 3 == FULL */
|
||||
config.gg_extra = 0; /* 1 = show extended Game Gear screen (256x192) */
|
||||
#if defined(USE_NTSC)
|
||||
config.ntsc = 1;
|
||||
#endif
|
||||
@ -270,12 +270,9 @@ static void config_default(void)
|
||||
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)
|
||||
{
|
||||
audio_init(44100, vdp_pal ? pal_fps : ntsc_fps);
|
||||
audio_init(44100, 0);
|
||||
}
|
||||
|
||||
static void configure_controls(void)
|
||||
@ -951,7 +948,7 @@ void retro_init(void)
|
||||
|
||||
void retro_deinit(void)
|
||||
{
|
||||
system_shutdown();
|
||||
audio_shutdown();
|
||||
#if defined(USE_NTSC)
|
||||
free(md_ntsc);
|
||||
free(sms_ntsc);
|
||||
|
@ -12,8 +12,8 @@ void set_config_defaults(void)
|
||||
config.psg_preamp = 150;
|
||||
config.fm_preamp = 100;
|
||||
config.hq_fm = 1;
|
||||
config.psgBoostNoise = 0;
|
||||
config.filter = 1;
|
||||
config.psgBoostNoise = 1;
|
||||
config.filter = 0;
|
||||
config.low_freq = 200;
|
||||
config.high_freq = 8000;
|
||||
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) */
|
||||
|
||||
/* 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.render = 0; /* 1 = double resolution output (only when interlaced mode 2 is enabled) */
|
||||
|
||||
|
@ -892,7 +892,6 @@ int main (int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
system_shutdown();
|
||||
audio_shutdown();
|
||||
error_shutdown();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user