ZX81 memory troubles

Discussions about Sinclair ZX80 and ZX81 Hardware
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: ZX81 memory troubles

Post by PokeMon »

Maybe it's a good idea to use additional soldering flux as the board is nearly 30 years old. :mrgreen:
Sometimes it helps also to get it free with a resistor (the wire end put through the hole) and to cut it.
This way you destroy 14 resistors but they are not too expencive.
User avatar
Paul
Posts: 1604
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: ZX81 memory troubles

Post by Paul »

ArtemKuchin wrote:no, not an iron and a pump, but a desoldering iron with built-in pump
I have one of these and use it frequently. But not always with the wanted result. I really need to get some soldering flux (never had this up to now) and try with that.
I saw what kind of magic Andy Rea did with it producing his ULA on our anual meeting of the ZXTeam.
Unbelievable if you haven't seen this yourself!
In theory, there is no difference between theory and practice. But, in practice, there is.
gozzo
Posts: 452
Joined: Fri Jul 08, 2011 8:52 pm

Re: ZX81 memory troubles

Post by gozzo »

Those dreaded 4116's - would it be possible to replace the lot of them with 4164's, remove all the stupid -5 and +12v circuitry, and change the connections slightly to suit (connect previous +5v ram line [4164 -A7 - not needed] to 0v, previous ram +12v to +5v,and also previous -5v line to 0v) - as apart from the power pins and the extra A7 line, they are pin compatible - would this work? the only problem I can think of is refresh - 4116's need 128 cycles every 2ms, and 4164's, 256 every 4ms(although as you are not using A7, maybe this can be got away with??) - well, that is according to the datasheets I have for them! I was also thinking of 4164's as possible replacements for the 4532 and similar used for the upper 32k in a spectrum !
ArtemKuchin
Posts: 41
Joined: Sun Jul 08, 2012 11:53 pm
Location: Moscow, Russia

Re: ZX81 memory troubles

Post by ArtemKuchin »

For spectrum replacing wirg 4164 works fine. So, it should here.

I have a somple question: How do i check total available memory in zx81 basic?
Artem
gozzo
Posts: 452
Joined: Fri Jul 08, 2011 8:52 pm

Re: ZX81 memory troubles

Post by gozzo »

That depends on whether you want to fully test every single address, or just PEEK RAMTOP to see what the ZX 'thinks' it has installed (or just check the base 1k)- I can't see any easy way to fully test every location as it is , partly because some are used for the display, program itself and system variables - maybe it would be possible to rig up an adapter to fit between the ZX and a rampack (assuming 16k)to shift its addresses to 32768-49152,and disabling the ROM echo in there of course, leaving the base 1k active - should be possible to think up a program to fit into 1k to test all the bytes between those addresses without causing a crash ?? (I DO intend to build such a thingy as I have several rampacks that need testing) .. ??? I'll have another think about it and see what I can come up with..
gozzo
Posts: 452
Joined: Fri Jul 08, 2011 8:52 pm

Re: ZX81 memory troubles

Post by gozzo »

If you just want to see what 'free' ram is available, when the ZX is running ok(to see how much more program/variables you can cram in!), try

PRINT (PEEK 16386+256*PEEK 16387)-(PEEK 16412+256*PEEK 16413)

I think this will give a very rough amount of bytes free.. I tried in on EightyOne emulator set to 16K with no program or variables loaded, and it came up with 15379 ,so it doesn't look too far out !!
User avatar
1024MAK
Posts: 5534
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: ZX81 memory troubles

Post by 1024MAK »

gozzo wrote:Those dreaded 4116's - would it be possible to replace the lot of them with 4164's, remove all the stupid -5 and +12v circuitry, and change the connections slightly to suit (connect previous +5v ram line [4164 -A7 - not needed] to 0v, previous ram +12v to +5v,and also previous -5v line to 0v) - as apart from the power pins and the extra A7 line, they are pin compatible - would this work? the only problem I can think of is refresh - 4116's need 128 cycles every 2ms, and 4164's, 256 every 4ms(although as you are not using A7, maybe this can be got away with??) - well, that is according to the datasheets I have for them! I was also thinking of 4164's as possible replacements for the 4532 and similar used for the upper 32k in a spectrum !
You do know that there was another 16k x 1 bit DRAM chip that does not need any -5V or +12V power rails?
These are 4816AP-3 chips and only need +5V and 0V supply rails.
They are used in the Acorn BBC Micro and have the same pin-out (except pins 1 and 9 are N/C).
I would attach the data sheet, but I am currently getting an error :!:
Sorry, the board attachment quota has been reached.
I also do not know if these are still available...
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Spring approaching...
User avatar
RetroTechie
Posts: 379
Joined: Tue Nov 01, 2011 12:16 am
Location: Hengelo, NL
Contact:

Re: ZX81 memory troubles

Post by RetroTechie »

gozzo wrote:Those dreaded 4116's - would it be possible to replace the lot of them with 4164's, remove all the stupid -5 and +12v circuitry, and change the connections slightly to suit (..) the only problem I can think of is refresh - 4116's need 128 cycles every 2ms, and 4164's, 256 every 4ms
Some 64K*1 (or *4) chips have 256-cycle refresh, some have 128-cycle refresh. The latter probably most common since they are a nice match for a Z80 that cycles through 128 refresh addresses, so these were used in a lot of systems. It depends on manufacturer & type so only a datasheet for the exact part you have, will tell.
1024MAK wrote:You do know that there was another 16k x 1 bit DRAM chip that does not need any -5V or +12V power rails?
There's also 16K*4 chips that use only +5V (for example TMS4416, I've seen some from Toshiba too), primarily used with TMS9918 family chips as video RAM. But you'd rather use 64K*1 or 64K*4 simply because those are easier to find (and likely cheaper too).
Paul wrote:Have a look here: http://bitcycle.org/retro/spectrum/SRAM_replacement/ It is about replacing the lower 16K of a spectrum, but MIGHT as well work for a 16K Zeddy RAMPACK.
But I don't think this is a reasonable way.
Neither do I. Replacing 4116's in a ZX81 RAM pack with above mod means multiplexing address lines, then de-multiplexing them, to reproduce address signals which are already present on the edge connector. Makes no sense. No need for all the mux/demux + DRAM control logic, just an SRAM is enough.

Given current pricing for 32K*8 SRAMs, I don't see any point in using DRAMs for a ZX81 RAM pack. Especially not considering ZX81 image generation <-> DRAM refresh issues. Not to mention that those SRAMs can be bought new, eg. a 64K*1 DRAM is at best unused, but still old (New Old Stock).

For 16K alone, internal mod is very easy and only requires a 32K*8 SRAM. No extra logic, just wiring. Basically remove old RAM, place 28 pin socket, and then either: bend a few pins on SRAM sideways, place in socket & wire those few pins. Or modify those few socket pins on the board. Personally I prefer the latter as the modifications are small, easy to do/revert, and it makes exchanging the SRAM trivial. For example check this picture: http://bitcycle.org/retro/zx81/ula/ZX81 ... _board.jpg (ignore anything on left side o/t board). That's internal 16K RAM, a few cut circuit traces and maybe 10 cm. of wiring in total. The SRAM has no pins bent sideways. True Hi-Res capable like internal 1K or 2K.

To use all 32K in that chip, you'd need at least an extra logic IC. More than that (>32K, battery backup, write protect, bank switching) is the kind of thing which IMHO lends itself better to build into a RAM pack. And for that purpose I'd just take a RAM pack, rip out all IC's & power circuitry, and use 1 original circuit board for connections & as mechanical support. Note that internal RAM expansion does away with the infamous RAM pack wobble, which IMO is a big advantage of an internal mod. Also does away with the RAM pack itself, and keeps the edge connector free for other uses.
User avatar
Paul
Posts: 1604
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: ZX81 memory troubles

Post by Paul »

ArtemKuchin wrote:How do i check total available memory in zx81 basic?
What do you think about this?http://forum.tlienhard.com/phpBB3/viewt ... 8cd5#p6150
Sysinfo.p will give you a quick answer ;)
In theory, there is no difference between theory and practice. But, in practice, there is.
ArtemKuchin
Posts: 41
Joined: Sun Jul 08, 2012 11:53 pm
Location: Moscow, Russia

Re: ZX81 memory troubles

Post by ArtemKuchin »

Paul wrote:Sysinfo.p will give you a quick answer ;)
Oh! This is nice! Thanks


RetroTechie:

I got it , i got it. Repairing the ram pack is not worth it. But the thing is one of the zeddies i have is a complete boxed set, even the ramp pack is in an original box. So, this is not the functional repair, it is basically restoration to the original state. So, this zx81 (and only this one) needs an original ram pack any way. SO, i guess i have to repair OR at least simulate ram pack in the original case.
All the others will get internal upgrade.
Artem
Post Reply