T/S 1000 40K Non-Volatile Memory Expansion Project, Part II

Author(s): Gerry Desmarais
Publication: SWYM
Pub Details: SWYM v4 n12 Dec 1989 (Volume 4, Issue 12)
Date: December 1989
Pages: 5-6

THE HARDWARE

The board layout and the Parts List are shown below. A detail of the configuration header where shorting blocks are used to set up the circuit is shown above the layout sketch.

The component layout is straightforward with a few exceptions; 1) U1b and U1c are soldered piggy back to U1a with pin 20 (CS) bent out as described last month. 2) The battery (BT1) and its socket are installed on the side opposite the components. 3) For the connector and feedthru details, see the Hunter Board article in the July ’83’issue of Radio Electronics.

An example of a typical board setup is shown at the right.

A listing of the various jumper configurations and some notes are shown on the next page. Didn’t I warn you that there were a lot of configurations and that it MIGHT? be confusing!

THE SOFTWARE

Listing 1 is the disassembly of machine code routine that transfers a 16K block of memory from the 32-48K area into the user 16-32K area. This routine can be used if the configuration is per the Example Setup 1. This will give you two 16K ready-to-run programs within seconds of power up! (No more waiting for slow tapes).

Listing 2 is a simple routine which holds the machine code and transfers it to any location that you chose within the 8-16K area (the code is relocatable).

That’s about as short as I can make this (maybe it’s too short). Please feel free to contact me if you have any questions. Have fun and keep on Hack’n.

TYPICAL INSTALLATION AND CONFIGURATION SETUP

YOU WANT A STANDARD HUNTER BOARD SETUP, WITH YOUR 16K RAM MODULE ATTACHED, AND 2 – 16K NVM BLOCKS IN THE 32-48K REGION. SET UP THE BOARD AS FOLLOWS;

1.  INSTALL ALL COMPONENTS INDICATED IN THE PARTS LIST SHOWN AS
    THE MINIMUM CONFIGURATION.

2.  INSTALL DIODE CR6.  R20, R21, W2, AND CR7 ARE NOT REQUIRED.

3.  INSTALL U3 (LS139) DECODER.

4.  INSTALL U1A (8K SRAM) AND U2 (32K SRAM).

5.  SELECT DESIRED OPTIONS FROM JUMPER CONFIGURATION LIST:
     GROUP 'A' IS USED BECAUSE YOU HAVE ONLY ONE 8K CHIP INSTALLED
     OPTION 1 (YOU WANT TO USE THE ZX ROM)
     OPTION 6 (U1A IS MAPPED TO 8-16K)
     OPTION 14 (U2 WILL PROVIDE 2-16K BLOCKS AT 32-48K)

6.  THE THREE JUMPERS FOR THE OPTIONS ARE H3-H18, H6-H7, AND
    H10-H11 AS SHOWN BELOW.
Header setup and header pin assignments
Header setup and header pin assignments

PARTS LIST

U1a,U1b,U1c   43256-15L, 256K x 8 SRAM
U2            6264LP-15, 64K x 8 SRAM
U3            74LS139,  2 TO 4 DECODER
Q1            2N3638A, Ge PNP Transistor
Q2,Q3,Q4,Q5   2N3904, NPN Transistor
CR1           1N5817, Ge Diode
CR2           LED, Miniature, green
CR3 - CR7     1N4148, Diode
R1,R2,R8,R10,
R13,R14,R17,
R18           10K, Resistor
R3,R5,R6,R7,
R11,R19       2.2K, Resistor
R4,R12,R21    330 Ohm, Resistor
R9            51.1K, Resistor
R16,R20       4.7K, Resistor
C1            10uF, Cap,16V, Electrolytic
C2,C4,C5,C6   0.01uF, Cap,50V, Ceramic
C3            50uF, Cap,16V, Electrolytic
S1,S2         SPST Slide or Toggle Switch
S3            N.O. Pushbutton Switch
BT1           BR2325, 3V Lithium battery
Misc,   20 Pin Header, Shorting Blocks,
        Connector, IC & battery sockets
Board layout (4.600 x 4.000)
Board layout (4.600 x 4.000)

JUMPER CONFIGURATIONS

8K CHIP (U1a, U1b, & U1c) OPTIONS:

OPTION   MEMORY     GROUP     MEMORY CHIP     JUMPER BETWEEN        NOTES
        ADDRESSED  (NOTE 5)    SELECTED
  1       0-8K        A        ZX ROM           H3-H18
  2       0-8K        B        ZX ROM         H2-H19, H3-H4
  3       0-8K        B        NVM U1a        H2-H19, H4-H17 or      (1)
                                                      H16-H17
  4       0-8K        B        NVM U1b        H2-H19, H4-H5          (1)
  5       0-8K        B        NVM U1c        H2-H19, H15-H16        (1)
  6       8-16K       A        NVM U1a          H6-H7
  7       8-16K       A        NVM U1b          H5-H6
  8       8-16K       A        NVM U1c          H6-H15
  9       8-16K       B        NVM U1a        H2-H19, H7-H14
 10       8-16K       B        NVM U1b        H2-H19, H13-H14
 11       8-16K       B        NVM U1c        H2-H19, H14-H15

32K CHIP (U2) OPTIONS:

OPTION   MEMORY     BLOCK         JUMPER BETWEEN          NOTES
        ADDRESSED
 12      16-32K      A/B             H9-H12              (2),(6),(7)
 13      16-48K      ---      H1-H20, H9-H12, H10-H11    (3),(6),(7)
 14      32-48K      A/B             H10-H11                (2)
 15      32-64K      ---      H1-H20, H8-H9, H10-H11      (4),(7)
 16      48-64       A/B             H8-H9                (2),(7)

NOTES:

(1)  INSTALL Q4 AND R21 FOR ZX ROM CHARACTER SET,
     OTHERWISE INSTALL CR7 AND R20 FOR NVM CHARACTER SET
     (REQUIRES RIGTER OR SIMILAR S/W).

(2)  CHIP IS DIVIDED INTO TWO 16K BLOCKS (A & B) SELECTED
     BY SWITCH S1.

(3)  SWITCH S1 MUST BE SET TO 'A'.

(4)  ADDRESSING 16-32K OR 48-64K WILL BOTH ENABLE U2.

(5)  DECODER HALF U3A IS DIVIDED INTO TWO GROUPS 'A' AND 'B'
     WHICH ARE SELECTED WITH JUMPER H2-H19.

(6)  DISABLE INTERNAL 2K RAM WITH WIRE JUMPER BETWEEN E1 AND
     E2 AND ADD WIRE JUMPER BETWEEN E12 AND E13 TO ENABLE 48-
     64K AREA FOR THE DISPLAY TO FUNCTION PROPERLY.

(7)  WRITE SWITCH S2 MUST BE IN WR POSITION.

LISTING 1

HEX          Source code           Comments
182C JR SAVE
210080 LOAD LD HL, $8000 ;source address
110044 LD DE, $4000 ;target address
010040 LD BC, $4000 ;counter
EDB0 LDIR ;move block
ED7B7B40 LD SP, ($407B) ;restore stack ptr
E1 POP HL ;restore registers
D1 POP DE
C1 POP BC
F1 POP AF
D9 EXX
08 EX AF, AF"
FDE1 POP IY
DDE1 POP IX
E1 POP HL
D1 POP DE
C1 POP BC
F1 POP AF
3A3B40 LD A, ($403B) ;CDFLAG
CB77 BIT 6,A ;test SLOW/FAST flag
2004 JR NZ, SLOW
CD230F FAST CALL $$0F23 ;ROM "FAST"
C9 RET
CD2B0F SLOW CALL $0F2B ;ROM "SLOW"
C9 RET
F5 SAVE PUSH AF ;save regs on stack
C5 PUSH BC
D5 PUSH DE
E5 PUSH HL
DDE5 PUSH IX
FDE5 PUSH IY
08 EX AF, AF" ;switch to alt regs
D9 EXX
F5 PUSH AF
C5 PUSH BC
D5 PUSH DE
E5 PUSH HL
08 EX AF, AF"
D9 EXX
210000 LD HL, $0000
39 ADD HL, SP
227B40 LD ($407B), HL ;save stack pointer
210040 LD HL, $4000 ;source addr.
110080 LD DE, $8000 ;target addr.
010040 LD BC, $4000 ;counter
EB LOOP EX DE, HL ;check for vaild WR
1A LD A, (DE)
77 LD (HL), A
BE CP (HL)
EB EX DE, HL
2011 JR NZ, WRERR ;run error code
23 INC HL
13 INC DE
0B DEC BC
78 LD A, B
B1 OR C
20F2 JR NZ, LOOP ;cont if valid WR
211400 LD HL, $0014 ;20 decimal
ED5B7B40 LD DE, ($407B)
19 ADD HL, DE
F9 LD SP, HL
C9 RET
CF WRERR RST 8
1F DEFB $1F

LISTING 2

Listing 2 line 1 REM holding the machine code
Listing 2 line 1 REM holding the machine code
   4 REM ;**   40K MEMORY  **
7 REM ;** VERSION 1.0 **
10 REM ;** 4-6-88 **
13 REM ;** G.M.DESMARAIS **
16 REM ;
20 SLOW
30 PRINT "ENTER ADDRESS FOR CODE"
40 INPUT D
50 IF D=0 THEN STOP
60 IF D<8192 OR D>16300 THEN GOTO 300
70 POKE D,1
80 IF PEEK D<>1 THEN GOTO 400
90 FAST
100 LET S=16514
110 FOR I=D TO (D+120)
120 POKE I,PEEK S
130 LET S=S+1
140 NEXT I
150 CLS
160 PRINT "TRANSFER COMPLETE"
170 PRINT "*****************"
180 PRINT
190 PRINT "USE RAND USR ";D;" TO SAVE"
200 PRINT
210 PRINT "USE RAND USR ";D+1;" TO LOAD"
220 STOP
300 PRINT "OUTSIDE OF ADDRESS RANGE"
320 PAUSE 150
330 CLS
340 GOTO 30
400 PRINT "WRITE ERROR-PLEASE CORRECT"
410 PAUSE 200
420 CLS
430 GOTO 30

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.