🖥️
← Back to KLO Software

BeebRFSTool

Command-line tool for packing and extracting BBC Micro Compressed ROM Filing System images

Windows Command Line MSI Installer BBC Micro Free

BeebRFSTool is a Windows command-line tool for packing files into BBC Micro Compressed ROM Filing System (RFS) sideways ROM images, and extracting, or just listing, files from them. It is compatible with the comprom.pl v2.10 format created by Greg Cook. It can also create and read standard, uncompressed RFS images.

BeebRFSTool uses the same compression and extraction engine that powers the BeebRFSMaker Windows WinUI3 application, but it is designed to be used completely standalone in a cmd terminal — no GUI app installation is required.


Usage

C:\LocalOnly\RFS> BeebRFSTool
BeebRFSTool v2026-06-08_16:11 - BBC Micro ROM Filing System (RFS) Pack, List, and Extract Tool by Kara Ottewell
Compatible with both standard RFS and Greg Cook's compressed RFS "comprom" format v2.10
Usage:
  pack    <input-dir> <rom.bin> [options]
  extract <rom.bin> <output-dir> [options]
Pack Options:
  --romtitle <string>      ROM header title as shown by, say, *ROMS (e.g. "My Tools")
  --catalogtitle <string>  Empty file acting as title, shown by *CAT (e.g. "MyTools" -> "*MyTools*")
  --copyright <string>     Copyright string (e.g. "1.00")
  --versionstring <string> Version string (e.g. "2.10 (14 Oct 2022)")
  --uncompressed           Standard RFS ROM without compression, else "comprom" v2.10
Extract Options:
  --inf or -i              Generate .INF files
  --list or -l             List files only, do not extract
C:\LocalOnly\RFS>

Example: packing files

Pack a folder of BBC Micro files into a 16 KB sideways ROM image. Files with a matching .inf sidecar file (file in the same folder with exactly the same name and type but with ".inf" at the end) will have their BBC Micro filename, load address, and execution address set according to the metadata in that file. Any file without a matching sidecar defaults to a sanitized, legal Beeb filename, with a load and exec address set to &0000 and the length taken from the PC file length, unless we spot that it is a binary, tokenized BBC Basic file, then we set the load address to &1900 and the exec address to &8023.

C:\LocalOnly\RFS> BeebRFSTool pack .\BeebFiles NewRFSCompr.rom
BeebRFSTool v2026-06-08_16:11 - BBC Micro ROM Filing System (RFS) Pack, List, and Extract Tool by Kara Ottewell
Compatible with both standard RFS and Greg Cook's compressed RFS "comprom" format v2.10
Packing with compression enabled (compressed RFS) to NewRFSCompr.rom.
 Title          : "CompressedRFS"
 Copyright      : "KLO 2026"
 Version string : "(2026-06-08 17:28)"
 Catalog title  : "*CompRFS*"
+---+------------+----------+----------+-------+-------+------+------+
| # |Name        |Load      |Exec      |Raw    |Compr. |% Orig| Inf? |
+---+------------+----------+----------+-------+-------+------+------+
| 1)|aaa_txt     |&00000000 |&00000000 |    44 |    30 |68.2% |      |
| 2)|bcdefghijk  |&00000000 |&00000000 |   442 |   263 |59.5% |      |
| 3)|Defende     |&00005000 |&00008023 |  4785 |  2754 |57.6% |(.inf)|
| 4)|DefenMC     |&00001900 |&00000E00 |  9121 |  7598 |83.3% |(.inf)|
| 5)|test_nocom  |&00000000 |&00000000 |    44 |    38 |86.4% |      |
| 6)|Zeddy_txt   |&00000000 |&00000000 |   167 |   145 |86.8% |      |
+---+------------+----------+----------+-------+-------+------+------+
ROM Uncompressed:  14163 bytes
ROM Compressed  :  10858 bytes
ROM Overhead    :   1958 bytes (header + stub + dictionary + digraphs)
ROM Total       :  16384 bytes (12816 padded to full &4000 size)
ROM Space Used  :  12816 bytes  (78% utilised)
ROM Image Saved: NewRFSCompr.rom

Example: extracting files

Extract all files from an existing CompRFS ROM image. The -i flag generates .inf sidecar files alongside each extracted file, preserving the BBC Micro filename, load address, execution address, and file length.

C:\LocalOnly\RFS> BeebRFSTool extract RFSCompressed.rom -i
BeebRFSTool v2026-06-08_16:11 - BBC Micro ROM Filing System (RFS) Pack, List, and Extract Tool by Kara Ottewell
Compatible with both standard RFS and Greg Cook's compressed RFS "comprom" format v2.10
ROM image: %HOMEDRIVE%\LocalOnly\RFS\RFSCompressed.rom
ROM header verified: standard BBC Micro ROM signature found.
RFS ROM detected: Compressed format. Files will be decompressed and extracted.
Decoded compression and expanded contents to 21739 bytes.
+---+-----------+--------+------------+------------+----------------------------------+
| # |Name       |Blocks  |Size (hex)  |Size (bytes)|Inf File Content                  |
+---+-----------+--------+------------+------------+----------------------------------+
| 1)|*CompRFS*  |     1  |0x000000    |         0  |*CompRFS*  FFFFFF FFFFFF 000000   |
+---+-----------+--------+------------+------------+----------------------------------+
| 2)|aaa_txt    |     1  |0x00000D    |        13  |aaa_txt    000000 000000 00000D   |
+---+-----------+--------+------------+------------+----------------------------------+
| 3)|Defende    |    19  |0x001240    |      4672  |Defende    001900 008023 001240   |
+---+-----------+--------+------------+------------+----------------------------------+
| 4)|DefenMC    |    35  |0x002300    |      8960  |DefenMC    001900 000E00 002300   |
+---+-----------+--------+------------+------------+----------------------------------+
| 5)|test_nocom |     1  |0x00000A    |        10  |test_nocom 000000 000000 00000A   |
+---+-----------+--------+------------+------------+----------------------------------+
End of ROM marker '+' seen at byte 0x0036C3 [014019]
Extracted  5 files totalling 13655 uncompressed bytes
Output folder: %HOMEDRIVE%\LocalOnly\RFS\-i
        CompRFS
        aaa_txt
        Defende
        DefenMC
        test_nocom

Each extracted file is written to the output folder with its BBC Micro filename. With -i, a corresponding .inf file is written alongside it, for example:

$.DefenMC FF1900 FF0E00 8960
in the standard format.

Features

Pack files into ROM images

Pack a folder of files into a standard 16 KB CompRFS sideways ROM image, with optional ROM title, catalogue title, copyright, and version string.

Extract from ROM images

Extract files from any compatible CompRFS ROM image, with optional .inf sidecar generation preserving BBC Micro metadata.

Compression feedback

Detailed output shows per-file raw and compressed sizes, dictionary and digraph statistics, and overall ROM utilisation.

comprom.pl compatible

Produces byte-identical ROM images to the original comprom.pl v2.10 Perl script by Greg Cook, requiring no Perl installation.

Scripting and automation

Designed for use in batch files and build pipelines. Exit codes and error messages are written to standard error, output to standard out.

.inf sidecar support

Reads and writes .inf sidecar files in the standard BBC Micro format used by DFS tools, preserving load addresses, execution addresses, and BBC filenames.


Download and source code

BeebRFSTool

The app can be installed from:

Requires Windows 10 or later and .NET 8 or later.

Note: If you need a graphical interface rather than a command line, BeebRFSMaker provides the same packing and extraction functionality as a WinUI 3 Windows application.

Compatibility

BeebRFSTool is compatible with the Compressed ROM Filing System v2.10 format. ROM images it produces can be used with:


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