Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# MinUI clang-format style
# LessUI clang-format style
# Preserves existing code style while improving consistency

# Based on LLVM style with MinUI customizations
# Based on LLVM style with LessUI customizations
BasedOnStyle: LLVM

# Indentation - MinUI uses tabs
# Indentation - LessUI uses tabs
UseTab: ForIndentation
TabWidth: 4
IndentWidth: 4

# Braces - Opening brace on same line (actual MinUI style)
# Braces - Opening brace on same line (actual LessUI style)
BreakBeforeBraces: Attach

# Line length - be reasonable
ColumnLimit: 100

# Pointers and references - MinUI uses left-aligned (char* p, not char *p)
# Pointers and references - LessUI uses left-aligned (char* p, not char *p)
PointerAlignment: Left
DerivePointerAlignment: false

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GitHub Actions CI Workflows

This directory contains the continuous integration workflows for MinUI.
This directory contains the continuous integration workflows for LessUI.

## Workflows

Expand Down Expand Up @@ -68,15 +68,15 @@ make all
Add to README.md:

```markdown
[![QA](https://github.com/nchapman/MinUI/actions/workflows/qa.yml/badge.svg)](https://github.com/nchapman/MinUI/actions/workflows/qa.yml)
[![Build](https://github.com/nchapman/MinUI/actions/workflows/build.yml/badge.svg)](https://github.com/nchapman/MinUI/actions/workflows/build.yml)
[![QA](https://github.com/nchapman/LessUI/actions/workflows/qa.yml/badge.svg)](https://github.com/nchapman/LessUI/actions/workflows/qa.yml)
[![Build](https://github.com/nchapman/LessUI/actions/workflows/build.yml/badge.svg)](https://github.com/nchapman/LessUI/actions/workflows/build.yml)
```

## Future Enhancements

### ARM64 Runners

GitHub now supports ARM64 runners which could significantly speed up builds since MinUI compiles for ARM devices. To use ARM64 runners:
GitHub now supports ARM64 runners which could significantly speed up builds since LessUI compiles for ARM devices. To use ARM64 runners:

1. Enable ARM64 runners in repository settings
2. Update workflow files to use `runs-on: [self-hosted, linux, arm64]` or `runs-on: ubuntu-24.04-arm64` (when available)
Expand Down
2 changes: 1 addition & 1 deletion .shellcheckrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ShellCheck configuration for MinUI
# ShellCheck configuration for LessUI
# Start forgiving, tighten over time

# Disable these common warnings that are too noisy for now
Expand Down
60 changes: 56 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

## Project Overview

MinUI is a focused, custom launcher and libretro frontend for retro handheld gaming devices. It provides a simple, distraction-free interface for playing retro games across multiple hardware platforms (Miyoo Mini, Trimui Smart, Anbernic RG35xx series, etc.).
LessUI is a focused, custom launcher and libretro frontend for retro handheld gaming devices. It provides a simple, distraction-free interface for playing retro games across multiple hardware platforms (Miyoo Mini, Trimui Smart, Anbernic RG35xx series, etc.).

**Key Design Philosophy:**
- Simplicity: No configuration, no boxart, no themes
Expand All @@ -15,7 +15,7 @@ MinUI is a focused, custom launcher and libretro frontend for retro handheld gam

### Multi-Platform Build System

MinUI uses a **platform abstraction layer** to support 15+ different handheld devices with a single codebase:
LessUI uses a **platform abstraction layer** to support 15+ different handheld devices with a single codebase:

```
workspace/
Expand Down Expand Up @@ -81,7 +81,7 @@ The common code in `workspace/all/common/defines.h` uses these to create derived

### Docker-Based Cross-Compilation

MinUI uses Docker containers with platform-specific toolchains to cross-compile for ARM devices:
LessUI uses Docker containers with platform-specific toolchains to cross-compile for ARM devices:

```bash
# Enter platform build environment
Expand Down Expand Up @@ -109,6 +109,58 @@ Active platforms (as of most recent): miyoomini, trimuismart, rg35xx, rg35xxplus

## Development Commands

### macOS Native Development (makefile.dev)

For rapid UI development on macOS, use native builds instead of Docker cross-compilation:

```bash
# First-time setup
brew install sdl2 sdl2_image sdl2_ttf

# Development workflow
make dev # Build minui for macOS (native, with AddressSanitizer)
make dev-run # Build and run minui in SDL2 window (4x3 default)
make dev-run-4x3 # Run in 4:3 aspect ratio (640×480)
make dev-run-16x9 # Run in 16:9 aspect ratio (854×480)
make dev-clean # Clean macOS build artifacts
```

**How it works:**
- Compiles minui natively on macOS using system gcc/clang
- Links against Homebrew SDL2 libraries
- Runs in SDL2 window (640×480 for 4x3, 854×480 for 16x9)
- Uses fake SD card at `workspace/macos/FAKESD/` instead of actual device storage
- Keyboard input: Arrow keys (D-pad), A/S/W/Q (face buttons), Enter (Start), 4 (Select), Space (Menu)
- Quit: Hold Backspace/Delete

**Setting up test ROMs:**
```bash
# Create console directories
mkdir -p workspace/macos/FAKESD/Roms/GB
mkdir -p workspace/macos/FAKESD/Roms/GBA

# Add test ROMs
cp ~/Downloads/game.gb workspace/macos/FAKESD/Roms/GB/
```

**Use cases:**
- UI iteration (instant feedback vs. SD card deploy)
- Visual testing of menus, text rendering, graphics
- Debugging with sanitizers (-fsanitize=address)
- Integration testing with file I/O and ROM browsing

**Limitations:**
- **minui (launcher) only** - Cannot test minarch (libretro cores)
- Hardware features stubbed (brightness, volume, power management)
- Performance differs from ARM devices
- Path handling: SDCARD_PATH is `../../macos/FAKESD` relative to `workspace/all/minui/` working directory

**Implementation details:**
- Source files: Same as production minui build (from `workspace/all/minui/makefile`)
- Platform code: `workspace/macos/platform/platform.{h,c}` provides macOS-specific stubs
- Build output: `workspace/all/minui/build/macos/minui` binary
- See `workspace/macos/FAKESD/README.md` for SD card structure

### Quality Assurance (makefile.qa)

```bash
Expand Down Expand Up @@ -179,7 +231,7 @@ This pattern appears in `getEmuName()` and was the source of a critical bug.

### Display Name Processing

MinUI automatically cleans up ROM filenames for display:
LessUI automatically cleans up ROM filenames for display:
- Removes file extensions (`.gb`, `.nes`, `.p8.png`)
- Strips region codes and version info in parentheses: `Game (USA) (v1.2)` → `Game`
- Trims whitespace
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# MinUI
# LessUI

MinUI is a focused, custom launcher and libretro frontend for [a variety of retro handhelds](#supported-devices).
> **Built on the shoulders of giants:** LessUI is a fork of [MinUI](https://github.com/shauninman/MinUI), the brilliant work of [Shaun Inman](https://github.com/shauninman). Shaun's vision of a distraction-free, beautifully simple retro gaming experience is what makes this project possible. This fork exists to explore new directions while honoring the elegance and philosophy of the original.

LessUI is a focused, custom launcher and libretro frontend for [a variety of retro handhelds](#supported-devices).

<img src="github/minui-main.png" width=320 /> <img src="github/minui-menu-gbc.png" width=320 />

Expand Down Expand Up @@ -32,7 +34,7 @@ MinUI is a focused, custom launcher and libretro frontend for [a variety of retr
multiple devices from different
manufacturers

**[Download the latest release](https://github.com/shauninman/MinUI/releases)**
**[Download the latest release](https://github.com/nchapman/LessUI/releases)**

## Installation

Expand Down Expand Up @@ -96,16 +98,16 @@ For detailed installation steps and device-specific setup, see the `README.txt`
| **MagicX** | XU Mini M | May 2024 | Deprecated |

> [!NOTE]
> Deprecated devices will continue to work with current MinUI releases but will not receive new features or platform-specific fixes.
> Deprecated devices will continue to work with current LessUI releases but will not receive new features or platform-specific fixes.

---

## For Developers

Want to build MinUI, create custom paks, or understand how it works?
Want to build LessUI, create custom paks, or understand how it works?

- **[Development Guide](docs/DEVELOPMENT.md)** - Building, testing, and contributing
- **[Architecture Guide](docs/ARCHITECTURE.md)** - How MinUI works internally
- **[Architecture Guide](docs/ARCHITECTURE.md)** - How LessUI works internally
- **[Cores Guide](docs/CORES.md)** - How libretro cores are built and loaded
- **[Pak Development Guide](docs/PAKS.md)** - Creating custom emulator and tool paks
- **[Platform Documentation](workspace/)** - Technical hardware details for each device
34 changes: 17 additions & 17 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# MinUI Architecture
# LessUI Architecture

This document explains how MinUI is structured and how the pieces fit together.
This document explains how LessUI is structured and how the pieces fit together.

## Core Concept

MinUI uses a **platform abstraction layer** to run the same code on 20+ different handheld devices. Write once, compile for each platform with hardware-specific constants.
LessUI uses a **platform abstraction layer** to run the same code on 20+ different handheld devices. Write once, compile for each platform with hardware-specific constants.

## The Three Layers

Expand Down Expand Up @@ -73,13 +73,13 @@ Device-specific daemons and utilities:

1. Device boots → runs platform boot script (`workspace/<platform>/install/boot.sh`)
2. Boot script displays splash screen (installing/updating if needed)
3. Launches MinUI via `.system/<platform>/paks/MinUI.pak/launch.sh`
4. MinUI reads ROM folders and displays launcher
3. Launches LessUI via `.system/<platform>/paks/LessUI.pak/launch.sh`
4. LessUI reads ROM folders and displays launcher

### Launching a Game

1. User selects ROM in launcher
2. MinUI calls the appropriate pak's `launch.sh` script
2. LessUI calls the appropriate pak's `launch.sh` script
3. Pak script runs `minarch.elf <core> <rom>`
4. Minarch loads the libretro core and starts emulation
5. User presses MENU → in-game menu appears
Expand Down Expand Up @@ -143,7 +143,7 @@ build/

## The Pak System

MinUI is extended through "paks" - folders ending in `.pak` with a `launch.sh` script inside.
LessUI is extended through "paks" - folders ending in `.pak` with a `launch.sh` script inside.

### Emulator Paks

Expand Down Expand Up @@ -176,14 +176,14 @@ See [PAKS.md](PAKS.md) for complete pak development guide.

## Multi-Resolution Support

MinUI supports devices from 320x240 to 1280x720 using a scale factor:
LessUI supports devices from 320x240 to 1280x720 using a scale factor:

- **1x**: 320x240 devices (trimuismart, gkdpixel)
- **2x**: 640x480 devices (most platforms)
- **3x**: 960x720 devices (tg5040 brick)
- **4x**: 1280x960+ devices (future)

Each platform defines `FIXED_SCALE` in `platform.h`. At startup, MinUI loads the appropriate sprite sheet:
Each platform defines `FIXED_SCALE` in `platform.h`. At startup, LessUI loads the appropriate sprite sheet:

```c
sprintf(asset_path, RES_PATH "/assets@%ix.png", FIXED_SCALE);
Expand All @@ -198,7 +198,7 @@ This way UI code is resolution-independent.

## Input Handling

MinUI supports three input methods (platforms use one or more):
LessUI supports three input methods (platforms use one or more):

1. **SDL Keyboard**: `BUTTON_A = SDLK_SPACE`
2. **SDL Joystick**: `JOY_A = 0`
Expand All @@ -224,7 +224,7 @@ The platform layer handles the actual hardware polling.

### Rendering

MinUI uses double-buffering:
LessUI uses double-buffering:
```c
GFX_clear(screen); // Clear back buffer
GFX_blitText(...); // Draw UI elements
Expand All @@ -246,7 +246,7 @@ GFX_blitAsset(ASSET_BATTERY, screen, x, y, width, height, rotation);

## Save States

MinUI has 9 save state slots per game:
LessUI has 9 save state slots per game:
- **Slots 0-8**: Manual saves (accessible in-game menu)
- **Slot 9**: Auto-save (created on quit, loaded on resume)

Expand All @@ -264,7 +264,7 @@ Save states are shared across all platforms (unlike per-game configs which are p

### Stack vs Heap

MinUI prefers stack allocation for speed:
LessUI prefers stack allocation for speed:
```c
char path[MAX_PATH]; // 512 bytes on stack
```
Expand Down Expand Up @@ -317,10 +317,10 @@ Launcher shows these first for quick access.
1. Device hardware boots
2. Runs boot script from device-specific location
3. Boot script:
- Checks for `MinUI.zip` (update)
- Checks for `LessUI.zip` (update)
- Displays splash screen if updating
- Extracts update or launches MinUI
4. MinUI launcher starts
- Extracts update or launches LessUI
4. LessUI launcher starts
5. User navigates and plays games
6. On quit, device reboots or powers off (prevents stock firmware access)

Expand Down Expand Up @@ -355,7 +355,7 @@ Minarch maintains 60fps by:

## Thread Safety

MinUI is mostly single-threaded except:
LessUI is mostly single-threaded except:
- Some platforms use background threads for HDMI monitoring
- Keymon runs as separate process
- Settings use shared memory or files for IPC
Expand Down
Loading