{
  "commit": "3effc4a043e0fca93f5882c62eba9a2344b02d56",
  "count": 1,
  "generated_at": "2026-11-24T10:38:35Z",
  "items": [
    {
      "id": "piece",
      "profile": {
        "core_classification": "official_port",
        "core_version": "0.3",
        "cores": [
          "piece"
        ],
        "display_name": "Aquaplus - P/ECE (piece-emu)",
        "emulator": "piece-emu",
        "files": [],
        "notes": "Aquaplus P/ECE emulator (EPSON S1C33209 SoC, S1C33000 CPU core) by\nAutch. The repository ships an SDL3 standalone, a headless runner and\nthe libretro core, all built from the same core, soc, board and system\nsources (src/libretro/CMakeLists.txt:17-57).\n\nThe content is a P/ECE Flash Image (.pfi): a 40-byte PFIHEADER carrying\nthe SYSTEMINFO block, then the raw flash contents at the stored offset\n(src/pfi_format.h:22-47). retro_get_system_info sets need_fullpath to\nfalse, so the frontend hands the file over as a memory blob\n(src/libretro/piece_libretro.cpp:231). retro_load_game checks the\nPFI signature and SYSTEMINFO.size == 32, sizes SRAM and flash from\nSYSTEMINFO, copies the flash bytes into an SST39VF flash device and\nstarts the CPU at the reset vector read from flash base 0xC00000\n(src/libretro/piece_libretro.cpp:271-362,\nsrc/debug/pfi_loader_blob.cpp:20-49, 58-91). The P/ECE kernel, its PFFS file\nsystem and the installed applications (.pex) all live in that flash\nimage. The bus maps internal IRAM, external SRAM, external flash and\nI/O only (src/core/bus.hpp:75-79 and src/core/bus.hpp:239). The core\ncarries no embedded boot code, and retro_set_environment registers\ncore options and nothing else (src/libretro/piece_libretro.cpp:204-218).\nNo environment call asks for the system directory.\n\nRETRO_MEMORY_SAVE_RAM exposes the whole flash as a PFI image (original\nheader, then the flash bytes, re-copied sector by sector when the\nkernel writes), so the frontend's .srm is itself a bootable .pfi\n(src/libretro/piece_libretro.cpp:334-352, 538-564, 614-624). A stored\n.srm with a valid header replaces the flash on the first frame\n(src/libretro/piece_libretro.cpp:398-420).\n\nA .pfi is produced from the official Aquaplus PieceSystem 1.20 updater\nwith the bundled mkpfi. mkpfi checks the \"Piece Kernel Program\"\nsignature at offset 8 of all.bin, writes the boot vector 0x00C02004\ninto sector 0, leaves sector 1 blank and copies all.bin from sector 2\n(src/tools/mkpfi.c:14, 88-95, 115-135). A fresh image boots to the\nlauncher with startup.pex, date.pex and gamepad.pex installed, and games\nare added with pfar.\n",
        "platform_details": {
          "flash_image": {
            "flash_base": "0xC00000",
            "format": "PFI",
            "header_size": 40,
            "sector_size": 4096,
            "source_ref": "src/pfi_format.h:22-47, src/debug/pfi_loader_blob.cpp:20-91"
          },
          "kernel_source": {
            "archive": "LHA self-extracting executable",
            "members": [
              {
                "command": "mkpfi -512kb piece/update/all.bin piece.pfi",
                "flash": "512 KB factory units",
                "path": "piece/update/all.bin",
                "size": 516096
              },
              {
                "command": "mkpfi -2mb piece/update/2mb/all.bin piece.pfi",
                "flash": "2 MB modified units",
                "path": "piece/update/2mb/all.bin",
                "size": 516096
              }
            ],
            "name": "PieceSystem 1.20 updater",
            "source_ref": "src/tools/mkpfi.c:14, 88-95, 115-135",
            "url": "https://aquaplus.jp/piece/dl/update120.exe"
          }
        },
        "profiled_date": "2026-11-09",
        "source": "https://github.com/autch/piece-emu",
        "source_commit": "9aedad032c5d06a8c6d7cf74142a2b9ac32d77ac",
        "systems": [
          "aquaplus-piece"
        ],
        "type": "libretro",
        "upstream": "https://github.com/autch/piece-emu",
        "version_basis": {
          "kind": "file",
          "path": "src/libretro/piece_libretro.cpp",
          "pattern": "info->library_version\\s+=\\s+\"([^\"]+)"
        }
      }
    }
  ],
  "kind": "emulators",
  "schema_version": 1
}
