🖥️
← Back to KLO Software

BeebRFSMaker

Compressed ROM Filing System packer and extractor to let your Windows PC make RFS ROM images for the BBC Micro

Windows WinUI 3 Microsoft Store BBC Micro Free

BeebRFSMaker is a Windows application for packing files into a BBC Micro Compressed ROM Filing System (CompRFS) image, and extracting files back out again. It is compatible with the comprom.pl v2.10 format by Greg Cook, and produces sideways ROM images that can be used directly with a BBC Microcomputer or emulator.

BeebRFSMaker app icon

To use it, simply drag and drop files from your PC onto the area labeled "Drop PC files here". The files will be listed in the area below with their name, load and exec addresses, and size in bytes. The files in the list are compressed into a ROM image. By using the radio buttons at the top you can see the content of the selected file from the list, or the ROM image, or the Event Log, in the preview window which takes up most of the left hand side of the app. If the combined total file size after compression will fit within a 16 KB ROM then the "Create RFS ROM Image" button will be enabled, and you can choose where to save the ROM image with a .rom extension. If you attempt to add a file which will clash with the name of one already in the list, it will not be included and you will be informed and given advice on workarounds.

The .inf sidecar file format

When packing, BeebRFSMaker reads the accompanying .inf sidecar file for each PC file if one exists. When extracting, it creates one alongside each extracted file. The .inf file is the de facto standard for preserving BBC Micro file metadata on a modern PC filing system, and is recognised by BeebEm and most other emulators and tools in the BBC Micro ecosystem.

Each .inf file is a single line of plain text with the following fields, separated by whitespace:

$.FILENAME  LLLLLL  EEEEEE  SSSSSS

Where:

The load address is the 6502 memory address at which the file should be loaded when transferred back to a BBC Micro. The execution address is the address to jump to if the file is run with *RUN or CHAIN"". For non-executable files such as data files these two addresses are often identical. Addresses are stored as 32-bit values to accommodate the Master 128's extended address space, though on a Model B only the lower 16 bits are significant.

Example — a BBC BASIC program called GAME:

$.GAME  001900  008023  003A4F
BeebRFSMaker file drop area BeebRFSMaker file drop area

If you drop a .rom file onto the app it will offer to extract the content into a location of your choice, and optionally add those files to whatever is already in the list. You can also use this feature just to extract files from a compatible ROM image. The corresponding .inf file will be created during extraction.


"Burning" an EEPROM

Rather than using the old-style, UV-erasable EPROMs I bought 5 compatible AT28C256-15PU EEPROMs for around $11 on Amazon. The "256" in the part number refers to its 256Kbit capacity (which equals 32KB), and the "-15" indicates a 150ns access time. I use the upper 16K since the A14 address line is held high making that half of the capacity visible to the Beeb. The chips linked to are second-hand but all worked, though I did throw out one of the chips because it was missing a leg. I used the Xgecu T48 TL866-3G EEPROM Programmer with the downloadable Xgpro software to "burn" the EEPROM content. The EEPROMs I have created so far all worked in my actual BBC Micro.

Screenshots

BeebRFSMaker packing screen

Packing a set of BBC Micro files into a 16 KB sideways ROM image

BeebRFSMaker extraction screen

Extracting files from an existing CompRFS ROM image, with optional .inf sidecar files


Features

Pack files into ROM images

Select a folder of files and pack them into a standard 16 KB sideways ROM image. BBC Micro filenames, load addresses, and execution addresses are read from .inf sidecar files if present.

Extract from ROM images

Open any compatible CompRFS ROM image and extract its files back to a folder, generating .inf sidecar files that have become the de facto standard for preserving BBC Micro metadata — filename, load and execution addresses, and file length.

Compression feedback

The pack output shows each file’s raw and compressed sizes so you can see at a glance how efficiently your files compress, and whether everything fits in the 16 KB slot.

comprom.pl compatible

Produces byte-identical ROM images to the original comprom.pl v2.10 Perl script by Greg Cook, so ROMs built with BeebRFSMaker work with any BBC Microcomputer or emulator such as BeebEm.

ROM header options

Customise the ROM title (shown by *ROMS), catalogue title (shown by *CAT), copyright string, and version string.

Command-line interface

A corresponding command-line tool, BeebRFSTool, which uses the same pack and extract classes as the UX app, provides a full command-line interface for scripting and automation, compatible with batch files and build pipelines.


How the resulting ROM appears on a BBC Micro or emulator

A BeebRFSMaker ROM image as seen by a BBC Micro or emulator

How it works

The Compressed ROM Filing System format, created by Greg Cook, stores files in a standard BBC Micro 16 KB sideways ROM using a compressed stream that begins after a conventional Acorn ROM header at &8000 and a small 6502 decompressor stub at &8040. The stream uses four compression mechanisms: a digraph table of up to 31 frequent two-byte pairs each encoded as a single byte token, a dictionary of up to 128 longer repeated sequences each referenced by a two-byte address token, run-length encoding for repeated byte values, and literal escape sequences for bytes that cannot otherwise be represented. Dictionary entries may chain up to nine levels deep, and since the ROM Filing System requires each file header to be directly addressable, each file’s stream is generated separately and chained to the next via a link field. The result is a self-delimiting compressed stream that the decompressor stub decodes on the fly in response to standard MOS ROM Filing System service calls, requiring no RAM workspace beyond a handful of zero-page locations.

BeebRFSMaker implements the full comprom.pl v2.10 compression algorithm:

  1. A digraph table of up to 31 frequent 2-byte pairs, each encoded as a single byte token
  2. A dictionary of up to 128 longer repeated sequences, each encoded as a 2-byte address token
  3. Run-length encoding for repeated byte values
  4. Literal escape sequences for bytes that cannot be represented by any of the above

The compressor analyses all the files together to build a shared dictionary, so common patterns across multiple files all benefit from the same tokens.


Download and Install

BeebRFSMaker

The app can be installed from:

Requires Windows 10 (build 1809) or later, or Windows 11.


Compatibility

BeebRFSMaker is compatible with the Compressed ROM Filing System v2.10 format. ROM images produced by BeebRFSMaker can be used with:


BeebRFSMaker is free software. The CompRFS format and original comprom.pl script are by Greg Cook.
← BeebRFSTool    ← Back to KLO Software