Credits
- Code — NoRecess
Written alone.
CATRUN

CATRUN is a simple tool for the Amstrad CPC machines to fasten the process of disc’s content discovery / launch a program.
When inserting a new disc into the machine, I bet than 95% of the regular Amstrad CPC users will first type the CAT command to discover its content, then type RUN”FILENAME to launch a targeted program.
With CATRUN, the user can press CTRL+TAB (or SHIFT+TAB for 464 owners) at machine startup (or any other time, of course) to show the list of files stored on the disc, then use the arrow keys to select the targeted file to execute, then press RETURN/ENTER/COPY/SPACE to auto-type the RUN command. Few key presses are saved in the process, while enhancing (a little bit !) the launching experience.
What’s new in version 2.0
Version 2.0 is the first release since V1.3 (December 2023). The changes are big enough for a new major version: CATRUN is now a real file and folder toolbox, and many bugs were fixed along the way.
- Folders, for real (UniDOS). C copies a folder with everything in it, sub-folders included; the new M key moves files and folders to the other drive (the originals are deleted only when everything was copied); D deletes a folder even when it is not empty. The folders are listed first.
- Multiselection everywhere. S and Control+A now work with copy, move and delete, not only with delete.
- Choose the device of a drive (UniDOS). P lists the devices that have a medium (SD:, UMS:, DFA:, TAPE:…) and puts the one you pick on the current drive.
- User numbers (AMSDOS). The new U key changes the user number (0–15) and shows its catalogue.
- About 3 times faster to print the catalogue (60 files: about 21 frames instead of 70). A big folder shows the entries fitting on the screen, then “(+ N more entries not shown)”.
- Respectful of BASIC. The catalogue buffer now lives in BASIC’s free memory, as the CAT command’s does: the program, its variables and its strings are never touched, and the ROM reserves a single byte of RAM. Control+Enter types RUN” again, and the shortcut survives a keyboard expansion buffer that is already full (UTOPIA).
- CPC 464 fixed. Delete, rename and the UniDOS commands failed with “Type mismatch” on BASIC 1.0: the commands are now called by CATRUN itself instead of being typed at the BASIC prompt.
- And many other fixes, listed in the changelog below.
Using CATRUN
While selecting a file, it’s also possible to:
- use H key to print the program help (the first |CATRUN after the machine starts reminds it: “Press H for HELP!”)
- use ESC key to just get back to BASIC (cf. discard the RUN command)
- use TAB key (or Control+Tab, Shift+Tab on a 464) to redo a catalogue discovery (cf. when the user is willing to change disc and rebrowse its content)
- use R key to rename the selected file
- use D key to delete the selected file (UniDOS: a folder too, with everything in it, even when it is not empty)
- use A or B key to switch current drive to A: or B:
- use U key to change the user number (0–15), then the catalogue of that user is shown (AMSDOS only, not under UniDOS)
- use S key for multiselection (Control+A selects all the files shown). You can combine that with the delete, copy and move operations.

If UniDOS gets detected:
- the folders are listed first, then the files
- use CLR key to navigate to root folder
- use DEL key to navigate to parent folder
- use RETURN/ENTER/COPY to navigate into a sub-folder
- use N key to create a new folder
- use P key to change the device of the current drive: CATRUN lists the devices UniDOS knows that have a medium (SD:, UMS:, DFA:, TAPE:…, with their descriptions), you press its number (ESC: cancel) and the catalogue of the device is shown
- use C key to copy a file or a folder (with everything in it, its sub-folders too) to the other logical drive, and M key to move it there (copied, then the original deleted, only when everything was copied). Both can be combined with S key (multiselection). A copy stops at the first file not copied (“Not all done”).


And that’s all :)
Notes
- supports both MODE 1 and MODE 2. If the current video mode is MODE 0, then a regular CAT will be applied and the user will get back to BASIC
- to be available system-wide from the BASIC prompt, this program is distributed as a ROM to be installed on a ROMBoard (X-MEM, FlashGordon, etc.)
- the ROM reserves a single byte of RAM below HIMEM (it remembers that “Press H for HELP!” was shown). The Control+Tab (Shift+Tab on 464) shortcut uses its own keyboard expansion token, so Control+Enter still types RUN” as usual
- if another ROM already filled the keyboard expansion buffer (UTOPIA defines 10 keys, for example), CATRUN moves all the expansions to a bigger buffer at the top of the RAM (about 230 bytes below HIMEM) instead of losing its shortcut. ROMs are initialised from the highest slot number down: with UTOPIA, put CATRUN in a lower slot number than UTOPIA, otherwise UTOPIA finds the buffer full and loses its last key
- the catalogue is read into a 2K buffer taken at the top of BASIC’s free memory (just like BASIC’s own CAT does): the BASIC program, its variables and its strings are never touched. With less than about 2.3K of free memory, CATRUN says “Not enough free memory” and gets back to BASIC. Copying/deleting selected files needs 4K more
- if the catalogue on disc appears to be a CATART, then a regular CAT will be applied and the user will get back to BASIC
- if the catalogue appears to be impossible to browse for whatever reasons, then a regular CAT will be applied and the user will get back to BASIC. This happens for example with the (great!) Duke’s M4 expansion not behaving internally like the regular CAT from Amstrad – for programmers: the 2K buffer not being populated by CAS CATALOG.
- generally speaking, this program refers only to the firmware routines. It provides full compatibility between 464, 664 and 6128 Amstrad CPC machines (tested)
- the commands (delete, rename, copy, folders, drives) call the DOS/ROM commands (|ERA, |REN, |COPY…) directly instead of typing them at the BASIC prompt, so they work the same with the 464’s BASIC 1.0. Only RUN” is typed
- a test is done to ensure that the call of |CATRUN is made from the BASIC prompt: typed in Protext’s command mode, CATRUN does nothing (Protext has its own CAT)
- UniDOS-specific: the current drive and its path get displayed on top of all printed catalogues (“A: PI:GAMES/”)
- UniDOS-specific: a folder is shown [DIR]
- the catalogue lists the entries fitting on one screen: up to 48 in MODE 1 (MODE 2 is used from 43 entries) and 96 in MODE 2. Bigger folders show the first 92 entries and “(+ N more entries not shown)”
- sizes are shown in K up to 999K, then in M
- the build date is displayed in the Help
- doesn’t assume AmsDOS is at ROM7
- internally relies on a “fast print routine” (faster than the standard Amstrad one).
- when displaying a catalog, CATRUN will try to pre-select an executable file, based on filename (thanks Eto/Prodatron!):
- if it finds a file “disc.”/”disk.”/”disc.bas”/”disk.bas”/”disc.bin”/”disk.bin” (then “menu.”/”menu.bas”)
- and if not, if it finds the first “*. “
- and if not, if it finds the first “*.bas”
- and if not, if it finds the first “*.bin” (very useful, most of the time it’s accurate. A folder is never pre-selected.)
Final words.
This program is useful to me. With some luck it will also be useful to you ! :)
Thanks to TotO, Offset, Poulette73, roudoudou & everyone else keeping the Amstrad scene alive! =)
Changelog
Version 2.0 (1st of Dec 2026):
New
- UniDOS: C copies a folder with everything in it (its files and sub-folders), not only a file
- UniDOS: new M key: moves the selected files and folders to the other logical drive (copied, then the originals deleted, only when everything was copied)
- UniDOS: D deletes a folder even when it is not empty
- UniDOS: C and M are refused when the other drive shows the same folder, or a folder inside the one copied; a copy stops at the first file not copied (“Not all done”)
- UniDOS: P key (new meaning): changes the device of the current drive (SD:, UMS:, DFA:, TAPE:…), picked among the devices UniDOS lists with a medium (|DRIVE)
- UniDOS: the folders are listed first, then the files; the first row shows the drive and its path (“A: PI:GAMES/”, was “PI:GAMES/”)
- the multiselection (S, Control+A) works with copy, move and delete, not only with delete
- new U key (AMSDOS): changes the user number (0–15)
- SPACE runs the file too; Control+Tab / Shift+Tab refresh the catalogue inside CATRUN
- the help (H) lists the commands of the current setup and fits on one screen; it clears the cursor’s bar, and its “Press a key” row is erased afterwards. The first |CATRUN after the machine starts says “Press H for HELP!”
- the catalogue is printed about 3 times faster (60 files: about 21 frames instead of 70)
- a big folder lists only the entries fitting on the screen (92 in MODE 2), then “(+ N more entries not shown)”; sizes from 100K are right, and shown in M from 1000K
- the name typed for R (rename) and N (new folder) only takes the characters every DOS accepts, in upper case, as 8.3
- a separation line (the whole row) above “Refreshing catalog…”, which comes right after the catalogue or the command’s question (no empty row)
- the commands (|ERA, |REN, |COPY, |LOAD, |SAVE, |A, |B, |DRIVE…) are called by CATRUN itself instead of being typed at the BASIC prompt (only RUN” is still typed)
Removed
- the P key (open with Protext): |P,”L FILE” never loaded the file (the Protext ROM ignores the name); P now chooses the UniDOS device
- E as a delete key: D only
- “catrun” typed in Protext’s command mode does nothing now (V1.3 placed its catalogue buffer with BASIC’s pointers, which are Protext’s data there)
Fixed
- CPC 464 (BASIC 1.0): delete, rename and the UniDOS commands failed with “Type mismatch” (BASIC 1.0 refuses literal strings as RSX parameters)
- |CATRUN destroyed up to 2K (4K with multiselection) of BASIC strings: the catalogue buffer now lives in BASIC’s free memory, like the CAT command’s
- a disc with a blank filename (Batman Forever) made CATRUN overwrite memory above HIMEM
- with UniDOS standalone (no AMSDOS), |CATRUN froze on a blank screen
- RETURN on a file did not run it when more statements followed |CATRUN (|CATRUN:CLS) or from a program; from a program it now stops with Break, then runs the file
- Control+Enter types RUN” again (the shortcut has its own expansion token, 141); a keyboard expansion buffer already full (UTOPIA) no longer loses the shortcut
- the RUN” autotype no longer writes in the DOS’ workspace, and its event is gone before BASIC runs the line
- the first |CATRUN wrote a byte in another ROM’s data (or BASIC’s); the ROM reserves a single byte of RAM
- the text output (TXT OUTPUT) silenced while reading the catalogue is put back exactly as it was
- the SPACE key did not run the file (while “/” did); the up arrow did nothing on entries 128 and beyond; Control+A with 16 entries or more wrote over the firmware’s restarts at &0018
- the pre-selection never picks a folder; an AMSDOS file with CP/M’s archive attribute, or a read-only file of 0K without UniDOS, is no longer taken for a folder
- a big folder no longer scrolls entries out of the screen (which highlighted the wrong lines)
- the ROM’s name can no longer be typed as a command (|CATRUNV13 ran the ROM’s init again)
- the ROM file is exactly 16384 bytes (CATRUN20.ROM; V1.3 and V1.4 were one byte short, which some ROM boards and emulators refuse)
- the build (make.sh) works on macOS and Linux, without /tmp
Version 1.4 (not published on this site):
- can open file with Orgams with O key (gone in V2.0)
Version 1.3 (20th of Dec 2023):
- fixed bugs with selection when doing an action on files
- direct calls to |ERA and |COPY RSXs for multiselection (cf. removed the limit of 9 files max. to be auto-typed in BASIC prompt)
Version 1.2 (5th of Dec 2023):
- 464 fix + added Shift+TAB/COPY key usage (better ergonomy for CPC 464 users)
- user can now go to Drive A or B (key A or B)
- added multiselection for file delete operations (key S to toggle select on a file, Control+A to select all)
- P key on a text file to open Protext editor
- if UniDOS gets detected: current path gets displayed on top of all printed catalogues; user can navigate through the directory hierarchy (go to root (CLR key), go to parent directory (DEL key), go to subfolder); user can create a new directory (key N); simple file copy to the other logical drive (key C)
- minor improvements (better internal memory management, build date shown in Help, don’t assume AmsDOS ROM being at ROM 7, etc)
Version 1.1 (17th of Sept 2023):
First feedbacks received, adjusting few things.
- implemented pre-selection of an executable file in the catalog, based on filename (thanks Eto/Prodatron!). Of course, user must still press RETURN key to trigger the launch of the program (cf. RUN it)
- if we are about to display more than 42 files in MODE 1, the video-mode will be automatically switched to MODE 2 (to allow more files displayed on screen)
- it’s now possible to press E or D keys (“E”rase or “D”elete) to delete the selected file. A confirmation gets presented to the user before proceeding
- it’s now possible to press R key (“R”ename) to rename the selected file. ESC to cancel while entering the new filename
Version 1.0 (15th Sept 2023):
- initial release
Earlier versions, as they looked:



