News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_radu14m

Overclocking CPC @6/8 Mhz

Started by radu14m, 22:05, 24 December 12

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

arnoldemu

@Bryce: What would the circuit look like if the main 16Mhz clock was kept for gate-array, crtc, fdc and sound, but a seperate 6Mhz/8Mhz clock was used for z80?

This would keep the sound, graphics and fdc the same but give more power to z80.

Just wondering...
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

arnoldemu

Quote from: Bryce on 14:12, 05 September 14
Ok, just messing about here with a concept for a possible "Accelerator" for the CPC. The idea is this. A single 24Mhz Clock with a divide by three circuit to bring it back down to 16Mhz. Solid-state switching to allow you to switch frequencies without resetting and a seperate 4Mhz clock for the FDC (this could also be made switchable if required). The PCB would be installed by removing IC117 and plugging this board into the (newly added) socket. It would also have a single wire that would need to be connected to IC205 Pin 13 (after disconnecting the pin from the mainboard). It looks complicated in the schematic, but actually it's only 4 ICs including the 74HC04 that was on the mainboard.

It's just a first draft/scribble and probably full of mistakes and potential for simplification, but I thought I'd upload it anyway, because (A) radu14m asked for one and (B) To get the discussion rolling.

All electronics members (and non-electronics members), feel free to criticise and pick holes in the design / schematic / concept :)

Bryce.
With this circuit the Gate-Array is clocked higher so the resolution is higher? And the sound would be closer to 2Mhz and similar to ST?
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

arnoldemu

It would be interesting to see a circuit for dma transfer... but finish the accelerator one first  ;D
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Munchausen

Quote from: arnoldemu on 17:47, 05 September 14
@Bryce: What would the circuit look like if the main 16Mhz clock was kept for gate-array, crtc, fdc and sound, but a seperate 6Mhz/8Mhz clock was used for z80?

This would keep the sound, graphics and fdc the same but give more power to z80.

Just wondering...


Quote from: arnoldemu on 17:48, 05 September 14
With this circuit the Gate-Array is clocked higher so the resolution is higher? And the sound would be closer to 2Mhz and similar to ST?


I think the z80 and gate-array, crtc and sound have to be synchronised, only the fdc can have a separate clock (I could be wrong). And so this would make the resolution higher (not sure about sound...)

arnoldemu

Quote from: Munchausen on 18:48, 05 September 14


I think the z80 and gate-array, crtc and sound have to be synchronised, only the fdc can have a separate clock (I could be wrong). And so this would make the resolution higher (not sure about sound...)
I don't agree. Only croc and gate array needs to be synchronised. Fdc,ay and cpu can be different speeds. Ga is master and will hold off cpu when it needs ram. Cpu will try to use available slots and instruction timings will not be so predictable.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Munchausen

#105
Quote from: arnoldemu on 19:52, 05 September 14
I don't agree. Only croc and gate array needs to be synchronised. Fdc,ay and cpu can be different speeds. Ga is master and will hold off cpu when it needs ram. Cpu will try to use available slots and instruction timings will not be so predictable.

Ah ok, I haven't checked , I was just going with my impression. You would know better :)

Bryce

Quote from: Munchausen on 16:32, 05 September 14
Did you mean this? Because 24/3 = 8. You mean 2/3 (divide by 1.5) right?

Yes, I meant divide by 2/3 (quite a difficult division to do in electronics), not 3.

I'm not sure how much the clocks can be split otherwise. I think the AY could have its own clock, but every split means cutting tracks on the mainboard which I don't like to do. I'm pretty sure that if the CRTC, GA or CPU weren't synchronised that things would start getting pretty random and/or instable.

Either way, it is just a concept to get ideas out.

Bryce.

radu14m

Bryce, can wait to see the first prototype !!!  ;D ;D ;D

radu14m

i try today the X-MEM @6Mhz and it"s working ! ;D

TFM

#109
And if you increase the BIT RATE of the HxC FLOPPY EMULATOR by 50% (do that in the menu of the HxC itself for testing), then it will work with 6 MHz too....[nb]Well, I guess ;-)[/nb]  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

radu14m

great ! i will test :)
the only problem is to set every time the CRTC :(
can you prepare a ROM file ? with an rsx command would be more easy !

TFM

Quote from: radu14m on 04:18, 29 September 14
great ! i will test :)
the only problem is to set every time the CRTC :(
can you prepare a ROM file ? with an rsx command would be more easy !


Since you got the X-MEM you could just patch the firmware. Adjust the CRTC values of the ROM in a way that it works. The ROM listing is somewhere in the wiki / internet (writing from PC at work, so got nothing with me).

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

gerald

Quote from: TFM on 15:11, 29 September 14

Since you got the X-MEM you could just patch the firmware. Adjust the CRTC values of the ROM in a way that it works. The ROM listing is somewhere in the wiki / internet (writing from PC at work, so got nothing with me).
If you modify the ROM, you better change the values for NTSC and add a switch on LK4 (Port B, bit 4 of the 8255) which is used to select the CRTC timing.
The 6128 FW dissasembly is available here : http://cpctech.cpc-live.com/docs/os.asm
Table for CTRC init are at address 05C5 for 50Hz, and 05D5 for 60Hz

TFM

That's a good idea, but since Radu already got an X-MEM it's more easy to use the switch already being on the X-MEM instead of adding another switch to the CPC. However on the long term I guess your idea is the best solution.  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

ZbyniuR

I was wonder how overclocking look on other platforms. Recently I read about for example Amiga 500, speed up (only procesor) by 100%, it accelerates only from 5% to 30%, depending on type of memory, because processor must wait for response. It's disappointing. But change processor into more resistant seem to be not necessary, because 68k 7MHz overclocked to 14MHz with an ordinary heat sink has a lower temperature than the same 68k 7MHz working without a cooler. I suppose that same would be in CPC. Of course, exist a lot turbo cards for Amigas.
Atari Mega STE in standard have switch 8/16 MHz acceleration and there is a 100% speed up. I read about similar alterations to ordinary ST, but I don't know details.
To Commodore you can buy Chameleon 64 - 20MHz. But actualy it's separate computer, not turbo card and it's not cheap, but performance is impressive even can emulate Spectrum 128k with ULA+. Apple already in 1986, did IIGS (a 16bit version of Apple II) almost 3 times faster than original, and in 1988 - IIc (8bit) but 4 times faster. Polish fans of 8bit Atari resently trying to do something similar as Apple. I read about testing prototype turbo card with 16bit versions of 6502. Almost 100% compatible, but faster only with new fresh writen software.
Russians and Ukrainians already in 90's made ZX Spectrum clones 100% faster, and later even 24MHz. As I read they only tweaks processor and memory and nothing else. This is apparently easiest way to keep synchronization and working of all connected things. They improve graphics too, but it nothing common with acceleration. Only Amstrads still in The Stone Age.

Maybe we should collect money and announce the prize, for someone who effectively accelerate Amstrad at least 100% ? ;)
Because otherwise it again just talk on forum what we can do, and again will end the conclusion that too expensive, too difficult, too slow, and it's not worth risking damage to  beloved equipment. And the only thing what rest will be to use RSX FASTSCREEN and do not forget DEFINT in BASIC, or compilers. Because what for trying if we have emulators that so easy to accelerate. ;)
In STARS, TREK is better than WARS.

SyX

#115
Well, acceleration is a complex problem, overclocking the CPU is the first step. Although in those days of FPGA, this is the less hack solution and let you experiment with more interesting things, as adding special video modes or embedding a playcity or a blitter or ...

Getting a CPC so faster as the CPC fast mode that Tobiflex made for the C-One or the CPC-Trex without an FPGA, it is going to mean a lot of changes inside the CPC. So many, that you should be better redesign the motherboard.

Of course, we can take a deeper look to other machines for getting inspiration.

For example, the Amiga way is more sensible that you make look. Amiga has two kinds of RAM:
1.- Chip RAM is the RAM used by the custom chips (mainly sound and graphics) and shared with the CPU. There is an IC that signal with device has priority over the RAM, the cpu or the custom chips, usually are the custom chips.

2.- Fast RAM: This RAM is used in exclusively by the CPU and is not shared with any other device. In our CPCs, we lack of this Fast RAM because the GA stop the Z80 even when is using the expansion RAM.

You only need to add a Fast RAM expansion to your Amiga, nothing else and the CPU will go 100% faster executing code in the Fast RAM, only will be stop (read as "running to the same speed than before") when access to Chip RAM. And of course, you can get a lot of patches to move the AmigaOS and its variables to Fast RAM.

In case you need more speed, the supercharged Amigas use expansions that replace the custom chips, like Graphics or Sound cards. Although with those expansions, the Amiga looks less Amiga with every step :P

STs have a memory system similar to the Amiga ones and a lot of these techniques can be shared.

In the case of the C64, the Chameleon is the new thing, but it's nothing more than a FPGA board, even can works without a C64 :P and if you port the CPC-Trex to it, then you will see a CPC in it, in the same way that happened with the C-One.

If you look deeper, you will discover the old SuperCPU (that it's now emulated in the beta versions of Vice) that add a 65816, a 16 bit version of the 6502 (the equivalent to the Z800 or Z280 in the Zilog world) used in Apple IIgs and Snes, running to 20 MHz and with 16 MBs of RAM. But only software made for the 65816 will make full use of this expansion.

But in the C64 world there is a few other interesting things, first one is the REU, a RAM expansion that uses DMA transfers (copy blocks of RAM without using the CPU). Then you have the C128, where the CPU goes to double speed, although during the C64 mode you can only use the extra speed while the video chip is not building the screen. Of course, the prototype C65 is even a better option for getting a superfast c64... if you can find one finished :P

But at the end of the day in the C64 world, the people only wants a way of acceleration the floppy drive XDDDD

Tthe Apple II has cpu acceleratos since the first day, even there is a wikipedia page about it, and Apple used one of these solutions for making its Apple IIc (really pretty machine :)) goes to 4 MHz (a lot from of original 1 MHz :P ). A few of these solutions look CPC friendly.

I never considered the IIgs part of the II family, too much improved in the graphical and sound side, although it's compatible and has similar acceleration solutions as its older brother.

The Atari 8 bit computer guys solution looks very similar to the C64 SuperCPU... these guys always with the same inferiority complex about the C64... always that i read an A800 forum, automatically i think in Iznogoud xDDDD

The russian speccy clones are not so faster, at least the 90s ones, but there is a lot of nice speccy clones as Peter Plus's Sprinter that go really fast. The Sprinter has an old FPGA as video chip and include superlovely graphical modes... it's sad that this machine is practically impossible to get those days.

The superbasic speccy architecture (practically a z80 + ram) helps a lot to having very few limitations and you can add things like DMA chips from Zilog for accelerating the instructions that use repetition (LDIR, LDDR, OTIR, CPIR, INIR, ...). And except in one case, a lot of those graphical improvements are based in interlace modes, that means can not be used without get blind xDDD

The only difficult part in the speccy hardware was its ULA (our GA + CRTC), but it was documented by Bob Smith in a book a few years ago, and since then, the speccy has converted in one of the most FPGAble machine in the world  and a lot of those FPGA implementations add extra things (more speed, new graphical modes, ...).

There is a LOT of fun expansions for ZXs, one that i would like to test add an MSX video chip in the expansion bus and this is another project totally portable to the CPC, that it would help to bring a few MSX, Coleco and Sega SG-100 games to the CPC ;)

Another interesting fast Z80 project is the V6Z80P, one of my favourites because is an Amiga 500 with a Z80 at 16 MHz and an FPGA chip where the audio and video are syntethized, an a CPC mode could be possible.

The BBC is another superinteresting machine to look, for example its Tube expansion where you can connect extra CPUs. And those days we could put there an ARM and send code to be processed in the ARM and returned to the host machine. That is another possible solution for accelerate the CPC, even the ARM could be running a Z80 emulator, jejeje.

I could speak about the Dragon/Coco world and other more rare machines. But i only going to comment two more, because this is boring and everybody get the general idea.

First one is the MSX, a machine really easy to accelerate the Z80 because the video chip uses is own RAM, and the fast Z80 only needs to add extra waits when is sending bytes to the video chip. You can find MSXs with Z80B or the Turbo-R that use the R800, an improved Z80 clone that goes at 7 MHz but it's more or less equivalent to a 28 MHz Z80. Of course, there is a lot of Graphical and Sound expansions for MSX, even they have one expansion that add the Master System video chip, a nice improvement over the old VDP.

And the last, the PCW, you can take a look to the Sprinter board, and accelerator board that goes in the Z80 socket and add a faster Z80, extra RAM and shadow RAM. The code in the extra RAM goes to the full speed of the new z80, the shadow ram is a copy of the PCW internal RAM and every thing is written there, it's sent to the PCW internal RAM (those writes and the I/O access goes to the normal PCW speed).

Quote from: ZbyniuR on 20:47, 29 September 14
Only Amstrads still in The Stone Age.
Well, the only way of changing that is working to fix it, not waiting to somebody does for you. TotO and me wanted a CTC and 2xYMZs, and if we were waiting to somebody for doing it, we will continue waiting :P

Quote from: ZbyniuR on 20:47, 29 September 14
Maybe we should collect money and announce the prize, for someone who effectively accelerate Amstrad at least 100% ? ;)
Because otherwise it again just talk on forum what we can do, and again will end the conclusion that too expensive, too difficult, too slow, and it's not worth risking damage to  beloved equipment. And the only thing what rest will be to use RSX FASTSCREEN and do not forget DEFINT in BASIC, or compilers. Because what for trying if we have emulators that so easy to accelerate. ;)
Sure speak is free and painless, work is hard and take time :P Accelerate a CPC is easy, replace the CPC RAM for a Dual Port RAM and you can cut the Gate Array pin that stop the Z80. Now the Z80 will go to 4 MHz and the GA doesn't disturb it, then buy a 16 MHz or faster Z80, replace the old one and connect the 16 MHz system clock to it and that is all. You will get a 400% faster CPC.

My bank details are... xDDD

TotO

Your post look 1000% overclocked!!!  ;D 
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Neil79

The latest in Indie & Retro News!!! IndieRetroNews - Indie Retro News on twitter

ZbyniuR

#118
Quote from: SyX
-----
" Accelerate a CPC is easy, replace the CPC RAM for a Dual Port RAM and you can cut the Gate Array pin that stop the Z80. Now the Z80 will go to 4 MHz and the GA doesn't disturb it, then buy a 16 MHz or faster Z80, replace the old one and connect the 16 MHz system clock to it and that is all. You will get a 400% faster CPC."
-----

If it's so easy. Has anyone done it?  Was it presented somewhere?
I guess is that you can add some circuits that will give CPC extra skills, but I'm afraid that number of people that will be interested in writing for this program will be negligible. So I think that the priority should be to keep compatibility and ability to run old programs. Except that faster.


If someone, some day will build a new motherboard, here's my wishlist:
1. Suitable for old casing 6128 or 464 and uses old keyboard.
2. Works as CPC PLUS, but faster.
3. SD card as an external storage with support for folders and DSK.
4. USB mouse and pads.
5. It can display images from a ramdisk.
6. Digiblaster.
7. Displays normal PAL.
In STARS, TREK is better than WARS.

TFM

Quote from: ZbyniuR on 14:36, 30 September 14
... but I'm afraid that number of people that will be interested in writing for this program will be negligible. ...


I will support a faster CPC or compatible computer.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

radu14m

I dunno how to patch the FW.
i would need your help ppl  :D

radu14m

increasing the BIT RATE of the HxC FLOPPY EMULATOR by 50% doesn"t work @6Mhz on mine....maybe i do something wrong :o

TFM

Well, you can try different bit rates. Somehow it should be working.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

radu14m

tried 250, 300 and 500 ! same situation.

TFM

IIRC the CPC uses 250 right?

So... can you set it to 375 ??

(I can't. Have no working monitor).
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Powered by SMFPacks Menu Editor Mod