piece-emu
piece-emu emulates Aquaplus PIECE.
About this profile
Platform details
-
flash_image:
- format: PFI
- header_size: 40
- flash_base: 0xC00000
- sector_size: 4096
- source_ref:
src/pfi_format.h:22-47,src/debug/ pfi_loader_blob.cpp:20-91
-
kernel_source:
- name: PieceSystem 1.20 updater
- url: https://aquaplus.jp/piece/dl/update120.exe
- archive: LHA self-extracting executable
- members: {'path': 'piece/update/all.bin', 'size': 516096, 'flash': '512 KB factory units', 'command': 'mkpfi -512kb piece/update/all.bin piece.pfi'}, {'path': 'piece/update/2mb/all.bin', 'size': 516096, 'flash': '2 MB modified units', 'command': 'mkpfi -2mb piece/update/2mb/all.bin piece.pfi'}
- source_ref:
src/tools/mkpfi.c:14,src/tools/mkpfi.c:88-95,src/tools/mkpfi.c:115-135
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/).
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/). 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/,
src/, 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/).
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/, 538-564, 614-624). A stored
.srm with a valid header replaces the flash on the first frame
(src/).
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.
Next steps
Section titled “Next steps”- Get the files, for the setup in use
- Every system, and the files each one needs
- When a game does not start