Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
8337321
pre-audio
jeapostrophe Oct 18, 2025
188ec2d
audio
jeapostrophe Oct 19, 2025
33f9e2b
system dir
jeapostrophe Oct 19, 2025
c57e364
cleaner paths
jeapostrophe Oct 19, 2025
ad39593
Fix libretro video pixel format and frame orientation
mixerjdp Mar 22, 2026
62208c7
Fix libretro hw rendering and supersampling
mixerjdp Mar 23, 2026
5ae8f2e
Scale libretro supersampling correctly
mixerjdp Mar 23, 2026
6ebdbac
Fix libretro supersampling viewport and hot reload
mixerjdp Mar 23, 2026
de396ef
Fix libretro supersampling presentation
mixerjdp Mar 23, 2026
6fc96c5
Swap racer trigger mapping
mixerjdp Mar 23, 2026
a1e0d7c
Restore supersampling and input mappings
mixerjdp Mar 23, 2026
de3b20c
Make libretro config self-contained
mixerjdp Mar 23, 2026
9faf51f
Fix libretro widescreen geometry
mixerjdp Mar 23, 2026
6ebb0d6
Refine racer and fighter input profiles
mixerjdp Mar 23, 2026
5771986
Finalize libretro crosshair and gun input polish
mixerjdp Mar 23, 2026
56857ef
Add analog joystick and soccer libretro mappings
mixerjdp Mar 23, 2026
7550b1e
Finalize libretro input profiles and VS2022 setup
mixerjdp Mar 24, 2026
5182e19
libretro: migrate savestates to in-memory serialization and add fast-…
mixerjdp Mar 24, 2026
5749a8d
Stabilize libretro crosshair state and overlay sizing
mixerjdp Mar 24, 2026
2ab223a
libretro: enable fighter-only P2 port with mirrored RetroPad mapping
mixerjdp Mar 24, 2026
01885d3
libretro: add extensible frontend integration layer (log/perf/runtime…
mixerjdp Mar 24, 2026
46afa83
libretro: expose persistent memory via retro_get_memory_* and add rep…
mixerjdp Mar 24, 2026
96cc1c2
libretro linux: route GL loading through RetroArch
mixerjdp Mar 24, 2026
fc7f0b3
libretro: stop using frontend viewport as output size
mixerjdp Mar 24, 2026
00fd3c6
Revert "libretro: stop using frontend viewport as output size"
mixerjdp Mar 24, 2026
440c19e
libretro linux: fix final framebuffer coverage
mixerjdp Mar 24, 2026
9804250
libretro: expose PPC, SCSP legacy DSP, and CRT color tuning
mixerjdp Mar 25, 2026
a495cea
Optimize Linux incremental sync and finalize input profiles
mixerjdp Mar 25, 2026
2f78140
Add libretro build and release workflows
mixerjdp Mar 26, 2026
2b98a4d
fix(libretro): set Network config default (required by trzy netboard)
jeapostrophe Jul 11, 2026
e02b128
fix(libretro): core-profile crosshair shader + macOS build script
jeapostrophe Jul 11, 2026
298f54e
feat(libretro): expose 8 MB PPC main RAM as RETRO_MEMORY_SYSTEM_RAM
jeapostrophe Jul 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 98 additions & 33 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,121 @@
name: Build and Release
name: Release Supermodel Libretro

on:
push:
branches: [ master ] # Auto-build on master
workflow_dispatch: # Manual triggering
tags:
- "v*"
workflow_dispatch:
inputs:
opt:
description: "Optimization flags"
tag_name:
description: "Release tag to create or publish (for example v0.3a-1)"
required: false
type: string
default: "-O3 -g"
default: ""
release_name:
description: "Release title"
required: false
type: string
default: ""
notes:
description: "Extra release notes to prepend"
required: false
type: string
default: ""
prerelease:
description: "Mark as prerelease"
required: false
type: boolean
default: true

jobs:
build:
uses: ./.github/workflows/build.yml
with:
opt: ${{ github.event.inputs.opt || '-O3 -g' }}
opt: "-O3 -g"

release:
needs: build
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- name: Get version
id: version
run: |
VERSION=$(make -f Makefiles/Makefile.UNIX version)
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Download all artifacts
- name: Check out source
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
path: artifacts

- name: Debug downloaded artifacts
- name: Prepare release metadata
id: meta
shell: bash
run: |
echo "=== Downloaded artifacts structure ==="
find artifacts -type f -name "*.zip" -o -name "*.tar.gz" | sort
echo "=== End debug ==="

- name: Create release
uses: softprops/action-gh-release@v1
set -e

if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ github.event.inputs.tag_name }}" ]; then
TAG_NAME="${{ github.event.inputs.tag_name }}"
else
TAG_NAME="${{ github.ref_name }}"
fi

if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ github.event.inputs.release_name }}" ]; then
RELEASE_NAME="${{ github.event.inputs.release_name }}"
else
RELEASE_NAME="Supermodel Libretro ${TAG_NAME}"
fi

PREV_TAG="$(git tag --sort=-creatordate | grep -Fxv "$TAG_NAME" | head -n 1 || true)"

if [ -n "$PREV_TAG" ]; then
CHANGELOG="$(git log --pretty=format:'- %s' "${PREV_TAG}..HEAD")"
else
CHANGELOG="$(git log -n 12 --pretty=format:'- %s')"
fi

EXTRA_NOTES=""
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ github.event.inputs.notes }}" ]; then
EXTRA_NOTES="${{ github.event.inputs.notes }}"
fi

{
echo "tag_name=$TAG_NAME"
echo "release_name=$RELEASE_NAME"
echo "prerelease=${{ github.event_name == 'workflow_dispatch' && github.event.inputs.prerelease || 'false' }}"
echo "body<<EOF"
echo "Supermodel Libretro automated release."
echo ""
echo "Assets:"
echo "- Win32: \`supermodel_libretro-win32.dll\`"
echo "- Win64: \`supermodel_libretro-win64.dll\`"
echo "- Linux: \`supermodel_libretro-linux.so\`"
echo ""
if [ -n "$EXTRA_NOTES" ]; then
echo "Notes:"
echo "$EXTRA_NOTES"
echo ""
fi
echo "Recent changes:"
if [ -n "$CHANGELOG" ]; then
echo "$CHANGELOG"
else
echo "- No recent commits available."
fi
echo "EOF"
} >> "$GITHUB_OUTPUT"

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: "v${{ steps.version.outputs.version }}"
name: "Supermodel v${{ steps.version.outputs.version }}"
files: |
artifacts/*/*.zip
artifacts/*/*.tar.gz
body: "Automated release with builds for Windows, Linux, and macOS."
tag_name: ${{ steps.meta.outputs.tag_name }}
name: ${{ steps.meta.outputs.release_name }}
target_commitish: ${{ github.sha }}
body: ${{ steps.meta.outputs.body }}
prerelease: ${{ steps.meta.outputs.prerelease }}
draft: false
prerelease: false
generate_release_notes: true
files: |
artifacts/**/supermodel_libretro-win32.dll
artifacts/**/supermodel_libretro-win64.dll
artifacts/**/supermodel_libretro-linux.so
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ib/

# Visual Studio 2015/2017 cache/options directory
.vs/
Expand Down Expand Up @@ -349,6 +350,9 @@ Libraries
bin/
bin64/
bin32/
lib/
lib64/
lib32/
obj/
obj64/
obj32/
Expand Down
6 changes: 4 additions & 2 deletions Makefiles/Makefile.OSX
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ SDL_LIBS = -framework SDL2 -framework SDL2_net -framework OpenGL -framework GLUT
#

PLATFORM_CXXFLAGS = -F./Frameworks -IFrameworks/SDL2.framework/Headers $(SDL_CFLAGS) -DSUPERMODEL_OSX
PLATFORM_LDFLAGS = -F./Frameworks $(SDL_LIBS) -lz -lm -lstdc++ -Wl,-rpath,@executable_path/../Frameworks -Wl,-rpath,@executable_path/Frameworks
PLATFORM_LDFLAGS = -F./Frameworks $(SDL_LIBS) -lz -lm -lstdc++ -Wl,-rpath,@executable_path/../Frameworks -Wl,-rpath,@executable_path/Frameworks -Wl,-rpath,@loader_path
PLATFORM_DIRS = Frameworks/SDL2_net.framework Frameworks/SDL2.framework
PLATFORM_BINARY_EXTENSION =
PLATFORM_DYLIB_EXTENSION = .dylib
PLATFORM_DYLIB_FLAG = -dylib

#
# GitHub token
Expand Down Expand Up @@ -154,4 +156,4 @@ Frameworks/SDL2_net.framework: Frameworks/SDL2_net.dmg
$(SILENT)cp -r /Volumes/SDL2_net/SDL2_net.framework Frameworks
$(SILENT)xattr -dr com.apple.quarantine $@
$(SILENT)hdiutil detach -quiet /Volumes/SDL2_net
$(SILENT)touch $@
$(SILENT)touch $@
3 changes: 2 additions & 1 deletion Makefiles/Makefile.UNIX
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ SDL2_LIBS += -lSDL2_net
PLATFORM_CXXFLAGS = $(SDL2_CFLAGS) -O3
PLATFORM_LDFLAGS = $(SDL2_LIBS) -lGL -lGLU -lz -lm -lstdc++ -lpthread
PLATFORM_BINARY_EXTENSION =

PLATFORM_DYLIB_EXTENSION = .so
PLATFORM_DYLIB_FLAG = --shared

###############################################################################
# Core Makefile
Expand Down
3 changes: 2 additions & 1 deletion Makefiles/Makefile.Win32
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ PLATFORM_LIBS = -ldxerr8 -ldinput8 -lglu32 -lole32 -loleaut32 -lopengl32 -lwbemu
PLATFORM_CXXFLAGS = $(SDL2_CFLAGS) -DSUPERMODEL_WIN32 $(addprefix -I,$(sort $(PLATFORM_INCLUDE_DIR)))
PLATFORM_LDFLAGS = -static -L$(sort $(PLATFORM_LIB_DIR)) $(SDL2_LIBS) $(PLATFORM_LIBS)
PLATFORM_BINARY_EXTENSION = .exe

PLATFORM_DYLIB_EXTENSION = .dll
PLATFORM_DYLIB_FLAG = --shared

###############################################################################
# Core Makefile
Expand Down
63 changes: 51 additions & 12 deletions Makefiles/Rules.inc
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@

OBJ_DIR = obj$(strip $(BITS))
BIN_DIR = bin$(strip $(BITS))
LIB_DIR = lib$(strip $(BITS))

SUPERMODEL_BINARY = supermodel$(PLATFORM_BINARY_EXTENSION)
DISASSEMBLER_BINARY = ppcd$(PLATFORM_BINARY_EXTENSION)
SUPERMODEL_DYLIB = supermodel_libretro$(PLATFORM_DYLIB_EXTENSION)


###############################################################################
Expand All @@ -57,6 +59,12 @@ ifeq ($(strip $(ENABLE_DEBUGGER)),1)
SUPERMODEL_BUILD_FLAGS += -DSUPERMODEL_DEBUGGER
endif

# If libretro enabled, need to define SUPERMODEL_LIBRETRO
ifeq ($(strip $(LIBRETRO)),1)
SUPERMODEL_BUILD_FLAGS += -DSUPERMODEL_LIBRETRO
SUPERMODEL_BUILD_FLAGS += -DGLEW_LIBRETRO
endif

# DEBUG will build a debug build but does *not* enable extra debug logging and
# therefore does not modify SUPERMODEL_BUILD_FLAGS

Expand All @@ -80,25 +88,31 @@ endif
# Construct the compiler (C and C++) and linker flags
#
COMMON_CFLAGS = -c $(ARCH) $(OPT) $(WARN) $(addprefix -I,$(sort $(INCLUDE_DIRS))) -DGLEW_STATIC $(SUPERMODEL_BUILD_FLAGS)
ifeq ($(strip $(LIBRETRO)),1)
COMMON_CFLAGS += -fPIC
endif
CFLAGS = $(COMMON_CFLAGS) $(CSTD)
CXXFLAGS = $(PLATFORM_CXXFLAGS) $(COMMON_CFLAGS) $(CXXSTD)
ifeq ($(strip $(LIBRETRO)),1)
LDFLAGS = $(PLATFORM_DYLIB_FLAG) -o $(LIB_DIR)/$(SUPERMODEL_DYLIB) $(PLATFORM_LDFLAGS) $(LDOPT)
else
LDFLAGS = -o $(BIN_DIR)/$(SUPERMODEL_BINARY) $(PLATFORM_LDFLAGS) $(LDOPT)

endif

###############################################################################
# Source Files
###############################################################################

SRC_FILES = \
Src/CPU/PowerPC/PPCDisasm.cpp \
Src/BlockFile.cpp \
Src/Pkgs/unzip.cpp \
Src/Pkgs/ioapi.cpp \
Src/Model3/93C46.cpp \
Src/JTAG.cpp \
Src/Graphics/Legacy3D/Error.cpp \
Src/Pkgs/glew.cpp \
Src/Graphics/Shader.cpp \
SRC_FILES = \
Src/CPU/PowerPC/PPCDisasm.cpp \
Src/BlockFile.cpp \
Src/Pkgs/unzip.c \
Src/Pkgs/ioapi.c \
Src/Model3/93C46.cpp \
Src/Model3/JTAG.cpp \
Src/Graphics/Legacy3D/Error.cpp \
Src/Pkgs/glew.c \
Src/Graphics/Shader.cpp \
Src/Model3/Real3D.cpp \
Src/Graphics/Legacy3D/Legacy3D.cpp \
Src/Graphics/Legacy3D/Models.cpp \
Expand Down Expand Up @@ -199,6 +213,11 @@ ifeq ($(strip $(ENABLE_DEBUGGER)),1)
Src/Debugger/CPU/Z80Debug.cpp
endif

ifeq ($(strip $(LIBRETRO)),1)
SRC_FILES += \
Src/OSD/SDL/LibRetro.cpp
endif

#
# Sorted-path compile order
#
Expand All @@ -220,7 +239,11 @@ INCLUDE_DIRS = $(sort $(foreach file,$(SRC_FILES),$(dir $(file))))
# generated dependencies because otherwise, make gets confused for some reason
# and thinks the default target is just one of the object files.
#
ifeq ($(strip $(LIBRETRO)),1)
all: $(LIB_DIR)/$(SUPERMODEL_DYLIB)
else
all: $(BIN_DIR)/$(DISASSEMBLER_BINARY) $(BIN_DIR)/$(SUPERMODEL_BINARY)
endif

#
# Supermodel3.com release targets: used only to create official builds stamped
Expand Down Expand Up @@ -306,7 +329,7 @@ $(BIN_DIR)/$(SUPERMODEL_BINARY): $(BIN_DIR) $(OBJ_FILES)

#
# Disassembler binary (we assume $(LD) can also compile here, which is sloppy).
# $(PLATFORM_DIRS) is required on macOS, whose $(PLATFORM_LDFLAGS) pulls in
# $(PLATFORM_DIRS) is required on macOS, whose $(PLATFORM_LDFLAGS) pulls in
# Frameworks that must be downloaded.
#
$(BIN_DIR)/$(DISASSEMBLER_BINARY): $(BIN_DIR) Src/CPU/PowerPC/PPCDisasm.cpp $(PLATFORM_DIRS)
Expand All @@ -315,6 +338,15 @@ $(BIN_DIR)/$(DISASSEMBLER_BINARY): $(BIN_DIR) Src/CPU/PowerPC/PPCDisasm.cpp $(P
$(SILENT)$(LD) -o $(BIN_DIR)/$(DISASSEMBLER_BINARY) Src/CPU/PowerPC/PPCDisasm.cpp -DSTANDALONE $(OPT) $(WARN) $(addprefix -I,$(sort $(INCLUDE_DIRS))) $(CXXSTD) $(PLATFORM_LDFLAGS)
$(info --------------------------------------------------------------------------------)

#
# Supermodel dylib
#
$(LIB_DIR)/$(SUPERMODEL_DYLIB): $(LIB_DIR) $(OBJ_FILES)
$(info --------------------------------------------------------------------------------)
$(info Dynamic Linking Supermodel : $(LIB_DIR)/$(SUPERMODEL_DYLIB))
$(LD) $(OBJ_FILES) $(LDFLAGS)
$(info --------------------------------------------------------------------------------)

#
# Directory to which binary will be written. Note that Supermodel is never
# packaged with this directory.
Expand All @@ -330,6 +362,13 @@ $(OBJ_DIR): | $(PLATFORM_DIRS)
$(info Creating directory : $(OBJ_DIR))
$(SILENT)mkdir $(OBJ_DIR)

#
# Library directory
#
$(LIB_DIR): | $(PLATFORM_DIRS)
$(info Creating directory : $(LIB_DIR))
$(SILENT)mkdir $(LIB_DIR)


###############################################################################
# Rules
Expand Down
Loading