Questions about the Memotech MTX that you were too afraid to ask...

stephen_usher
Posts: 325
Joined: 27 Nov 2016 19:58

Re: Questions about the Memotech MTX that you were too afraid to ask...

Post by stephen_usher »

Potholepete wrote: 25 Aug 2022 19:05 even more so with a colour VGA output soon added to it ;-)
Well, it you have a Microvitec CUB or other TTL RGB monitor you could fit a TMS-RGB under the motherboard. https://tms-rgb.com/
Potholepete
Posts: 83
Joined: 11 Aug 2012 22:13

Re: Questions about the Memotech MTX that you were too afraid to ask...

Post by Potholepete »

now thats a smart bit of kit too, amazing what some people are doing with the old machines now.
Bill B
Posts: 593
Joined: 26 Jan 2014 16:31

Re: Questions about the Memotech MTX that you were too afraid to ask...

Post by Bill B »

Why did Memotech have to put the VDP on Z80 ports 0x01 and 0x02?

It makes decoding VDP addressing more difficult. It would be easier if the VDP was either on 0x00 & 0x01 or on 0x02 & 0x03. In general it is easiest if common functionalities have the same high bits in the port address and all the low bits of the address are exclusive to that functionality. Most of the other peripherals (CTC, DART, 80-column, disk interfaces) follow this. The keyboard is another example that does not.

I don't know whether the original MTX I/O addresses were chosen to simplify board routing, or whether they were just more or less randomly assigned.
Potholepete
Posts: 83
Joined: 11 Aug 2012 22:13

Re: Questions about the Memotech MTX that you were too afraid to ask...

Post by Potholepete »

Here's a question that anyone who has had to work on them will know all too well....

Why did Memotech make working on the FDX so fiddley? I have had to take three apart due to power cap failure and lost count of the number of cuts and scratches my arms and hands have taken in the process... ;-)
User avatar
gunrock
Posts: 245
Joined: 28 Oct 2020 21:17

Re: Questions about the Memotech MTX that you were too afraid to ask...

Post by gunrock »

Not sure I follow, Bill (I apologise in advance, I don't have much experience of direct VDP access other than what I've been reading in Resource, etc.).

How would being at 0x00 and 0x01 be better? 0x01 being port 2 is where you setup the VDP for read/write etc. and 0x00 is where you shove the bytes to be transferred or (I guess in the case of a read) read back from the VDP memory. Is something about the Z80 syntax that makes it onerous when the ports are 0x01 and 0x02 or something else?

Genuine question from a n00b.
Steve G
Danish Memotech MTX 512, MFX and loving it
Bill B
Posts: 593
Joined: 26 Jan 2014 16:31

Re: Questions about the Memotech MTX that you were too afraid to ask...

Post by Bill B »

I suppose the VDP addressing only really becomes a pain when you try and make video add-ons. Whether working in hardware, on a FPGA or a microprocessor you often need a signal to say this is a VDP address. If the VDP was on addresses 0x02 and 0x03 then this signal would be:

Code: Select all

VDP = A1 & /A2 & /A3 & /A4 & /A5 & /A6 & /A7
i.e. a simple test of 7 bits.

However, with the VDP being on 0x01 and 0x02 the needed signal is:

Code: Select all

VDP = (A0 & /A1 & /A2 & /A3 & /A4 & /A5 & /A6 & /A7) | (/A0 & A1 & /A2 & /A3 & /A4 & /A5 & /A6 & /A7)
i.e. a test against two different 8-bit values.

Particularly when working on a microprocessor and trying to do the address decoding in software while keeping up with the Z80 the extra complexity makes the timing more difficult.
User avatar
gunrock
Posts: 245
Joined: 28 Oct 2020 21:17

Re: Questions about the Memotech MTX that you were too afraid to ask...

Post by gunrock »

At the risk of feeling the faint flicker of a collective eyeroll across the forum software from the hardware gurus. :roll:

How does the the check for two adjacent ports alter dependent on which pair they are? I have no FPGA programming knowledge (I have viewed some Verilog before and other than the small buzz of wonderment that a person with their head in lion's mouth might feel, seconds before they die, it made no sense to me!).

So the only thing I can see in your explanation is the binary equivalents of the port. At 0x02 and 0x03, it would allow you to check only the most-significant 7 bits? 0x02 and 0x03 == 00000010 and 00000011, whereas 0x01 and 0x02 == 00000001 and 00000010, thus you have to check all 8 bits. Is that what you allude to, Bill?

And if so, I'm not sure how that complicates things much in FPGA programming but will take your word for it.
Steve G
Danish Memotech MTX 512, MFX and loving it
Martin A
Posts: 799
Joined: 09 Nov 2013 21:03

Re: Questions about the Memotech MTX that you were too afraid to ask...

Post by Martin A »

OK the VDP has a "mode" input to switch between the address and data ports

So yes for port 2/3 and a TMS 9918/28/29 decode the logic looks for 7 bits as address bit 0 is a don't care ie 0000001x. That don't care bit 0 goes to the VDP only.

For port 1/2 the decode logic has fo check for 00000001 or 00000010 there's no don't cares. Memotech then used address bit 1 to slect the mode.

So resource wise the port 1/2 select has to match two 8 bit values , port 2/3 only has to match one, 7 bit value.

On a 4000+ element device that we used for MFX a couple of extra cells (typical cells have 4 or 5 inputs so 7 or 8 bit decodes require liniking 2 cells) aren't lilely to be an issue. On one of the a smaller 32 cell programmable logic device, doing multiple decodes, that extra step could mean the difference bwtween fitting and not.
User avatar
gunrock
Posts: 245
Joined: 28 Oct 2020 21:17

Re: Questions about the Memotech MTX that you were too afraid to ask...

Post by gunrock »

Ah ok, that's a bit clearer. Had never really thought about exactly what a LE is, other than a programmable gate of some kind and that more of them obviously allows you to do more. Makes sense now.

Thank you Martin.
Steve G
Danish Memotech MTX 512, MFX and loving it
Bill B
Posts: 593
Joined: 26 Jan 2014 16:31

Re: Questions about the Memotech MTX that you were too afraid to ask...

Post by Bill B »

And when doing the address decode on a microprocessor where each comparison requires a couple of instructions (a test and a jump) the additional time needed for the odd addresses is a pain. I certainly cursed the decision while writing the Propeller code for the CFX-II.

Anyway, it is inelegant :)
Post Reply