Skip to content
Wanted files

piece-emu emulates Aquaplus PIECE.

About this profile
Detail Value
Type libretro
Classification Official port
Source https://github.com/autch/piece-emu
Version 0.3, stated in src/libretro/piece_libretro.cpp
Revision autch/piece-emu@9aedad032c5d
Run by Batocera, EmuDeck, Lakka, RetroArch, RetroDECK, RetroPie
Profiled 2026-11-09
Profile YAML, JSON
Cores piece
Systems Aquaplus PIECE
Platform details
Technical notes

Aquaplus P/ECE emulator (EPSON S1C33209 SoC, S1C33000 CPU core) by Autch. The repository ships an SDL3 standalone, a headless runner and the libretro core, all built from the same core, soc, board and system sources (src/libretro/CMakeLists.txt:17-57).

The content is a P/ECE Flash Image (.pfi): a 40-byte PFIHEADER carrying the SYSTEMINFO block, then the raw flash contents at the stored offset (src/pfi_format.h:22-47). retro_get_system_info sets need_fullpath to false, so the frontend hands the file over as a memory blob (src/libretro/piece_libretro.cpp:231). retro_load_game checks the PFI signature and SYSTEMINFO.size == 32, sizes SRAM and flash from SYSTEMINFO, copies the flash bytes into an SST39VF flash device and starts the CPU at the reset vector read from flash base 0xC00000 (src/libretro/piece_libretro.cpp:271-362, src/debug/pfi_loader_blob.cpp:20-49, 58-91). The P/ECE kernel, its PFFS file system and the installed applications (.pex) all live in that flash image. The bus maps internal IRAM, external SRAM, external flash and I/O only (src/core/bus.hpp:75-79 and src/core/bus.hpp:239). The core carries no embedded boot code, and retro_set_environment registers core options and nothing else (src/libretro/piece_libretro.cpp:204-218). No environment call asks for the system directory.

RETRO_MEMORY_SAVE_RAM exposes the whole flash as a PFI image (original header, then the flash bytes, re-copied sector by sector when the kernel writes), so the frontend's .srm is itself a bootable .pfi (src/libretro/piece_libretro.cpp:334-352, 538-564, 614-624). A stored .srm with a valid header replaces the flash on the first frame (src/libretro/piece_libretro.cpp:398-420).

A .pfi is produced from the official Aquaplus PieceSystem 1.20 updater with the bundled mkpfi. mkpfi checks the "Piece Kernel Program" signature at offset 8 of all.bin, writes the boot vector 0x00C02004 into sector 0, leaves sector 1 blank and copies all.bin from sector 2 (src/tools/mkpfi.c:14, 88-95, 115-135). A fresh image boots to the launcher with startup.pex, date.pex and gamepad.pex installed, and games are added with pfar.

No BIOS or firmware files required.

.