Skip to content

Commit

Permalink
build, revisions and fixes for opendingux based platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
irixxxx committed Nov 15, 2023
1 parent 7f09f5c commit f255443
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ jobs:
run: |
git config --global --add safe.directory $PWD
ver=$(cut -d'"' -f2 platform/common/version.h)-$(git rev-parse --short HEAD)
./configure --platform=opendingux
./configure --platform=gcw0 --platform=odbeta
make -j2
mv PicoDrive.opk PicoDrive-odbeta-gcw0-$ver.opk
- name: artifacts
Expand All @@ -230,7 +230,7 @@ jobs:
run: |
git config --global --add safe.directory $PWD
ver=$(cut -d'"' -f2 platform/common/version.h)-$(git rev-parse --short HEAD)
./configure --platform=opendingux
./configure --platform=opendingux --platform=odbeta
make -j2
mv PicoDrive.opk PicoDrive-odbeta-lepus-$ver.opk
- name: artifacts
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -458,3 +458,4 @@ pico/memory.o pico/cd/memory.o pico/32x/memory.o : pico/memory.h
$(shell grep -rl pico_int.h pico) : pico/pico_int.h
# pico/cart.o : pico/carthw_cfg.c
cpu/fame/famec.o: cpu/fame/famec.c cpu/fame/famec_opcodes.h
platform/common/menu_pico.o: platform/libpicofe/menu.c
19 changes: 11 additions & 8 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ check_define()
# "" means "autodetect".

# TODO this is annoyingly messy. should have platform and device
platform_list="generic pandora gp2x wiz caanoo dingux retrofw gcw0 rg350 opendingux miyoo rpi1 rpi2 psp rg99"
platform_list="generic pandora gp2x wiz caanoo dingux retrofw gcw0 rg350 opendingux miyoo rpi1 rpi2 psp rg99 odbeta"
platform="generic"
sound_driver_list="oss alsa sdl"
sound_drivers=""
Expand Down Expand Up @@ -73,6 +73,7 @@ fail()
set_platform()
{
platform=$1
CFLAGS="$CFLAGS -D__`echo $platform | tr '[a-z]' '[A-Z]'`__"
case "$platform" in
rpi1)
MFLAGS="-mcpu=arm1176jzf-s -mfpu=vfp"
Expand All @@ -83,45 +84,48 @@ set_platform()
have_gles="yes"
;;
generic)
MFLAGS=""
;;
dingux)
# dingoo a320, ritmix rzx-50, the like. all have Ingenic MIPS cpu <= JZ4755
sound_drivers="sdl"
# use static linking since the lib situation is ... let's say vague
#LDFLAGS="$LDFLAGS -static"
# uses a pre-gcw0 version of opendingux
CFLAGS="$CFLAGS -D__DINGUX__"
MFLAGS="-march=mips32 -msoft-float"
platform="opendingux"
;;
retrofw)
# devices using retrofw. AFAIK all have Ingenic MIPS JZ4760 with fpu
sound_drivers="sdl"
# uses it's own modified version of opendingux
CFLAGS="$CFLAGS -D__RETROFW__"
MFLAGS="-march=mips32"
platform="opendingux"
;;
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.
CFLAGS="$CFLAGS -D__`echo $platform | tr '[a-z]' '[A-Z]'`__"
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.
CFLAGS="$CFLAGS -D__`echo $platform | tr '[a-z]' '[A-Z]'`__"
MFLAGS="-march=mips32"
CFLAGS="$CFLAGS -D__OPENDINGUX__"
platform="opendingux"
;;
miyoo)
# Miyoo BittBoy, PocketGO 1, PowKiddy V90/Q90 with Allwinner F1C100s
sound_drivers="sdl"
CFLAGS="$CFLAGS -D__MIYOO__"
MFLAGS="-mcpu=arm926ej-s -marm"
platform="miyoo"
;;
Expand All @@ -146,7 +150,6 @@ set_platform()
psp)
# use newlib
SYSLIBS="-lc -lpspuser -lpspkernel"
CFLAGS="$CFLAGS -D__PSP__"
MFLAGS="-march=allegrex"
ARCH=mipsel
;;
Expand Down Expand Up @@ -276,7 +279,7 @@ arm*)
esac

case "$platform" in
rpi1 | rpi2 | generic | opendingux | miyoo)
rpi1 | rpi2 | generic | opendingux | odbeta | miyoo)
need_sdl="yes"
;;
esac
Expand Down
2 changes: 1 addition & 1 deletion platform/common/plat_sdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ void plat_init(void)
ret = plat_sdl_init();
if (ret != 0)
exit(1);
#if defined(__RG350__) || defined(__GCW0__) || defined(__OPENDINGUX__) || defined(__RG99__)
#if defined(__OPENDINGUX__)
// opendingux on JZ47x0 may falsely report a HW overlay, fix to window
plat_target.vout_method = 0;
#endif
Expand Down
2 changes: 1 addition & 1 deletion platform/libpicofe
Submodule libpicofe updated 1 files
+8 −6 menu.c
2 changes: 1 addition & 1 deletion platform/opendingux/inputmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const char * const _in_sdl_key_names[SDLK_LAST] = {
[SDLK_RETURN] = "START",
[SDLK_ESCAPE] = "SELECT",

#if defined(__RG350__) || defined(__OPENDINGUX__) || defined(__RG99__)
#if defined(__OPENDINGUX__)
[SDLK_HOME] = "POWER",

[SDLK_TAB] = "L1",
Expand Down
4 changes: 2 additions & 2 deletions tools/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ mv PicoDrive-pandora-$rel release-$rel/
# gcw0 (untested): JZ4770 (mips32r2 with fpu), swapped X/Y buttons
docker pull ghcr.io/irixxxx/toolchain-odbeta-gcw0
echo " git config --global --add safe.directory /home/picodrive &&\
./configure --platform=gcw0 &&\
./configure --platform=gcw0 --platform=odbeta &&\
make clean && make -j2 all "\
| docker run -i -v$PWD:/home/picodrive -w/home/picodrive --rm ghcr.io/irixxxx/toolchain-odbeta-gcw0 sh &&
mv PicoDrive.opk release-$rel/PicoDrive-odbeta-gcw0_$rel.opk
Expand All @@ -125,7 +125,7 @@ mv PicoDrive.opk release-$rel/PicoDrive-odbeta-gcw0_$rel.opk
# lepus (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 &&\
./configure --platform=opendingux --platform=odbeta &&\
make clean && make -j2 all "\
| docker run -i -v$PWD:/home/picodrive -w/home/picodrive --rm ghcr.io/irixxxx/toolchain-odbeta-lepus sh &&
mv PicoDrive.opk release-$rel/PicoDrive-odbeta-lepus_$rel.opk
Expand Down

0 comments on commit f255443

Please sign in to comment.