From 319f038a28907277890b6122c4caf07842a4936c Mon Sep 17 00:00:00 2001 From: neonloop Date: Tue, 10 Jan 2023 15:58:01 +0000 Subject: Adds funkey-s build instructions to README --- Makefile | 4 ++-- README.md | 57 +++++++++++++++++++++++++++++++++++++++++++++------------ scale.c | 2 +- 3 files changed, 48 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index a4daf7a..21df610 100644 --- a/Makefile +++ b/Makefile @@ -89,9 +89,9 @@ ifeq ($(platform), trimui) else ifeq ($(platform), funkey-s) OBJS += plat_funkey.o funkey/fk_menu.o funkey/fk_instant_play.o CFLAGS += -DCONTENT_DIR='"/mnt"' -DFUNKEY_S - LDFLAGS += -fPIC + LDFLAGS += -fPIC LDFLAGS += -lSDL_image -lSDL_ttf # For fk_menu - core_platform = classic_armv7_a7 + core_platform = classic_armv7_a7 else ifeq ($(platform), unix) OBJS += plat_linux.o LDFLAGS += -fPIE diff --git a/README.md b/README.md index e0cae71..205cdda 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # picoarch - a libretro frontend designed for small screens and low power -picoarch uses libpicofe and SDL to create a small frontend to libretro cores. It's designed for small (320x240 2.0-2.4") screen, low-powered devices like the Trimui Model S (PowKiddy A66). +picoarch uses libpicofe and SDL to create a small frontend to libretro cores. It's designed for small (320x240 2.0-2.4") screen, low-powered devices like the Trimui Model S (PowKiddy A66) and FunKey S. ## Running @@ -14,7 +14,7 @@ If you do not specify core or content, picoarch will have you select a core from ## Building -The frontend can currently be built for the TrimUI Model S and Linux (useful for testing and debugging). +The frontend can currently be built for the TrimUI Model S, FunKey S, and Linux (useful for testing and debugging). First, fetch the repo with submodules: @@ -50,6 +50,48 @@ make platform=trimui MINUI=1 make platform=trimui MMENU=1 ``` +To build for distribution: + +``` +make platform=trimui dist-gmenu +make platform=trimui MINUI=1 dist-minui +``` + +These will output a directory structure that can be moved onto the SD card into `pkg/gmenunx` or `pkg/MinUI`. + +Or run + +``` +make platform=trimui picoarch.zip +``` + +To build a .zip file ready for SD card. + +### FunKey S instructions + +To build for FunKey S, you need a toolchain first, following [instructions](https://doc.funkey-project.com/developer_guide/tutorials/build_system/build_program_using_sdk/) on the FunKey wiki. + +To build generic binaries: + +``` +make platform=funkey-s +``` + +To build a specific core as .opk file: + +``` +make platform=funkey-s picoarch-gambatte.opk +``` + +Or run + +``` +make platform=funkey-s picoarch-funkey-s.zip +``` + +To build a .zip file containing all .opk files. + + ### Other build options To debug: @@ -76,15 +118,6 @@ To completely clean the repo (will delete, pull, and patch all core repos from s make force-clean ``` -Distribution builds can also be made for gmenunx and MinUI: - -``` -make platform=trimui dist-gmenu -make platform=trimui MINUI=1 dist-minui -``` - -These will output a directory structure that can be moved onto the SD card into `pkg/gmenunx` or `pkg/MinUI`. - To build profiles for profile-guided optimization: ``` @@ -105,7 +138,7 @@ In order to make development and testing easier, the Makefile will pull and buil You will have to make changes when adding a core, since TrimUI is not a supported libretro platform. picoarch has a `patches/` directory containing needed changes to make cores work well in picoarch. Patches are applied in order after checking out the repository. -At a minimum, you need to add a `platform=trimui` section to the core Makefile. +At a minimum, you need to add a `platform=trimui` section to the core Makefile if you are building for trimui. Some features and fixes are also included in `patches` -- it would be best to try to upstream them. diff --git a/scale.c b/scale.c index 61f44d4..583ca5d 100644 --- a/scale.c +++ b/scale.c @@ -442,7 +442,7 @@ static void scale_select_scaler(unsigned w, unsigned h, size_t pitch) { if (scale_size == SCALE_SIZE_CROP) { scaler = scale_crop; return; - } if (scale_size == SCALE_SIZE_FULL) { + } else if (scale_size == SCALE_SIZE_FULL) { dst_w = SCREEN_WIDTH; dst_h = SCREEN_HEIGHT; dst_offs = 0; -- cgit v1.2.3