From c287c2052da96c5b48f327c81431614eece881d1 Mon Sep 17 00:00:00 2001 From: salvacam Date: Sun, 31 Jan 2021 02:20:21 +0100 Subject: compile for Miyoo --- backends/platform/dingux/README.MIYOO | 44 +++++++++++++++++++++++++++++++++ backends/platform/dingux/build.miyoo.sh | 21 ++++++++++++++++ backends/platform/dingux/dingux.mk | 25 +++++++++++++++++++ configure | 30 ++++++++++++++++++++-- 4 files changed, 118 insertions(+), 2 deletions(-) create mode 100644 backends/platform/dingux/README.MIYOO create mode 100755 backends/platform/dingux/build.miyoo.sh diff --git a/backends/platform/dingux/README.MIYOO b/backends/platform/dingux/README.MIYOO new file mode 100644 index 0000000000..ecee753f61 --- /dev/null +++ b/backends/platform/dingux/README.MIYOO @@ -0,0 +1,44 @@ +[ScummVM-MIYOO README] + +Controls +======== +- Dpad/analog joy: move mouse cursor +- A: left mouse button click +- B: right mouse button click +- X: '0' key +- Y: '.' key (skips dialogue line in some engines) +- Left Trigger: open global menu +- Right Trigger: opens virtual keyboard +- Select: ESC button, scene skip in some engines +- Start: F5 key, game menu in some engines + +Installation from binaries +========================== +Copy over scummvm.opk file to /media/data/apps directory on the device. + +Mount your SD card in your pc, then copy the directory "scummvm" found in +the release package to a directory inside /emus. +At this point is sufficient to point your launcher (eg. gmenu2x) to scummvm.elf +file included into the scummvm directory you copied to the SD card, and then launch it. + +Building from binaries +====================== +It's pretty simple if you are running Linux on an x86/amd64 machine: +1. Download and install the Miyoo toolchain (https://github.com/steward-fu/miyoo/releases/download/v1.0/toolchain.7z) +2. Download ScummVM sources and uncompress them +3. Run backends/platform/dingux/build.miyoo.sh script +4. Copy copy the directory "scummvm" to your device +5. Enjoy + +Troubleshooting +=============== +Please be advised that currently games with a resolution above 320x240 +are disabled due to the limited screen resolution on the MIYOO. This could be +changed in the future. + +In case you need to submit a bugreport, you may find the log file at the +following path: + + /var/tmp/scummvm.log + +The log file is being overwritten at every ScummVM run. diff --git a/backends/platform/dingux/build.miyoo.sh b/backends/platform/dingux/build.miyoo.sh new file mode 100755 index 0000000000..9079e8fca0 --- /dev/null +++ b/backends/platform/dingux/build.miyoo.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +export PATH=/opt/miyoo/usr/bin/:$PATH + +# ../../../configure --host=miyoo --with-mad-prefix=/opt/miyoo/usr/bin --enable-plugins --default-dynamic --disable-all-unstable-engines --disable-flac --disable-debug --disable-highres --enable-release-mode --disable-hq-scalers && make && make miyoo-dist + + ../../../configure --host=miyoo --with-mad-prefix=/opt/miyoo/usr/bin --enable-plugins --default-dynamic --disable-all-unstable-engines --disable-flac --disable-debug --disable-highres --enable-release-mode --disable-hq-scalers --disable-mt32emu --disable-lua --disable-nuked-opl && make && make miyoo-dist + +#este es el bueno +#../../../configure --host=miyoo --with-mad-prefix=/opt/miyoo/usr/bin --enable-plugins --disable-all-unstable-engines --default-dynamic --disable-flac --disable-highres --disable-debug --disable-hq-scalers --enable-release && make && make miyoo-dist + + +# ../../../configure --host=miyoo --with-mad-prefix=/opt/miyoo/usr/bin --enable-plugins --disable-all-unstable-engines --default-dynamic --disable-flac --enable-release && make && make miyoo-dist + +# --disable-16bit +# --enable-static + + #make miyoo-dist + + #/opt/buildroot-bittboy/bin/arm-buildroot-linux-musleabi-strip scummvm -o dingux-dist/scummvm/scummvm + diff --git a/backends/platform/dingux/dingux.mk b/backends/platform/dingux/dingux.mk index f812e6e7b2..0ecd1c2ed2 100644 --- a/backends/platform/dingux/dingux.mk +++ b/backends/platform/dingux/dingux.mk @@ -2,6 +2,7 @@ DINGUX_EXE_STRIPPED := scummvm_stripped$(EXEEXT) bundle_name = dingux-dist/scummvm gcw0_bundle = gcw0-opk +miyoo_compile = /opt/miyoo/usr/bin/arm-linux-strip f=$(shell which $(STRIP)) libloc = $(shell dirname $(f)) @@ -39,6 +40,30 @@ endif $(CP) $(srcdir)/backends/platform/dingux/README.DINGUX $(bundle_name)/ $(CP) $(srcdir)/backends/platform/dingux/scummvm.png $(bundle_name)/ +miyoo-dist: all + $(MKDIR) $(bundle_name) + $(MKDIR) $(bundle_name)/saves + $(miyoo_compile) $(EXECUTABLE) -o $(bundle_name)/scummvm.elf + $(CP) $(DIST_FILES_THEMES) $(bundle_name)/ +ifdef DIST_FILES_ENGINEDATA + $(CP) $(DIST_FILES_ENGINEDATA) $(bundle_name)/ +endif +ifdef DIST_FILES_NETWORKING + $(CP) $(DIST_FILES_NETWORKING) $(bundle_name)/ +endif +ifdef DIST_FILES_VKEYBD + $(CP) $(DIST_FILES_VKEYBD) $(bundle_name)/ +endif + $(CP) $(DIST_FILES_DOCS) $(bundle_name)/ +ifdef DYNAMIC_MODULES + $(MKDIR) $(bundle_name)/plugins + $(CP) $(PLUGINS) $(bundle_name)/plugins + $(miyoo_compile) $(bundle_name)/plugins/* +endif + + $(CP) $(srcdir)/backends/platform/dingux/README.MIYOO $(bundle_name)/ + $(CP) $(srcdir)/backends/platform/dingux/scummvm.png $(bundle_name)/ + # Special target for generationg GCW-Zero OPK bundle $(gcw0_bundle): all GeneralUser\ GS\ FluidSynth\ v1.44.sf2 $(MKDIR) $(gcw0_bundle) diff --git a/configure b/configure index 6898d55ead..f4073920b0 100755 --- a/configure +++ b/configure @@ -1618,6 +1618,11 @@ dingux | gcw0) _host_cpu=mipsel _host_alias=mipsel-linux ;; +miyoo) + _host_os=linux + _host_cpu=arm + _host_alias=arm-linux + ;; dreamcast) _host_os=dreamcast _host_cpu=sh @@ -3122,6 +3127,27 @@ if test -n "$_host"; then _seq_midi=no _port_mk="backends/platform/dingux/dingux.mk" ;; + miyoo) + _sysroot=`$CXX --print-sysroot` + _sdlpath=$_sysroot/usr/bin + append_var DEFINES "-DDINGUX -DGCW0" + append_var DEFINES "-DREDUCE_MEMORY_USAGE" + #append_var CXXFLAGS "-mips32" + _backend="dingux" + _alsa=no + _mt32emu=no + _seq_midi=no + _timidity=no + _mad=yes + _build_scalers=yes + _optimization_level=-O3 + _vkeybd=yes + _keymapper=yes + _vorbis=no + _sdlconfig=sdl-config + _port_mk="backends/platform/dingux/dingux.mk" + ;; + raspberrypi) # This is needed because the official cross compiler doesn't have multiarch enabled # but Raspbian does. @@ -3555,7 +3581,7 @@ case $_backend in append_var LDFLAGS "-lronin -lm" fi ;; - dingux) + dingux | miyoo) append_var DEFINES "-DDINGUX" _sdl=auto ;; @@ -3835,7 +3861,7 @@ fi # Enable 16bit support only for backends which support it # case $_backend in - 3ds | android | androidsdl | dingux | dc | gph | iphone | ios7 | maemo | openpandora | psp | psp2 | samsungtv | sdl | switch | tizen | webos | wii) + 3ds | android | androidsdl | dingux | miyoo | dc | gph | iphone | ios7 | maemo | openpandora | psp | psp2 | samsungtv | sdl | switch | tizen | webos | wii) if test "$_16bit" = auto ; then _16bit=yes else -- cgit v1.2.3