aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneonloop2021-10-21 15:04:02 +0000
committerneonloop2021-10-21 15:04:02 +0000
commit4ed343911dd50c564d76e3d44f807cc64820310b (patch)
tree6298fae38506a290c24ea6b14550a0849c30f139
parenta1b4714da9b135a864ebe1b53b8bf4c67b8b18d5 (diff)
downloadpicoarch-4ed343911dd50c564d76e3d44f807cc64820310b.tar.gz
picoarch-4ed343911dd50c564d76e3d44f807cc64820310b.tar.bz2
picoarch-4ed343911dd50c564d76e3d44f807cc64820310b.zip
Adds smsplus-gx core
-rw-r--r--.gitignore1
-rw-r--r--Makefile10
-rw-r--r--overrides.c2
-rw-r--r--overrides/fceumm.h4
-rw-r--r--overrides/quicknes.h4
-rw-r--r--overrides/smsplus.h52
-rw-r--r--patches/smsplus-gx/1000-trimui-build.patch27
7 files changed, 94 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index 70183e4..fc49c3e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,5 +15,6 @@ picoarch
/mame2003_plus
/pcsx_rearmed
/quicknes
+/smsplus-gx
/snes9x2002
/snes9x2005
diff --git a/Makefile b/Makefile
index 6064832..a5b6977 100644
--- a/Makefile
+++ b/Makefile
@@ -19,8 +19,7 @@ LDFLAGS = -lc -ldl -lgcc -lm -lSDL -lasound -lpng -lz -Wl,--gc-sections -flto
# Unpolished or slow cores that build
# EXTRA_CORES += fbalpha2012
# EXTRA_CORES += mame2003_plus
-
-CORES = beetle-pce-fast fceumm gambatte gme gpsp mame2000 pcsx_rearmed quicknes snes9x2002 snes9x2005 $(EXTRA_CORES)
+CORES = beetle-pce-fast fceumm gambatte gme gpsp mame2000 pcsx_rearmed quicknes smsplus-gx snes9x2002 snes9x2005 $(EXTRA_CORES)
beetle-pce-fast_REPO = https://github.com/libretro/beetle-pce-fast-libretro
beetle-pce-fast_CORE = mednafen_pce_fast_libretro.so
@@ -42,6 +41,9 @@ pcsx_rearmed_MAKEFILE = Makefile.libretro
quicknes_REPO = https://github.com/libretro/QuickNES_Core
+smsplus-gx_MAKEFILE = Makefile.libretro
+smsplus-gx_CORE = smsplus_libretro.so
+
ifeq ($(platform), trimui)
OBJS += plat_trimui.o
CFLAGS += -mcpu=arm926ej-s -mtune=arm926ej-s -fno-PIC -DCONTENT_DIR='"/mnt/SDCARD/Roms"'
@@ -192,6 +194,10 @@ quicknes_ROM_DIR = FC
quicknes_TYPES = nes
quicknes_PAK_NAME = Nintendo
+smsplus_ROM_DIR = MS
+smsplus_TYPES = sms,bin,rom,col,gg,sg
+smsplus_PAK_NAME = Game Gear
+
snes9x2002_ROM_DIR = SFC
snes9x2002_TYPES = smc,fig,sfc,gd3,gd7,dx2,bsx,swc,zip
snes9x2002_PAK_NAME = Super Nintendo
diff --git a/overrides.c b/overrides.c
index 7e6b61b..27d130e 100644
--- a/overrides.c
+++ b/overrides.c
@@ -7,6 +7,7 @@
#include "overrides/mame2000.h"
#include "overrides/pcsx_rearmed.h"
#include "overrides/quicknes.h"
+#include "overrides/smsplus.h"
#include "overrides/snes9x2002.h"
#include "overrides/snes9x2005.h"
#include "util.h"
@@ -20,6 +21,7 @@ static const struct core_override overrides[] = {
mame2000_overrides,
pcsx_rearmed_overrides,
quicknes_overrides,
+ smsplus_overrides,
snes9x2002_overrides,
snes9x2005_overrides,
};
diff --git a/overrides/fceumm.h b/overrides/fceumm.h
index 2009d08..e0fbc10 100644
--- a/overrides/fceumm.h
+++ b/overrides/fceumm.h
@@ -74,8 +74,8 @@ me_bind_action fceumm_ctrl_actions[] =
{ "B ", 1 << RETRO_DEVICE_ID_JOYPAD_B },
{ "A TURBO ", 1 << RETRO_DEVICE_ID_JOYPAD_X },
{ "B TURBO ", 1 << RETRO_DEVICE_ID_JOYPAD_Y },
- { "SELECT ", 1 << RETRO_DEVICE_ID_JOYPAD_START },
- { "START ", 1 << RETRO_DEVICE_ID_JOYPAD_SELECT },
+ { "START ", 1 << RETRO_DEVICE_ID_JOYPAD_START },
+ { "SELECT ", 1 << RETRO_DEVICE_ID_JOYPAD_SELECT },
{ "DISK CHNG", 1 << RETRO_DEVICE_ID_JOYPAD_L },
{ "INS DISK ", 1 << RETRO_DEVICE_ID_JOYPAD_R },
{ "INS COIN ", 1 << RETRO_DEVICE_ID_JOYPAD_R2 },
diff --git a/overrides/quicknes.h b/overrides/quicknes.h
index f132951..f4a5455 100644
--- a/overrides/quicknes.h
+++ b/overrides/quicknes.h
@@ -74,8 +74,8 @@ me_bind_action quicknes_ctrl_actions[] =
{ "B ", 1 << RETRO_DEVICE_ID_JOYPAD_B },
{ "A TURBO ", 1 << RETRO_DEVICE_ID_JOYPAD_X },
{ "B TURBO ", 1 << RETRO_DEVICE_ID_JOYPAD_Y },
- { "SELECT ", 1 << RETRO_DEVICE_ID_JOYPAD_START },
- { "START ", 1 << RETRO_DEVICE_ID_JOYPAD_SELECT },
+ { "START ", 1 << RETRO_DEVICE_ID_JOYPAD_START },
+ { "SELECT ", 1 << RETRO_DEVICE_ID_JOYPAD_SELECT },
{ NULL, 0 }
};
diff --git a/overrides/smsplus.h b/overrides/smsplus.h
new file mode 100644
index 0000000..e540f18
--- /dev/null
+++ b/overrides/smsplus.h
@@ -0,0 +1,52 @@
+#include "overrides.h"
+
+static const struct core_override_option smsplus_core_option_overrides[] = {
+ {
+ .key = "smsplus_hardware",
+ .options = {
+ { "auto", NULL },
+ { "master system", "sms" },
+ { "master system II", "sms II" },
+ { "game gear", NULL },
+ { "game gear (sms compatibility)", "gg (sms compat.)" },
+ { "coleco", NULL },
+ { NULL, NULL },
+ },
+ },
+ {
+ .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.",
+ },
+ {
+ .key = "smsplus_hide_left_border",
+ .desc = "Hide SMS Border",
+ },
+ { NULL }
+};
+
+me_bind_action smsplus_ctrl_actions[] =
+{
+ { "UP ", 1 << RETRO_DEVICE_ID_JOYPAD_UP},
+ { "DOWN ", 1 << RETRO_DEVICE_ID_JOYPAD_DOWN },
+ { "LEFT ", 1 << RETRO_DEVICE_ID_JOYPAD_LEFT },
+ { "RIGHT ", 1 << RETRO_DEVICE_ID_JOYPAD_RIGHT },
+ { "BTN 1 ", 1 << RETRO_DEVICE_ID_JOYPAD_A },
+ { "BTN 2 ", 1 << RETRO_DEVICE_ID_JOYPAD_B },
+ { "COLECO 1 ", 1 << RETRO_DEVICE_ID_JOYPAD_X },
+ { "COLECO 2 ", 1 << RETRO_DEVICE_ID_JOYPAD_Y },
+ { "START / #", 1 << RETRO_DEVICE_ID_JOYPAD_START },
+ { "COLECO * ", 1 << RETRO_DEVICE_ID_JOYPAD_SELECT },
+ { "COLECO 3 ", 1 << RETRO_DEVICE_ID_JOYPAD_R },
+ { "COLECO 4 ", 1 << RETRO_DEVICE_ID_JOYPAD_L },
+ { "COLECO 5 ", 1 << RETRO_DEVICE_ID_JOYPAD_R2 },
+ { "COLECO 6 ", 1 << RETRO_DEVICE_ID_JOYPAD_L2 },
+ { NULL, 0 }
+};
+
+#define smsplus_overrides { \
+ .core_name = "smsplus-gx", \
+ .actions = smsplus_ctrl_actions, \
+ .action_size = array_size(smsplus_ctrl_actions), \
+ .options = smsplus_core_option_overrides \
+}
diff --git a/patches/smsplus-gx/1000-trimui-build.patch b/patches/smsplus-gx/1000-trimui-build.patch
new file mode 100644
index 0000000..2d42b2f
--- /dev/null
+++ b/patches/smsplus-gx/1000-trimui-build.patch
@@ -0,0 +1,27 @@
+diff --git a/Makefile.libretro b/Makefile.libretro
+index e4575bc..7f96e07 100644
+--- a/Makefile.libretro
++++ b/Makefile.libretro
+@@ -327,7 +327,21 @@ else ifeq ($(platform), miyoo)
+ SHARED := -shared -Wl,--no-undefined -Wl,--version-script=link.T
+ CFLAGS += -ffast-math -march=armv5te -mtune=arm926ej-s -fomit-frame-pointer
+ ENDIANNESS_DEFINES += -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN -DALIGN_LONG
+-
++
++else ifeq ($(platform), trimui)
++ TARGET := $(TARGET_NAME)_libretro.so
++ CC = $(CROSS_COMPILE)gcc
++ CXX = $(CROSS_COMPILE)g++
++ AR = $(CROSS_COMPILE)ar
++ SHARED := -shared -Wl,--no-undefined -Wl,--version-script=link.T
++ CFLAGS += -fomit-frame-pointer -march=armv5te -mtune=arm926ej-s -ffast-math -fno-PIC -flto
++ CXXFLAGS += -fomit-frame-pointer -march=armv5te -mtune=arm926ej-s -ffast-math -fno-PIC -flto
++ LDFLAGS += -flto
++ ifeq (,$(DEBUG))
++ LDFLAGS += -s
++ endif
++ ENDIANNESS_DEFINES += -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN -DALIGN_LONG
++
+ # else ifneq (,$(findstring armv,$(platform)))
+ # TARGET := $(TARGET_NAME)_libretro.so
+ # fpic := -fPIC