Andy Key's MEMU is an extremely effective, feature rich, and flexible emulator for the Memotech MTX series of computers, without which none of the following would have been possible. One of the consequences of MEMU's flexability is that running the program requires supplying a number of command line switches to specify the details of the emulation required. A number of potential users find this offputting, this was reiterated at the last Memofest meetup. There are a number of possible solutions to this issue:
When I first started playing with MEMU one of my main objectives was to turn a Raspberry Pi computer into a "Bare Metal" emulation of the MTX. This means no operating system and therefore no command line from which to specify the required switches. Therefore I had to provide a system for setting the configuration from within MEMU. Again I went for the option of providing a few "typical" configurations rather than supporting all of the options that MEMU can provide. I therefore added the option of a configuration dialog as shown:
While originally developed for the "bare metal" version, the dialg can also be included in Windows or Linux versions of MEMU, which may be of interest for the reasons given above.
My version of MEMU has also acquired a few other features which have not yet been included in Andy's version:
Conversely, my version can be a year (or more) behind the latest features added to Andy's version.
For convenience I have created a number of distributions:
This contains two 32-bit versions of MEMU:
To install, simply unzip the distribution into a suitable location, perhaps "Program Files (x86)". It may be worth creating a desktop shortcut, pointing to "memu-cfg.exe", with the working folder set to the folder containing the program.
This distribution contains four versions of MEMU. Two are for use with X-Window displays:
The other two are for use from the console, without X-Window, and display full screen. Use <Ctrl> plus the function keys to switch between VDP display and 80-column display:
To install, unzip the file into s suitable location. Optionally copy the contents of the "memu" folder into a location on the path, such as "/usr/local/bin".
This distribution contains the same four executables as the Linux distribution, but compiled for 32-bit ARM. It also contains a fifth executable:
This distribution contains the bare metal version of MEMU (with configuration dialog), compiled for different versions of the Raspberry Pi. At present the following are NOT supported:
This distribution contains the source code for all the above versions. There are build scripts in the top level folder for building all versions. The building has to be performed on the appropriate hardware (Windows, x86 Linux or Raspberry Pi) for the distribution being built. Cross-compilation is not currently supported.
To save space, none of the ROMs, disk or tape images are in this distribution, you need at least one runtime distribution. The runtime should be installed in a folder "memu" under the top level folder.
When first started, the configuration dialog versions of MEMU start in whichever emulation mode was last saved in the configuration file. To display the configuration dialog, use one of the following keys:
Different operating systems trap different key strokes for their own use, so try each of these to find one that works. Once in the dialog, use the arrow keys to navigate, and either the space bar or <Ener> key to select an item. To exit the dialog and return to the emulation select one of the options from the bottom line of the dialog. Note that "Exit" is exit the program not exit the dialog.
While the emulation is running, the following key strokes are also processed:
Within the configuration dialog, if "Audio Tapes" is turned off ("No") then only binary (*.mtx) tape files can be selected. In this mode, tape files will load very quickly. If "Audio Tapes" is turned on ("Yes"), then either binary (*.mtx) or audio (*.wav) tape files may be selected. However all files will be slow to load (realistic speed), and you will hear an approximation of the tape loading sounds. Binary files are effectivly converted back to audio in order to load them. Audio files in other formats such as *.mp3 must be converted to *.wav before they can be used.
The supplied disk images are in a number of sizes:
The image below shows a typical configuration for SDX emulation, with a tape file ready for loading with the command LOAD "", and a disk of games available for USER LOAD "game". Any user programs can be saved with USER SAVE "name"
A typical configuration for CP/M emulation, with two floppy disks, is shown below.
For the CFX-II it is necessary to open a sub-dialog to select the files to form partitions on the emulated Compact Flash cards. To open this dialog, select the Compact Flash card on the main dialog, and then use <Space> or <Enter> to open the sub-dialog.
Hextrain is Andy Key's incredible MTX game with 3D graphics. To run this, set the configuration as shown and restart. Once CP/M has started type the command "hextrain" (renamed from "htsi"), and then switch to the VDP window or display.
Fuzix is a Unix like operating system for Z80 machines. It has been ported to the MTX with CFX-II storage add-on, and can be run in MEMU. To run it, set the configuration as shown:
Restart, then once the CFX-2 startup page is showing, reboot using the two <Alt> keys with the "C" key down, as if rebooting to CP/M. Fuzix will begin to boot. When prompted for "bootdev:", enter "hda1" (without the quotes). Enter the date and time when requested. Finally login as "root". When finished using Fuzix, enter the command "shutdown" to cleanly unmount the emulated drives and halt the system. Otherwise a lengthy check of drive integrity will be required next time Fuzix is started.
Most of the command line usage is as per Andy Key's Documentation which is repeated here.
|-iobyte iobyte||specify IOBYTE (initially 0x00)|
|-subpage subpage||set ROM subpage (initially 0)|
|-addr addr||set the address (initially 0x0000)|
|-mem file||load file at address|
|-mem-blocks n||number of 16KB memory blocks (default 4)|
|-mem-mtx500||equivelent to -mem-blocks 2|
|-n-subpages rom n||set number of subpages|
|-romX file||load ROM X from file|
|-rompairX file||load ROM X and X+1 from file|
|-vid-win||emulate VDP and TV using a graphical window|
|-vid-win-big,-v||make window twice as large (realistic size)|
|-vid-win-hw-palette||use an alternate palette|
|-vid-ntsc||refresh at 60Hz (instead of 50Hz)|
|-snd-portaudio,-s||emulate sound chip using portaudio|
|-snd-latency value||instruct portaudio to use a given latency|
|-mon-win||emulate 80 column card using a graphical window|
|-mon-win-big,-mw||make window twice as high (realistic aspect ratio)|
|-mon-win-mono||green screen monochrome|
|-mon-th,-mt||emulate 80 column card using full screen text mode|
|-mon-console,-mc||emulate 80 column card using console only|
|-mon-console-nokey||keyboard status shows no keys pressed|
|-mon-no-ignore-init||don't ignore writes to non-emulated registers|
|-kbd-remap||remaps MTX keyboard (despite shift state)|
|-kbd-country n||sets the country code switches to n (default 0)|
|-kbd-type string||auto type keys in this string|
|-kbd-type-file fn||auto type keys in this file|
|-joy,-j||enable joystick support|
|-joy-buttons string||define left,right,up,down and fire buttons|
|-joy-central n||percentage off-centre to press direction|
|-serial1-in fn||serial 1 input from file/pipe|
|-serial1-out fn||serial 1 output to file/pipe|
|-serial2-in fn||serial 2 input from file/pipe|
|-serial2-out fn||serial 2 output to file/pipe|
|-sdx-tracks n||specify tracks of first drive (default 80)|
|-sdx-mfloppy file||specify .mfloppy file in SDX first drive|
|-sdx-tracks2 n||specify tracks of second drive (default 80)|
|-sdx-mfloppy2 file||specify .mfloppy file in SDX second drive|
|-sidisc-huge||enable Silicon Disc huge mode|
|-sidisc-no-save||don't save Silicon Disc content on termination|
|-sidisc-file n file||specify Silicon Disc content for a drive|
|-prn-file file||specify file to receive printer output|
|-tape-dir path||.mtx files are in this directory|
|-tape-overwrite||SAVE can overwrite an existing file|
|-tape-disable||don't patch INOUT to LOAD/SAVE/VERIFY .mtx files|
|-tap-file fn||specify ZX tape file (default memu.tap)|
|-sna-file fn||specify ZX snapshot file (default memu.sna)|
|-cpm||emulate CP/M BDOS|
|-cpm-drive-a path||where CP/M BDOS finds A: files (default: .)|
|-cpm-invert-case||invert between CP/M and host filenames|
|-cpm-tail tail||construct CP/M command tail|
|-cpm-open-hack||don't insist on EX,S1,S2,RC being 0|
|-sdx||SDX support in ROM 5 (or -sdx3 for ROM 3)|
|-fdxb||FDXB CP/M support|
|-speed hz||set CPU speed (default is 4000000, ie: 4MHz)|
|-fast||don't limit speed, run as fast as possible|
|file.com tail ...||-cpm -iobyte 0x80 -addr 0x0100 -mem file.com|
|file.run||-iobyte 0x00 -addr 0xAAAA (from header)|
|file.mtx||subsequent LOAD/SAVE/VERIFY "" will use this file|
The additional options for my version are:
|-vga||emulate Propeller VGA display|
|-serial1-dev dev||serial 1 in/out from device|
|-serial2-dev dev||serial 2 in/out from device|
|-cfx2 rom_file||enable CFX-II emulation and specify ROM image file|
|-cf-image c:p file||specify data image for partition (p) on card (c)|
|-cassette-in||hardware emulation - MTX or WAV file to load|
|-cassette-out||hardware emulation - MTX or WAV file to save|
|-mon-win-title||set title for 80 column window|
|-mon-win-display||set display to use for 80 column window|
|-vid-win-title||set title for VDP window|
|-vid-win-display||set display to use for VDP window|
|-help||displays list of options and exits|
The configuration dialog version also uses the same swiches, storeing them in the configuration file, but they may also be given on the command line. There are a few additional switches listed below to support the operation of the dialog.
|-config-file file||read configuration options from file|
|-no-ignore-faults||turn off permissive options enabled by -config-file|
|-rom-enable rom_bits||bit flags to enable (1) or disable (0) a rom|
|-no-cfx2 rom_file||disable CFX-II emulation but specify ROM image file|
|-mon-size||sets 80 col size (but does not enable it)|
|-disk-dir||directory containg disk images|
|-tape-dir||directory containg tape files|
And finally, two further switches specific to the Raspberry Pi specific versions:
|-hw-config file||specifies the GPIO interface to MEMU, documented here|
|-gpu-mode mode||controls the use of the GPU for screen upscaling (memu-pi only):