CPCWiki forum

General Category => Amstrad CPC hardware => Topic started by: banana on 14:19, 18 June 21

Title: Is there any hardware to make the CPC run faster?
Post by: banana on 14:19, 18 June 21
This would come in handy for those slow zx spectrum and C64 conversion games.A change in MHz is what I mean, not a different processor as that would mean no backward compatibility.
Title: Re: Is there any hardware to make the CPC run faster?
Post by: roudoudou on 14:23, 18 June 21
it's called emulator  ;D
maybe some serious drug can slow your brain, so the game will look faster ?
Title: Re: Is there any hardware to make the CPC run faster?
Post by: Gryzor on 14:25, 18 June 21
This would come in handy for those slow zx spectrum and C64 conversion games.A change in MHz is what I mean, not a different processor as that would mean no backward compatibility.


There have been discussions about replacing the Z80 with a beefier version, you can look for them but the short answer is: no.
Title: Re: Is there any hardware to make the CPC run faster?
Post by: banana on 14:26, 18 June 21
it's called emulator  ;D
maybe some serious drug can slow your brain, so the game will look faster ?
I guess that is a solution, and it's free, but still no hardware invention?What's the drug called  8) ?
Title: Re: Is there any hardware to make the CPC run faster?
Post by: banana on 14:30, 18 June 21
Look at Bad dudes vs dragon ninja as an example, there are hundreds more. The game has nice graphics but is so slow that makes it almost unplayable.
Title: Re: Is there any hardware to make the CPC run faster?
Post by: roudoudou on 14:30, 18 June 21
I guess that is a solution, and it's free, but still no hardware invention?What's the drug called  8) ?
someone tried to speed up Z80 to 8MHz to as all chips are synchronous, Floppy disc controler will also run twice as fast => you cannot expect using floppies anymore
video controller also will run faster so you will have a nice stamp (or maybe black screen?)
and the music...
well, that's a bad idea...
ps: bad dudes is well optimized, it's cool to play even it's not as fast as arcade...
Title: Re: Is there any hardware to make the CPC run faster?
Post by: SkulleateR on 14:30, 18 June 21
https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/overclocking-cpc-68-mhz/ (https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/overclocking-cpc-68-mhz/)
Title: Re: Is there any hardware to make the CPC run faster?
Post by: roudoudou on 14:32, 18 June 21

anyway, spectrum display faster, ok, but we have COLORS  8)
Title: Re: Is there any hardware to make the CPC run faster?
Post by: banana on 14:38, 18 June 21
anyway, spectrum display faster, ok, but we have COLORS  8)
Yes, for sure. The worst conversions from the spectrum I have seen are on the MSX machines, those were simply terrible.
Title: Re: Is there any hardware to make the CPC run faster?
Post by: Gryzor on 14:40, 18 June 21
Don't know what you guys are saying, I played Bad Dudes a lot back in the day and always enjoyed looking at the bad guys flying through the air in slow-mo.
Title: Re: Is there any hardware to make the CPC run faster?
Post by: Bryce on 15:56, 18 June 21
The problem with overclocking the CPC is that most of the hardware CPU, Sound, Graphics, Gate Array and Floppy all derive their clock from the same source. So it's extremely difficult to speed up the CPU without speeding up everything else. They are also synchronised with each other, so speeding just the CPU up causing problems in the synchronisation.

Bryce.
Title: Re: Is there any hardware to make the CPC run faster?
Post by: Shaun M. Neary on 16:04, 18 June 21
Look at Bad dudes vs dragon ninja as an example, there are hundreds more. The game has nice graphics but is so slow that makes it almost unplayable.

Huh? Dragonninja wasn't that bad in terms of speed. The main problem with that game was that the bosses were too easy to defeat. Kick, they jump over you, kick again, they jump over you.
Repeat until dead.

anyway, spectrum display faster, ok, but we have COLORS  8)

Please don't tell me we were still talking about Dragonninja here. That game was a shambolic mess on the Spectrum!
Title: Re: Is there any hardware to make the CPC run faster?
Post by: banana on 16:37, 18 June 21
I used a bad example of a slow game  :doh:
Title: Re: Is there any hardware to make the CPC run faster?
Post by: ajcasado on 16:44, 18 June 21
Maybe it's possible to switch the clock input of the Z80 between phi (mainboard 4MHz) and a synchronised higher frequency clock signal when the Z80 is not interfacing with memory or I/O devices. This would speed up some CPU T-cycles per instruction cycle.
Title: Re: Is there any hardware to make the CPC run faster?
Post by: TotO on 17:16, 18 June 21
To speed-up the CPC, you can use floppy disc instead of tape, on ROM programs. ;D
Well... I'm sorry that Amstrad do not improve the speed with the Plus range of computers.
Title: Re: Is there any hardware to make the CPC run faster?
Post by: Bryce on 17:41, 18 June 21
Maybe it's possible to switch the clock input of the Z80 between phi (mainboard 4MHz) and a synchronised higher frequency clock signal when the Z80 is not interfacing with memory or I/O devices. This would speed up some CPU T-cycles per instruction cycle.

I made a similar project using this method to speed up an Atari 800XL. I does get faster, but the results are firstly variable, ie: some programs get a bigger boost than others and secondly, the overall increase is minimal.

Bryce.
Title: Re: Is there any hardware to make the CPC run faster?
Post by: ajcasado on 17:59, 18 June 21
I made a similar project using this method to speed up an Atari 800XL. I does get faster, but the results are firstly variable, ie: some programs get a bigger boost than others and secondly, the overall increase is minimal.

Did you used a a faster CPU or just overclocked the stock one?.

With the CPC a 8MHz Z80 could be used, eventually with some overclocking, 20MHz using a CMOS Z80 but with some software incompatibility.

I guess than some experimenting with an emulator could be interesting.
Title: Re: Is there any hardware to make the CPC run faster?
Post by: ajcasado on 18:06, 18 June 21
In fact the 6502C has in overall less cycles per instruction, so I guess that the efficiency of the method should be greater with the Z80.
Title: Re: Is there any hardware to make the CPC run faster?
Post by: eto on 18:52, 18 June 21
In fact the 6502C has in overall less cycles per instruction, so I guess that the efficiency of the method should be greater with the Z80.


In theory yes, but not in the CPC, because of how CPU and RAM interact. I'm not 100% sure I am right, but as far as I understood so far and also know from the Atari ST which has a similar architecture regarding CPU/Display RAM, the CPU can access RAM only during those times, when the video chip doesn't access RAM. In the CPC, the Z80 can access RAM every 1µs. If the CPU has finished earlier, it will wait until it can access RAM again. So if you speed up the CPU by 2 or even 5 with a 20MHz CPU, the CPU would basically be faster but then just wait longer until it can do anything with the result of the calculation. The only difference would be, if the CPU executes a command that at 4MHz lasts longer than 1µs and then would take e.g. 8 or 12µs in a normal CPC. In that case a faster internal execution would have impact as it might be finished 1µs faster.

For the Atari ST there have been (and are) a few addons that support this, but unless a cache is involved, the speed improvement is very, very low, like 10 or 20%. For the CPC I would expect even less. And you would cause incompatibilities, as some games e.g. rely on exact execution of the commands and any command that is faster than expected can crash the program.
Title: Re: Is there any hardware to make the CPC run faster?
Post by: Bryce on 19:42, 18 June 21
Did you used a a faster CPU or just overclocked the stock one?.

With the CPC a 8MHz Z80 could be used, eventually with some overclocking, 20MHz using a CMOS Z80 but with some software incompatibility.

I guess than some experimenting with an emulator could be interesting.

Same CPU, the 6502 has massive overclocking potential.

Bryce.
Title: Re: Is there any hardware to make the CPC run faster?
Post by: XeNoMoRPH on 21:37, 18 June 21
I don't know if someone has already put this post.

https://www.cpcwiki.eu/index.php/6_MHz_CPC
Title: Re: Is there any hardware to make the CPC run faster?
Post by: zhulien on 07:08, 24 June 21
Although not really faster, some people seem to think it is, you can put a jumper in the CPC (at least on my 664) that lets you switch between 50hz and 60hz.  It makes some programs appear to run faster - in reality they are interrupting more frequently with less time between interrupts but the z80 itself doesn't change speed.  I did have one demo that was quirky in the default 50hz that worked perfectly in 60hz, but cannot remember which one.
Title: Re: Is there any hardware to make the CPC run faster?
Post by: zhulien on 07:15, 24 June 21
There is another option and that is using the @revaldinho (https://www.cpcwiki.eu/forum/index.php?action=profile;u=1776) 's Tube project which gives your CPC the ability to do some things much faster using an additional CPU - but software musts be coded to support it.


I think this option has a huge potential but sadly not very much adopted in the CPC community yet.


Some potential uses for CPC's Tube - running emulators on the CPC, NES emulator? (ok, technically it's running from the PI but using the CPC joystick or keyboard)... using Linux on the CPC, fast compiling, fast 3d vector matrix translations, HDMI output for CPC, MP3 playback, mass storage (but not as fast as other current options) etc.
Title: Re: Is there any hardware to make the CPC run faster?
Post by: Sykobee (Briggsy) on 18:35, 24 June 21

Note that changes like this really mean you haven't got a CPC anymore, just something that Amstrad should have done with the CPC Plus range but didn't.


I don't know how viable it would be to take one of the FPGA Z80 implementations, and stick it on a Z80 compatible form factor, at 4MHz, looking to the rest of the system like a normal Z80 timing-wise, but internally redesigned with a full 16-bit single-cycle ALU (to speed up processing) and instruction cache (to reduce issues with slow main memory access, sorry games that use self-modifying code). It might end up looking more like an R800.


Most graphics routines use the 16-bit register pairs and instructions, so this would be the single best way to speed up the performance - although limited by the main memory access times for writes.


Obviously by the time you are doing this, you start thinking of implementing other firmware routines in hardware (firmware can be patched to call the new hardware function) to accelerate other common actions. Spectrum Next did this somewhat, with some custom Z80 instructions for common Spectrum routines.


There is a solution on the Amiga that interfaces an ARM SoC (Raspberry Pi) running a 68000 emulator to the native A500 motherboard with a small adapter board. It has compatibility issues still, but when it works it's like 1000x faster, so that's another option.
Title: Re: Is there any hardware to make the CPC run faster?
Post by: revaldinho on 22:54, 24 June 21
Note that changes like this really mean you haven't got a CPC anymore, just something that Amstrad should have done with the CPC Plus range but didn't.

I don't know how viable it would be to take one of the FPGA Z80 implementations, and stick it on a Z80 compatible form factor, at 4MHz, looking to the rest of the system like a normal Z80 timing-wise, but internally redesigned with a full 16-bit single-cycle ALU (to speed up processing) and instruction cache (to reduce issues with slow main memory access, sorry games that use self-modifying code). It might end up looking more like an R800.

Most graphics routines use the 16-bit register pairs and instructions, so this would be the single best way to speed up the performance - although limited by the main memory access times for writes.


I've done something like this (https://stardot.org.uk/forums/viewtopic.php?f=3&t=20752) for the BBC Micro - a board which plugs into the 6502 socket and replaces the CPU with a WDC65816 (https://www.westerndesigncenter.com/wdc/w65c816s-chip.php) (6502 compatible with a 16b mode) and a fast 512KByte RAM with a CPLD to implement all caching and memory remapping logic.


It works well, slowing down for access to host resources but otherwise running at full speed asynchronously to the host computer. The latest incarnation is stable at around 16MHz. Quite how much of that speed up you get is very dependent on how often you write to screen RAM (slow writes) and other peripheral locations. For BASIC programs like the sphere demo you really do get most of it (~7x), but for hugely IO bound tasks like being a host to an Acorn 2nd Processor the speed up might be just 50% or so. And of course it's no use at all for most games which will just run too fast, but things like chess programs or adventure games might appreciate the speed boost.


The main thing is though that it still feels like a BBC Micro. It's highly compatible. It's faster. It has more memory for BASIC (shadow mode) - not such an issue on the CPC. It offers more ROM slots and sideways RAM. Essentially though it does still feel like a Beeb.


I wonder about doing something similar for the CPC, but again this kind of acceleration is probably of no interest to gamers since you'd end up disabling it most of the time. Great for CP/M and BASIC programming of course but I feel the target market is shrinking there ...



Title: Re: Is there any hardware to make the CPC run faster?
Post by: Sykobee (Briggsy) on 00:02, 25 June 21
Very clever. Whilst it would be nice on the CPC to have something similar, the main use would be for patched games - Sentinel, Freescape games, and so on, that could be patched "easily" enough to make use of such a speed up. Otherwise it would be so rare that nobody would write for it.


But I would like it in the CPC FPGA cores for mister, etc - assuming one day I get such a thing.
Title: Re: Is there any hardware to make the CPC run faster?
Post by: zhulien on 05:17, 25 June 21
changes like this really mean you haven't got a CPC anymore


That depends on which bit is the CPC to you.  If you change your 3" drive to a Gotek, is it a CPC?  If you change your keyboard to a PS2 keyboard, is it a CPC?  If you change everything to a JustCPC, is it a CPC?  I guess my PC is not a PC anymore and my Amiga is not an Amiga anymore and my CPC is not a CPC anymore... because they are enhanced.