CPCWiki forum

General Category => Amstrad CPC hardware => Topic started by: Charlie on 17:03, 18 September 19

Title: Z80 Accelerator
Post by: Charlie on 17:03, 18 September 19
Hello all,
It's been an absolute age since I showed my face round here - sorry about that.I've had a few projects on the boil but sadly can't afford to actually make / test them so I thought I'd post them all here in case anyone wants to run with any of them.

#3) Z80 AcceleratorI like to tinker with retro machines and one thing I'd really like is to make them go faster, especially the PCW and CPC as there's CP/M and Symbos to play with. I initially assumed the internet would be lousy with such an idea but it seems not. What accelerators that were made don't have available schematics and on the whole being nearly full-fledged computers in their own right are probably a bit too complex for DIY'ers.

...And so I came up with this dirty hack:
-I wanted something that could potentially speed up any Z80 machine .
-I wanted it to be as simple as possible
-I didn't want it to mess with the timing of other system components (eg the 6Mhz hack for the CPC)-It would be nice if the basic design could be bent to other CPU's

In essence what this board is supposed to do is run the Z80 twice as fast as the system clock while keeping in step with it - very important! Higher speeds are at least technically possible.
To make sure the rest of the system works as normal the circuit keeps tabs on /MREQ and /IORQ and drops the Z80 back to the system clock speed in those circumstances.
If one is feeling brave it would be quite possible not to do this if you felt your memory and I/O was fast enough to cope with an impatient Z80. Doing so, especially with RAM access would add further speed benefits.

To say this design is a dirty hack would be a slur on the reputation of dirty hackers everywhere but in theory it should work. One thing for certain is the R?C circuit will need individually tuning for every system this board is plugged in to. Therefore I strongly advice using a variable resistor for tuning and take my suggested values and target frequency with a huge pinch of salt. There's plenty of on line R/C calculators to work out the numbers yourself.
Oh, and I'd be amazed it this could be made to work with LC logic. Fast HCT chips will be needed.


Quite untested so use at your discretion.


All the best,
Charlie.
Title: Re: Z80 Accelerator
Post by: GUNHED on 18:42, 18 September 19

Nice!  :) :) :)

How quick will the Z80 run?

Title: Re: Z80 Accelerator
Post by: rpalmer on 22:04, 18 September 19
Charlie,
You cannot simply just double the clock to the CPU as the DRAM and ROMs will not allow for the speed increase (these were chosen to suit a 4MHz system). You might get away with 5 or 6 MHz but certainly not 8MHz as you have designed it.

Also the gate array controls who is driving the address (CRTC or Z80) via four 74LS153 chips, so you would be in conflict with the gate array without taking control of this issue by the accelerator.

rpalmer
Title: Re: Z80 Accelerator
Post by: TotO on 22:26, 18 September 19
Quote from: rpalmer on 22:04, 18 September 19You cannot simply just double the clock to the CPU as the DRAM and ROMs will not allow for the speed increase (these were chosen to suit a 4MHz system). You might get away with 5 or 6 MHz but certainly not 8MHz as you have designed it.
The schematic explain that memory or I/O access are 4MHz. Only internal computing is 8MHz.
Title: Re: Z80 Accelerator
Post by: rpalmer on 23:29, 18 September 19
Toto, thanks for the correction. It would interesting to see if this works then why not a 10MHz Z80 CPU or even a 16MHz Z80.
Title: Re: Z80 Accelerator
Post by: TotO on 05:55, 19 September 19
Quote from: rpalmer on 23:29, 18 September 19
Toto, thanks for the correction. It would interesting to see if this works then why not a 10MHz Z80 CPU or even a 16MHz Z80.
I have already tryed that on my X-CPC prototype and it not worked... May be I does something wrong, I have to retry.
Title: Re: Z80 Accelerator
Post by: Sykobee (Briggsy) on 11:23, 19 September 19
Quote from: rpalmer on 23:29, 18 September 19
Toto, thanks for the correction. It would interesting to see if this works then why not a 10MHz Z80 CPU or even a 16MHz Z80.


Surely most of the time the Z80 would still be at 4MHz? It might speed up the 16-bit operations however as they take longer to complete.
An alternative is to replace with Z80 with an FPGA Z80-compatible implementation that still runs at 4MHz and is system compatible, but can do one instruction per clock (16-bit ALU implementation, etc) rather than 4-11 clocks. You could also round out the instruction set, and add useful MUL, DIV, etc instructions (CPC firmware compatible).


At some point it becomes NotACPC of course.


IIRC there are a couple of FPGA CPC implementations out there (ralfaroo?) that this could be trialed on. It would probably need a way to switch to/from 'fast mode'.
Title: Re: Z80 Accelerator
Post by: TotO on 12:17, 19 September 19
My idea was to allow a faster Z80 to access the EXT RAM at 16MHz, but the VGA RAM and I/O ports at 4MHz.
Target usage to speed-up the OrgAms assembler and other CPC tools using the X-MEM / Z-MEM (55ns SRAM).
Title: Re: Z80 Accelerator
Post by: GUNHED on 16:44, 19 September 19
Quote from: TotO on 12:17, 19 September 19
My idea was to allow a faster Z80 to access the EXT RAM at 16MHz, but the VGA RAM and I/O ports at 4MHz.
Target usage to speed-up the OrgAms assembler and other CPC tools using the X-MEM / Z-MEM (55ns SRAM).


Oh yes! That would be it!!!
Title: Re: Z80 Accelerator
Post by: Charlie on 16:34, 22 September 19
Hi all,
I'm glad this design has proven of interest to some:
-Yes, adding local memory would make for a far more efficient and faster design.
-I don't see why this wouldn't potentially work at higher clock speeds.


But do please consider this very much a 'concept piece'. The idea and execution may be of interest, hence my sharing. If it functions at all in the real world what I have done hear is very dodgy indeed. Also my main driver for this decidedly iffy concept was for something that would give a bit of a boost to any Z80-based system; designs with local memory aimed at specific hardware will work much better.


Still, I hope of some interest to some.


All the best,
C.
Powered by SMFPacks Menu Editor Mod