This section covers day to day usage of REMEMOTECH, and covers common hints and tips.
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.
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.
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.
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.
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
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"
To access SD Card partitions from Linux,
use the cpmtools package, and
ensure /usr/share/cpmtools/diskdefs contains the Memotech
CP/M filesystem disk definitions from the
MFLOPPY package.
Although we RECONFIG drives as types 18..1F (depending on what partition
we want the drive to map to), all of these types are 8MB in size and have
the same disk configuration (ie: the same CP/M DPB).
Also cpmtools has no concept of "offset from the disk start".
The diskdefs file therefore only has a single type 18
definition, and in the examples that follow,
we always refer to -f memotech-type18.
To read partitions, I use commands like this :-
$ su # dd if=/dev/sde of=partition0.dat bs=8M skip=0 count=1 # dd if=/dev/sde of=partition1.dat bs=8M skip=1 count=1 # dd if=/dev/sde of=partition2.dat bs=8M skip=2 count=1 # ^D $ cpmls -f memotech-type18 partition0.dat $ cpmls -f memotech-type18 partition1.dat $ cpmls -f memotech-type18 partition2.dat
To write them, I use commands like this :-
$ mkfs.cpm -f memotech-type18 -b boot59.dat partition0.dat $ mkfs.cpm -f memotech-type18 -b boot54.dat partition1.dat $ mkfs.cpm -f memotech-type18 -b boot54.dat partition2.dat $ cpmcp -f memotech-type18 partition0.dat SOMEFILE.COM 0: $ cpmcp -f memotech-type18 partition1.dat SOMEMORE.COM 0: $ cpmcp -f memotech-type18 partition2.dat EVENMORE.COM 0: $ su # dd if=partition0.dat of=/dev/sde bs=8M seek=0 # dd if=partition1.dat of=/dev/sde bs=8M seek=1 # dd if=partition2.dat of=/dev/sde bs=8M seek=2 # ^D
Although the examples show multiple partitions, the whole Memotech software library probably fits within just one.
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 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.
To read one of the partitions (0-7), use the following command.
The partition number is the skip= value, and
partitions 0 to 7 correspond to CONFIG types 18 to 1F :-
C:\ak\tmp>dd if=\\?\Device\Harddisk4\Partition0 of=partition0.dat bs=8M skip=0 count=1 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 1+0 records in 1+0 records out
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 from my
MFLOPPY package :-
C:\ak\tmp>copy \cpmtools\diskdefs \cpmtools\diskdefs.saved
1 file(s) copied.
C:\ak\tmp>copy \ak\mtx\mfloppy\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 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.
I view this as a bug in cpmtools.
To list the partition content, copy in a new file, and list it again :-
C:\ak\tmp>cpmls -f memotech-type18 partition0.dat 0:a*.run 0: alpha.run astropac.run C:\ak\tmp>cpmcp -f memotech-type18 partition0.dat AGROVATA.RUN 0: C:\ak\tmp>cpmls -f memotech-type18 partition0.dat 0:a*.run 0: agrovata.run alpha.run astropac.run
To write the partition back onto the SD Card, use :-
C:\ak\tmp>dd --filter=removable if=partition0.dat of=\\?\Device\Harddisk4\Partition0 bs=8M seek=7 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 1+0 records in 1+0 records out
Pay careful attention to the fact I use
--filter=removable as a safety measure to protect against
writing to my harddisk, and the right of= value.
Also notice that the example has seek=7 meaning we
actually wrote to partition 7, and so would have to
RECONFIG E:1F and DIR E: to see the files.
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.