Hardware

There are sections below on ports, memory, the SDX, floppy drives and video output.

Memotech hardware components, and what they include :-

Picture Description
MTX external PSU. Circuit diagram found here. Its thought to be 22.5 VAC, 1A tapped at 18V and 9V.
MTX motherboard. It had Z80A CPU (at 4MHz), 24KB of ROM, 32KB or 64KB (or 256KB) of RAM, VDP chip (TMS 9918 in US, TMS 9929A in Europe) with 16KB of video RAM, a sound chip (TI SN76489A), and a centronics printer port. The ROM could be 8KB+8KB+8KB or 16KB+8KB ROM. The RAM would be 32KB, 64KB or 256KB (with yellow wire modifications to the board).
MTX memory upgrade. Had 32KB or 512KB of extra RAM. The 32KB card would typically upgrade an MTX500 to MTX512. The 512KB card would add memory which was typically used as a type 51 512KB RAM Disc. Sat inside the MTX case, on the right.
MTX ROM card, with 4 slots for "2764" 8KB EPROMs. Had connector on both sides, but typically connected to the right hand side of the MTX motherboard. Someone else has reported connecting ROM cards to the left. Writing a byte to 0x0000-0x1fff when in RELCPMH=0 mode selects the sub-page (0x00-0x03), which selects which of the 4 8KB ROM appears in ROM page 2. I have the PALASM for the PAL used on this card. I also beleive there was a version of this card that used 32KB EPROMs (thus supporting 16 sub-pages), which will have been used in a diskless Videowall Controller. Furthermore, I have reason to believe there was at least one version of this card hacked to include 32KB SRAM chips instead, which was used to test EPROM images prior to use.
MTX serial card. Connected to the right hand side of the MTX motherboard. It had Z80 DART and two RS232 serial ports. Appears to be the MTX serial and FDX interface card, but physically reduced in size with a hack-saw.
MTX serial and FDX interface card. As above, but also had buffers for connecting to the FDX bus interface card. With no DART populated, this is only an FDX interface card. You can add the DART if you also program a PAL14L4 or GAL16V8 using the PALASM at the back of the Phoenix manual. It also seems likely this card will have been shipped with DART but no buffers, purely as a full sized MTX serial card.
FDX bus interface card, connecting MTX to FDX, with CP/M boot ROM. The ROM provided by this board appears in ROM slot 4. With a small yellow wire modification, this board could probably be made to properly support ROM slot 4 and slot 5, which would be good because it would allow MTX BASIC to support USER commands to access the disk (at the moment it seems to currently have a bug). Note that the name on the board is MTX500-SM1 BUS INTERFACE, which is misleading because it would typically connect a MTX512 (not a MTX500) to a FDX (not an SM1). Picture from Søren and Claus Bækkel.
FDX 80 column card, producing output for a monitor, rather than a TV. Picture from Søren and Claus Bækkel.
Combined MTX serial card and 80 column card. Pictures courtesy of Bill Brendling.
FDX disc controller card. Known as SJM's (=Steve Marchant) floppy controller. It had a WD1791 disk controller chip supporting 4 disk drives. Supported 5.25" and 8" disk drives. Reported to not be able to drive 3.5" disk drives (although I think I did once have a 3.5" drive hooked up to my FDX). Picture from Søren and Claus Bækkel.
FDX Silicon disc. Various memory sizes were available. This was basically memory accessible through I/O ports, which appeared as discs to CP/M. Expensive, but fast. Picture from Søren and Claus Bækkel.
SDX floppy disc controller card, earlier version. Known as TB's (=Tony Brewer?) floppy controller. Had a relatively thin circuit board. It had a WD disk controller chip supporting 2 disk drives. Connected to the left hand side of the MTX motherboard. Connected to one or two external drives, which were typically type 03 but could be type 07, and were typically 5.25" but could be 3.5". Had an 8KB SDX ROM, in ROM slot 3, which was either a CP/M boot ROM, or the SDX ROM providing USER commands to MTX BASIC. But with the addition of a single yellow wire and a slightly modified GAL in IC11, a 16KB ROM can be supported, in ROM slots 4 and 5 (much like the later SDX floppy controller supported), allowing both CP/M boot ROM and SDX ROM at the same time.
SDX floppy disc controller card, later version. Also known as TB's (=Tony Brewer?) floppy controller. Had a wider circuit board (as wide as a 3.5" disk drive). Had a single 3.5" type 07 disk. Only seems to be capable of driving a single disk (per hardware investigation below). Had a 16KB ROM containing a 8KB CP/M boot ROM (80 column or SCPM variant) in ROM slot 4, and the 8KB SDX ROM (supposedly supporting 2x type 07 drives, but with a bug), in ROM slot 5. Had sockets for 512KB of RAM, often populated, which was typically used as a 512KB type 51 RAM Disc.
An EPROM programmer, developed back in the day by Bill Brendling.
A PIC programmer, developed back in the day by Bill Brendling. Circuit board designed using software written by Bill, which ran on a FDX.
A Raspberry Pi, in a posh case, running MEMU, developed recently by Bill Brendling. Bill has patched MEMU so that windowing uses the frame buffer and joysticks connected via GPIO can be used.
MTX Memory Card is a memory expansion developed in 2012. Can be used to add memory to MTXs with varying amounts of memory, which can support various sizes of SRAM chip, and can make varying amounts of that SRAM available to the MTX.
REMEMOrizer is an add-on based upon technology from REMEMOTECH, developed in 2012. It provides SD Card support, 320KB of extra memory, virtual tape support and 80 column card, all in one. In addition, it can provide the missing memory to upgrade MTX500s (or even MTXs with no RAM at all) to 64KB.

Ports

In the original design, ports below 20 hex can be provided by the Motherboard and internal/external add-ons. 20 and above were to be provided from within the FDX. This is why the FDX FDC and Sidisc ports are above 20. The RS232/interface card has logic (controlled by a PAL) to drive the data bus from the FDX to the motherboard, when port 20 or over is accessed. This PAL has to be changed if an SDX or REMEMOrizer is attached to an MTX with an RS232/interface card (and clearly the FDX cannot be connected in such a configuration).

The following table documents the original ports assigned, and what ports are known to have been used by various add-ons since then. It also gives a few indications of possible future use.

If you're thinking of designing an add-on, let me know. We can hopefully avoid collisions and keep this table up to date. Whether your add-on sits on the MTX or FDX side might influence whether you pick a port above or below 20 hex. If you're just looking for a few ports, that shouldn't be hard, but if you want lots, then depending on how many you need, maybe pick a value for A7-A0 and then further decode A15-A8?

Motherboard
00 -OIOBYTE
00 I-Printer strobe
01 IOVDP data
02 -OVDP control
02 I-VDP status
03 -OCassette
03 I-Sound strobe, motherboard doesn't drive bus, REMEMOTECH and REMEMOrizer drive the value 03
04 IOPrinter
05 -OKeyboard drive
05 I-Keyboard sense
06 I-Keyboard sense
06 -OSound
07 IOPIO
08 IOCTC channel 0
09 IOCTC channel 1
0A IOCTC channel 2
0B IOCTC channel 3
RS232
0C IODART
0D IODART
0E IODART
0F IODART
SDX FDC
10 -OFDC command
10 I-FDC status
11 IOFDC track
12 IOFDC sector
13 IOFDC data
14 IOControl/status port
Cassette controller?
1F -OCassette start/stop
80 column
30 I-Ring the bell (not implemented on REMEMOTECH/REMEMOrizer)
30 -OAddress low
31 -OAddress high
32 IOCharacter data
33 IOAttribute data
38 IOCRTC register select
39 IOCRTC register data
FDX FDC
40 -OFDC command
40 I-FDC status
41 IOFDC track
42 IOFDC sector
43 IOFDC data
44 IOFDC control/status port
45 IOFDC drive change
46 IOFDC DMA low
47 IOFDC DMA high
Silicon Disc
50 IOF: sector address low
51 IOF: sector address high
53 IOF: data
54 IOG: sector address low
55 IOG: sector address high
57 IOG: data
58 IOH: sector address low
59 IOH: sector address high
5B IOH: data
5C IOI: sector address low
5D IOI: sector address high
5F IOI: data
REMEMOrizer Accelerator extras
A0 IOMantissa bits -24 to -31
A1 IOMantissa bits -16 to -23
A2 IOMantissa bits -8 to -15
A3 IOSign bit and mantissa bits -1 to -7
A4 IOExponent
A5 -OCommand
A5 I-Result
REMEMOrizer Speculator extras
B0 I-REMEMOrizer Speculator sound transition counter (low)
B1 I-REMEMOrizer Speculator sound transition counter (high)
B2 I-Video active indicator
B2 -ORow type and number select
B3 I-Run size
B3 -OClear leftmost cell in run
B4 I-CPU address low
B5 I-CPU address high
B6 I-VDP address low
B7 I-VDP address high
REMEMOTECH specific bells and whistles
C0 IO7 segment digits 1 and 0
C1 IO7 segment digits 3 and 2
C2-C3 IOSpace left for further 7 segment displays in future
C4 IOGreen LEDs, LEDG7..LEDG0
C5 I-Keys, KEY2..KEY0 (KEY3=reset)
C6 IOSpace left for future features
C7 I-Extra keys, mainly numeric pad
C8-CF IOSpace left for future features
REMEMOTECH and REMEMOrizer address mapping
D0 IOPage register 1
D1 IOPage register 2
D2 IOREMEMOrizer page register 3
D3 IOREMEMOrizer page register 4, controls ROM 2 sub-page
REMEMOTECH and REMEMOrizer SD Card
D4 IOSD control/status
D5 IOSpace left for future SD card enhancements
D6 IOSD data
D7 I-SD data, with implied send FF
REMEMOTECH and REMEMOrizer misc stuff
D8 I-Clock divider (REMEMOrizer hard codes result of 05)
D9 IOREMEMOrizer specific flags
DA IOMore REMEMOrizer specific flags
DB-DF IOSpace left for future features
Inaki Castillo
E0-E3 IOKelly Materialiser, 3 ports set vital statistics (eg: 36,24,36) and one sets desired age (eg: 21)
Speculator (original only)
x11xxxxxIOPartial address decode, covers 7E,7F,FB,FE,FF, and maybe more?
xxx11111IOPartial address decode, covers 1F, and maybe more?
Speculator (original, REMEMOrizer, MEMU)
1F IOKempston Joystick
7E I-Read emulated Spectrum border
7E -OWrite emulated Spectrum keyboard, first low bit in A15-A8 selects row
7F IOFuller joystick (00 written only, no button pressed)
FB IOZX Printer (40 written only, printer not connected)
FE -OWrite emulated Spectrum border
FE I-Read emulated Spectrum keyboard, first low bit in A15-A8 selects row
FF -ONMI write register

Memory investigation

The memory decoder PAL, as described by the PALASM on p249 and p250 of the Phoenix MTX Operators Manual

ROMs

4000-04 motherboards have a 16KB ROM and an 8KB ROM. 4000-05 motherboards have 3 x 8KB ROMs.

The PALASM for a system with 16KB + 8KB ROM should include this :-

/CEA  = /RELCPMH                   * /A15 * /A14 * /A13 * /MREQL * /RDL
      + /RELCPMH * /R2 * /R1 * /R0 * /A15 * /A14 *  A13 * /MREQL * /RDL
/CE64 = /RELCPMH * /R2 * /R1 *  R0 * /A15 * /A14 *  A13 * /MREQL * /RDL
      + /RELCPMH *  R2 *  R1 *  R0 * /A15 * /A14 *  A13 * /MREQL * /RDL

CEA recognises the fixed ROM and ROM page 0.

CE64 recognises ROM pages 1 and 7. CE64 is further decoded outside the PAL.

The PALASM for a system with 3 x 8KB ROM should include this :-

/CEA  = /RELCPMH                   * /A15 * /A14 * /A13 * /MREQL * /RDL
/CE64 = /RELCPMH * /R2 * /R1       * /A15 * /A14 *  A13 * /MREQL * /RDL
      + /RELCPMH *  R2 *  R1 *  R0 * /A15 * /A14 *  A13 * /MREQL * /RDL 

CEA recognises the fixed ROM.

CE64 recognises ROM pages 0, 1 or 7. CE64 is further decoded outside the PAL to distinguish between ROM pages 0 and 1, and ROM page 7, known as the "games ROM".

Claus Bækkel has a Danish MTX which a little 1KB ROM piggy-backed on to one of the other ROMs. This ROM is enabled by ROM 7, and contains code which redefines certain characters in the pattern generator table, so that they are now certain danish characters. In addition, it intercepts the keyboard routine and changes the behavior of the CTRL key with these characters.

DRAMs

There is a hard-wired link just above the PAL at position A6, known as LK7, and this signal referred to in the PALASM as I2H4L. In the MTX512 I believe this would be wired to 4, ie: low. On my MTX500 it is wired to 2, ie: high. I think this link is probably a hangover from originally attempting to have one PAL which would handle MTX500 (2x16KB) and MTX512 (4x16KB). Although the original PALASM references I2H4L, I ignore it here.

DRAMs on MTX500

An MTX500 has 8 x 4132 DRAM chips (or similar, eg: my MTX500 uses M3732L-20RS). The 6-pin LK6 link block at position B7 on the motherboard controls which address lines are passed to the DRAMs and how, and certain combinations allow an MTX500 motherboard to use half-working 4164 chips instead.

The PALASM for a system with 32KB DRAM should include this :-

/NA15 =                                    /A15
/RAM  =                                     A15 *  A14 * /MREQL
      +            /P3 * /P2 * /P1 * /P0 *  A15 * /A14 * /MREQL

There are bugs in the MTX500 PALASM. DRAM appears in places where it shouldn't. Where DRAM inappropriately appears depends on the number of ROMs. Before adding additional memory, memory decoder PALs programmed differently to the Phoenix Manual are needed.

DRAMs on MTX512

An MTX512 has 8 x 4164 DRAM chips (or similar). Some systems labelled MTX512 are actually an MTX500 (ie: 32KB on the motherboard) with a memory expansion card with an additional 32KB of memory.

The PALASM for a system with 64KB DRAM should include this :-

/NA15 =                                    /A15
      + /RELCPMH * /P3 * /P2 * /P1 *  P0 *  A15 * /A14
/RAM  =                                     A15 *  A14 * /MREQL
      +  RELCPMH * /P3 * /P2 * /P1 * /P0               * /MREQL
      + /RELCPMH * /P3 * /P2 * /P1 * /P0 * /A15 *  A14 * /MREQL
      + /RELCPMH * /P3 * /P2 * /P1       *  A15 * /A14 * /MREQL

The NA15 equation remaps accesses in RELCPMH=0 mode, to RAM Page 1, Z80 addresses 0x8000-0xbfff, to DRAM addresses 0x0000-0x3fff. Put another way, this is how the δ page moves between RELCPMH modes.

DRAMs on MTX512 S2

The MTX512 S2 is basically just a yellow wire modification of the original MTX motherboard, allowing the use of larger DRAMs. This upgrade was not (and can not be) 100% compatible with previous MTXs - the δ memory page doesn't move correcly between RELCPMH modes.

An MTX512 S2 has 8 x 4256 DRAM chips. At first glance, it might appear this would have 256KB of RAM. However, from BASIC (ie: in RELCPMH=0) mode, there is only 64KB visible, and from CP/M (RELCPMH=1) mode, 208KB of RAM is visible.

The /CAS signal into the DRAMs is altered. The A7 input to the DRAMs is normally multiplexed from A14 and NA15 (where N15 is the new A15 computed by the address decoder PAL). However, this is now simply multiplexed from A14 and A15.

What was previously the NA15 output of the PAL now effectively provides A16 and A17 to the DRAMs. Which to provide depends on the RAS/CAS logic, so the the I2H4L input to the PAL is repurposed and feeds the MPX signal from the RAS/CAS logic.

The PALASM for a system with 256KB DRAM should include this :-

/MA8  = P0 * MPX
      +                                     A15 *  A14
/RAM  =                                     A15 *  A14 * /MREQL
      +  RELCPMH * /P3 * /P2                           * /MREQL
      + /RELCPMH * /P3 * /P2 * /P1 * /P0 * /A15 *  A14 * /MREQL
      + /RELCPMH * /P3 * /P2 * /P1       *  A15 * /A14 * /MREQL

MPX is the repurposed I2H4L pin, and MA8 is the repurposed NA15 pin.

Upgrading MTX500 to MTX512

I now recommend the use of an MTX Memory Card with an appropriate GAL and SRAM memory chip in it. With this approach there is no danger of damaging the MTX motherboard whilst desoldering the DRAM chips (as I did to mine). Alternatively, if you're confident of your skill with a soldering iron and desoldering pump, read on...

This datasheet has a picture of PAL pin-outs, including the PAL14L4. However, you'll find it hard to find software you can easily install and use. I've tried PALASM 2.3d, PALASM 4.15, under DOSEmu, DOSBox, and FreeDOS on real hardware. You might also find it hard to find a PAL programmer.

GAL16V8s can be programmed with the same equations as PAL14L4s (and many other 20 pin PAL types), and are pin compatible.

I've found it best to use the Opal junior 2.1 tools to compile the equations to a JEDEC file, and TopWin Ver 6.22 and a TOP853 programmer to program a GAL16V8 instead.

Recommended procedure (not successfully performed as yet) :-

  1. Check system works as an MTX500
  2. Very carefully desolder and remove 8 x 4132
  3. Solder in 8 x 16 pin DIL sockets
  4. Insert 8 x 4164 (or other pin compatible 64KBit DRAMs)
  5. Check system still works as an MTX500
  6. Blow new PAL14L4 or GAL16V8
  7. Replace existing PAL14L4
  8. In the 6-pin link-block snip link between C and L, and make a new link between C and 4
  9. Check system works as MTX512. eg: PRINT PEEK(64122) should now return 1, rather than 0.

Note, the above procedure does not suggest breaking and remaking the I2H4L link, close to the PAL chip at A6 on the motherboard. Instead, I suggest you use equations for 64KB RAM that simply do not reference the I2H4L input. One less thing to mess up soldering.

Here are the equations to use with GAL16V8s :-

 32KB RAM64KB RAM64KB/208KB RAM
2 ROMs2_322_642_208
3 ROMs3_323_64 

If you were to screw-up your upgrade, or the DRAMs on the motherboard are faulty, these can be used to disable them :-

 0KB RAM
2 ROMs2_0
3 ROMs3_0

You'd then need a memory card of some kind to operate the MTX.

SDX hardware investigation

My one-off special SDX has he newer wider circuit board, with the 512KB of DRAM and 16KB ROM (slots 4 and 5). It's connected to a single 3.5" NEC FD1036A floppy drive.

My older SDX has the older thinner circuit board, without any extra DRAM. Originally it had a single 8KB ROM (slot 3) but I upgraded it to have 16KB ROM (slots 4 and 5). The CP/M ROM in slot 4 supports B:07,C:07 and the SDX ROM in slot 5 supports B:07. It is now connected to a Epson SD800 dual 3.5" and 5.25" combo drive. I have it wired so that B: is 3.5" and C: is 5.25", although with different wiring or jumper settings, it could be the other way around. I had to configure the 5.25" drive so that it runs at 300rpm, which is consistent with the information for "5.25 inch drives, 720K DD, 80 track" in Herbs technical information.

The SDX FDC circuit diagram covers the older SDX, but the later one is likely to be very similar, except with extra memory.

Both styles of controller support Shugart floppy disk drives, and these differ slightly from the more modern drives used in IBM PCs, refer to these pinout tables.

To connect a PC controller to Shugart drives, a forum post includes this diagram :-

To connect a SDX FDC to a modern drive, we need to do the reverse.

The SDX controller pulls "disk change detect" aka pin 2 low. On modern 5.25" drives this is "density select", so this means we only support double-density on a single-density and double-density capable drive. Presumably a single-density only drive ignores this signal, so in that case we'd only be supporting single-density. On modern 3.5" drives the drive uses the HD hole on the diskette to spot whether it is double-density or high-density (so ensure this is taped over on the floppy diskette), so again, we only support double-density. I don't think we ever saw any single-density 3.5" floppy drives, or any diskettes formatted as single-density. There never was any support for high-density in any Memotech product. The double-density type codes are 02, 03, 06 and 07.

I am not sure whether the difference between "disk change" and "disk ready" on pin 34 is ordinarily a problem or not, although the SDX FDC circuit diagram doesn't appear to use this signal.

Aside: the SDX FDC circuit diagram seems to show DRIVE SELECT 3 being mapped to pin 6 rather than the pin 4 per Shugart specification. Probably a problem with the diagram, but it wouldn't matter if this was really the case - modern drives don't use either pin 4 or 6.

On my one-off special SDX, when booting from B:, I see pin 10 go low. So the FD1036A is configured to be "drive 0". When trying to boot from C:, I don't see any pin go low. So I don't see how I can connect two drives at once.

My older SDX is able to drive two drives, which conveniently I provide in the form of an Epson SD800.

Beware: Most literature I can find numbers the pins as shown on this page. However, the SDX FDC circuit diagram and the SDX FDC circuit board number the pins in reverse. So pin N becomes pin 35-N. This means the red-edging on the Memotech supplied ribbon cable is pin 1 according to SDX convention, but actually pin 34 according to Shugart and modern drive convention. This also means that a conventional PC style floppy cable (with its notch to prevent incorrect connection) fouls the SDX FDC PCB.

Floppy advice

Mike Rudkin offers the following advice when trying to get the original Qume 142 floppy drives working again...

I find that after some years, especially if not used, the shiny metal head-guide rail becomes dry and maybe even covered in fluff/dust ... especially at each end. (They tend not to become worn as such, as the steel is high quality and very dense on these early 80's drives).

If you can very gently get the head guide rail clean and fluff free (Tweezers then a cotton bud soaked in (tape head cleaning) Isopropyl alcohol should work wonders), then leave it for 10 minutes... before you apply an extremely small amount of spindle oil (watchmakers or sewing machine oil is great).

Put a little tiny drop of oil on the rail, then move the head carefully up and down the rail a few times. After doing this, if you can see any residual oil at all... then you need to wipe it off. Basically any residual trace amounts of oil under the head runner will suffice for at least another 10 years!

Then before you re-install the drive, make sure that any moving parts/springs etc don't have any fluff or dust on them.

Your drive will now be able to self adjust the head position accurately... as it did when it was new.

The only drawback "might" be that if you have any disks that were useable/formatted whilst the disk was going out of alignment, you might find that after this procedure, they are unreadable. This can be got around by fixing one drive, then copying all your disks to that drive from the other "dirty" drive BEFORE it is cleaned/fixed in the same way.

It is always good practice to also clean the edge connector of the drives before re-fitting... use either an eraser or Isopropyl alcohol.

Video Output

The MTX VDP output goes through a TV standard specific (PAL, NTSC, ...) video daughter board, through a UHF modulator, and then on to your TV. Analogue TVs are getting harder to find and are big bulky things. Also, as the MTX warms up, so the frequency of the signal drifts, requiring continual retuning.

Instead, I remove the daughter card, and attach this cable :-

The block at the bottom is a 5-pin female header block, and on the right we have composite plugs and a 3.5mm socket.

I then convert the composite signal to VGA using a Gonbes 8200 :-

The picture quality isn't brilliant, but its better than my TV. It can show junk around the main picture area, and overall the picture is bluer than it should be, with no obvious way to tune. This may require resistors in the cable, but I've not worked out any of this as yet.

I also connect the 3.5mm socket through a 3.5" male-to-male cable and into the VGA monitor, so I get sound too.

If you have a FDX or an SDX you may have the 80 column card. This outputs a colour signal out of a 9-pin female connector. The problem is that this signal is for old monitors, and can't be fed to a modern VGA monitor. This too can be converted to VGA using a Gonbes 8200, using this cable :-

The diagram shows the back of the 9-pin plug, and the 8-pin cable supplied with the Gonbes 8200. The colour coding reflects the colours on the cable. Red, green and blue are obvious. Black is ground and grey is sync.

Some adjustment of the presets on the Gonbes are required to get the colour bright enough.

The Gonbes 8200, composite cable (cut in half), 3.5mm male-to-female cable (cut in half), 5-pin female header, 5V 2A PSU, and 9-pin Dsub male plug can all easily be found on eBay.


This page maintained by Andy Key
andy.z.key@googlemail.com