mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
build, revisions and fixes for opendingux based platforms
This commit is contained in:
parent
a20af2f935
commit
250c8ffbc0
7 changed files with 52 additions and 52 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -172,7 +172,7 @@ jobs:
|
||||||
ver=$(cut -d'"' -f2 platform/common/version.h)-$(git rev-parse --short HEAD)
|
ver=$(cut -d'"' -f2 platform/common/version.h)-$(git rev-parse --short HEAD)
|
||||||
./configure --platform=miyoo
|
./configure --platform=miyoo
|
||||||
make -j2
|
make -j2
|
||||||
mv PicoDrive.zip PicoDrive-miyoo-$ver.zip
|
mv PicoDrive-miyoo.zip PicoDrive-miyoo-$ver.zip
|
||||||
- name: artifacts
|
- name: artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
|
25
Makefile
25
Makefile
|
@ -59,7 +59,7 @@ endif
|
||||||
chkCCflag = $(shell n=/dev/null; echo $(1) | tr " " "\n" | while read f; do \
|
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)
|
$(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
|
# very small caches, avoid optimization options making the binary much bigger
|
||||||
CFLAGS += -fno-common -finline-limit=42 -fno-unroll-loops -ffast-math
|
CFLAGS += -fno-common -finline-limit=42 -fno-unroll-loops -ffast-math
|
||||||
CFLAGS += $(call chkCCflag, -fno-stack-protector)
|
CFLAGS += $(call chkCCflag, -fno-stack-protector)
|
||||||
|
@ -136,11 +136,18 @@ $(TARGET)-dge.zip: .od_data
|
||||||
all: $(TARGET)-dge.zip
|
all: $(TARGET)-dge.zip
|
||||||
CFLAGS += -DSDL_SURFACE_SW # some legacy dinguces had bugs in HWSURFACE
|
CFLAGS += -DSDL_SURFACE_SW # some legacy dinguces had bugs in HWSURFACE
|
||||||
else
|
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
|
$(TARGET).opk: .od_data
|
||||||
rm -f .od_data/PicoDrive.dge
|
rm -f .od_data/PicoDrive.dge
|
||||||
mksquashfs .od_data $@ -all-root -noappend -no-exports -no-xattrs
|
mksquashfs .od_data $@ -all-root -noappend -no-exports -no-xattrs
|
||||||
all: $(TARGET).opk
|
all: $(TARGET).opk
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq (,$(filter %mips32r2, $(CFLAGS)))
|
ifneq (,$(filter %mips32r2, $(CFLAGS)))
|
||||||
CFLAGS += -DMIPS_USE_SYNCI # mips32r2 clear_cache uses SYNCI instead of a syscall
|
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.
|
# OpenDingux is a generic platform, really.
|
||||||
PLATFORM := generic
|
PLATFORM := generic
|
||||||
endif
|
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"))
|
ifeq ("$(PLATFORM)",$(filter "$(PLATFORM)","rpi1" "rpi2"))
|
||||||
CFLAGS += -DHAVE_GLES -DRASPBERRY
|
CFLAGS += -DHAVE_GLES -DRASPBERRY
|
||||||
CFLAGS += -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads/ -I/opt/vc/include/interface/vmcs_host/linux/
|
CFLAGS += -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads/ -I/opt/vc/include/interface/vmcs_host/linux/
|
||||||
|
|
33
configure
vendored
33
configure
vendored
|
@ -105,30 +105,30 @@ set_platform()
|
||||||
opendingux | gcw0 | rg350)
|
opendingux | gcw0 | rg350)
|
||||||
# more modern devices using opendingux, with Ingenic MIPS JZ4770 or newer
|
# more modern devices using opendingux, with Ingenic MIPS JZ4770 or newer
|
||||||
sound_drivers="sdl"
|
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__"
|
CFLAGS="$CFLAGS -D__OPENDINGUX__"
|
||||||
MFLAGS="-march=mips32r2"
|
MFLAGS="-march=mips32r2"
|
||||||
platform="opendingux"
|
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)
|
odbeta)
|
||||||
# various devices with opendingux beta, arch flags from toolchain default
|
# various devices with opendingux beta, arch flags from toolchain default
|
||||||
MFLAGS=""
|
MFLAGS=""
|
||||||
platform="opendingux"
|
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)
|
pandora)
|
||||||
sound_drivers="oss alsa"
|
sound_drivers="oss alsa"
|
||||||
have_libavcodec="yes"
|
have_libavcodec="yes"
|
||||||
|
@ -279,7 +279,7 @@ arm*)
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$platform" in
|
case "$platform" in
|
||||||
rpi1 | rpi2 | generic | opendingux | odbeta | miyoo)
|
rpi1 | rpi2 | generic | opendingux)
|
||||||
need_sdl="yes"
|
need_sdl="yes"
|
||||||
;;
|
;;
|
||||||
esac
|
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)"
|
||||||
#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
|
SDLVERSION=sdl && echo $SDL_CONFIG | grep -q sdl2 && SDLVERSION=sdl2
|
||||||
|
test -n "$SDL_CONFIG" || SDL_CONFIG=false
|
||||||
|
|
||||||
MAIN_LDLIBS="$LDLIBS -lm"
|
MAIN_LDLIBS="$LDLIBS -lm"
|
||||||
|
|
||||||
|
|
9
platform/opendingux/data/default.lepus.desktop
Normal file
9
platform/opendingux/data/default.lepus.desktop
Normal 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
|
|
@ -78,26 +78,25 @@ const char * const _in_sdl_key_names[SDLK_LAST] = {
|
||||||
[SDLK_RETURN] = "START",
|
[SDLK_RETURN] = "START",
|
||||||
[SDLK_ESCAPE] = "SELECT",
|
[SDLK_ESCAPE] = "SELECT",
|
||||||
|
|
||||||
#if defined(__OPENDINGUX__)
|
#if defined(__MIYOO__)
|
||||||
[SDLK_HOME] = "POWER",
|
[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_TAB] = "L1",
|
||||||
[SDLK_BACKSPACE] = "R1",
|
[SDLK_BACKSPACE] = "R1",
|
||||||
[SDLK_PAGEUP] = "L2",
|
[SDLK_PAGEUP] = "L2",
|
||||||
[SDLK_PAGEDOWN] = "R2",
|
[SDLK_PAGEDOWN] = "R2",
|
||||||
[SDLK_KP_DIVIDE] = "L3",
|
[SDLK_KP_DIVIDE] = "L3",
|
||||||
[SDLK_KP_PERIOD] = "R3",
|
[SDLK_KP_PERIOD] = "R3",
|
||||||
#elif defined(__MIYOO__)
|
[SDLK_HOME] = "POWER",
|
||||||
[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",
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
const char * const (*in_sdl_key_names)[SDLK_LAST] = &_in_sdl_key_names;
|
const char * const (*in_sdl_key_names)[SDLK_LAST] = &_in_sdl_key_names;
|
||||||
|
|
|
@ -272,4 +272,4 @@ int posix_memalign(void **p, size_t align, size_t size)
|
||||||
if (p)
|
if (p)
|
||||||
*p = memalign(align, size);
|
*p = memalign(align, size);
|
||||||
return (p ? *p ? 0 : ENOMEM : EINVAL);
|
return (p ? *p ? 0 : ENOMEM : EINVAL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ mv PicoDrive.opk release-$rel/PicoDrive-gcw0_$rel.opk
|
||||||
# rg350, gkd350h etc: JZ4770 or newer
|
# rg350, gkd350h etc: JZ4770 or newer
|
||||||
docker pull ghcr.io/irixxxx/toolchain-opendingux
|
docker pull ghcr.io/irixxxx/toolchain-opendingux
|
||||||
echo " git config --global --add safe.directory /home/picodrive &&\
|
echo " git config --global --add safe.directory /home/picodrive &&\
|
||||||
./configure --platform=opendingux &&\
|
./configure --platform=rg350 &&\
|
||||||
make clean && make -j2 all "\
|
make clean && make -j2 all "\
|
||||||
| docker run -i -v$PWD:/home/picodrive -w/home/picodrive --rm ghcr.io/irixxxx/toolchain-opendingux sh &&
|
| 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
|
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 &&\
|
./configure --platform=miyoo &&\
|
||||||
make clean && make -j2 all "\
|
make clean && make -j2 all "\
|
||||||
| docker run -i -v$PWD:/home/picodrive -w/home/picodrive --rm ghcr.io/irixxxx/toolchain-miyoo sh &&
|
| 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 *}" ] && {
|
[ -z "${plat##* psp *}" ] && {
|
||||||
|
@ -122,7 +122,7 @@ mv PicoDrive.opk release-$rel/PicoDrive-odbeta-gcw0_$rel.opk
|
||||||
}
|
}
|
||||||
|
|
||||||
[ -z "${plat##* odbeta-lepus *}" ] && {
|
[ -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
|
docker pull ghcr.io/irixxxx/toolchain-odbeta-lepus
|
||||||
echo " git config --global --add safe.directory /home/picodrive &&\
|
echo " git config --global --add safe.directory /home/picodrive &&\
|
||||||
./configure --platform=opendingux --platform=odbeta &&\
|
./configure --platform=opendingux --platform=odbeta &&\
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue