Shelezyak's Planet - a generalized experience in refining various ZX Spectrums.

City #47
 P L A N E T A * * * * * * * * *

 c.    c.   ccc.  ccc. ccc. ccc.   cccc. c. c.   ccc.
 c. c. c c.    c. c. c.      c.  c. c. c.c.   c. c.
       c. c. c.  cc.   c. c. cc.    cc.   ccc. c.  c. cccc.
      c. c. c.  c.    c. c. c.   c.  c.  c.c. c.  c. c. c.
      ccc.cc.c. ccc.c.  c.  ccc. cccc. c. c. c.  c. c. c.

 * * * * * * * * * * * * *

 The ZX-SPECTRUM 48 & 128 computers
 Extended devices and user's manual

(c) UАЗPRQ/Borisov Serge

  The main problem facing ZX-SPECTRUM users
usually consists of bringing your version of the computer to
conditions' by introducing various modifications into the circuit for
use with other devices. Most schemes of this
kind published in many amateur radio publications,
were intended for isolated work and many were simply
contradict each other in connection principles. It makes
users spend a lot of time achieving compatibility
devices among themselves, unfortunately such experimentsoften
accompanied by periodic 'burnout' of various parts
computer circuitry and peripherals, and often by simple refusal
application of interface schemes.
  The author of these lines tried to summarize all the experience he received
from similar experiments and all the information that is currently
he knows the moment. Below you will find information and diagrams of how
correctly use interface devices on SPECTRUM and their
options tested and used for a long time on several
computers like "PENTAGON-128".  This construction option is not
changes software compatibility at the level of ZX machines by
applied and gaming software products, both foreign and
domestic firms in 48/128K.
  Standard port distribution in ZX-SPECTRUM any
configuration has the following form (if we consider the bitwise
distribution):

A15 A14 A13 A12 A11 A10 A9 A8 : A7 A6 A5 A4 A3 A2 A1 A0
───────────────────────── ─────────────────── ────────────────────
 X X X X X X X X : X X X X X X X X
 ┬ ┬ ┬ ┬ ┬ ┬ ┬ ┬ ┬
 │ <--- #XXFE keyboard port │ │ │ │ │ │
 │ │ │ 0 0* 0* │ │ 0
 1 0 │ port #1F │ │#XXFE
#FFFD #BFFDKEMPSTON JOYSTIK │ │port
AY-3-8910(12) │ │ Oklav.
music coprocessor └─ X #7B,#FB 0 ─────┘port#XXFD
 │ │ │ printer port AY-3-8910(12)
 0 0 * 0 * (eg ZX-LPRINT II-III) │
port #7FFD switch port #7FFD
pages RAM-DISK (128K) RAM-DISK (128K)

  As can be seen from the diagram, simplified decryption of system ports
computer makes it very difficult to connect enough
external devices.  These restrictions are not difficult to trace.  On
The diagram above shows the bits that are monitored
decoders of the vast majority of schemes
(“Leningrad”, “Moscow”, “Pentagon-48,128” and many others).
The keyboard 'takes over' most of the addresses (exactly
half - 32768), because all even addresses have A0=0, then this
Be sure to connect the keyboard port. In the same way, reset to
0 A7 chooses KEMPSTON (in Leningrad, for example, everything is done
much simpler, this port takes up the remaining 32768 addresses in full
Z80 addressing, i.e. all odd addresses).  If desired, this
the description can be continued.
  Therefore, connecting any external devices should be
carry out carefully and when programming indicate the full
port address (with "1"s in unusedranks). In some
variants of computers without modifications, while naturally not
make do.
  One possible solution to this problem is
using an additional decoder.  Below will be indicated and
methods for dividing the address space of a given
schemes.
  For decryption it is advisable to use the lower half
addresses (A7-A0), because  when programming Z80 machine code
accessing such ports is easier and faster, and
nothing prevents the programmer from using full commands
(e.g. 'OUT A,(C)') and thus complement the address
space at the expense of higher addresses. As can be seen from the considered
Above the circuit for control, the following bits can be distinguished: 7,4,3.
When using m/s K5SSID7 it is possible to completely
decrypt all these bits, and you can also use
bit A0 to enable decryption and thus not used
all even addresses.  All this must be taken into account in order to
ensuring software compatibility with unmodified types
computers.   Thus there are 8 possible combinations
addresses look like:


A7 A6 A5 A4 A3 A2 A1 A0 │Channel│Channel assignment
───────────────────────────────┼ ─────┼──────────────────────────
0 X X 0 0 X X 1 │ 0 │reserve
1 X X 00 X X 1 │ 1 │port KPS8OBB55 (II)
0 X X 1 0 X X 1 │ 2 │reserve
1 X X 1 0 X X 1 │ 3 │timer KPS8OVI5З
0 X X 0 1 X X 1 │ 4 │reserve
1 X X 0 1 X X 1 │ 5 │port KPS8OBB51
0 X X 1 1 X X 1 │ 6 * │KPS8OBB55(I) port, standard
1 X X 1 1 X X 1 │ 7 * │port AY-3-89XX and for long-distance
                               │ │ the latest expansion
───────────────────────────────┴ ─────┴──────────────────────────
* Marked devices are not disconnected from the ZX buffer system bus

 to be continued...

Share your thoughts about the article