A small utility to help build bootable images from .P files for the ZX81 External EPROM interface by Thomas Heckmann.
The ZX81 External EPROM interface is a clever interface that allows loading different ROMs for the ZX81 without having to open and reflash the system ROMs.
It can contain 8 × 8 KB ROMs but also supports organizing the EPROM into 4 × 16 KB banks. This leaves room for both a system ROM and one or more .P files.
The original repository contains the code to achieve this (see the autorun folder).
This repository contains a small command-line utility that makes the process easier:
- Combines a modified system ROM, a small loader, and one or more
.Pfile. - Compresses the
.Pfile using zx7. - Loader decompresses the file at load time.
- Makes it possible to include programs larger than 8 KB.
make./p2rom [-b base.bin] [-l loader.bin] [-o output.rom] input.p [input2.p input3.p ...]# Creates a ROM image (game.rom) containing and autorunning game.p
./p2rom game.p
# Creates a ROM image containing and autorunning game.p.zx7, output is xyz.rom
./p2rom -o xyz.rom game.p.zx7
# Creates a ROM image with game.p, using myloader.bin and customrom.bin
./p2rom -b customrom.bin -l myloader.bin game.p
# Creates a ROM image with 3 games.p and include a small menu based on the filenames
./p2rom game1.p game2.p game3.p
# Creates a ROM image with 2 games.p and a minimalistic menu without game names
./p2rom -s game1.p game2.p game3.p
The ZX81 system ROM needs a few modifications to autorun the .P file.
See this description for details.
- The source code adjusted for the sjasmplus assembler is in the
asmfolder. - Includes source for the loader and zx7 decompression code.
- Precompiled versions are in the
binfolder.
If you want to modify the loader or base image, assemble them with:
sjasmplus file.asm --raw=output.binPlease note that if you supply more than one input P-file, it is not possible to specify a custom loader.
This program is a co-creation between me and an AI. Concept, core mechanics and most code is mine, while quality assurance, makefile, readme and some vital insights into how to fix memory addressing is thanks to Claude.