https://github.com/JulieMontoya/Random_Beeb_Stuff/blob/main/sideways_rom_ram/make_rfs
You might need to alter the first line to point to the Perl interpreter on your own system.
Instructions may be found here but are summarised below:
Make a control file like this, where each line specifies a host-side filename (or just * to create an empty file; this may be used as the first file, to include a title in the listing produced by *CAT), the filename as it should appear in the RFS image, optional load and execution addresses and a flag to indicate special treatment (translation of \n to \r):
Code: Select all
# comment; ignored
* TITLE
host_filename1 [ rfs_filename1 [ load_addr [exec_addr ] ] ] [T]
host_filename2 [ rfs_filename2 [ load_addr [exec_addr ] ] ] [T]
- Lines beginning with a comment mark are ignored
- Fields are separated by any whitespace (spaces or tabs)
- If the target-side filename is *, a zero-byte file will be created on the target side
- If no target-side filename is specified, the host-side filename will be used
- Addresses are in hex, 1-4 digits, with no prefix
- If no execution address is specified, the load address will be used
- If no load address is specified, &0000 will be used
- A final "T" indicates a text file; this will have all \n characters translated to \r to match the BBC's expectations
$ make_rfs -b begin_addr -i control_file -o output_file
where begin_addr is the address at which the RFS image must start (i.e., what gets poked into &F6 and &F7 by Service &0D).
An example control file, for an RFS image containing a zero-byte title file (which appears first when *CAT is used), a BASIC program, a machine code program (possibly BeebAsm output) intended to be loaded at and executed from particular addresses, a couple of MODE 7 screen saves and a text file:
Code: Select all
# Create a title file with no content
* **HELLO1**
# host_filename beeb_name load exec [T]
hello1.bas HELLO 1900 8023
# Execution address is different from load address
hello1.o MCODE 2E00 2E16
pic1.m7 PIC1 7C00
pic2.m7 PIC2 7C00
# T at end means translate line endings
instructions !INSTR T