The usual way to run a
.COM file is to run it from CP/M.
However, there are
.COM files (such as games) that can be
run from CP/M, but don't actually need any of the CP/M functionality.
These can be made into ROM images using this program.
The program works by making a ROM file which is a loader,
followed by the
.COM file data.
When the ROM loader is invoked, it copies itself to high memory,
and then copies the rest of the ROM content into RAM,
and jumps to it.
The loader is small, and for small programs,
the loader and the
.COM file data may fit into 8KB.
Larger programs may require > 8KB of ROM, and this is fine also,
providing you have a ROM card that supports subpages.
Just place successive 8KB chunks in successive subpages.
The loader will fetch data from each subpage in turn.
There is also a dual-ROM variant which distributes 8KB pages of
data over two ROM slots.
Most of the original internal MTX ROM cards had space for 4 8KB EPROMs.
So using the dual-ROM loader can allow you to support
beyond 32KB (minus the loader overhead), upto the largest possible in CP/M.
First the loader loads
from ROM slot N subpage 0,
then ROM slot N+1 subpage 0,
then ROM slot N subpage 1,
then ROM slot N+1, subpage 1,
and so on.
Care is needed to place each 8KB from the output file into the right
8KB EPROM on the right ROM card.
There are loader variants that have the 8,7,6,5,4,3,2,1 autostart
These have names ending with 'A'.
If these are used, when the MTX is reset, it will automatically run the ROM
without the user having to type
Imagine we want to turn Quasar (5KB) into a single 8KB EPROM, which we'll put in ROM slot 7, and we want it to autostart when the MTX is reset :-
$ ./com2rom LOADER1A.BIN QUASAR.COM QUASAR.ROM $ memu -rom7 QUASAR.ROM -s -v
Or, to spread Mission Alphatron (10KB) over two subpages of ROM slot 2, and because this needs the larger ROM card usually installed inside the MTX, we can't quickly remove it, so we won't have it autostart :-
$ ./com2rom LOADER1.BIN ALPHA.COM ALPHA.ROM $ memu -rom2 ALPHA.ROM -s -v ROM 2
Or, to spread Scrolling Maze Game (36KB) over the first few subpages of ROM slots 2 and 3 :-
$ ./com2rom LOADER2.BIN SMG.COM SMG.ROM $ memu -rompair2 SMG.ROM -s -v ROM 2
Some of these examples assume the use of a recent MEMU that supports
-romXoption to upload to multiple subpages
-rompair2option to upload to multiple subpages over two ROM slots
COM2ROM can be downloaded from
Copying of this program is encouraged, as it is fully public domain. Even the source code is included in the package. It was created on the authors time and equipment. Caveat Emptor.
The author of COM2ROM and this documentation is Andy Key