aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneonloop2022-02-10 15:46:51 +0000
committerneonloop2022-02-10 15:46:51 +0000
commite506386fc683b18c2e25a27e8c3f7a220a92e5e1 (patch)
treef7da313b7a7cd43de4baf329c76490546cf8641c
parentaf5f38f00f49ab0c60425270502a09a9fee5fd23 (diff)
downloadpicoarch-e506386fc683b18c2e25a27e8c3f7a220a92e5e1.tar.gz
picoarch-e506386fc683b18c2e25a27e8c3f7a220a92e5e1.tar.bz2
picoarch-e506386fc683b18c2e25a27e8c3f7a220a92e5e1.zip
Updates cores and moves to snes9x2005 fork
-rw-r--r--Makefile8
-rw-r--r--menu.c4
-rw-r--r--options.c3
-rw-r--r--overrides.h2
-rw-r--r--overrides/beetle-pce-fast.h28
-rw-r--r--overrides/fceumm.h4
-rw-r--r--overrides/fmsx.h72
-rw-r--r--overrides/mame2000.h25
-rw-r--r--overrides/pcsx_rearmed.h4
-rw-r--r--overrides/smsplus.h10
-rw-r--r--overrides/snes9x2005.h4
-rw-r--r--patches/beetle-pce-fast/0001-frameskip-interval.patch26
-rw-r--r--patches/mame2000/1000-trimui-build.patch20
-rw-r--r--patches/snes9x2005/0001-frameskip-interval.patc_ (renamed from patches/snes9x2005/0001-frameskip-interval.patch)0
-rw-r--r--patches/snes9x2005/1000-trimui-support.patc_ (renamed from patches/snes9x2005/1000-trimui-support.patch)0
15 files changed, 155 insertions, 55 deletions
diff --git a/Makefile b/Makefile
index 42f18e4..dcad83b 100644
--- a/Makefile
+++ b/Makefile
@@ -50,6 +50,9 @@ quicknes_REPO = https://github.com/libretro/QuickNES_Core
smsplus-gx_MAKEFILE = Makefile.libretro
smsplus-gx_CORE = smsplus_libretro.so
+snes9x2005_REPO = https://git.crowdedwood.com/snes9x2005
+snes9x2005_REVISION = performance
+
ifeq ($(platform), trimui)
OBJS += plat_trimui.o
CFLAGS += -mcpu=arm926ej-s -mtune=arm926ej-s -fno-PIC -DCONTENT_DIR='"/mnt/SDCARD/Roms"'
@@ -62,6 +65,7 @@ endif
ifeq ($(DEBUG), 1)
CFLAGS += -Og -g
+ LDFLAGS += -g
else
CFLAGS += -Ofast -DNDEBUG
@@ -125,8 +129,10 @@ $(1):
$(if $1_REVISION,cd $(1) && git checkout $($1_REVISION),)
(test ! -d patches/$(1)) || (cd $(1) && $(foreach patch, $(sort $(wildcard patches/$(1)/*.patch)), git apply -p1 < ../$(patch) &&) true)
-$(1)_libretro.so: $(1)
+$(1)/$(1)_libretro.so: $(1)
cd $$($1_BUILD_PATH) && $$($1_MAKE) $(PROCS)
+
+$(1)_libretro.so: $(1)/$(1)_libretro.so
cp $$($1_BUILD_PATH)/$(if $($(1)_CORE),$($(1)_CORE),$(1)_libretro.so) $(1)_libretro.so
clean-$(1):
diff --git a/menu.c b/menu.c
index 23a6a27..52a05fe 100644
--- a/menu.c
+++ b/menu.c
@@ -529,8 +529,8 @@ static int key_config_loop_wrap(int id, int keys)
const struct core_override *override = get_overrides();
me_bind_action *actions = CORE_OVERRIDE(override, actions, me_ctrl_actions);
size_t action_size = CORE_OVERRIDE(override, action_size, array_size(me_ctrl_actions));
- me_bind_action *emu_actions = emuctrl_actions;
- size_t emu_action_size = array_size(emuctrl_actions);
+ me_bind_action *emu_actions = CORE_OVERRIDE(override, emu_actions, emuctrl_actions);
+ size_t emu_action_size = CORE_OVERRIDE(override, emu_action_size, array_size(emuctrl_actions));
switch (id) {
case MA_CTRL_PLAYER1:
diff --git a/options.c b/options.c
index 54e2607..95b4c71 100644
--- a/options.c
+++ b/options.c
@@ -287,9 +287,6 @@ bool options_changed(void) {
}
void options_update_changed(void) {
- if (core_options.changed)
- return;
-
for(size_t i = 0; i < core_options.len; i++) {
struct core_option_entry* entry = &core_options.entries[i];
if (entry->value != entry->prev_value) {
diff --git a/overrides.h b/overrides.h
index 328a5d6..fd1f9c2 100644
--- a/overrides.h
+++ b/overrides.h
@@ -32,6 +32,8 @@ struct core_override {
const struct core_override_startup_msg *startup_msg;
me_bind_action* actions;
const size_t action_size;
+ me_bind_action* emu_actions;
+ const size_t emu_action_size;
const struct core_override_option* options;
int block_load_content;
};
diff --git a/overrides/beetle-pce-fast.h b/overrides/beetle-pce-fast.h
index a16b044..010dc8f 100644
--- a/overrides/beetle-pce-fast.h
+++ b/overrides/beetle-pce-fast.h
@@ -20,36 +20,36 @@ static const struct core_override_option beetle_pce_fast_core_option_overrides[]
.desc = "FS Interval",
},
{
- .key = "pce_hoverscan",
+ .key = "pce_fast_hoverscan",
.desc = "Horiz. Overscan",
.info = "Modify the horizontal overscan. (352 Width Mode Only)",
},
{
- .key = "pce_turbo_toggling",
+ .key = "pce_fast_turbo_toggling",
.info = "Change III / IV to Toggle Turbo II / Toggle Turbo I",
},
{
- .key = "pce_sound_channel_0_volume",
+ .key = "pce_fast_sound_channel_0_volume",
.desc = "Channel 0 Volume",
},
{
- .key = "pce_sound_channel_1_volume",
+ .key = "pce_fast_sound_channel_1_volume",
.desc = "Channel 1 Volume",
},
{
- .key = "pce_sound_channel_2_volume",
+ .key = "pce_fast_sound_channel_2_volume",
.desc = "Channel 2 Volume",
},
{
- .key = "pce_sound_channel_3_volume",
+ .key = "pce_fast_sound_channel_3_volume",
.desc = "Channel 3 Volume",
},
{
- .key = "pce_sound_channel_4_volume",
+ .key = "pce_fast_sound_channel_4_volume",
.desc = "Channel 4 Volume",
},
{
- .key = "pce_sound_channel_5_volume",
+ .key = "pce_fast_sound_channel_5_volume",
.desc = "Channel 5 Volume",
},
{
@@ -57,20 +57,24 @@ static const struct core_override_option beetle_pce_fast_core_option_overrides[]
.desc = "CD Cache (Restart)",
},
{
- .key = "pce_ocmultiplier",
+ .key = "pce_fast_cdbios",
+ .desc = "CD BIOS (Restart)",
+ },
+ {
+ .key = "pce_fast_ocmultiplier",
.desc = "Overclock (Restart)",
.info = "Overclock the emulated CPU by selected multiplier.",
},
{
- .key = "pce_disable_softreset",
+ .key = "pce_fast_disable_softreset",
.desc = "Disable Soft Reset",
},
{
- .key = "pce_mouse_sensitivity",
+ .key = "pce_fast_mouse_sensitivity",
.blocked = true,
},
{
- .key = "pce_turbo_toggle_hotkey",
+ .key = "pce_fast_turbo_toggle_hotkey",
.blocked = true,
},
{ NULL }
diff --git a/overrides/fceumm.h b/overrides/fceumm.h
index e0fbc10..71d8f6e 100644
--- a/overrides/fceumm.h
+++ b/overrides/fceumm.h
@@ -50,6 +50,10 @@ static const struct core_override_option fceumm_core_option_overrides[] = {
.desc = "Show Snd Options",
},
{
+ .key = "fceumm_game_genie",
+ .blocked = true
+ },
+ {
.key = "fceumm_zapper_mode",
.blocked = true
},
diff --git a/overrides/fmsx.h b/overrides/fmsx.h
index 5365c83..06f66ec 100644
--- a/overrides/fmsx.h
+++ b/overrides/fmsx.h
@@ -2,6 +2,10 @@
static const struct core_override_option fmsx_core_option_overrides[] = {
{
+ .key = "fmsx_hires",
+ .retro_var_value = "High res; Off|Interlaced|Progressive"
+ },
+ {
.key = "fmsx_mapper_type_mode",
.retro_var_value = "Mapper Type; "
"Guess Mapper Type A|"
@@ -23,6 +27,74 @@ static const struct core_override_option fmsx_core_option_overrides[] = {
.key = "fmsx_autospace",
.retro_var_value = "Autofire SPACE; No|Yes"
},
+ {
+ .key = "fmsx_phantom_disk",
+ .retro_var_value = "Make empty disk; No|Yes"
+ },
+ {
+ .key = "fmsx_custom_keyboard_up",
+ .blocked = true
+ },
+ {
+ .key = "fmsx_custom_keyboard_down",
+ .blocked = true
+ },
+ {
+ .key = "fmsx_custom_keyboard_left",
+ .blocked = true
+ },
+ {
+ .key = "fmsx_custom_keyboard_right",
+ .blocked = true
+ },
+ {
+ .key = "fmsx_custom_keyboard_a",
+ .blocked = true
+ },
+ {
+ .key = "fmsx_custom_keyboard_b",
+ .blocked = true
+ },
+ {
+ .key = "fmsx_custom_keyboard_y",
+ .blocked = true
+ },
+ {
+ .key = "fmsx_custom_keyboard_x",
+ .blocked = true
+ },
+ {
+ .key = "fmsx_custom_keyboard_start",
+ .blocked = true
+ },
+ {
+ .key = "fmsx_custom_keyboard_select",
+ .blocked = true
+ },
+ {
+ .key = "fmsx_custom_keyboard_l",
+ .blocked = true
+ },
+ {
+ .key = "fmsx_custom_keyboard_r",
+ .blocked = true
+ },
+ {
+ .key = "fmsx_custom_keyboard_l2",
+ .blocked = true
+ },
+ {
+ .key = "fmsx_custom_keyboard_r2",
+ .blocked = true
+ },
+ {
+ .key = "fmsx_custom_keyboard_l3",
+ .blocked = true
+ },
+ {
+ .key = "fmsx_custom_keyboard_r3",
+ .blocked = true
+ },
{ NULL }
};
diff --git a/overrides/mame2000.h b/overrides/mame2000.h
index f3912f7..9d306c0 100644
--- a/overrides/mame2000.h
+++ b/overrides/mame2000.h
@@ -1,3 +1,4 @@
+#include "main.h"
#include "overrides.h"
static const struct core_override_option mame2000_core_option_overrides[] = {
@@ -57,17 +58,27 @@ me_bind_action mame2000_ctrl_actions[] =
{ NULL, 0 }
};
+me_bind_action mame2000_emu_actions[] =
+{
+ { "Toggle FPS/CPU% ", 1 << EACTION_TOGGLE_HUD },
+ { "Toggle FF ", 1 << EACTION_TOGGLE_FF },
+ { "Take Screenshot ", 1 << EACTION_SCREENSHOT },
+ { NULL, 0 }
+};
+
const struct core_override_fast_forward mame2000_fast_forward = {
.type_key = "mame2000-frameskip",
.type_value = "auto",
.interval_key = "mame2000-frameskip_interval"
};
-#define mame2000_overrides { \
- .core_name = "mame2000", \
- .fast_forward = &mame2000_fast_forward, \
- .actions = mame2000_ctrl_actions, \
- .action_size = array_size(mame2000_ctrl_actions), \
- .options = mame2000_core_option_overrides, \
- .block_load_content = 1 \
+#define mame2000_overrides { \
+ .core_name = "mame2000", \
+ .fast_forward = &mame2000_fast_forward, \
+ .actions = mame2000_ctrl_actions, \
+ .action_size = array_size(mame2000_ctrl_actions), \
+ .emu_actions = mame2000_emu_actions, \
+ .emu_action_size = array_size(mame2000_emu_actions), \
+ .options = mame2000_core_option_overrides, \
+ .block_load_content = 1 \
}
diff --git a/overrides/pcsx_rearmed.h b/overrides/pcsx_rearmed.h
index daf0ea6..e68724e 100644
--- a/overrides/pcsx_rearmed.h
+++ b/overrides/pcsx_rearmed.h
@@ -154,6 +154,10 @@ static const struct core_override_option pcsx_rearmed_core_option_overrides[] =
.key = "pcsx_rearmed_display_internal_fps",
.blocked = true
},
+ {
+ .key = "pcsx_rearmed_icache_emulation",
+ .blocked = true
+ },
{ NULL }
};
diff --git a/overrides/smsplus.h b/overrides/smsplus.h
index e540f18..1895792 100644
--- a/overrides/smsplus.h
+++ b/overrides/smsplus.h
@@ -2,7 +2,13 @@
static const struct core_override_option smsplus_core_option_overrides[] = {
{
+ .key = "smsplus_sms_bios",
+ .desc = "SMS BIOS (Restart)",
+ .info = "Use official BIOS/bootloader, if present in the system directory.",
+ },
+ {
.key = "smsplus_hardware",
+ .desc = "Hardware (Restart)",
.options = {
{ "auto", NULL },
{ "master system", "sms" },
@@ -14,6 +20,10 @@ static const struct core_override_option smsplus_core_option_overrides[] = {
},
},
{
+ .key = "smsplus_region",
+ .desc = "Region (Restart)",
+ },
+ {
.key = "smsplus_fm_sound",
.desc = "Use FM (Restart)",
.info = "Use FM Sound for some Master System games to enable enhanced music. Some games need Region set to ntsc-j (e.g. Wonder Boy III). Needs restart.",
diff --git a/overrides/snes9x2005.h b/overrides/snes9x2005.h
index af2f0ff..237a89a 100644
--- a/overrides/snes9x2005.h
+++ b/overrides/snes9x2005.h
@@ -31,6 +31,10 @@ static const struct core_override_option snes9x2005_core_option_overrides[] = {
.desc = "Reduce Flicker",
.info = "Raises sprite limit to reduce flickering in games.",
},
+ {
+ .key = "snes9x_2005_dynarec",
+ .default_value = "enabled",
+ },
{ NULL }
};
diff --git a/patches/beetle-pce-fast/0001-frameskip-interval.patch b/patches/beetle-pce-fast/0001-frameskip-interval.patch
index c44a893..cdc6894 100644
--- a/patches/beetle-pce-fast/0001-frameskip-interval.patch
+++ b/patches/beetle-pce-fast/0001-frameskip-interval.patch
@@ -1,8 +1,8 @@
diff --git a/libretro.cpp b/libretro.cpp
-index 508577f..c706d96 100644
+index 48fd03a..c0fe238 100644
--- a/libretro.cpp
+++ b/libretro.cpp
-@@ -1629,13 +1629,11 @@ static uint64_t audio_frames = 0;
+@@ -1627,13 +1627,11 @@ static uint64_t audio_frames = 0;
static unsigned frameskip_type = 0;
static unsigned frameskip_threshold = 0;
static uint16_t frameskip_counter = 0;
@@ -17,7 +17,7 @@ index 508577f..c706d96 100644
static unsigned audio_latency = 0;
static bool update_audio_latency = false;
-@@ -1749,6 +1747,7 @@ void retro_init(void)
+@@ -1747,6 +1745,7 @@ void retro_init(void)
frameskip_type = 0;
frameskip_threshold = 0;
frameskip_counter = 0;
@@ -25,7 +25,7 @@ index 508577f..c706d96 100644
retro_audio_buff_active = false;
retro_audio_buff_occupancy = 0;
retro_audio_buff_underrun = false;
-@@ -1863,8 +1862,10 @@ static void check_variables(bool first_run)
+@@ -1861,8 +1860,10 @@ static void check_variables(bool first_run)
{
if (strcmp(var.value, "auto") == 0)
frameskip_type = 1;
@@ -37,7 +37,7 @@ index 508577f..c706d96 100644
}
/* Reinitialise frameskipping, if required */
-@@ -1878,6 +1879,13 @@ static void check_variables(bool first_run)
+@@ -1876,6 +1877,13 @@ static void check_variables(bool first_run)
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
frameskip_threshold = strtol(var.value, NULL, 10);
@@ -48,10 +48,10 @@ index 508577f..c706d96 100644
+ if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
+ frameskip_interval = strtol(var.value, NULL, 10);
+
- var.key = "pce_hoverscan";
+ var.key = "pce_fast_hoverscan";
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
-@@ -2357,16 +2365,19 @@ void retro_run(void)
+@@ -2355,16 +2363,19 @@ void retro_run(void)
case 1: /* auto */
skip_frame = retro_audio_buff_underrun ? 1 : 0;
break;
@@ -74,15 +74,15 @@ index 508577f..c706d96 100644
skip_frame = 0;
frameskip_counter = 0;
diff --git a/libretro_core_options.h b/libretro_core_options.h
-index 28d27c6..1fedbd4 100644
+index 4b1a0a7..0e664b9 100644
--- a/libretro_core_options.h
+++ b/libretro_core_options.h
-@@ -102,13 +102,14 @@ struct retro_core_option_v2_definition option_defs_us[] = {
+@@ -97,13 +97,14 @@ struct retro_core_option_v2_definition option_defs_us[] = {
"pce_fast_frameskip",
"Frameskip",
NULL,
-- "Skip frames to avoid audio buffer under-run (crackling). Improves performance at the expense of visual smoothness. 'Auto' skips frames when advised by the frontend. 'Manual' utilises the 'Frameskip Threshold (%)' setting.",
-+ "Skip frames to avoid audio buffer under-run (crackling). Improves performance at the expense of visual smoothness. 'Auto' skips frames when advised by the frontend. 'Auto (Threshold)' utilises the 'Frameskip Threshold (%)' setting. 'Fixed Interval' utilises the 'Frameskip Interval' setting.",
+- "Skip frames to avoid audio buffer under-run (crackling). Improves performance at the expense of visual smoothness. 'Auto' skips frames when advised by the frontend. 'Manual' utilizes the 'Frameskip Threshold (%)' setting.",
++ "Skip frames to avoid audio buffer under-run (crackling). Improves performance at the expense of visual smoothness. 'Auto' skips frames when advised by the frontend. 'Auto (Threshold)' utilises the 'Frameskip Threshold (%)' setting. 'Fixed Interval' utilizes the 'Frameskip Interval' setting.",
NULL,
"video",
{
@@ -96,7 +96,7 @@ index 28d27c6..1fedbd4 100644
{ NULL, NULL },
},
"disabled"
-@@ -141,6 +142,28 @@ struct retro_core_option_v2_definition option_defs_us[] = {
+@@ -136,6 +137,28 @@ struct retro_core_option_v2_definition option_defs_us[] = {
},
"33"
},
@@ -123,5 +123,5 @@ index 28d27c6..1fedbd4 100644
+ "2"
+ },
{
- "pce_hoverscan",
+ "pce_fast_hoverscan",
"Horizontal Overscan (352 Width Mode Only)",
diff --git a/patches/mame2000/1000-trimui-build.patch b/patches/mame2000/1000-trimui-build.patch
index b02c1cc..6368afc 100644
--- a/patches/mame2000/1000-trimui-build.patch
+++ b/patches/mame2000/1000-trimui-build.patch
@@ -1,8 +1,8 @@
diff --git a/Makefile b/Makefile
-index 4b0667a..34df34e 100644
+index 8112d85..8f3555e 100644
--- a/Makefile
+++ b/Makefile
-@@ -335,6 +335,26 @@ else ifeq ($(platform), gcw0)
+@@ -321,6 +321,26 @@ else ifeq ($(platform), gcw0)
DISABLE_ERROR_LOGGING := 1
CFLAGS += -march=mips32 -mtune=mips32r2 -mhard-float
@@ -29,7 +29,7 @@ index 4b0667a..34df34e 100644
# Windows MSVC 2010 x64
else ifeq ($(platform), windows_msvc2010_x64)
CC = cl.exe
-@@ -522,6 +542,8 @@ endif
+@@ -508,6 +528,8 @@ endif
ifeq ($(DEBUG), 1)
CFLAGS += -O0 -g
@@ -38,17 +38,3 @@ index 4b0667a..34df34e 100644
else
CFLAGS += -O2 -DNDEBUG
endif
-@@ -531,6 +553,13 @@ RM = rm -f
- LIBS = -lm
- OBJ = obj
-
-+ifeq ($(PROFILE), GENERATE)
-+ CFLAGS += -fprofile-generate=./profile/mame2000
-+ LIBS += -lgcov
-+else ifeq ($(PROFILE), APPLY)
-+ CFLAGS += -fprofile-use -fprofile-dir=../profile/mame2000 -fbranch-probabilities
-+endif
-+
- ifeq ($(HAVE_RZLIB),)
- ZLIB_INCLUDE := -Isrc/zlib
- endif
diff --git a/patches/snes9x2005/0001-frameskip-interval.patch b/patches/snes9x2005/0001-frameskip-interval.patc_
index f1c431d..f1c431d 100644
--- a/patches/snes9x2005/0001-frameskip-interval.patch
+++ b/patches/snes9x2005/0001-frameskip-interval.patc_
diff --git a/patches/snes9x2005/1000-trimui-support.patch b/patches/snes9x2005/1000-trimui-support.patc_
index 96dcb78..96dcb78 100644
--- a/patches/snes9x2005/1000-trimui-support.patch
+++ b/patches/snes9x2005/1000-trimui-support.patc_