Subject: Re: Speaking of the Zip...
From: [email-masked] (David Empson)
Date: 12 Nov 91 13:50:52 GMT
Newsgroups: comp.sys.apple2

In article <[email-masked]> [email-masked] (James L. Brookes) writes:
> 
> The only drawback I find to the Zip is that the CDA is not in the 
> firmware, so you have to boot up GS/OS to access it.  While the speed of
> bootup now makes that less of a problem, I do remember hearing of some
> p8 util that would load CDAs.  If there is such a beast, I would
> *really* love to have it.  There are some games that are just *too*
> fast with the Zip in, it would be nice to play those at say 7 mhz or
> something. 
> 
> [High Speed at last, and loving every second of it:^]

Agreed!!!

The program you want is called P8CDA, and it is published by:

Roger Wagner Publishing, Inc.
1050 Pioneer Way, Suite P
El Cajon, California 92020

619/442-0522

P8CDA is a ProDOS-8 system file that installs all CDAs it finds in the
SYSTEM/DESK.ACCS directory, then runs the second .SYSTEM file.
The package includes a CDA screen blanker.  I don't know the price,
but it should be no more than US$25.

An alternative would be to write a ProDOS-8 SYS file that can set the
speed of the ZIP and perform the other operations that the CDA
supports.  It is very easy to write a program to 'enable' and
'disable' the ZIP - I have written a couple called FAST and SLOW.

All you need is details of the I/O addresses used by the ZIP.

Here is SLOW:

2000: A9 50	LDA	#$50
2002: 8D 5A C0	STA	$C05A	; write $50 to $C05A four times to
2005: 8D 5A C0	STA	$C05A	; enable access to the ZIP registers
2008: 8D 5A C0	STA	$C05A
200B: 8D 5A C0	STA	$C05A
200E: 8E 5A C0	STZ	$C05A	; write $00 to $C05A to disable the ZIP
2011: 0A	ASL
2012: 8D 5A C0	STA	$C05A	; write $A0 to stop accessing the ZIP
2015: 20 00 BF	JSR	$BF00	; Do a ProDOS QUIT call
2018: 65		$65
2019: 1D 20		$201D
201B: 00 00	BRK	$00
201D: 04 00 00 00 00

Just type in the hex codes on the left, and use the following commands
to save it:

CREATE SLOW,TSYS
BSAVE SLOW,TSYS,A$2000,L$22

To write FAST, simply change one byte:

200F:5B

(this changes the STZ $C05A to STZ $C05B)

CREATE FAST,TSYS
BSAVE FAST,TSYS,A$2000,L$22

Now, before you run your game, you boot ProDOS-8 and run SLOW.  After
you've finished with the game, boot ProDOS-8 and run FAST to resume
full speed operations (or boot GS/OS and use the CDA).

Here is the full set of ZIP registers, for those who are interested
(others can skip the rest of this article):

ZipChip GS Special Registers       Ex ZIP Technology, 12 October 1990

Registers must be unlocked before they can be accessed (see $C05A).
Locking them will re-enable the annunciators.

Writing to any I/O location $C058-$C05F (whether registers are locked or
unlocked) will reset delay in progress.

$C058 R   No operation

$C058 W   Write any value to force poweron/reset bit to COLD (forces next
reset to restore ZIP registers to defaults/switch settings).

$C059 R/W 76543210
          *.......  Bank Switch Language Card cache disable=1/enable=0?
          .*......  Paddle delay (5 ms) disable=0/enable=1  $C070/$C020
          ..*.....  External delay (5 ms) disable=0/enable=1
          ...*....  Counter delay (5 ms) disable=0/enable=1 $C02E/$C07E
          ....*...  CPS follow disable=0/enable=1
          .....*..  Last Reset warm?              READ ONLY
          ......*.  Hardware DMA                  READ ONLY
          .......*  non-GS (0)/GS (1)             READ ONLY

$C05A R   76543210
          ****....  Current ZIP Speed, 0=100%, F=6.25%, in 6.25% increments
          ....1111

$C05A W   Write values as follows:
          $5x       Unlock ZIP registers (must write 4 times)
          $Ax       Lock ZIP registers
          other     Force ZIP to follow system clock (i.e. disable card)

$C05B R   76543210
          *.......  1msclk - clock with 1 ms period
          .*......  cshupd - Tag data at $C05F updated (read $C05F to reset)
          ..*.....  Bank Switch Language Card cache (0), don't (1)
          ...*....  Board disable - 0=enabled, 1=disabled
          ....*...  delay in effect (0=ZIP, 1=Slow)
          .....*..  rombank (0/1) - not in development version
          ......**  Cache RAM size (00=8k, 01=16k, 10=32k, 11=64k)

$C05B W   Write any value to force ZIP to current speed (i.e. enable card)

$C05C R/W 76543210
          *******.  Slot 7-1 delay enable (all slots 52-54 ms)
          .......*  Speaker delay enable (5 ms)

$C05D R   Current 65816 bank

$C05D W   76543210
          ****....  Set ZIP speed, 0=100%, F=6.25%, in 6.25% increments
          ....****  Don't care

$C05E R   Read last Tag data written and force the next write to
create a trash tag value.

$C05E W   No operation

$C05F R   Read last Tag data written and reset cshupd.  Note: apparently
any write to a ZIP register (unlocked) will clear cshupd, but cshupd says
that this location must be read.

$C05F W   No operation

I got this information from ZIP Technology (with many thanks).
-- 
David Empson

[email-masked]
[email-masked]