UDGs?

(TIMOTHY C, SWENSON) at ASCCYM
Date: 1/31/96 4:02 PM (Martin van der Zwan)
Newsgroups: comp.sys.sinclair
Subject: Re: ZX81 Hires – How?
References: [message ID omitted]

Hello,

MB> 3. There were a number of hardware add-ons that worked with software similar to the above routines to allow UDG’s and true HRG. DK’Tronics and Quicksilva produced devices that worked with some of their games.

High resolution on the ZX81 is not possible with all 64K RAMpaks, there should be a static RAM between 8192-16383, the ZX81’s 16K RAMpacks have dynamic RAM and are refreshed, although with a trick, it’s possible to intercept.this refresh signal with a 74LS08, this cheap High Resolution is something which will be covered in the next International ZX81 Magazine, a program will also be included.

Here is how to make your own UDG’s on the ZX81 emulators, Xtender/Xtricator:

First we must move the ZX81’s character set to RAM;

10 FOR N=7680 TO 8191
20 POKE N+512, PEEK N
30 NEXT N

Now we tell the ROM and ULA to use the character set we have just moved to RAM:

10 POKE 8704,62
20 POKE 8705,32
30 POKE 8706,237
40 POKE 8707,71
50 POKE 8708,201
60 RAND USR 8704

When you run this program you will find out that nothing happens because the character set we just transfered to RAM is identical to the one in ROM and we must change it so we can make our own nice graphics like a Bomb or a real Pacman, this is how you do it:

Each character on the ZX81 is of 8X8 pixels and looks like this:

  char A        addr.   bin   =   dec.
                8496   00000000    0
   AAAA         8497   00111100    60
  A    A        8498   01000010    66
  A    A        8499   01000010    66
  AAAAAA        8500   01111110    126
  A    A        8501   01000010    66
  A    A        8502   01000010    66
                8503   00000000    0
             Binary example
128  64  32  16   8   4   2   1
  0   1   0   0   0   0   1   0   = 66

Now if an Invader game on the ZX81 uses A’s for example you can change them in real Invaders by Poking this:

POKE 8496,126
POKE 8497,255
POKE 8498,153
POKE 8499,153
POKE 8500,255
POKE 8501,126
POKE 8502,66
POKE 8503,129

This is how you find the address of the beginning of a character you want to change:

PRINT 8192+8*CODE "A"
1 REM MINI UDG MAKER 30/1/95
2 REM
5 CLS
10 LET A$=" "
20 PRINT "WHICH CHARACTER WOULD YOU LIKE TO CHANGE?"
30 INPUT A$
50 LET A=8192+8*CODE A$
54 PRINT
55 PRINT "THE CHARACTER IS AT ADDRESS ";A
60 PRINT
65 PRINT "PLEASE ENTER NEW VALUE"
67 PRINT
70 PRINT A$; " LOOKS LIKE THIS NOW"
80 POR B=A TO A+7
90 INPUT C
95 PRINT A$; " LOOKS LIKE THIS"
100 POKE B,C
110 NEXT B
115 PRINT
120 PRINT "YOUR NEW UDG IS FINISHED"
125 PRINT "I HOPE YOU LIKE IT."
130 PRINT "WOULD YOU LIKE TO MAKE ANOTHER UDG? (Y/N),"
140 LET B$=INKEY$
150 IF B$ ="Y" THEN GOTO 5
160 PRINT "THANKS FOR USING MINI UDG MAKER"
170 GOTO 140

I tested this routines on Xtender and Xtricator and they work fine. If any time you want to turn the UDG characters off then:

To turn UDG's off     |  To turn UDG's on
  POKE 8705;30        |    POKE 8705,32
  RAND USR 8704       |    RAND USR 8704

BTW, The International ZX81 Magazine will be on Internet soon, right now someone is scanning the schematics for me, they will be included in .GIF format with the magazine.

Have fun,
Martin

cartoon of a wizard at a computer
cartoon of a wizard at a computer

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