ROMCNV - CPS2 ROM Converter
A tool to convert Capcom CPS2 arcade ROMs into an optimized cache format for use with NJEMU emulators on memory-constrained platforms.
Why Convert ROMs?
CPS2 ROMs contain graphics data that may exceed the available RAM on: - PSP: ~24-64MB available RAM - PS2: ~32MB available RAM
This converter processes the ROM files and creates optimized cache files that can be loaded in smaller chunks during emulation.
Supported Platforms
| Platform | Executable | Cache Location |
|---|---|---|
| Windows | romcnv_cps2.exe |
./cache/ |
| Linux/macOS | romcnv_cps2 |
./cache/ |
| Web | Online Converter | Download as ZIP |
| PSP | N/A (use desktop tool) | /PSP/GAME/CPS2PSP/cache/ |
| PS2 | N/A (use desktop tool) | mass:/CPS2PSP/cache/ |
Usage
Basic Usage
Convert a single ROM:
romcnv_cps2 /path/to/game.zipCommand Line Options
| Option | Description |
|---|---|
-all |
Convert all ROMs in the specified directory |
-raw |
Force raw cache file format (overrides per-game defaults) |
-zip |
Create a ZIP compressed cache file (reduces storage space) |
-folder |
Create a folder with individual block files instead of a single raw cache |
-batch |
Batch mode - donโt pause between conversions |
Note: Some games default to ZIP format for historical reasons. Use
-rawto explicitly force the single-file.cacheformat regardless of per-game defaults.
Examples
Convert a single game:
romcnv_cps2 "D:\roms\ssf2.zip"Convert with ZIP compression:
romcnv_cps2 "D:\roms\avsp.zip" -zipConvert multiple games in batch mode:
romcnv_cps2 "D:\roms\avsp.zip" -zip -batch
romcnv_cps2 "D:\roms\qndream.zip" -zip -batch
romcnv_cps2 "D:\roms\mvsc.zip" -batch
romcnv_cps2 "D:\roms\vsav.zip"Convert all ROMs in a directory:
romcnv_cps2 "D:\roms" -allConvert all ROMs with ZIP compression:
romcnv_cps2 "D:\roms" -all -zipConvert with folder format:
romcnv_cps2 "D:\roms\avsp.zip" -folderLinux/macOS Examples
# Convert a single ROM
./romcnv_cps2 /home/user/roms/ssf2.zip
# Convert with ZIP compression
./romcnv_cps2 /home/user/roms/ssf2.zip -zip
# Convert with folder format
./romcnv_cps2 /home/user/roms/ssf2.zip -folder
# Convert all ROMs in directory
./romcnv_cps2 /home/user/roms -all
# Convert all with ZIP compression
./romcnv_cps2 /home/user/roms -all -zip
# Convert all with folder format
./romcnv_cps2 /home/user/roms -all -folderOutput
The converter creates a cache directory containing one
of: - gamename.cache โ Single raw cache file (default) -
gamename_cache.zip โ ZIP compressed cache file (with
-zip) - gamename_cache/ โ Folder with
individual block files (with -folder)
All three formats are supported by the emulator on all platforms.
File Structure for Emulators
PSP (raw format โ default):
/PSP/GAME/CPS2PSP/
โโโ roms/
โ โโโ game.zip
โโโ cache/
โโโ game.cache
PSP (zip format):
/PSP/GAME/CPS2PSP/
โโโ roms/
โ โโโ game.zip
โโโ cache/
โโโ game_cache.zip
PSP (folder format):
/PSP/GAME/CPS2PSP/
โโโ roms/
โ โโโ game.zip
โโโ cache/
โโโ game_cache/
PS2 (raw format โ default):
mass:/CPS2PSP/
โโโ roms/
โ โโโ game.zip
โโโ cache/
โโโ game.cache
Building from Source
Windows
mkdir build && cd build
cmake .. -DTARGET=CPS2
cmake --build .Linux/macOS
mkdir build && cd build
cmake .. -DTARGET=CPS2
makeWebAssembly
mkdir build && cd build
emcmake cmake .. -DTARGET=CPS2
emmake makeNotes
- Parent ROM sets must be in the same directory as the game ROM
- The converter requires
rominfo.cps2file to be present in the same directory as the executable - Cache files are version-specific - regenerate if you update the emulator
- Some games fully fit in memory and donโt require cache conversion
Cache Format Comparison
The emulator supports reading caches in raw file, zip, and folder formats. The table below compares them from a memory and performance perspective to help you choose the right format for your target platform.
Memory
| Aspect | Raw File (default) | ZIP (-zip) |
Folder (-folder) |
|---|---|---|---|
| Persistent open FD | 1 file descriptor held open | Zip archive kept open (central directory in RAM) | None โ open/read/close per block |
| ZIP central directory overhead | โ | ~32 bytes ร num_entries | โ |
| Block metadata | block_offset[0x200] = 2 KB |
block_empty[0x200] = 512 B |
block_empty[0x200] = 512 B |
| Sleep/resume cost | close()/open() 1 FD |
zip_close()/zip_open() (re-parse central
dir) |
Nothing to do |
| Overall RAM overhead | Lowest | Medium | Lowest |
Read Performance
| Aspect | Raw File (default) | ZIP (-zip) |
Folder (-folder) |
|---|---|---|---|
| Cache miss (block load) | lseek() + read() โ 1 syscall pair, direct
offset |
zopen() โ scan zip dir + zread()
decompress 64 KB + zclose() โ slowest |
open() + read() + close() โ 3
syscalls, no decompression |
| Cache hit | LRU pointer update only | LRU pointer update only | LRU pointer update only |
| I/O pattern | Random seek in single file โ | Sequential scan of zip entries + inflate โ | Path lookup + read small file ๐ถ |
| Decompression CPU | None | zlib inflate() per 64 KB block โ significant on
PSP/PS2 |
None |
Startup (fill_cache) |
Sequential lseek+read โ fast |
Open+decompress+close each block โ slowest | Open+read+close each block โ moderate |
Disk / Storage
| Aspect | Raw File (default) | ZIP (-zip) |
Folder (-folder) |
|---|---|---|---|
| Disk size | Largest โ offset table + uncompressed blocks, padded to 64 KB alignment | Smallest โ deflate typically 30โ70% compression | Same as raw โ uncompressed blocks + metadata |
| File count | 1 file | 1 file | Many files (up to 512 blocks + cache_info) |
| Filesystem friendliness | โ Best | โ Good | โ ๏ธ FAT16/FAT32 may struggle with 500+ entries (PSP Memory Stick) |
Recommendation per Platform
| Platform | Best format | Reason |
|---|---|---|
| PSP | Raw file (default) | Weakest CPU; lseek/read is the cheapest
cache miss path. Single FD. FAT16 hates many files. |
| PS2 | Raw file (default) | Same โ limited CPU, limited I/O drivers. |
| Desktop | Any (zip for disk savings) | CPU is a non-issue; zip saves ~50% disk with negligible cost. |
| WASM / Web | ZIP | Single HTTP download; in-memory inflate is fast in browser. |
Troubleshooting
โROM not foundโ error: - Ensure the ROM filename
matches entries in rominfo.cps2 - Check that parent ROMs
are available for clone sets
Game runs without conversion: - Some smaller CPS2 games donโt require cache files - The emulator will load the ROM directly if it fits in memory