Newsgroups: comp.sys.sinclair
Path: ulke.hiMolde.no!trane.uninett.no!nntp.uio.no!ifi.uio.no!sics.se!eua.ericsson.se!erinews.ericsson.se!cnn.exu.ericsson.se!convex!cs.utexas.edu!howland.reston.ans.net!news.moneng.mei.com!uwm.edu!reuter.cse.ogi.edu!psgrain!m2xenix!m2n
From: cotrina@lia01.unizar.es (Francisco Cotrina)
Subject:  1Mg Ram for the ZX-Spectrum
X-M2n: psg.com
Organization: PSGnet mail to news gate
Date: Mon, 16 Jan 1995 19:49:00 GMT
Message-ID: <9501161949.AA00359@lia01.unizar.es.unizar.es>
Sender: @psg.com
Lines: 43

This is an addendum to my last posting about how to have a Spectrum with
1 Megabyte of memory.
It was published in a Spanish Magazine called "Resistor", so if you live
in Spain, Puerto Rico or SouthAmerica you might find it.
It is an issue about 1984-5, but I ignore if the magazine is still alive,
not even if they have a missed-issues-delivery.
And now, the stuff:
As you sure know, the spectrum is a 8 bit machine, using 16 bits registers.
This allow to use as much as 64Kb memory.
And what about ZX-Spectrum +2 ??  It has 128 Kb, doesn't it?? (you wonder)
The answer is YES, and the technique is called "paging".
You can have as much memory as you wish, you just have to know how to adress it.
But you can use the ports (concretelly, the I/O ports). Imagine you have
a device conected to the back slot of the computer, that can look at the
adress-line (may be this is not the correct word, but it is the only
translation I can think of). When you write data to this adress (using OUT
instruction), the device takes it, and knows you are talking to it. Usually
the device takes another command throught the data-line, and knows what to
do. In this case, interchange memory banks.
How does it does it?? Well, It is easy. just take all the following
asks (petitions) to memory, and if they adress to one of the conmuted banks,
translate them to the external memory, and return your data.
If you do it carefully, you set the ED line (Envoy Data), and put the data.
Of course you have to avoid the other memory to send its data: just tell
the authentic memory that it correctly send it.
On the Spectrum , it was common to use memory banks of 16Kb, so the limit was
16Kb * 256 posibles values.
But hey, that is not correct! You also had to say WHERE you want to put the
new banks. 64 Kb / 16Kb-banks = 4 banks. This takes 2 bits.
So we have 8-2=6 bits. That makes 2^6=64 posible banks
That is : 64 banks * 16Kb each one = 1024 Kb.
Of course you can use smaller sized banks, for example 8kb, but you will need
3 bits to tell the substituted bank, thus leading to 8-3=5 bits to address
them, so: 2^5=32 banks. 32 banks * 8 Kb = 256 Kb.
Good things about that:
1) You can substitute any bank: this is: ROM or RAM.
   This is the metod used by Disciply, all the Transtape-like copiers,
   the Mikroplus device (Shadow of Unicorn game), and the Spanish version
   of Spectrum, called Inves+ , that has a different ROM (conmutable),
   and the 128Kb machines.
2) You can Switch easily between banks -> fast demos !
 
cotrina@lia01.unizar.es
