The Fastest MTX on earth ??

Modern, Memotech inspired, hardware projects
Martin A
Posts: 797
Joined: 09 Nov 2013 21:03

The Fastest MTX on earth ??

Post by Martin A »

I've built a new CPU card for the MTXplus.

With a lot of help from Tony, Dave and I have been experimenting with the MTX plus systems by putting in additional wait states when the MTXplus CPU accesses the hardware through I/O ports.

This is an attempt to overcome some of the timing limitations of the V9958 VDP and 82C55 PPI that handles the 16 bit IDE interface. Increasing the speed of the Z80 CPU beyond 10mhz has caused issues as neither peripheral chip was designed to cope with the reduced signal times from the Z80 at higher clock rates.

Lez very kindly supplied a 33mhz Z180 cpu in a package of CPU parts a while back. The Z180 has a build it wait stare generator, so I decided to build CPU board based on the more modern chip. The intention being that the built in wait states would remove the need for the external wait state hardware. The Z180 also incorporates additional components like the memory management, CTC and a UART, on this board that's all ignored, just the Z80 compatible signals are connected. Memory management is done through the page port just like the original MTX.

The newer design of the Z180 means it takes less machine cycles to do most operations giving around a 20-25% speed improvement for a given clock rate.

The initial build as shown here has been successful to a certain extent with the I/O issues. With the maximum amount of wait states added to I/O accesses, the IDE access has been stable up to 25mhz. The video chip still has issues with data arriving too quickly and being lost beyond 10mhz. however with software delays the display is stable at 28mhz the rest of the system however can't cope at 28 and inevitably the system crashes. Surprisingly the 8mhz CTC on board is also stable at 25mhz, and that's the speed currently being run at for testing.

Memory access, using a modern 512k static ram chip, is sufficiently fast that all memory waits are currently disabled for maximum performance.

Another bonus of the Z180, there's an on-board clock divider, I'm hopeful that some additional software can be included into the boot rom to enable the CPU speed to be switched in software. That could aid compatibility with (mostly) games that drive the hardware directly. 25mhz, 12.5mhz and 6.25mhz clock rates should be directly available. An approximate Z80 4mhz equivalent should be achievable by juggling memory wait states at the slower CPU clock rate.

So here it is, the Fastest MTX on earth ?

The original Z80 tuned CPU speed detection code rated it at 31mhz, though the Z180 aware code does calculate the correct value as seen here.
Z180 Boot Screen
Z180 Boot Screen
Z180 Boot screen.jpg (25.08 KiB) Viewed 12205 times
MTXplus Z180 Processor Card
MTXplus Z180 Processor Card
Z180 CPU.jpg (97.19 KiB) Viewed 12205 times
User avatar
thewiz
Posts: 137
Joined: 12 Aug 2012 16:08

Re: The Fastest MTX on earth ??

Post by thewiz »

Wow thats fast. Will it run cpm at that speed?
THIS is what Memotech is doing now.
Martin A
Posts: 797
Joined: 09 Nov 2013 21:03

Re: The Fastest MTX on earth ??

Post by Martin A »

thewiz wrote:Wow thats fast. Will it run cpm at that speed?
Currently I have the mono implementation of CPM running at 25mhz on the Z180, it needs a little work on the keyboard code as the key repeat is still tuned for the Z80A.

It's fast enough that I wonder how I ever put up with the FDX.
User avatar
1024MAK
Posts: 757
Joined: 24 Dec 2012 03:01
Location: Looking forward to summer, in Somerset, UK

Re: The Fastest MTX on earth ??

Post by 1024MAK »

Wonderful 8-) :D :D :D

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer in Somerset later in the year :D

Not as many MTXs as Dave! :lol:
lezanderson
Posts: 186
Joined: 14 Aug 2012 15:31

Re: The Fastest MTX on earth ??

Post by lezanderson »

Amazing 25MHz....!

What's the BOM list (Bill of Materials) for this ?
Martin A
Posts: 797
Joined: 09 Nov 2013 21:03

Re: The Fastest MTX on earth ??

Post by Martin A »

On the Z180 CPU card is:
Z8S18033VSG - 33Mhz Z180 CPU (clocked at 25Mhz)
39SF010A - 128 x 8 70ns Flash
AS6C4008 -512x x 8 55ns static ram
Z84C3008 - Z80 CTC 8mhz (3010 10mhz part as an alternative)
DS12887+ - Real time clock
ATF22V10C-7PX - 7ns GAL for memory decode
ATF16V8C-7PU - 7ns GAL for I/O decode
MAX705 - Reset controller
74HC273 - MTX style Page port
74HC393 - Clock divider for CPU and PSG clocks
74HC193 - 4mhz Divide by 13 for SIO clocks
16Mhz Oscillator - PSG clock source
25Mhz Oscillator - CPU clock source

Plus there's the various sockets, jumpers, resistors and smoothing capacitors to stick it all together.

The Z180 is run as a fast Z80, in a MTX compatible environment, which is why there is a page port and CTC on the board. The internal MMU and timers aren't used.
User avatar
AndyKey
Posts: 74
Joined: 12 Aug 2012 01:29
Location: Southampton, UK
Contact:

Re: The Fastest MTX on earth ??

Post by AndyKey »

REMEMOTECH can also run at 25MHz, and because my newly recreated VDP, sound and other hardware doesn't have the timing/wait-state limitations of the originals you can run existing code unmodified without dropping video updates...
It also runs with the T80 in the mode where non-M1 cycles run in only 3T, thus running a bit faster than a Z80 at the same clock speed.
Although the CPU speed may be sped up, the timer inputs remain the same, allowing time based interrupts to work ok.
The CTC also has a hack to ensure single-step debugging of ROMs still works at unusual clocks speeds.

Is a 25MHz Z180 faster than a 25MHz Z80 (ie: fewer clocks per instruction on average)?
This might be more of a performance lift of the T80 needing fewer clocks than a Z80.
In which case, you may be able to claim the crown of fastest MTX.

Alternatively, if you can run at >25MHz, then that may give you the edge.
I think some people may have run the T80 at 50MHz, or at least >30MHz, but that made things trickier for me in REMEMOTECH, so I didn't.

Perhaps we should use MANDBAS and MANDASM (http://www.nyangau.org/mand/mand.htm) as a speed trial, and race them...
I really should add the numeric accelerator to REMEMOTECH, and go even faster.

{{{ Andy
{{{ Andy
Martin A
Posts: 797
Joined: 09 Nov 2013 21:03

Re: The Fastest MTX on earth ??

Post by Martin A »

MANDBAS.BAS tested on the Z180 board at 25mhz.

Total run time 55m 15 sec. (3315 sec), compared to the 7h 12m 28s of a real MTX (25948sec) that gives a CPU rating of 7.8 times as fast.

Since the clock speed is 6.25x that of the MTX that suggests the Z180 is 25% faster than the Z80.

Part of that I'm sure is the MTX plus is built to use static ram, so I've been able to turn off the refresh generator required by dynamic rams.

MANDBAS.BAS on the Z180 board
MANDBAS.BAS on the Z180 board
Image1.jpg (55.34 KiB) Viewed 12098 times
User avatar
AndyKey
Posts: 74
Joined: 12 Aug 2012 01:29
Location: Southampton, UK
Contact:

Re: The Fastest MTX on earth ??

Post by AndyKey »

Oh the shame of it, REMEMOTECH with its flash Altera FPGA beaten by some whipper-snapper with his Z180 and 74LS chippery.... :cry:

http://www.nyangau.org/mand/mand.htm updated.
{{{ Andy
User avatar
Dave
Posts: 1278
Joined: 11 Aug 2012 18:16
Contact:

Re: The Fastest MTX on earth ??

Post by Dave »

Hi Martin,

MTXPlus+ Rules :D

Seems like Andy is planning to mount a challenge, maybe we need a maths co-processor on MTXPlus+ too :lol:
Post Reply