domingo, 21 de agosto de 2016


I have been designing a ZX Spectrum Cartridge "clone" for a while (case, board and silicon skirt), to be able to make new software releases or replace original damaged cartridges. I always liked the fact that these cartridges were small and had a sleek look.
However, Cartridges have a nasty limitation, which is the hard coded limit to 16KBytes. In fact it's a limitation imposed by ZX Spectrum inner workings and how ROMCS control line works, which can be used to disable internal ZX Spectrum ROM, which has 16KBytes, hence the size limit.

This new Cartridge, will have up to (128K, 256K or 512K Bytes), paged in 16KB blocks into the same address space as ZX ROM.
This will allow this cartridge to work as a replacement for multiples of 16KB ROMs, or eventually, as a fast application snapshot loader, so that larger than 16KB applications can be loaded by using several 16KB Banks.
Another important factor in the design, is to be able to quickly switch banks, in order to use the cartridge as ROM data bank, for an application larger than 48KB or 128KB. This allows for larger games or levels to be included, without ever needing to use a tape deck or similar serial loading.

However, due to limited Bus Address control lines available at ROM Cartridge slot, several hurdles had to be overcome, since we need to send at least bank switch commands to it, but no Read (RD) or Write (WR) control lines are available (see available control lines on the right, in green when compared with regular Z80 CPU control lines for opcode fetch.
So after several brainstorming sessions, I developed a method to trigger these commands, by manipulating the address lines into a specific sequence, that is almost impossible for a regular program to generate in normal operation.

It basically consists, in managing to output the same exact address 3 times in sequence, which is usually impossible, since each Z80 fetch instruction cycle (M1 cycle), always outputs a refresh address in between. So at most, two consecutive addresses could happen, in normal operation. But with some very specific trickery one can manage to output these 3 consecutive addresses.

So after validating this idea, it was time to make some simulations, and find some digital logic that would accomplish this mechanism.
On the right is an example of a simulation to validate the bank mechanism with a few test cycles.
It tests, regular Reading of addresses from ROM and RAM, the trigger mechanism for setting a Bank and also a another mechanism to allow writing to the Flash Memory being used as Cartridge ROM.

All that was left to do was to implement a suitable PCB (last image).
To make this a reality, able to fit inside the very small ZX Spectrum original Cartridge case, all components had to be SMD and low profile variant (TSOP and TSSOP).

8 comentários:

  1. Engenhoso!
    Estás efetivamente a expandir a memória do Spectrum para cima dos 128KB, com um "hack" bem elegante!

  2. Hi Rui,

    Could you explain me how could you open the cartridge without breaking it?

    Thank you!

    1. The cartridges are in fact glued and are very hard to open without damage.
      You need a lot of patience and little bit of luck.
      What I did to open it was heat the cartridge along the seam, slowly while checking if it starts to come loose. Note: This is a very slow process and can take in excess of one hour, without any guarantee results.

      The main question you should answer is why do you want to open it?
      I already have one open. You can check the photos I have taken. What extra info do you need ?

    2. Hi again,

      I just want to clone the rubber protector. I have some cartridges without it.

      To make the mold is necessary, logically.


    3. I'm also planning to make rubber skirts for my cartridges.
      I will sell them, together with the cartridge system or individually, as soon as I have them available.

    4. TIP: It's easier to mold the skirts based on an undamaged silicon skirt, that you can remove from a good cartridge.
      NOTE: The skirt is not glued, it's just very tightly placed into position.
      It's possible to removed a skirt and put it back again, into a cartridge, without actually opening the cartridge, with enough patience and perseverance, by using a simple toothpick or non sharp/pointy plastic tool.
      I have tried it, with success more than once, since this is necessary to fix old but original cartridges, that are better left un-opened.

  3. Oh, thanks for the advice.

    Actually, by manipulating a cartridge with the rubber skirt intact I have managed to extract and reinsert part of the rubber.

    I have not extracted it completely because I did not know if I could introduce it again.

    I will dare!

  4. Many thanks for your hard work! I watched your video on Youtube and I was amazed that you managed to get multi-load R-Type to work from cartridge. This is exactly where such a kind of device should be used as for gaming - to allow multi-load games to be played without all that hassle with level tape loading.

    There is also that website - and he actually designed several cartridge variants and even supports WRITING to cartridges, I think. But for sure you know about that.