Skip to content

About

A small utility to help building bootable images from P files for the ZX81-external-eprom interface by Thomas Heckmann

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

14 Commits

Folders and files

Repository files navigation

ZX81 External EPROM Builder

A small utility to help build bootable images from .P files for the ZX81 External EPROM interface by Thomas Heckmann.


Overview

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 .P file.
  • Compresses the .P file using zx7.
  • Loader decompresses the file at load time.
  • Makes it possible to include programs larger than 8 KB.

Building

make

Usage

./p2rom [-b base.bin] [-l loader.bin] [-o output.rom] input.p [input2.p input3.p ...]

Examples

# 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

ROM Modifications

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 asm folder.
  • Includes source for the loader and zx7 decompression code.
  • Precompiled versions are in the bin folder.

Modifying Loader or Base Image

If you want to modify the loader or base image, assemble them with:

sjasmplus file.asm --raw=output.bin

Please note that if you supply more than one input P-file, it is not possible to specify a custom loader.

A note on AI

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.

About

A small utility to help building bootable images from P files for the ZX81-external-eprom interface by Thomas Heckmann

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages