🖥️
← Back to KLO Software

BeebRFSTool

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

Windows Command Line Microsoft Store BBC Micro Free

BeebRFSTool is a Windows command-line tool for packing files into BBC Micro ROM Filing System (RFS) sideways ROM images, and extracting, or just listing, files from them. It handles both RFS formats: compressed, compatible with the comprom.pl v2.10 format created by Greg Cook, and standard, uncompressed RFS. When extracting, the format is worked out from the ROM header, so you never have to say which kind you have.

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

The most up to date version of this information will always be the online version.


Usage

C:\LocalOnly\RFS> BeebRFSTool
BeebRFSTool v2026-07-22_22:27 - 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]
  extract <rom.bin> --list                 (no output folder needed when only listing)

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 (no <output-dir> needed)
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 (a file in the same folder with the same name plus a .inf extension) 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 sanitised, legal Beeb filename, with a load and exec address set to &0000 and the length taken from the PC file length, unless it is detected as a tokenised BBC BASIC binary, in which case the load address is set to &1900 and the exec address to &8023.

C:\LocalOnly\RFS> BeebRFSTool pack .\BeebFiles NewRFSCompr.rom --romtitle "CompressedRFS" --catalogtitle "CompRFS" --copyright "KLO 2026"
BeebRFSTool v2026-07-22_22:27 - 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-07-22 22:30)"
 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 RFS ROM image, giving the ROM to read and the folder to write into. The -i flag generates .inf sidecar files alongside each extracted file, preserving the BBC Micro filename, load address, execution address, and file length. Use -l instead to list a ROM's contents without writing anything to disk. Either way the run finishes with a *INFO style catalogue of the files and a one-line summary of the ROM's own header.

C:\LocalOnly\RFS> BeebRFSTool extract NewRFSCompr.rom .\Extracted -i
BeebRFSTool v2026-07-22_22:27 - 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: C:\LocalOnly\RFS\NewRFSCompr.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 21761 bytes.
+---+-----------+--------+------------+------------+--------------------------------------+
| # |Name       |Blocks  |Size (hex)  |Size (bytes)|Inf File Content                      |
+---+-----------+--------+------------+------------+--------------------------------------+
| 1)|*CompRFS*  |     1  |0x000000    |         0  |*CompRFS*  00FFFFFF 00FFFFFF 000000   |
+---+-----------+--------+------------+------------+--------------------------------------+
| 2)|aaa_txt    |     1  |0x00000D    |        13  |aaa_txt    00000000 00000000 00000D   |
+---+-----------+--------+------------+------------+--------------------------------------+
| 3)|bcdefghijk |     2  |0x000176    |       374  |bcdefghijk 00000000 00000000 000176   |
+---+-----------+--------+------------+------------+--------------------------------------+
| 4)|Defende    |    19  |0x001240    |      4672  |Defende    00005000 00008023 001240   |
+---+-----------+--------+------------+------------+--------------------------------------+
| 5)|DefenMC    |    35  |0x002300    |      8960  |DefenMC    00001900 00000E00 002300   |
+---+-----------+--------+------------+------------+--------------------------------------+
| 6)|test_nocom |     1  |0x00000A    |        10  |test_nocom 00000000 00000000 00000A   |
+---+-----------+--------+------------+------------+--------------------------------------+
| 7)|Zeddy_txt  |     1  |0x000086    |       134  |Zeddy_txt  00000000 00000000 000086   |
+---+-----------+--------+------------+------------+--------------------------------------+
End of ROM marker '+' seen at byte 0x003921 [014625]
Extracted  7 files totalling 14163 uncompressed bytes
Output folder: C:\LocalOnly\RFS\Extracted
        *CompRFS*  00FFFFFF 00FFFFFF 000000    (CompRFS)
        aaa_txt    00000000 00000000 00000D    (aaa_txt)
        bcdefghijk 00000000 00000000 000176    (bcdefghijk)
        Defende    00005000 00008023 001240    (Defende)
        DefenMC    00001900 00000E00 002300    (DefenMC)
        test_nocom 00000000 00000000 00000A    (test_nocom)
        Zeddy_txt  00000000 00000000 000086    (Zeddy_txt)

ROM: "CompressedRFS" (2026-07-22 22:30) (C)KLO 2026 - compressed RFS,
     Type &82 (service entry, no language, 6502 code), binary version &13, language entry &811C, service entry &8040

The closing list is a *INFO style catalogue, one line per file: the BBC Micro filename, its load address, execution address and length, and then in parentheses the name the file is given on this PC. The two differ whenever a BBC name contains characters Windows will not accept in a filename — here the catalogue entry *CompRFS* becomes CompRFS, since Windows filenames cannot contain asterisks.

The final line summarises the ROM's own header: its title, version string and copyright, whether it is compressed or plain RFS, and the paged-ROM header fields — the type byte (spelled out in parentheses), the binary version number, and the language and service entry addresses. A filing system ROM is type &82: it offers a service entry but has no language of its own. Note that the compressed ROM's language entry points at &811C whereas the plain one shows &0000, the unused entry described below.

Each extracted file is written to the output folder under the name shown in parentheses. With -i, a corresponding .inf file is written alongside it, for example:

DefenMC 00001900 00000E00 002300
in the standard format.

Example: standard, uncompressed ROMs

Adding --uncompressed writes a plain RFS ROM instead of a compressed one. The files are stored verbatim, so there is no dictionary, no digraph table and no decompressor stub — the ROM holds a good deal less, but its layout is straightforward and nothing has to be decoded at run time.

C:\LocalOnly\RFS> BeebRFSTool pack .\BeebFiles NewRFSPlain.rom --romtitle "StandardRFS" --catalogtitle "PlainRFS" --uncompressed
BeebRFSTool v2026-07-22_22:27 - 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 disabled (uncompressed RFS) to NewRFSPlain.rom.

 Title          : "StandardRFS"
 Copyright      : "KLO 2026"
 Version string : "(2026-07-22 22:30)"
 Catalog title  : "*PlainRFS*"

+---+------------+----------+----------+-------+-------+
| # |Name        |Load      |Exec      |Bytes  | Inf?  |
+---+------------+----------+----------+-------+-------+
| 1)|aaa_txt     |&00000000 |&00000000 |    13 |       |
| 2)|bcdefghijk  |&00000000 |&00000000 |   374 |       |
| 3)|Defende     |&00005000 |&00008023 |  4672 |(.inf) |
| 4)|DefenMC     |&00001900 |&00000E00 |  8960 |(.inf) |
| 5)|test_nocom  |&00000000 |&00000000 |    10 |       |
| 6)|Zeddy_txt   |&00000000 |&00000000 |   134 |       |
+---+------------+----------+----------+-------+-------+

ROM Total       :  16384 bytes (14708 padded to full &4000 size)
ROM Space Used  :  14708 bytes  (89% utilised)
ROM Image Saved: NewRFSPlain.rom

Extraction needs no extra option. The format is worked out from the ROM header, so the same extract command reads either kind:

C:\LocalOnly\RFS> BeebRFSTool extract NewRFSPlain.rom .\ExtractedPlain -i
BeebRFSTool v2026-07-22_22:27 - 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: C:\LocalOnly\RFS\NewRFSPlain.rom
ROM header verified: standard BBC Micro ROM signature found.
RFS ROM detected: Uncompressed format. Files will be decompressed and extracted.
+---+-----------+--------+------------+------------+--------------------------------------+
| # |Name       |Blocks  |Size (hex)  |Size (bytes)|Inf File Content                      |
+---+-----------+--------+------------+------------+--------------------------------------+
| 1)|aaa_txt    |     1  |0x00000D    |        13  |aaa_txt    00000000 00000000 00000D   |
+---+-----------+--------+------------+------------+--------------------------------------+
| 2)|bcdefghijk |     2  |0x000176    |       374  |bcdefghijk 00000000 00000000 000176   |
+---+-----------+--------+------------+------------+--------------------------------------+
| 3)|Defende    |    19  |0x001240    |      4672  |Defende    00005000 00008023 001240   |
+---+-----------+--------+------------+------------+--------------------------------------+
| 4)|DefenMC    |    35  |0x002300    |      8960  |DefenMC    00001900 00000E00 002300   |
+---+-----------+--------+------------+------------+--------------------------------------+
| 5)|test_nocom |     1  |0x00000A    |        10  |test_nocom 00000000 00000000 00000A   |
+---+-----------+--------+------------+------------+--------------------------------------+
| 6)|Zeddy_txt  |     1  |0x000086    |       134  |Zeddy_txt  00000000 00000000 000086   |
+---+-----------+--------+------------+------------+--------------------------------------+
End of ROM marker '+' seen at byte 0x003903 [014595]
Extracted  6 files totalling 14163 uncompressed bytes
Output folder: C:\LocalOnly\RFS\ExtractedPlain
        aaa_txt    00000000 00000000 00000D    (aaa_txt)
        bcdefghijk 00000000 00000000 000176    (bcdefghijk)
        Defende    00005000 00008023 001240    (Defende)
        DefenMC    00001900 00000E00 002300    (DefenMC)
        test_nocom 00000000 00000000 00000A    (test_nocom)
        Zeddy_txt  00000000 00000000 000086    (Zeddy_txt)

ROM: "StandardRFS" (2026-07-22 22:30) (C)KLO 2026 - uncompressed RFS,
     Type &82 (service entry, no language, 6502 code), binary version &01, language entry &0000, service entry &8035

Features

Pack files into ROM images

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

Both RFS formats

Produce either a compressed (CompRFS) ROM or, with --uncompressed, a standard plain RFS ROM — from the same folder of files.

Extract from ROM images

Extract files from any compatible RFS ROM image, compressed or uncompressed — the format is detected from the ROM header — with optional .inf sidecar generation preserving BBC Micro metadata.

*INFO style catalogue

Every extract or list run ends with a catalogue of the files — BBC filename, load and execution addresses and length, with the name used on this PC alongside — and a one-line summary of the ROM header, including the type byte spelled out in plain English.

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. Error messages are written to standard error and normal output to standard output, and meaningful exit codes are returned.

.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. Addresses are written as eight hex digits, so a host address such as FFFF1900 is stated in full; the shorter four- and six-digit forms written by other tools are still read.

Disk image file names

A folder of files exported from a .ssd or .dsd disk image packs under the BBC names they had. The drive and directory that 0_$.MAKERFS and 0_P.MakeRFS carry are stripped off, since a ROM filing system has no directories, and a name never keeps a dot — which the BBC would read as a directory separator.


Download and Install

BeebRFSTool

The app can be installed from:

Requires Windows 10 or later and .NET 9 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 handles both the Compressed ROM Filing System v2.10 format and standard, uncompressed RFS. ROM images it produces can be used with:

When reading an uncompressed ROM, the unused language entry point at &8000 may be filled with either three NOP instructions or three zero bytes; both conventions are recognised. Either way there is no address to report, which is why the ROM summary shows a language entry of &0000 for a plain RFS ROM.


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