Usage

This section covers day to day usage of REMEMOTECH, and covers common hints and tips.

After power on

After applying power to the DE1, press and hold KEY1 and KEY0, press and release KEY3, and then you can let go (be careful not to press KEY2, as described in Setting up the Flash on the Setup page). This will reset the T80 (KEY3), and cause REBOOT to copy the ROM images from Flash to SRAM (KEY1) and to copy the initial RAM Disc image from Flash to SRAM (KEY0).

Now your REMEMOTECH is ready to go, and indeed, after doing the above, it will boot to the CP/M prompt.

From now on, to reset REMEMOTECH, you can just press KEY3, or both Windows keys either side of the space bar.

If both Shift keys are pressed during resetting, it doesn't boot CP/M and returns to BASIC instead.

Speed

SW9 to SW7 control the speed. SW9 up, SW8 down, SW7 up (101) corresponds to 4.166MHz (as 25MHz/(5+1)=4.166MHz), which is the closest setting to the 4MHz that a real Memotech runs at.

Typing

When typing, note that to type certain characters into the MTX keyboard, you must type different characters into the PS/2 keyboard. See the MTX Keyboard section of the Hardware page for further details. This isn't likely to bother you if you are using REMEMOTECH to play arcade style games.

SD Card

Each SD Card can have upto 8 8MB partitions. Each of these would contain a CP/M 2.2 filesystem.

The Flash image SD Card is different, and contains a raw 512KB image of the Flash (which contains ROM images and the initial RAM Disc image). You wouldn't use this initial Flash image SD Card as a disk, its only used as a part of the initial Setup process, see Setting up the Flash.

LEDR0 lights up when REMEMOTECH is reading or writing the SD Card. Then it flickers and turns off. Wait for it to turn off before removing or changing the SD Card.

Accessing SD Cards from CP/M

You'll need to use RECONFIG.COM to configure a drive (or drives) to access partitions on the SD Card. Type codes 18..1F correspond to 8MB partitions 0 to 7 on the card. eg: To access partitions 0, 1 and 2 :-

A>RECONFIG B:18,C:19,D:1A

Accessing SD Cards from MTX BASIC

You can switch to MTX BASIC, and use ROM 5 to gain access to disk via USER commands.

A>MTXL
ROM 5
USER DIR
USER RUN "TOADO.RUN"

Accessing SD Cards on Linux

On my Linux, my SD Card appears as /dev/sde (although this may be different for you), and so I can work directly with that, or I can use dd to copy between the device and a file containing a specific partition, or all 8 partitions.

To read all 8 partitions, or a specific partition, from the SD Card to file(s) :-

$ dd if=/dev/sde of=partitions.dat bs=8M        count=8
$ dd if=/dev/sde of=partition3.dat bs=8M skip=3 count=1

To copy back all 8 partitions, or just a specific partition, from file(s) back to the SD Card :-

$ dd if=partitions.dat of=/dev/sde bs=8M        count=8
$ dd if=partition3.dat of=/dev/sde bs=8M seek=3 count=1

You can use cpmtools (delivered or packaged for most modern Linux distros) to manipulate a partition on the SD Card directly, or a present in a file.

You need a cpmtools diskdefs file which includes definitions of the Memotech CP/M filesystem types. This is included and needs to be in the current directory, or in /usr/share/cpmtools/diskdefs.

This file has definitions for memotech-type18, memotech-type19 and similar formats. These are identical, except they have different starting offsets. So if you are working with a device with all 8 partitions or a file with all 8 partitions, you simply pick the right format to address the desired partition. But if you're working with a file containing just a single partition, you always use memotech-type18, as it has an offset of 0.

Some examples :-

$ cpmls -f memotech-type18 /dev/sde
$ cpmcp -f memotech-type18 /dev/sde 0:readme.txt /tmp
$ cpmcp -f memotech-type19 /dev/sde /tmp/readme.txt 0:

The 0: notation reflects the CP/M user number.

Alternatively, you can use cpmfuse, which is based on cpmtools and also uses the same diskdefs file.

With cpmfuse you can mount a partition from the SD Card or a file, and directly manipulate it using normal Linux commands :-

$ mkdir mnt
$ cpmfuse mnt -f memotech-type18 -i /dev/sde -v
$ ls mnt/*.TXT
mnt/README.TXT
$ fusermount -u mnt

Accessing SD Cards on Windows

If you must use Windows, then these ports of dd and cpmtools are useful. I put dd.exe in a directory on the PATH, and I unzip cpmtools so that it ends up in the C:\cpmtools directory.

The following command adds cpmtools to your PATH :-

C:\ak\tmp>\cpmtools\cpmtools

The diskdefs supplied with it doesn't understand Memotech disk formats. So save it away, and replace with the file supplied :-

C:\ak\tmp>copy \cpmtools\diskdefs \cpmtools\diskdefs.saved
    1 file(s) copied.

C:\ak\tmp>copy diskdefs \cpmtools\diskdefs
Overwrite \cpmtools\diskdefs? (Yes/No/All): Y
    1 file(s) copied.

Warning: Don't be tempted to edit the diskdefs file. The Windows version of the cpmtools package expects each line to end with just a line-feed character (as in UNIX), and most Windows text editors will terminate each line with carriage-return and line-feed (as in DOS and Windows). As a result, cpmtools will complain it doesn't recognise disk formats, even though they are in the diskdefs file. This is probably an unintentional consequence of how the code was built on Windows.

The first thing to do is to determine which block device is your SD Card. You don't want to accidentally write to your hard disk. Insert the SD Card and type :-

C:\ak\tmp>dd --filter=removable --list
rawwrite dd for windows version 0.5.
Written by John Newbigin <jn@it.swin.edu.au>
This program is covered by the GPL.  See copying.txt for details

NT Block Device Objects
\\?\Device\Harddisk2\Partition0
link to \\?\Device\Harddisk2\DR7
\\?\Device\Harddisk3\Partition0
link to \\?\Device\Harddisk3\DR8
\\?\Device\Harddisk4\Partition0
link to \\?\Device\Harddisk4\DR13
Removable media other than floppy. Block size = 512
size is 1015808000 bytes

The --filter=removable ensures the list returned only includes removable devices. You're looking for the one around the right size. In this case, as I'm using a 1GB SD Card, its clearly \\?\Device\Harddisk4\Partition0.

As with Linux, you can use dd to copy all 8 partitions, or a single partition, between the SD Card and file(s). Same syntax as above, except the device name is a Windows style name. However, when copying back, I strongly recommend you use the --filter=removable command line option, which double checks that you are targetting a removable device (ie: hopefully your SD Card, rather than your hard disk).

As with Linux, you can use cpmtools command line programs to list partition contents and copy files in or out. I have not been able to get the Windows build of cpmtools to work with windows block devices.

Alternatively, you can use cpmcbfs, which is based on cpmtools and also uses the same diskdefs file.

With cpmcbfs you can map a drive letter to an image of a CP/M filesystem, and directly manipulate it using normal Windows commands. Assuming you've already installed it :-

c:\cpmcbfs>cpmcbfs -f memotech-type18 -i sddisc.bin -v
Drive Z: should exist until you press Enter

In another Window :-

c:\>dir z:

If you run as Administrator, you can also enumerate block devices and map drive letters to them.

If the dd program doesn't work for you (it doesn't work on my Windows 10 system), you can consider using RAWIO instead.

Loading tapes

Prior to switching to MTX BASIC, you can use RETAPE to prime virtual cassette tapes with the contents of .MTX files. From CP/M :-

A>RETAPE QUAZZIA.MTX 1
A>RETAPE SNAPPO.MTX 2
A>RETAPE TIMEBAND.MTX 3
A>MTXL

Then the usual MTX BASIC LOAD command can be used to load it :-

LOAD "QUAZZIA"

Running RETAPE with no arguments lists bytes 1-15 of the virtual cassette in each slot, which is handy, as these are the names you will need to LOAD from MTX BASIC. These names do not necessarily agree with the names of the .MTX files they were loaded from.