build, revisions and fixes for opendingux based platforms

This commit is contained in:
kub 2023-11-16 22:53:05 +02:00
parent a20af2f935
commit 250c8ffbc0
7 changed files with 52 additions and 52 deletions

View file

@ -172,7 +172,7 @@ jobs:
ver=$(cut -d'"' -f2 platform/common/version.h)-$(git rev-parse --short HEAD)
./configure --platform=miyoo
make -j2
mv PicoDrive.zip PicoDrive-miyoo-$ver.zip
mv PicoDrive-miyoo.zip PicoDrive-miyoo-$ver.zip
- name: artifacts
uses: actions/upload-artifact@v3
with:

View file

@ -59,7 +59,7 @@ endif
chkCCflag = $(shell n=/dev/null; echo $(1) | tr " " "\n" | while read f; do \
$(CC) $$f -x c -c $$n -o $$n 2>$$n && echo "_$$f" | tr -d _; done)
ifeq ("$(PLATFORM)",$(filter "$(PLATFORM)","gp2x" "opendingux" "miyoo" "rpi1"))
ifeq ("$(PLATFORM)",$(filter "$(PLATFORM)","gp2x" "opendingux" "rpi1"))
# very small caches, avoid optimization options making the binary much bigger
CFLAGS += -fno-common -finline-limit=42 -fno-unroll-loops -ffast-math
CFLAGS += $(call chkCCflag, -fno-stack-protector)
@ -136,11 +136,18 @@ $(TARGET)-dge.zip: .od_data
all: $(TARGET)-dge.zip
CFLAGS += -DSDL_SURFACE_SW # some legacy dinguces had bugs in HWSURFACE
else
ifneq (,$(filter %__MIYOO__, $(CFLAGS)))
$(TARGET)-miyoo.zip: .od_data
rm -f .od_data/default.*.desktop .od_data/PicoDrive.dge
cd .od_data && zip -9 -r ../$@ *
all: $(TARGET)-miyoo.zip
else
$(TARGET).opk: .od_data
rm -f .od_data/PicoDrive.dge
mksquashfs .od_data $@ -all-root -noappend -no-exports -no-xattrs
all: $(TARGET).opk
endif
endif
ifneq (,$(filter %mips32r2, $(CFLAGS)))
CFLAGS += -DMIPS_USE_SYNCI # mips32r2 clear_cache uses SYNCI instead of a syscall
@ -152,22 +159,6 @@ use_inputmap ?= 1
# OpenDingux is a generic platform, really.
PLATFORM := generic
endif
ifeq "$(PLATFORM)" "miyoo"
$(TARGET).zip: $(TARGET)
$(RM) -rf .od_data
mkdir .od_data
cp -r platform/opendingux/data/. .od_data
cp platform/game_def.cfg .od_data
cp $< .od_data/PicoDrive
$(STRIP) .od_data/PicoDrive
rm -f .od_data/default.*.desktop .od_data/PicoDrive.dge
cd .od_data && zip -9 -r ../$@ *
all: $(TARGET).zip
OBJS += platform/opendingux/inputmap.o
use_inputmap ?= 1
PLATFORM := generic
endif
ifeq ("$(PLATFORM)",$(filter "$(PLATFORM)","rpi1" "rpi2"))
CFLAGS += -DHAVE_GLES -DRASPBERRY
CFLAGS += -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads/ -I/opt/vc/include/interface/vmcs_host/linux/

33
configure vendored
View file

@ -105,30 +105,30 @@ set_platform()
opendingux | gcw0 | rg350)
# more modern devices using opendingux, with Ingenic MIPS JZ4770 or newer
sound_drivers="sdl"
# mostly based on opendingux for gcw0, save device type as C define.
# mostly based on opendingux for gcw0
CFLAGS="$CFLAGS -D__OPENDINGUX__"
MFLAGS="-march=mips32r2"
platform="opendingux"
;;
rg99)
# RG99 using opendingux, with Ingenic MIPS JZ4725B
sound_drivers="sdl"
CFLAGS="$CFLAGS -D__OPENDINGUX__"
MFLAGS="-march=mips32"
platform="opendingux"
;;
miyoo)
# Miyoo BittBoy, PocketGO 1, PowKiddy V90/Q90 with Allwinner F1C100s
sound_drivers="sdl"
CFLAGS="$CFLAGS -D__OPENDINGUX__"
MFLAGS="-mcpu=arm926ej-s -marm"
platform="opendingux"
;;
odbeta)
# various devices with opendingux beta, arch flags from toolchain default
MFLAGS=""
platform="opendingux"
;;
rg99)
# RG99 using opendingux, with Ingenic MIPS JZ4725B
sound_drivers="sdl"
# mostly based on opendingux for gcw0, save device type as C define.
MFLAGS="-march=mips32"
CFLAGS="$CFLAGS -D__OPENDINGUX__"
platform="opendingux"
;;
miyoo)
# Miyoo BittBoy, PocketGO 1, PowKiddy V90/Q90 with Allwinner F1C100s
sound_drivers="sdl"
MFLAGS="-mcpu=arm926ej-s -marm"
platform="miyoo"
;;
pandora)
sound_drivers="oss alsa"
have_libavcodec="yes"
@ -279,7 +279,7 @@ arm*)
esac
case "$platform" in
rpi1 | rpi2 | generic | opendingux | odbeta | miyoo)
rpi1 | rpi2 | generic | opendingux)
need_sdl="yes"
;;
esac
@ -363,6 +363,7 @@ test -n "$SDL_CONFIG" || SDL_CONFIG="$(ls $SYSROOT/*/*bin*/sdl-config 2>/dev/nul
#test -n "$SDL_CONFIG" || SDL_CONFIG="$(ls $SYSROOT/*bin*/sdl2-config 2>/dev/null | grep /bin/sdl2-config | head -n 1)"
#test -n "$SDL_CONFIG" || SDL_CONFIG="$(ls $SYSROOT/*/*bin*/sdl2-config 2>/dev/null | grep /bin/sdl2-config | head -n 1)"
SDLVERSION=sdl && echo $SDL_CONFIG | grep -q sdl2 && SDLVERSION=sdl2
test -n "$SDL_CONFIG" || SDL_CONFIG=false
MAIN_LDLIBS="$LDLIBS -lm"

View file

@ -0,0 +1,9 @@
[Desktop Entry]
Type=Application
Name=Picodrive
Comment=A mega drive/genesis emulator
Exec=PicoDrive %f
Icon=megadrive
Terminal=false
Categories=emulators;
MimeType=.md;.smd;.gen;.bin;.sms;.gg;.sg;.cue;.chd;.cso;.iso;.32x;.pco;.zip

View file

@ -78,26 +78,25 @@ const char * const _in_sdl_key_names[SDLK_LAST] = {
[SDLK_RETURN] = "START",
[SDLK_ESCAPE] = "SELECT",
#if defined(__OPENDINGUX__)
[SDLK_HOME] = "POWER",
#if defined(__MIYOO__)
[SDLK_TAB] = "L1",
[SDLK_BACKSPACE] = "R1",
[SDLK_RALT] = "L2",
[SDLK_RSHIFT] = "R2",
[SDLK_RCTRL] = "RESET",
#elif defined(__GCW0__) || defined(__DINGUX__) || defined(__RETROFW__)
[SDLK_TAB] = "L",
[SDLK_BACKSPACE] = "R",
[SDLK_POWER] = "POWER",
[SDLK_PAUSE] = "LOCK",
#else
[SDLK_TAB] = "L1",
[SDLK_BACKSPACE] = "R1",
[SDLK_PAGEUP] = "L2",
[SDLK_PAGEDOWN] = "R2",
[SDLK_KP_DIVIDE] = "L3",
[SDLK_KP_PERIOD] = "R3",
#elif defined(__MIYOO__)
[SDLK_TAB] = "L1",
[SDLK_BACKSPACE] = "R1",
[SDLK_RALT] = "L2",
[SDLK_RSHIFT] = "R2",
[SDLK_RCTRL] = "R",
#else
[SDLK_TAB] = "L",
[SDLK_BACKSPACE] = "R",
[SDLK_POWER] = "POWER",
[SDLK_PAUSE] = "LOCK",
[SDLK_HOME] = "POWER",
#endif
};
const char * const (*in_sdl_key_names)[SDLK_LAST] = &_in_sdl_key_names;

View file

@ -72,7 +72,7 @@ mv PicoDrive.opk release-$rel/PicoDrive-gcw0_$rel.opk
# rg350, gkd350h etc: JZ4770 or newer
docker pull ghcr.io/irixxxx/toolchain-opendingux
echo " git config --global --add safe.directory /home/picodrive &&\
./configure --platform=opendingux &&\
./configure --platform=rg350 &&\
make clean && make -j2 all "\
| docker run -i -v$PWD:/home/picodrive -w/home/picodrive --rm ghcr.io/irixxxx/toolchain-opendingux sh &&
mv PicoDrive.opk release-$rel/PicoDrive-opendingux_$rel.opk
@ -85,7 +85,7 @@ echo " git config --global --add safe.directory /home/picodrive &&\
./configure --platform=miyoo &&\
make clean && make -j2 all "\
| docker run -i -v$PWD:/home/picodrive -w/home/picodrive --rm ghcr.io/irixxxx/toolchain-miyoo sh &&
mv PicoDrive.zip release-$rel/PicoDrive-miyoo_$rel.zip
mv PicoDrive-miyoo.zip release-$rel/PicoDrive-miyoo_$rel.zip
}
[ -z "${plat##* psp *}" ] && {
@ -122,7 +122,7 @@ mv PicoDrive.opk release-$rel/PicoDrive-odbeta-gcw0_$rel.opk
}
[ -z "${plat##* odbeta-lepus *}" ] && {
# lepus (untested): JZ4760 (mips32r1 with fpu)
# rg300 and other ingenic lepus based (untested): JZ4760 (mips32r1 with fpu)
docker pull ghcr.io/irixxxx/toolchain-odbeta-lepus
echo " git config --global --add safe.directory /home/picodrive &&\
./configure --platform=opendingux --platform=odbeta &&\