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:
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)
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
# 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/
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"
;;
- 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__"
+ 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="miyoo"
+ platform="opendingux"
+ ;;
+ odbeta)
+ # various devices with opendingux beta, arch flags from toolchain default
+ MFLAGS=""
+ platform="opendingux"
;;
pandora)
sound_drivers="oss alsa"
esac
case "$platform" in
-rpi1 | rpi2 | generic | opendingux | odbeta | miyoo)
+rpi1 | rpi2 | generic | opendingux)
need_sdl="yes"
;;
esac
#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"
--- /dev/null
+[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
[SDLK_RETURN] = "START",
[SDLK_ESCAPE] = "SELECT",
-#if defined(__OPENDINGUX__)
- [SDLK_HOME] = "POWER",
-
- [SDLK_TAB] = "L1",
- [SDLK_BACKSPACE] = "R1",
- [SDLK_PAGEUP] = "L2",
- [SDLK_PAGEDOWN] = "R2",
- [SDLK_KP_DIVIDE] = "L3",
- [SDLK_KP_PERIOD] = "R3",
-#elif defined(__MIYOO__)
+#if defined(__MIYOO__)
[SDLK_TAB] = "L1",
[SDLK_BACKSPACE] = "R1",
[SDLK_RALT] = "L2",
[SDLK_RSHIFT] = "R2",
- [SDLK_RCTRL] = "R",
-#else
+ [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",
+ [SDLK_HOME] = "POWER",
#endif
};
const char * const (*in_sdl_key_names)[SDLK_LAST] = &_in_sdl_key_names;
if (p)
*p = memalign(align, size);
return (p ? *p ? 0 : ENOMEM : EINVAL);
-}
\ No newline at end of file
+}
# 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
./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 *}" ] && {
}
[ -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 &&\