Interesting hardware - RAM expansion?

Discussions about Sinclair ZX80 and ZX81 Hardware
Post Reply
gamer-stu
Posts: 6
Joined: Wed Jan 22, 2020 8:31 pm

Interesting hardware - RAM expansion?

Post by gamer-stu »

Hi all, I purchased a ZX81 lot last year that included two expansion boxes. I haven't mapped all the pins and replaced the battery, so I don't want to hook up until I'm confident that I won't smoke everything. :)

Based on these pictures, is my cursory analysis correct that they are battery backed up RAM expansions? Not sure what the switches do, whether change addressable area or whatever.
Attachments
D3E35DC2-2CA1-4696-B904-1154B75FC905.JPG
609C0BEB-ABCC-4333-B29C-19C9923CECA8.JPG
User avatar
1024MAK
Posts: 5103
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Interesting hardware - RAM expansion?

Post by 1024MAK »

If the item under all the tape is indeed a battery, it could be battery backed RAM. Can you see the type numbers of the RAM chips?

Do you have a multimeter? What voltage is the battery actually producing?

The safest way to proceed is to disconnect the battery, making sure that the connections cannot short against each other or to any other circuits/connections/conductors. Then, connect it to a ZX81, power up, and see if you get to the K prompt.

One switch looks to be wired to pin 26, which is address line A13 on a 28 pin SRAM chip.

Often there is a switch to provide a write protect function, but it’s hard to tell if the switch in your other photo is wired up to do this.

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
gamer-stu
Posts: 6
Joined: Wed Jan 22, 2020 8:31 pm

Re: Interesting hardware - RAM expansion?

Post by gamer-stu »

Mark.

Excellent insights, thank you. I will do the suggested testing this weekend and report back!

Chris
gamer-stu
Posts: 6
Joined: Wed Jan 22, 2020 8:31 pm

Re: Interesting hardware - RAM expansion?

Post by gamer-stu »

I inadvertently left off the external photo of the project boxes.

Upon closer inspection, the box on the right (with the dip switches) has a connector that is too large for the zx81.
Attachments
IMG_1724.jpg
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: Interesting hardware - RAM expansion?

Post by Moggy »

I also think this is a battery backed RAM board and agree with Mark re the write protect switch.

Attached is a photo of my own board complete with write protect switch.
Attachments
SANY0020.JPG
gamer-stu
Posts: 6
Joined: Wed Jan 22, 2020 8:31 pm

Re: Interesting hardware - RAM expansion?

Post by gamer-stu »

Ok, I ran some tests. First, as suggested, I disconnected the battery and measured the voltage. Just shy of 3 volts. The battery pack is two 3v Lithium batteries in parallel.

I proceeded to test both boxes by PEEKing for RAMTOP (address 16389) and multiplying by 256. The larger box with the dips is working (without battery). Re the DIP switches, I didn't test all 256 permutations. However, I did find that if the MSByte is F (1111) the RAM is set to 16K (RAMTOP 32767). Any other value sets the ram to 8K (RAMTOP 24576). LSByte on the dips switches appears to be meaningless.

I was unable to get the smaller box with two switches to work. With it plugged in, the machine only registered 2K (RAMTOP 18431).
gamer-stu
Posts: 6
Joined: Wed Jan 22, 2020 8:31 pm

Re: Interesting hardware - RAM expansion?

Post by gamer-stu »

I have more insight into the design of the box with DIP switches.

It actually has 56K. Apparently PEEKing RAMTOP isn't adequate to see the total RAM. I found a program to test expanded RAM, and this showed that all of the 56K is addressable (YEAH). Unfortunately, in my haste to remove the battery, I didn't log which pins I removed it from. So now I need to figure out where to reattach it.

Here is the program that I used:

10 FOR I = 32768 TO 65535
20 POKE I,255
30 LET A= PEEK I
40 POKE I,0
50 LET B = PEEK I
60 IF A <>255 OR B <>0 THEN GOSUB 110
70 SCROLL
80 PRINT I
90 NEXT I
100 STOP
110 PRINT "ERROR AT: ",I
120 STOP
130 RETURN
Attachments
IMG_1735.jpg
User avatar
1024MAK
Posts: 5103
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Interesting hardware - RAM expansion?

Post by 1024MAK »

The ZX81 ROM only tests for between 1K and 16K of RAM. It ignores RAM below 0x4000 and ignores RAM above 0x8000.

Just to save future questions from other members, please keep in mind that the program in the above post is only suitable if there is real RAM between 32768 (0x8000) and 65535 (0xFFFF).

If there is not continuous RAM, because of the partial address decoding used in ZX81 systems, writes and reads may/will actually access RAM in other memory locations which may result in the system variables, the program, variable or display file data being overwritten. Which could cause a BASIC program to stop with a weird error, or just crash.

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
gamer-stu
Posts: 6
Joined: Wed Jan 22, 2020 8:31 pm

Re: Interesting hardware - RAM expansion?

Post by gamer-stu »

Thank you 1024MAK, excellent points. I failed to mention that I also forced RAMTOP at 32K by using POKE 16389,128. This ensured that I wouldn't blow away BASIC.
Post Reply