# # $Id: PETdoc $ # # This file is part of Commodore PET emulator # and Program Development System. # # # Copyright 1995 Olaf 'Rhialto' Seibert. All Rights Reserved. # You are not allowed to read this using any kind of Micro$oft product. # # # This file contains some documentation for Commodore PET systems. # # # Written by # Olaf Seibert (rhialto@mbfys.kun.nl) # Jouko Valta (jopi@stekt.oulu.fi) # Andre Fachat (a.fachat@physik.tu-chemnitz.de) # # Thanks to # Brian Heyboer (bjheyboer@space.honeywell.com) # And # Mitch B. Parker (mbpark@planetx.bloomu.edu) # Dave Tickle (aiu214@freenet.mb.ca) # RICHARD WHITE (richwhite2@mci.newscorp.com) # Veit Laule (UKAH@ibm3090.rz.uni-karlsruhe.de) # Byron Gracey (bgracey@freenet.niagara.com) # Dale DePriest (daled@cds9172.Cadence.COM) # David Evans (devans@ccubb.com), (dfevans@bbcr.uwaterloo.ca) # Martijn van Buul (martijnb@stack.urc.tue.nl) # Michael Brown (mbrown@ersys.edmonton.ab.ca) # Simon Rowe (srowe@ftel.co.uk) # Tracy M Nelson (tnelson@fluorite.telesciences.com) # Dorian Garson (doriang@microsoft.com) # # # $Log$ # # General PET info ---------------- When talking about the PET 30xx, 40xx, or 8032, a lot of different models, hardware, software and their combinations are concerned. The early models have almost everything besides the "big" I/O chips and the CPU in separat ICs, especially the complete video circuitry. Those machines were sold as the "PET 2001" with built-in tape recorder. It featured "snow" on the screen when the CPU wrote to the video memory that was driven at the same clock as the CPU. The first board was replaced with a new revision that had a faster video RAM and no more snow. Those models had a software from the initial - very buggy - version 1 ROMs over the "wait 6502,2" version 2 ROMs (AKA version 3 ROMs) up to the Basic 4. Those machines have been sold as "2001-8N" (replace "8" with the RAM size and (probably?) "N" with a letter indicating the keyboard) in the US. In Europe they have been sold as 2001, 3008-3032 with Basic 2, and (I am not certain of this) as 4016/4032 with Basic 4. Many of the older machines are said to have been upgraded to Basic 4. After this board then came the models with the 6545 CRTC controller. Some of those models are vulnerable to the "PET killer poke". Those boards were available with 1k video RAM and 40 columns (AKA "Fat-40") as well as with 2k video RAM and 80 columns. The 80 columns were achieved by shifting video address lines, an additional latch and doubling the pixel clock. Therefore the video setting still indicates 40 columns in a 8032! All of those machines had Basic 4. For all those machines no memory management is involved. With the 8096 and the 8296 Commodore then introduced some kind of bank switching to handle up to 128kByte RAM. The 8096 used an expansion board while the 8296 had 128k directly on board. Another machine with an expansion board was the SuperPET 9000 (AKA MicroMainFrame 9000 in europe). It featured a 6551 ACIA, 64k additional RAM (not 8x96 compatible) and a 6809 (!) CPU on the expansion board. Above the screen area at $8000, there are two (Basic 4.0) resp. three (older PETs) 4 kByte ROM areas that could be used for a ROM expansion. In hardware, there are two (three) ROM sockets on the motherboard where one can put the expansion ROMs. The sockets map to $9xxx, $Axxx, and $Bxxx, Above $B000 (Basic 4.0) resp. $C000 the system ROM starts. Older PETs have the I/O area, where the interface chips are mapped, between $e800 and $f000. Some newer PETs, starting with some 8032 models, have the I/O area between $e800 and $e900 only. This gave more place for an extended (nationalized) screen editor. The PET came with several different keyboard layouts (see below). The most common are the graphics keyboard used on the 3032 and the 4032 and the business keyboard as used for the 8032. The normal PET have - not counting the CRTC - three I/O chips. Two PIA 6520/6820/6521 (they are compatible to each other) are used for keyboard resp. IEEE488 interfacing. The VIA 6522 provides a timer and a shift register - which is used to play 'music' on newer PETs. The standard IRQ that is used for clock incrementing, cursor blinking and keyboard input is not procduced by a timer on any of those chips, though. Instead a vertical retrace signal is generated directly by the hardware. This is then fed into a PIA1 CB1, which is set to trigger an interrupt. Some of the newer PETs are reported to have an ACIA 6551 serial port interface chip. This may be the SuperPET 9000 as well as the business models CBM 600/610/700/710. The latter are not covered here. as they are not PET compatible :-) Andre ------------------------------ The following is from the PET FAQ http://www.goldrush.com/~foxnhare/petfaq.html and covers the PET joystick handling more to detail. This also coincides with the article about joysticks below, if you say that the port is VIA PA, which is connected to user port pins C-L. Andre I HAVE A PET PROGRAM THAT CAN USE JOYSTICKS, HOW DO I MAKE AN INTERFACE? The PET was not initially designed for joysticks but a determined user had devised a dual-joystick interface employing the parallel port. This interface allows you to plug in standard Atari/Commodore compatible joysticks.... Interface Diagram (use mono-spaced font to view properly) Looking at back of user port 1 1 1 1 2 3 4 5 6 7 8 9 0 1 2 = = = = = = = = = = = = ### ######################### ###### = = = = = = = = = = = = A B C D E F H J K L M N ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! port 1-> 8 1 2 3 4 ! ! ! ! ! ! ! ! ! ! port 2-> 1 2 3 4 8 Joystick pin diagram => 5 [4] [3] [2] [1] looking at back of \ / male connector 9 [8] 7 [6] The 'fire' button (pin 6) is added by connecting joystick port pins 1 & 2 to pin 6 with diodes, solder each diode from (already wired) pins 1 & 2 to pin 6 (with the banded ends to pin 6). ------------------------------ I/O lines --------- PIA1: $e810 Port A: Bit 0-3 - keyboard row select lines (decoded with a 4 to 10 bit decoder) Bit 4 - Cassette #1 sense Bit 5 - Cassette #2 sense Bit 6 - IEEE488 EOI input line Bit 7 - Diagnostic sense input line. Pull it low and the PET comes up in the builtin machine language monitor. Bit 5 on the userport. CA1 - Cassette #1 read line CA2 - very old PETs can blank the screen with it. Newer ones have this as IEEE488 EOI output. Port B: Bit 0-7 - Contents of Keyboard row CB1 - screen retrace detection in. CB2 - Cassette #1 motor on PIA2: $e820 Port A: Bit 0-7 - IEEE488 Data 1-8 Input Lines CA1 - IEEE488 ATN in CA2 - IEEE488 NDAC out Port B: Bit 0-7 - IEEE488 Data 1-8 output lines CB1 - IEEE488 SRQ in CB2 - IEEE488 DAV out VIA: $e840 Port A: Bit 0-7 - Userport Port B: Bit 0 - IEEE488 NDAC in Bit 1 - IEEE488 NRFD out Bit 2 - IEEE488 ATN out Bit 3 - ??? Bit 4 - Cassette #2 Motor on Bit 5 - vertical retrace detect Bit 6 - IEEE488 NRFD in Bit 7 - IEEE488 DAV in CA1 - ??? CA2 - screen character ROM switch (graphics/text) CB1 - ??? CB2 (SR out) - Shift register plays music on userport ------------------------------ The PET 3032,4032 Keyboard Matrix -- Graphics Keyboard e810 e812 0 Right Home _ [ & % # ! 1 BSpace Down ] | \ $ 2 9 7 o u t e q 3 / 8 p i y r w 4 6 4 l j g d a 5 * 5 : k h f s 6 1 Return m 7 + 2 ? , n x 8 9 . . . . . . . . Values 128 64 32 16 8 4 2 1 7F BF DF EF F7 FB FD FE The PET 8032 Keyboard Matrix -- Business Keyboard e810 e812 0 <05> Right KP_8 - 8 5 2 1 KP_9 UpArr KP_7 0 7 4 1 2 KP_5 \ k ; h f s Esc 3 KP_6 [ l Return j g d a 4 Del p i @ y r w Tab 5 KP_4 ] o Down u t e q 6 KP_3 Shift_R Down KP_Dot . b c Shift_L 7 KP_2 Repeat KP_0 , n v z 8 KP_1 / Home m Space x RVS 9 <16> <04> : * Stop 9 6 3 <- Values 128 64 32 16 8 4 2 1 7F BF DF EF F7 FB FD FE Here is the 8032 keyboard matrix, as it appears on the keyboard connector. Note that the columns are scanned in the opposite order. A B C D E F G H ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 | 2 5 8 - 8* Right {14} {5} 2 | 1 4 7 0 7* ^ {6} 9* 3 | ESC S F H ] K ; 5* 4 | A D G J Return L @ 6* 5 | Tab W R Y \ I P Del 6 | Q E T U Down O [ 4* 7 | Shift_L C B . .* {25} Shift_R 3* 8 | Z V N , 0* {15} {16} 2* 9 | Rvs X Space M Home {21} / 1* 10 | <- 3 6 9 Stop : {4} {22} The PET 8032 Business Keyboard Matrix e810 e812 0 <- 3 # 6 & 9 ) Stop : * <04> <16> 1 RVS x Space m Home <15> / ? KP_1 2 z v n , < KP_0 <0F> Repeat KP_2 3 Shift c b . > KP_Dot <19> Shift KP_3 4 q e t u Down o ] KP_4 5 Tab w r y @ i p Del 6 a d g j Return l [ KP_6 7 Esc s f h ; + k \ KP_5 8 1 ! 4 $ 7 ' 0 KP_7 ^ <06> ...
ptakuj234