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

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

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

Post by emuola » Tue Jan 08, 2019 1:14 pm

Thanks for accepting me here. Been tinkering with my zx48k (issue 2) and done the following repairs/upgrades:

-caps replaced (also inside psu)
-regulator replaced
-s-video mod done (replaced rf modulator internals)
-new keyboard membrane

Now the only thing I want is to expand the ram to (at least) 128k to be able to run the latest homebrew stuff :) There are some internal and external concepts, but some of them are really old etc. I know the space is really constrained inside the speccy but I'm willing to try this out. I love the design of the 48k and thus would not want to have a later model (not even the toastrack).

What is currently the best way to expand the ram of a issue 2 zx48k? If possible the expansion would be compatible with Divide etc modern hw.

Thanks :)

User avatar
1024MAK
Posts: 2439
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 » Tue Jan 08, 2019 3:31 pm

I presume you mean the original rubber key model?

Actually fitting larger capacity DRAM chips is not too much of a problem. The problem is adding the circuitry to provide the bank switching capability, especially if you want it to be configured to be the same as in a ZX Spectrum 128k (Toastrack)/+2 (grey). Or to be configured to be the same as in a ZX Spectrum +2A / +2B (both in a black case) or a +3 / +3B.

In all cases, you will need some programmable logic device (or devices). In the past GAL chips were popular. But a lot of the hobby friendly chips have been discontinued. You can still get some from eBay, but with the usual risks of such a marketplace.

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 » Tue Jan 08, 2019 5:06 pm

1024MAK wrote:
Tue Jan 08, 2019 3:31 pm
I presume you mean the original rubber key model?

Actually fitting larger capacity DRAM chips is not too much of a problem. The problem is adding the circuitry to provide the bank switching capability, especially if you want it to be configured to be the same as in a ZX Spectrum 128k (Toastrack)/+2 (grey). Or to be configured to be the same as in a ZX Spectrum +2A / +2B (both in a black case) or a +3 / +3B.

In all cases, you will need some programmable logic device (or devices). In the past GAL chips were popular. But a lot of the hobby friendly chips have been discontinued. You can still get some from eBay, but with the usual risks of such a marketplace.

Mark
Hi Mark, the s-video mod works great ;)

I also realised the ram chip(s) are not the problem, but the logic is. There seems to be GALs available on Ebay, but the mileage might not be perfect with some of them... I found this "universal" 128k rebuild:

https://hw.speccy.cz/128krebuild.html

and this external one:

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

They both use GALs.

I'm really not sure (or technically competent enough) to evalute how I want the ram to be configured (ZX Spectrum 128k (Toastrack)/+2 (grey) or ZX Spectrum +2A / +2B (both in a black case) or a +3 / +3B). Could you please enlighten me on this? I just thought "if there's 128k ram, then there is :D

Thanks one again Mark for your time helping others out :)

User avatar
Paul
Posts: 1024
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 6:09 am

1024MAK wrote:
Tue Jan 08, 2019 3:31 pm
In all cases, you will need some programmable logic device (or devices). In the past GAL chips were popular. But a lot of the hobby friendly chips have been discontinued. You can still get some from eBay, but with the usual risks of such a marketplace.
Hi Mark,
While this was true for several years microchip technologies is now producing chips starting with ATF. ATF16V8 for example in DIP, PLCC, SOP...
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 8:49 am

Hi Mark,
While this was true for several years microchip technologies is now producing chips starting with ATF. ATF16V8 for example in DIP, PLCC, SOP...
Thanks for that, it seems this is pin compatible with the GALs used in the designs:

https://www.mouser.fi/datasheet/2/268/d ... 180745.pdf

But what about the code? There seems to be these 3 files for the GAL regarding the internal 128k mod: p2_gal, p2_gal.eqn, p2_gal.jed

That's compiled assembly code, right? Sorry, this is completely new area for me :geek:

User avatar
1024MAK
Posts: 2439
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 10:41 am

Careful. Only CPUs, microprocessors and microcontrollers execute assembly code.

In programmable logic devices, be they PAL, GAL, CPLD or FPGA devices, what you are actually see is device configuration information. This tells the programmer how to configure the logic gates in the device so that it will perform the logic functions that you want.

.eqn is the human readable file with the required equations and other details.
.jed is the JEDEC file and it contains all the details that the programmer needs to program the chip.

For more information see these links:

https://www.uchobby.com/index.php/2008/ ... ics-hobby/

http://sss-mag.com/pdf/PLDTUTOR.pdf

Mark

User avatar
1024MAK
Posts: 2439
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 10:45 am

emuola wrote:
Tue Jan 08, 2019 5:06 pm
I'm really not sure (or technically competent enough) to evalute how I want the ram to be configured (ZX Spectrum 128k (Toastrack)/+2 (grey) or ZX Spectrum +2A / +2B (both in a black case) or a +3 / +3B). Could you please enlighten me on this? I just thought "if there's 128k ram, then there is :D
The differences between these machines are described in detail here ;-)

Mark

User avatar
1024MAK
Posts: 2439
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:17 am

Paul wrote:
Wed Jan 09, 2019 6:09 am
Hi Mark,
While this was true for several years microchip technologies is now producing chips starting with ATF. ATF16V8 for example in DIP, PLCC, SOP...
Hi Paul

Ahh, yes.
A lot of hobby projects are/were based on the Lattice versions of the GAL chips. That is the line that has been discontinued. Being a popular line of parts, it’s not difficult to find inexpensive third party programmers for the Lattice GAL chips.

I have not tried any Microchip / ATMEL GAL chips myself yet. Do they use the same programming arrangements as Lattice chips? If not, which programmer do you use? Or, do you know if there is a list of suitable programmers somewhere?

Mark

User avatar
Paul
Posts: 1024
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 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
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 12:21 pm

1024MAK wrote:
Wed Jan 09, 2019 10:41 am
Careful. Only CPUs, microprocessors and microcontrollers execute assembly code.

In programmable logic devices, be they PAL, GAL, CPLD or FPGA devices, what you are actually see is device configuration information. This tells the programmer how to configure the logic gates in the device so that it will perform the logic functions that you want.

.eqn is the human readable file with the required equations and other details.
.jed is the JEDEC file and it contains all the details that the programmer needs to program the chip.

For more information see these links:

https://www.uchobby.com/index.php/2008/ ... ics-hobby/

http://sss-mag.com/pdf/PLDTUTOR.pdf

Mark
Thanks, this makes all this stuff more clear :)
1024MAK wrote: The differences between these machines are described in detail here ;-)
Ok, so if I would like my zx48k behave like the toast track ram wise, how would it affect the actual upgrade? :oops: Sorry, that paging thingy got me kinda confused. I noticed that for example many games using ay for music require 128k minimum. I was planning to use the Melodik2 for the ay sound. On a 128k the additional ram is paged on top of the 16k as it says. So, to achieve that in practice on my 48k, what would be the easiest way?

Post Reply