News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Charlie

Z80 Surfboard

Started by Charlie, 12:49, 09 December 19

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Charlie

As things are looking up a bit I'm looking to actually make some of the designs I've been splurging on this good forum... there's more to come I'm afraid.
For today here's a teaser for what I'm calling a Z80 Surfboard:

A while back I mentioned I'd been looking in to doing a Z80 accelerator for the PCW, and maybe other Z80 systems. The circuit I'd initially shown was frankly a dubious hack. Further thought has taken me in a couple of directions, this do-dad is by far the simpler version but hopefully of interest to some and a far better rendition than my previous attempt.

Oh, it's a (hopefully) universal plug-in accelerator for Z80 based systems. I'm in the process of going over the schematic and layout again looking for errors. I'll post the Eagle files in a bit then if all seems good I'll be sending an order off to Seeed for some PCBs.

Fingers crossed!
Charlie.

Are you pondering what I'm pondering? The Qube Server

Bryce

#1
Interesting idea. What method are you using to accelerate the CPU?

Bryce.

Gryzor

I realised I don't know the difference between a co-processor and an accelerator...

Can it really be universal?

Bryce

#3
A co-processor is used to off-load process-heavy tasks and free up the processor for other things.
An accelerator makes the processor go faster.

I would also question whether it could be made as a universal expansion, as the Z80 is used in completely different ways in many of the better known computers, but it worth looking into.

Bryce.

Gryzor

What I suspected (though never thought of it before...) My next question is the same as yours 😄

Bryce

#5
I made an accelerator for the 6502 back in the 90's. It worked perfectly on the Atari 800XL, but it wouldn't have worked on any other 6502 computer.

Bryce.

Charlie

#6
Hi Chaps, thanks for the interest.  :)


Yes, the words 'universal' and 'accelerator' do need some clarification, especially as that's a bit on an ambitious claim. Let's dial it back a bit:


Universal - This board is indeed intended to fit between a Z80 and it's socket and I have done my best to make it as small as possible. Will it work in any Z80 system? No idea... in theory... maybe.
Will it fit in any Z80 system? I tried to make the board as small as reasonably possible, hence the SMT parts. But there's bound to be machines where there just isn't enough room and as there's no buffering on this board I wouldn't want to hang it off a ribbon cable.


Accelerator - This is in my (not so) humble opinion a fairly cunning design but it certainly isn't a full accelerator. eg: no local fast RAM, etc.
It's basically just a circuit to inject a higher clock speed in to the Z80 to make it execute code a bit faster. The result is never going to be as good as a proper accelerator but this will hopefully add a bit of relatively simple and easy vim to a system. Reasonable questions might be:
But if you're running the Z80 faster won't that throw out timings for everything else? The Z80 has the faster clock the rest of the computer keeps using it's stock clock.
Ok, but the CPU will still need servicing faster. At some point important things like peripherals, video, audio, RAM, ROM, won't be able to keep up or simply not work if they are timing critical. True, and depending on the computer your mileage may vary, but I've hopefully considered that:
By default this board falls back to using the stock clock whenever an /IORQ is asserted.
There are pads on the board for connecting the activation line of any unhappy subsystem. The stock clock will be asserted to slow the Z80 when said systems are activated. As a last resort the board also has a jumper to add a wait state whenever M1 is asserted - that might be of use where RAM or especially ROM is struggling, but it's use is best avoided - there will be a speed penalty.
Finally It's my understanding that Z80's don't like having their clock messed with. This circuit hopefully takes account of that but again your mileage may vary.


I'm certainly open to further questions and indeed suggestions and advice would be most welcome, I know Bryce has probably forgotten more about electronics that I will ever know. Hello by the way.  :)


So here's the files for any that may be interested. I am actually intending to get this one made fairly soon so actually news some time.


As I'm not about much these days it's possibly worth restating my attitude toward the use of my designs. I do this because I enjoy it, it's my hope others may find my stuff interesting and maybe even useful on occasion. I am 100% happy, even flattered, for anyone to use any of my stuff in any way they see fit. I don't expect to be credited but if for instance an enterprising soul should ever make / sell one of my creations a mention would be appreciated.


PS
Below are PNGs of the schematic and board layout, along with a .zip of the Eagle files. I've not done the gerbers as yet as I've no evidence this thing actually works.
Charlie.

Are you pondering what I'm pondering? The Qube Server

Bryce

#7
That's similar to how my 6502 accelerator worked. It used a faster clock as long as the /IORQ was high, however, this was much easier to do on the 800XL as the clock wasn't being generated by a Gate array, so my expansion had a faster clock on board with a divider to bring it back to the correct speed as soon as the /IORQ went high. Technically possible on a Z80, but I've never looked into what else this might effect. On a CPC you have the added advantage that the RAM refresh isn't being done by the CPU, but this might mean having to restrict the accelerators limits to make it compatible with other systems where the CPU is doing the refresh.

Eh, how are you syncing the original clock with the new clock?


Bryce.

gerald

Quote from: Bryce on 15:31, 10 December 19On a CPC you have the added advantage that the RAM refresh isn't being done by the CPU, but this might mean having to restrict the accelerators limits to make it compatible with other systems where the CPU is doing the refresh.
Except that the RAM refresh on the CPC is done by the Gate Array and only allow one access every 4 4MHz cycles (ie 1MByte/s).
So unless you know that you are accessing an external RAM, you are still bounded by the gate array.

Charlie

#9
Hi chaps,
Thanks for the interest and indeed further feedback. For what it's worth this is certainly a dirty way to speed up a computer but I have some evidence the theory holds in practice. While looking for ideas to come up with a more elegant solution than my previous, and frankly nasty, attempt I discovered some posts on MSX forums talking about 'accelerators' that used this kind of method. Indeed inspiration for adding a wait-state jumper came from this direction - I know next-to-nothing about MSX's but I understand by design they insert a Wait in to every M1 access because otherwise the RAM used isn't fast enough for reliable access. Maybe part of the reason why these machines have a bit of a reputation for being slower than they should be? Anyway I added the M1 jumper partly because I could, options are nice, and partly because I wondered if RAM (ROM) access might be more critical that I thought.


@Bryce:
Assuming I'm not about to discover I'm spouting rubbish, or my schematic has errors I've not spotted, the plan goes something like this:

'153 (4-to-1 multiplexer)
'175 (positive-edge triggered 4 bit register)
The '153 maintains a current state, and handles the status LED(s). Its clock input is triggered on the low-to-high transition, making sure that changes occur only right after the clock signal (pin 7) has turned high to meet Z80 CPU requirements. Its output (pin 2) is fed into the multiplexer.
One half is used internally to switch between clock signals, required to prevent the circuit from halting itself. At the next low-to-high transition, a second output (pin 15), following the first one, controls the actual switching of the clock output. If these two lines are the same the multiplexer acts as a buffer for the desired output. If the two control signals are different, circuit switching over, the other multiplexer inputs (tied to VCC) lengthen the high-period of the clock output.
Charlie.

Are you pondering what I'm pondering? The Qube Server

Bryce

Sounds like a nice solution. Interested to see if it works as planned.

Bryce.

Charlie

Fingers Crossed!  :)
Charlie.

Are you pondering what I'm pondering? The Qube Server

1024MAK

Quote from: Bryce on 08:31, 11 December 19
Sounds like a nice solution. Interested to see if it works as planned.

Bryce.

Ditto  :D

Mark
Looking forward to summer in Somerset :-)

Charlie

#13
Once again thanks for the interest.  :)

I've just sent an order for the PCB's off to Seeed so fingers crossed.

Why Seeed?
There's plenty of good PCB fabrication houses out there but I've never had any issues with Seeed. Their work is always excellent quality, dirt cheap, they have lots of options, and they'll even do the construction for you... for a fee:
eg: 10 x 66x26mm boards = $3.92, for a total of £12.13 with shipping vial Royal Mail.

Highly recommended.

Attached below is the .zip file for the gerbers - should anyone want to order their own the process is generally:
Upload the .zip file to the FAB house of your choice, enter the dimensions if this isn't automatic, say how many you want, pay, wait for your delivery.
As a general rule, at least with Seeed, there are many options indeed but the defaults are fine.

Might I suggest that if anyone is interested in their own:
-Wait for me to report back that it actually works
-Ask me if I have any spare boards you can have, there are likely to be some
-Order your own if I haven't got spares or you want something other than a Green PCB with the standard options

PS
Yes, I know this board has SMT components. It was necessary to make everything fit. I very rarely use SMT or programmable components because it often puts people off making their own but:
-SMT components aren't hard to solder, even with basic equipment
-I've deliberately gone for the larger sizes to make it easier
-I (almost) never do production runs
-I'm happy to render advice
Charlie.

Are you pondering what I'm pondering? The Qube Server

GUNHED

Let us please know which results you get with real hardware.  :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Powered by SMFPacks Menu Editor Mod