PCE.emu
PCE.emu emulates NEC PC Engine, NEC PC Engine CD and NEC SuperGrafx. It reads 2 files, 1 of them required: without a required file it does not start games. A required file is needed only by the machines that use it. Each file below cites the line of source code that reads it.
About this profile
Technical notes
Android and desktop application by Robert Broglia built on EmuFramework, vendoring Mednafen's pce_fast and pce modules. Both are compiled and selectable at runtime, and pce_fast is what an unset core option resolves to (PCE.emu/).
HuCard content (.pce, .sgx) loads with no external file. CD content (.cue, .toc, .ccd, .chd) requires a System Card image: loadContent throws "No System Card Set" when the path is unset or the file is gone (PCE.emu/src/main/Main.cc:88-91).
The System Card is a single path the user picks through a file browser filtered to .pce and .sgx (PCE.emu/), stored as CFGKEY_SYSCARD_PATH. No filename is fixed and no directory is scanned. MDFN_GetSettingS returns an empty string for pce.cdbios, pce_fast.cdbios and pce.gecdbios, and MDFN_MakeFName answers every MDFNMKF_FIRMWARE request with that one path (PCE.emu/), so the Games Express branch reads whichever image the setting points at. Mednafen's settings table still carries the syscard3.pce and gecard.pce defaults but settings.cpp is not compiled, so they are never read.
A path with an archive extension is opened as an archive and the first member ending in .pce, .bin or .bios is used (MDFNFILE.cc:41-76).
Neither module hashes the image. pce_fast skips a 512-byte copier header then reads a fixed 262144 bytes (huc.cpp:299-302), while pce reads min(rounded length, length) and accepts any size (huc.cpp:225-316). HuC_Load is always called with SYSCARD_3, or SYSCARD_ARCADE when Arcade Card emulation is on (pce.cpp:653).
SuperGrafx is enabled by the .sgx extension, by a CRC match against the built-in sgx_table (pce.cpp:345, 382-395), or by DetectSGXCD on disc. HES playback is compiled out (pce.cpp:76) and cheats are disabled (PCE.emu/).
2 files: 1 required, 1 optional.
In this collection: 2 in repo and 0 missing.
Required
Section titled “Required”syscard3.pce required in repo
Super CD-ROM2 System Card 3.0
- min_size comes from the fixed 262144-byte read in pce_fast (huc.cpp:302) with Stream::read throwing on a short file (Stream.h:88). A 262656-byte dump passes through the copier-header skip at huc.cpp:299. The pce module imposes no minimum.
- Size: min 256.0 KB (262,144 bytes)
- Collection copy:
bios/NEC/ PC Engine/ syscard3.pce - Platforms:
syscard3.pce: Batocera, KNULLI, Lakka, RetroArch, RetroBat, RetroPie.bios/syscard3.pce: AmberELEC, RetroDECK.PCECD_3.0-(J).pce: BizHawk.tg16/syscard3.pceandturbografx-cd/syscard3.pce: RomM
Validation and source
- Validation: existence, size
- Source:
PCE.emu/src/main/Main.cc:80-91(throws without it),PCE.emu/(path resolution),src/ main/ options.cc:275-301 PCE.emu/(selection),src/ main/ EmuMenuViews.cc:176-191 PCE.emu/,src/ pce_fast/ pce.cpp:477-483 PCE.emu/(default module load),src/ pce_fast/ huc.cpp:284-304 PCE.emu/(accurate module load),src/ pce/ pce.cpp:645-653 PCE.emu/,src/ pce_fast/ pce.cpp:663 PCE.emu/src/pce/pce.cpp:1094(name)
Optional
Section titled “Optional”gecard.pce optional in repo
Games Express CD Card
- Reached only when the accurate module runs and DetectGECD matches the disc, since pce_fast has no Games Express branch. Served through the same System Card setting, so the user points it at this image to boot those discs.
- Collection copy:
bios/NEC/PC Engine/gecard.pce - Platforms:
bios/gexpress.pce: AmberELEC, EmuELEC, RetroDECK.gecard.pceandgexpress.pce: Lakka, RetroArch, RetroPie.PCECD_gecard.pce: BizHawk.pcengine/gexpress.pce: Recalbox.tg16/gecard.pceandtg16/gexpress.pceandturbografx-cd/gecard.pceandturbografx-cd/gexpress.pce: RomM
Validation and source
- Validation: existence
- Source:
PCE.emu/(DetectGECD),src/ pce/ pce.cpp:512-551 PCE.emu/(gecdbios branch),src/ pce/ pce.cpp:644-646 PCE.emu/(size-agnostic read),src/ pce/ huc.cpp:225-316 PCE.emu/src/pce/pce.cpp:1095(name)
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