[Optical Brothers]
[Quick Commander]
[Quick Packer]
[mc-zx]
Archive:
[Group history]
[Our games]
[Other]
[Newspapers]
["OBS" news (in Russian)]
Plugins for Midnight Commander (mc) for those who
work with ZX Spectrum files on a PC: TR-DOS disk images, TAP and TZX tapes and DivMMC SD card images open
as ordinary folders, ALASM sources are shown as text, files are packed and unpacked with ZX0, Hrust and Hrum right from the mc menu, cp866 texts
can be read and converted.
mc-zx v1.1
Release date: 25.10.2026
Click to download:
mc-zx v1.1: trdos, tape, sdcard, alasm, zx0, hrust, hrum, cp866
New in 1.1: the tape plugin (.tap and .tzx tapes) and the sdcard plugin (SD card and disk images of DivMMC, DivIDE
and the Next). The other plugins work as in 1.0. The previous version:
mc-zx v1.0 (05.10.2026).
Each plugin is a separate folder with its own program, installer, description (README.md) and
tests: it can be shared and installed apart from the others. All programs are written in Python 3 with no
external libraries, produce output byte-for-byte identical to the original packers, and run on Linux, macOS and BSD.
| plugin | what it does | in mc |
| trdos | TR-DOS disk images (.trd) and SCL archives as folders: view, extract, add and delete files | Enter on .trd/.scl, F3 - catalog |
| tape | ZX Spectrum tapes (.tap, .tzx) as folders: view and extract files; on a TAP also add, replace and delete them | Enter on .tap/.tzx, F3 - catalog |
| sdcard | SD card and disk images of DivMMC, DivIDE and the Next (.mmc, .img, .hdf, .vhd): FAT12/16/32 with long names, read only | Enter on the image, F3 - partitions and the root folder |
| alasm | ALASM 4.4x and 5.0x sources (type H files) as text | F3 and Enter on .H/.$H, F2 - l (to .asm) |
| zx0 | ZX0 packing and unpacking (Einar Saukas), as in Quick Commander 3.20 | F2 - j / J, F3 on .zx0 and .z_? |
| hrust | Hrust 2 packing like the h command in Quick Commander 3.11, or shorter like oh2c; unpacking | F2 - u / O / N, F3 on .p_? and .hr2 |
| hrum | Hrum 3.5 (Hrumer) packing into a self-extracting block, and unpacking | F2 - k / K, F3 on .hrm |
| cp866 | DOS and Russian Spectrum texts in cp866: view, convert to UTF-8 and back | F2 - v, V, W |
The plugins also work together: inside a .trd image an ALASM source shows up as NAME.H, and F3 shows it as text;
a file packed in mc is copied to the disk with the type Quick Commander understands; a tape's files from its
hobeta/ folder go onto a .trd with their type, address and autostart line, and back; a .trd on an SD card opens
right from the card's image.
TR-DOS images (trdos)
Enter on a .trd or .scl file opens the image as a folder, F3 shows the disk catalog as text. Inside:
- the files as they are, named NAME.T, where T is the TR-DOS type: boot.B, game.C. Three-letter extensions
are shown in full (song.pt3), files packed by Quick Commander as game.p_C (Hrust) and game.z_C (ZX0);
- the hobeta/ folder: the same files in hobeta format (NAME.$T), whose header keeps the name, type, START and LENGTH.
It is not a copy but another view of the same files: deleting there deletes the file from the disk;
- CATALOG: the disk catalog as text: label, disk type, free space, START, LENGTH, sectors,
track and sector of each file, the BASIC autostart line, deleted files too.
Copying into an image (F5): a hobeta file is recognized by its header, an ordinary file gets its name and type from
its file name (game.C - name game, type C). The START address is given in the name: game.C@24576 or game.C@#6000; without it, 16384 for
a screen (6912 bytes) and 32768 for anything else. boot.B@10 is a BASIC program autostarting from line 10. A new file in a .trd
goes after the last file in the catalog, as in TR-DOS; files on the disk are never moved. Deleting (F8) in a
.trd only marks the file as deleted, as TR-DOS does; from an .scl the file is removed completely. To make a new image, create an empty file with
the .trd (80 tracks, 2 sides) or .scl extension, enter it and copy the files in.
mc quirks: after copying into an image mc shows it from its cache; to reread it, leave the image and
enter it again a minute later, or right away after F9 - Command - Active VFS list - Free VFSs now. The message "Cannot chmod
target file" when copying into an image is harmless: press "Ignore all" or uncheck "Preserve attributes".
Tapes (tape)
Enter on a .tap or .tzx file opens the tape as a folder, F3 shows its blocks as text. Inside:
- the files, named as the ROM names them when it loads, with the block's number in front, so that the panel
shows them in the tape's order: 01 Program boot, 03 Bytes screen, 05 Headerless (a block with no header). A file
holds the block's data without the flag and the checksum;
- the tap/ folder: the same files as pieces of TAP (the header and the data block as they are): nothing is lost
through it. Copy all the pieces from a .tzx tape's tap/ into an empty .tap file, and you have a TAP;
- the hobeta/ folder: the files with headers in hobeta format for TR-DOS disks: Program becomes B (with the
autostart line as TR-DOS writes it), Bytes C, arrays D;
- CATALOG: the tape's blocks in SAVE's words: Program: "boot" LINE 10, Bytes: "screen" CODE 16384,6912; a wrong
checksum and a length other than the header's are marked; for a TZX, blocks of every kind, the turbo blocks'
timings and the archive info.
Copying into a TAP (F5): a hobeta file and a piece of TAP go in as they are; an ordinary file gets its type and name
from its file name: Bytes screen, Program game@10 (autostart from line 10), Bytes code@#6000, Headerless; a file with
any other name becomes Bytes of that name. F4 replaces a file in its place, F6 renames it without moving it on the
tape, F8 removes the file's blocks. A new tape is an empty .tap file. A TZX is only read: the standard, turbo and
pure data blocks become files.
SD card images (sdcard)
Enter on an image of a DivMMC, DivIDE or Next SD card or disk opens it as a folder, F3 shows the partitions, the
file system (type, label, cluster size, free space) and the root folder. It reads raw images (ZEsarUX's .mmc, a
card's or the Next's .img), Fuse's HDF (.hdf) and fixed-size VHD (.vhd); an MBR with logical partitions, or a card
with no partitions; FAT12, FAT16 and FAT32 with long names, Russian ones too. With several FAT partitions each is a
folder named by its number. The card is only read: files are copied off it (F5), the image is never changed. A .img
file opens so only if it holds an MBR or FAT, so gigascreen .img pictures stay pictures.
ALASM sources (alasm)
F3 and Enter on a NAME.H or NAME.$H file show the ALASM 4.4x/5.0x source as text (the same as the text
export in ALASM itself), including inside a .trd image. F2 - l converts the selected files to NAME.asm.
A lowercase .h is a C header; the plugin leaves it alone.
Packers (zx0, hrust, hrum)
F2 j ZX0: pack game.C -> game.z_C (as in Quick Commander 3.20)
game.scr -> game.scr.zx0
J ZX0: unpack game.z_C -> game.C
u Hrust: pack game.C -> game.p_C (as h in Quick Commander 3.11)
O Hrust: pack (oh2c) game.C -> game.p_C (shortest block)
N Hrust: unpack game.p_C -> game.C
k Hrum: pack game.C -> game.C.hrm (self-extracting block)
K Hrum: unpack game.C.hrm -> game.C
F3 on .zx0, .z_?, .p_?, .hr2, .hrm - unpacked data (hex, F4 - as text)
The menu items work on the selected files, or on the current file if none are selected. Existing files are never overwritten;
if something fails, the plugin says why and waits for Enter (Ctrl-O shows the output). zx0 packs byte-for-byte like
the original zx0 2.2, hrust like QC 3.11 or like oh2c, hrum like hrum35 1.1b. Names with the type after "_"
(game.z_C, game.p_C) are the Quick Commander standard: once copied to a disk, QC unpacks such a file to game.C with the U command.
Hrum asks for the block address, the unpacking address, the jump after unpacking and the number of trailing zeros (answer "-" for the
default: #6000, #6000, return by RET). The mc menu works only in ordinary folders, not inside images:
copy the file out of the image (F5) and work with the copy.
cp866 texts (cp866)
F2 - v shows a cp866 text (DOS, Russian Spectrum) with Cyrillic letters; F2 - V writes NAME.utf8.txt next to it, F2 - W
converts back to cp866 (NAME.cp866.txt, with CR LF line ends, as in Spectrum texts). Both CR (Spectrum)
and CR LF (DOS) line ends are understood. If the UTF-8 text has a character that cp866 lacks, the file is not written, and the program
reports the line and column of that character.
mc's own viewer shows cp866 too (Alt-E in F3), but it keeps that coding for all files: until you switch it back,
UTF-8 texts come out garbled. F2 - v leaves that setting alone: mc stays in UTF-8, and a cp866 text is one key
away.
Command line
All programs also work without mc: trdos list/catalog/copyout/copyin/rm, tape list/catalog/copyout/copyin/rm,
sdcard list/info/copyout, zx0 [-d], hrust [-o] [-d], hrum [-d], alasm, cp866 [-r]. Details and all options are in each plugin's README.md.
|