REMEMORIZER User’s Guide
By Andrew Key User’s Guide REMEMOrizer Version 1.0.0 (16/01/2013) Document Revision 1.
Credits Relating to the construction of REMEMOrizer, in no particular order... Geoff Boyd, for designing the Memotech hardware, and making it available to me. Also, for providing feedback on my earlier design. Brian Pritchard, author of the MTX Series Operators Manual. This is really quite a comprehensive technical document, especially towards the end. Not only does it reproduce tech sheets from the chip vendors, it also includes the full MTX circuit diagrams. Invaluable when implementing hardware.
TABLE OF CONTENTS 1. Introduction ...................................................................................................................................... 7 2. Design Overview ............................................................................................................................. 8 Hardware ............................................................................................................................................. 8 Memory ...............................
SD Card.............................................................................................................................................. 23 Sample SD Card ............................................................................................................................. 23 Accessing SD Cards from CP/M .................................................................................................... 24 Accessing SD Cards from MTX BASIC ................................................
1. INTRODUCTION REMEMOrizer is an add-on for the Memotech MTX series of home computers which were produced in the UK between 1983 and 1985. The range included the MTX500, MTX512, RS128 and MTX512 Series 2, these were all Z80 based machines, the major difference between them being the amount of installed Random Access Memory (RAM).
2. DESIGN OVERVIEW This section provides an overview of the REMEMOrizer design and functionality. As a User Guide, this document is not intended to give the reader detailed instruction on the assembly and programming of the REMEMORIZER hardware. It is assumed that the reader already has a working REMEMOrizer; if this is not the case, full instruction for building one can be found on the web site.
MEMORY REMEMOrizer provides : replacement for the 8KB OS ROM replacement for the 8KB BASIC ROM 8KB CP/M boot ROM 8KB SDX BASIC ROM 320KB of extra RAM 128KB virtual cassette tape space 32KB memory upgrade if attaching REMEMOrizer to an MTX500 64KB memory upgrade if attaching to MTX with no memory at all The final bullet point is relevant if the user has tried to upgrade an MTX500, has removed the RAM and now has a functional MTX with no memory installed.
The paged memory map structure of the MTX computers was designed to operate in two modes :1. ROM Based (RELCPM = 0) ROMs are mapped from 0 to 3FFFh. The 8K (2000h bytes) monitor ROM is always available in area 0 to 1FFFh and the paged ROMs of 8K (2000h bytes) each are mapped from 2000h to 3fffh as eight pages 0 to 7 set by R2,R1,R0 in the page port write only register. Up to 512K of RAM is mapped on 16 pages (0 to F) set up by P3,P2,P1 and P0 in the page port write only register.
Default MTX RAM Based Memory Map, RELCPM = 1 0x0000..0x3fff 0x4000..0x7fff 0x8000..0xbfff 0xc000..
REMEMO RIZER M EMORY M AP M ODIFICATIONS In these pictures, ROMs are shown with their names and are 8KB in size and RAM pages are assigned letters and are 16KB in size. RAM pages α to δ are the normal 64KB present in an MTX512. RAM pages a to t are extra pages, which are used as 320KB of RAM Disc. MTX+REMEMOrizer logical memory map, as seen in RELCPMH=0 mode :- R2,R1,R0 0x0000..0x1fff 0x2000..0x3fff 0x4000..0x7fff 0x8000..0xbfff 0xc000..
MTX+REMEMOrizer logical memory map, as seen in RELCPMH=1 mode :0x0000..0x3fff 0x4000..0x7fff 0x8000..0xbfff 0xc000..0xffff P3,P2,P1,P0 δ ** γ ** β *** 0 a b c 1 d e f 2 g h i 3 j k l 4 m n o 5 p q r 6 s t α *** 7 8 9 A B C D E any SRAM any SRAM F In RAM page 15, it is possible to address any 16KB page of SRAM. Which page is visible at 0x4000..0x7fff is controlled by page register 1 (port 0xd0), and which page is visible at 0x8000..
CASSETTE TAPE By default REMEMOrizer does not load from or save to cassette tape. Almost all of the Memotech library on cassette has been converted into .MTX file format. Instead, REMEMOrizer supports "virtual cassette tapes”. "Virtual cassette tapes" are implemented as hidden areas of SRAM, per the diagram above. There are two virtual tapes, 64KB each. Looking at the known library of Memotech cassettes, almost all of them will fit within 64KB.
80 COLUMN CARD REMEMOrizer implements a video card which is largely compatible with the original FDX 80 column card. It outputs in 8 colours to VGA, 640x480 at 60Hz but does not RGB or Composite video, like the FDX did. In addition to the normal 80x24 mode, it also supports 80x48 mode. To do this it has 8KB of memory, rather than 4KB. It supports accesses to ports 0x30, 0x31, 0x32, 0x33, 0x38 and 0x39. Inputting from port 0x30 does not cause the bell to ring.
SOFTWARE REMEMOrizer includes following software : OS ROM BASIC ROM CP/M Boot ROM SDX BASIC ROM Tape Support CP/M Utilities Sample SD card OS ROM The OS ROM sits in the fixed ROM page. If the ROMs jumper is set "high", then REMEMorizer supplies a patched version of the OS ROM which does not corrupt the RAM Disc and which has its cassette load/save routine patched to jump to the REMEMOrizer tape support. If the ROMs jumper is set "low", then the motherboard ROM is used.
CP/M BOOT ROM The CP/M boot ROM sits in ROM page 4. REMEMOrizer provides this ROM unless you press SW1. So to bypass booting to CP/M, press this switch whilst resetting the MTX. (Refer to Chapter 3, Installation, to identify the position of switch SW1.) It is different to the version found in an FDX or found in an SDX with CP/M support, and is pretty much the same as the REMEMOTECH version. The CP/M Boot ROM is broken into a number of modules. The AZMON module is the initial monitor.
SDX BASIC ROM The SDX BASIC ROM sits in ROM page 5. The SDX ROM in a real SDX provides USER commands to MTX BASIC, allowing the user to read and write files on a floppy disk. The SDX ROM in REMEMOrizer is pretty much the same as the REMEMOTECH version. Instead of floppy disc, it supports SD Card partition 0. Unlike the original SDX ROM, this version also supports 320KB RAM Disc. In other words, the drive configuration supported is B:18,F:52.
3.
PREPARATION DECIDING ON WHETHER TO USE THE REPLACEMENT ROMS Replacement of the existing ROMs is optional, however, the memory test routine in the OS ROM corrupts the RAM disc on start-up and the cassette tape routines access the real tape I/O. If you don't remove the existing ROMs containing OS and BASIC and use the replacements supplied with REMEMOrizer, your RAM Disc can be corrupted at boot time, and you won't have the ability to use virtual cassette tapes.
MTX500 JUMPER Earlier MTX500s had a memory decoder PAL which made pages of the 32KB of memory appear in more than one place in the memory map. You can replace the PAL with a GAL which ensures the pages appear only once. Later MTX500s had a PAL which did this, and its entirely safe to make this change whether or not you plan to use REMEMOrizer. But REMEMOrizer can only work with MTX500s that only present the pages once.
RS232 The RS232 card provides two functions. It provides RS232 ports, and it acts as a bridge to an FDX box (even if you don't have one connected). As a consequence, if the MTX tries to read ROM 4 or ROM 5, or input from ports 20H or higher, or if it detects DMA from the FDX, it will drive the MTX data bus. This is clearly incompatible with an SDX, and its incompatible with REMEMOrizer too. An SDX and REMEMOrizer have their own ROMs and ports at these locations.
4. OPERATION POWER-ON The default behaviour of REMEMOrizer is to boot up in CP/M mode, however, upon power on, the FPGA on the GODIL on the REMEMOrizer takes two seconds to initialise, and in that time, the MTX will not see any of the ROM images it provides. As a result, the MTX will almost certainly not boot CP/M. Two red LEDs are lit during initialisation, and when complete, then they turn off and a green LED lights instead.
The first image has various games in .COM format. There are also a few games in .RUN file format, most of which can be run using the RUN.COM program. There are also some SDX BASIC .BAS files. It also has lots of .MTX files. The second image has Icicle Works, which needs a 54K CP/M system to work. I've never got to the bottom of why this is, and it is tricky to debug. Interrupt the CP/M bootstrap by holding down Then type BC19 to boot from the second partition o Then run DT.
# 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.
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 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
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.
TAPE OPERATION TAPE MODE SELECTION REMEMOrizer allows the user to switch between the Virtual Tape mode and Physical Tape mode using SW2 on the GODIL board. If you press SW2, then a little red LED lights up to indicate that virtual tape support is disabled. In this mode, real cassette load and saving occurs. This can happen because the code at the end of SDX ROM 5 also includes a copy of the code normally present in the OS ROM. TAPE BREAKER Tape support has a feature called tape-breaker.
5. CP/M UTILITIES RECONFIG.COM RECONFIG.COM is a version of CONFIG.COM, but enhanced for REMEMOTECH and REMEMOrizer. It gives give better error messages and has been enhanced to support extra drive types. It supports type 18..1F drives, which are 8MB SD Card partitions. Do not configure two drives with the same 1x type code, as this can cause data corruption. It also supports type 52 drives, which are 320KB RAM Discs.
REZTAPE.COM REZTAPE.COM is a program for managing the virtual cassette tapes feature in REMEMOrizer. It is much like the RETAPE.COM program used to do the same thing on REMEMOTECH. There is one read/write 64KB SRAM slot (slot number 0) and a read-only 64KB SRAM slot (slot number 1). The following commands can be used :- REZTAPE List bytes 1-15 of each virtual cassette tape in each slot. ie: the name to LOAD from MTX BASIC. REZTAPE SLOT Delete the contents of the indicated slot. REZTAPE INPUT.
For example, prior to switching to MTX BASIC :A>REZTAPE QUAZZIA.MTX 0 A>REZTAPE SNAPPO.MTX 1 A>MTXL Then the usual MTX BASIC LOAD command can be used to load it :LOAD "QUAZZIA" REZPATCH.COM REZPATCH.COM is a program which can patch the ROM images that REMEMOrizer provides. ie: The fixed OS ROM, BASIC ROM 0, CP/M boot ROM 4 and SDX ROM 5. Its usage is like this :A>REZPATCH iobyte address {byte} The change lasts until power-off, or next change.
6. INCOMPATIBILITIES There are a small number of incompatibilities between REMEMOrizer and real Memotech hardware. CP/M programs which directly do low level disk configuration or disk I/O, directly to the hardware itself, such as FORMAT.COM, FRMSDX.COM, SIDFMT.COM, RCHECK.COM and FDXB.COM. Programs which do direct access to the cassette tape ports, will never be able to use virtual cassette tape, such as certain games loaders. They will of course attempt to use real cassette tape.
INDEX 24 line ............................................................28 OS ROM ..................... 9, 14, 16, 18, 20, 21, 31 48 line ............................................................28 page port ................................................... 9, 10 80 column card ................................7, 8, 15, 17 Power-on ....................................................... 23 Accessing SD Cards from CP/M ...................24 RAM ...................................................