Best solution for expanding ram to 128k on a zx48k?

User avatar
Paul
Posts: 991
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: Best solution for expanding ram to 128k on a zx48k?

Post by Paul » Wed Jan 09, 2019 3:52 pm

Can you please post a photo of YOUR pcb? We would like to see if your upper 32k are socketed or not.
In theory, there is no difference between theory and practice. But, in practice, there is.

emuola
Posts: 7
Joined: Tue Jan 08, 2019 9:03 am

Re: Best solution for expanding ram to 128k on a zx48k?

Post by emuola » Wed Jan 09, 2019 4:17 pm

Paul wrote:
Wed Jan 09, 2019 3:52 pm
Can you please post a photo of YOUR pcb? We would like to see if your upper 32k are socketed or not.
Is this good enough? Took that before the s-video mod in October. If it's not good, I'll pop the Speccy open for a better picture :)
Attachments
20181019_173054.jpg

User avatar
Paul
Posts: 991
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: Best solution for expanding ram to 128k on a zx48k?

Post by Paul » Wed Jan 09, 2019 4:25 pm

Yes, they are soldered inside.
Both solutions need the internal 32k RAM to be desoldered.
This is not easy and no beginners task. The internal version (wich I prefer) also needs the 16k lower RAM to be desoldered.
Getting rid of the DRAM and replace by SRAM makes the critical negative voltage generation obsolete which I think is good.
These changes are hardcore.
In theory, there is no difference between theory and practice. But, in practice, there is.

User avatar
1024MAK
Posts: 2245
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Best solution for expanding ram to 128k on a zx48k?

Post by 1024MAK » Wed Jan 09, 2019 4:27 pm

Before I explain further, a bit of history and a time line.

Sinclair’s engineering staff developed the ZX Spectrum 16k and 48k machine’s based on what they had learned in creating the ZX80 and ZX81. The ZX Spectrum+ is just a 48k board (or a 16k board) in a new case with a slightly better keyboard.

Then the Spanish developed the 128k (toastrack). Sinclair in the U.K. produced a slightly different version of the 128k, but fundamentally it is the same hardware.

Amstrad brought Sinclair’s computer stock, designs and rights. They then produced a new machine based on the 128k (toastrack) design. There are some differences, but again, fundamentally it is the same hardware (it uses the same ULA).

To reduce costs and add extra features, Amstrad engineers produced a new gate array and new PCB for a new version of the +2. To differentiate it from the earlier +2 (which is dark grey in colour), these new machines are called the +2A. However soon after it was introduced, Amstrad put the gate array on a smaller PCB to further reduce costs, this is the +2B. The +2A PCB is the same as the +3 PCB. The +3 of course having the disk drive chips fitted. So most black coloured machines marked +2 on top, are actually +2B machines internally (even if it says +2A on the bottom). The +2A/+3 PCBs being then used to build the +3 machines. There is a design fault with the audio circuitry, so later a +3B PCB was produced to replace the 2A/+3 PCBs in later +3 machines. The +2B PCB also has this audio problem fixed.

In making the new gate array, Amstrad engineers went on the information that they had. Unfortunately this information did not accurately reflect how the 128k (toastrack) actually worked...

The main difference in terms of RAM between the 128k toastrack / +2 (grey) and the later Amstrad designed +2A, +2B, +3 & +3B is in which bank is provided by which physical RAM chips. Both have the same amount of RAM. Both will change the RAM bank. RAM appears in the same RAM banks as you would expect. The difference is in the access time as seen by the CPU.

If a particular RAM bank is provided by the same RAM chips that also are being used by the system (ULA or gate array) to produce the video picture, then any access by the CPU will be subject to delay (called contention) during the time that the ULA/gate array is getting screen data from the RAM.

If however the particular RAM bank is provided by the RAM chips that are only connected to the CPU and which never provide screen data, then the CPU is never delayed in accessing them (known as uncontented).

When using BASIC, this does not have much of an effect, but it may have an affect when running machine code programs such as games.

If you are going to use existing GAL equations or configuration data, then I would not worry about it. I have not checked, but it’s likely that the GAL design files will be designed to replicate the 128k (toastrack) bank arrangement.

Mark

User avatar
1024MAK
Posts: 2245
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Best solution for expanding ram to 128k on a zx48k?

Post by 1024MAK » Wed Jan 09, 2019 4:28 pm

Paul wrote:
Wed Jan 09, 2019 12:02 pm
My programmer is a tl866
I use latest lattice settings without problems.
I am not sure whether I have a deviceID check disabled or if it's on defaults.
Kind regards Paul
Thanks Paul :D

Mark

emuola
Posts: 7
Joined: Tue Jan 08, 2019 9:03 am

Re: Best solution for expanding ram to 128k on a zx48k?

Post by emuola » Wed Jan 09, 2019 7:02 pm

1024MAK wrote:
Wed Jan 09, 2019 4:27 pm
Before I explain further, a bit of history and a time line.

Sinclair’s engineering staff developed the ZX Spectrum 16k and 48k machine’s based on what they had learned in creating the ZX80 and ZX81. The ZX Spectrum+ is just a 48k board (or a 16k board) in a new case with a slightly better keyboard.

Then the Spanish developed the 128k (toastrack). Sinclair in the U.K. produced a slightly different version of the 128k, but fundamentally it is the same hardware.

Amstrad brought Sinclair’s computer stock, designs and rights. They then produced a new machine based on the 128k (toastrack) design. There are some differences, but again, fundamentally it is the same hardware (it uses the same ULA).

To reduce costs and add extra features, Amstrad engineers produced a new gate array and new PCB for a new version of the +2. To differentiate it from the earlier +2 (which is dark grey in colour), these new machines are called the +2A. However soon after it was introduced, Amstrad put the gate array on a smaller PCB to further reduce costs, this is the +2B. The +2A PCB is the same as the +3 PCB. The +3 of course having the disk drive chips fitted. So most black coloured machines marked +2 on top, are actually +2B machines internally (even if it says +2A on the bottom). The +2A/+3 PCBs being then used to build the +3 machines. There is a design fault with the audio circuitry, so later a +3B PCB was produced to replace the 2A/+3 PCBs in later +3 machines. The +2B PCB also has this audio problem fixed.

In making the new gate array, Amstrad engineers went on the information that they had. Unfortunately this information did not accurately reflect how the 128k (toastrack) actually worked...

The main difference in terms of RAM between the 128k toastrack / +2 (grey) and the later Amstrad designed +2A, +2B, +3 & +3B is in which bank is provided by which physical RAM chips. Both have the same amount of RAM. Both will change the RAM bank. RAM appears in the same RAM banks as you would expect. The difference is in the access time as seen by the CPU.

If a particular RAM bank is provided by the same RAM chips that also are being used by the system (ULA or gate array) to produce the video picture, then any access by the CPU will be subject to delay (called contention) during the time that the ULA/gate array is getting screen data from the RAM.

If however the particular RAM bank is provided by the RAM chips that are only connected to the CPU and which never provide screen data, then the CPU is never delayed in accessing them (known as uncontented).

When using BASIC, this does not have much of an effect, but it may have an affect when running machine code programs such as games.

If you are going to use existing GAL equations or configuration data, then I would not worry about it. I have not checked, but it’s likely that the GAL design files will be designed to replicate the 128k (toastrack) bank arrangement.

Mark
Ok, that was a very detailed explanation, which even I could understand :) Thank you.

One more thing: I understood that the other example I posted indeed is an external ram expansion:

https://velesoft.speccy.cz/zx/external_ ... /index.htm

Is it possible to use let's say an external ram expansion + external ay + external storage (such as Divide etc.) simultaneously, provided that at least the first two expansions have a pass through connector? To me it looks like the external ram expansion does not have the passthrough, so it would be the last one "in the chain". Sorry, this is just my unprofessional reasoning, please correct me where I've gone wrong :oops:

If it's not, I think I'll start tinkering with the generic (internal) 128k expansion. Let's see what happens :mrgreen:

*edit*

Replying myself: the external expansion has this shortcoming: "This upgrade can't support videoram switching. It is used only first videoram."

The internal one seems to support 2nd vram also. Da*n.

I'm not sure if this is exactly what Mark posted earlier :?: Not using 2nd vram is a showstopper?

*edit2*

It seems the 2nd vram is also called shadow ram and some older games don't work correctly with 128k. There is a way to circumvent this with a certain basic command before loading the game though. Hmm. Also shadow ram can apparently be used for double buffering. Does not sound too bad.

User avatar
1024MAK
Posts: 2245
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Best solution for expanding ram to 128k on a zx48k?

Post by 1024MAK » Wed Jan 09, 2019 11:38 pm

Video RAM is the RAM used by the ULA (or gate array) to produce the video picture. In a ZX Spectrum 16k or 48k, this is always the same area of RAM in the “lower” RAM chips, that is, the 4116 chips (eight 16k chips each one bit wide).

The 128k machine (and later machines) have 128k chips. The logic is arranged so that the CPU can choose if the ULA / gate array uses the normal area of RAM, or an alternative area of RAM (in the same chips) by changing the address lines between the ULA / gate array and the RAM.

But this can only be done for internal modifications, as the ULA has no access to any external RAM.

The loss of this feature will affect any 128k game that makes use of it.

Mark

emuola
Posts: 7
Joined: Tue Jan 08, 2019 9:03 am

Re: Best solution for expanding ram to 128k on a zx48k?

Post by emuola » Thu Jan 10, 2019 6:24 am

1024MAK wrote:
Wed Jan 09, 2019 11:38 pm
But this can only be done for internal modifications, as the ULA has no access to any external RAM.

The loss of this feature will affect any 128k game that makes use of it.

Mark
Ok, this makes it clear, altough it's unfortunate and makes the ram expansion project a whole lot more challenging :/ Thanks again Mark and Paul for clearing things out for a sinclair noobie :)

Post Reply