home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / sci / electron / 20658 < prev    next >
Encoding:
Internet Message Format  |  1992-12-14  |  18.5 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!ub!toz!cyberman
  2. From: cyberman@toz.buffalo.ny.us (Cyberman)
  3. Newsgroups: sci.electronics
  4. Subject: Re: Color Computer 3 inte
  5. Message-ID: <gate.g5DRVB1w165w@toz.buffalo.ny.us>
  6. Date: 14 Dec 92 06:20:15 GMT
  7. Lines: 391
  8. X-Maildoor: WaflineMail 1.00r
  9.  
  10.  
  11.   Sir F. Klein spoke forth saying:
  12. "Color Computer 3 interfac" toward
  13.  on 12-11-92  19:11
  14.  
  15.  JFK> Th old system I had worked on a Coco 1, and resided at $FEFF, up in
  16.  JFK> the unused cartridge address space.  Unfortunately, the Coco 3
  17.  JFK> apparently has RAM at this address (in addition to putting Super
  18.  JFK> Extended BASIC up there).  Thus, whenever I would try to perform a
  19.  JFK> read and get the A/D sample, the converter and the RAM would clash.  I
  20.  JFK> haven't done too much with the GIME chip, but it seems as if I should
  21.  JFK> be able to force these memory locations to be disconnected from RAM.
  22.  JFK> Can anybody tell me how to do this?  There are three control bits at
  23.  JFK> $FF90 that interest me.  One is the Coco 1/2 compatibility bit.  The
  24.  JFK> service manual also describes the lowest 2 bits as controlling the two
  25.  JFK> 16k segments of upper memory, specifying internal or external.  I have
  26.  JFK> tried poking what I guessed to be the appropriate values to this
  27.  JFK> register with no apparent resulting change; cartridge memory still
  28.  JFK> acted like RAM.
  29.  
  30. this should help immensly
  31. ------CUT HERE-----
  32. This information was gathered by Kevin K. Darling.
  33.  
  34. NOTE !!
  35.  This is a text for you to use to study the capabilities of the CoCo-3.
  36.  Some minor parts may be in error (??). Insiders should clue us in on these.
  37.  Purpose of release is to show some of the extra thought in the machine.
  38.  In NO way should it be construed as an "official map". Now have fun! -- Kevin
  39.  
  40.  * Many Thanks from All of Us to the Contributors who shall remain UnKnown! *
  41.  
  42.  -----------------------------------------------------------------------------
  43.  I        COCO-3 MEMORY, and GIME REGISTER MAP   (1 Sept 86)  KD ver1        I
  44.  -----------------------------------------------------------------------------
  45.  
  46. SYSTEM MEMORY MAP:
  47.  RAM      00000 - 7FFFF (512K bytes)
  48.  ROM      78000 - 7FEFF when enabled
  49.  I/O      XFF00 - XFFFF I/O space and GIME regs
  50.  
  51. 64K PROCESS MAP:
  52.  RAM       0000 -  FEFF (possible vector page FEXX)
  53.  I/O       FF00 -  FFFF (appears in all pages)
  54.  
  55. Note: the Vector Page RAM at 7FE00 - 7FEFF (when enabled), will appear instead
  56.  of the RAM or ROM at XFE00 - XFEFF. (see FF90 Bit 3)
  57.  
  58.   XFF00-0X  PIA0       (not fully decoded)
  59.   XFF10-1F  reserved
  60.   XFF20-2X  PIA1       (not fully decoded)
  61.   XFF30-3F  reserved
  62.   XFF40-5F  SCS        see note below
  63.   XFF60-7F  undecoded  (for current peripherals)
  64.   XFF80-8F  reserved
  65.  
  66. Note: IF MC2=0, then XFF50-5F is SCS, and XFF40-4F will be internal to CoCo.
  67.  -----------------------------------------------------------------------------
  68.  
  69.  FF90  INITIALIZATION REGISTER 0
  70.         Bit 7 - CoCo Bit  1= Color Computer 1/2 Compatible
  71.         Bit 6 - M/P       1= MMU enabled
  72.         Bit 5 - IEN       1= GIME IRQ output enabled to CPU
  73.         Bit 4 - FEN       1= GIME FIRQ  "      "
  74.         Bit 3 - MC3       1= Vector page RAM at FEXX enabled
  75.         Bit 2 - MC2       1= Standard SCS
  76.         Bit 1 - MC1       ROM mapping      0 X - 16K internal, 16K external
  77.         Bit 0 - MC0        "    "          1 0 - 32K internal
  78.                                            1 1 - 32K external
  79.  
  80. CoCo bit set = MMU disabled, Video address from SAM, RGB/Comp Palettes => CC2.
  81.  -----------------------------------------------------------------------------
  82.  
  83.  FF91  INITIALIZATION REGISTER 1
  84.         Bit 6 -           0=64K chips, 1 = 256K chips
  85.         Bit 5 - TINS      Timer INput Clock Select:  0= 70 nsec, 1= 63 usec
  86.         Bit 0 - TR        MMU Task Register Select (0/1 - see FFA0-AF)
  87.  -----------------------------------------------------------------------------
  88.  
  89.  FF92  IRQENR    Interrupt Request Enable Register (IRQ)
  90.  FF93  FIRQENR   Fast Interrupt Request Enable Reg (FIRQ)
  91.    (Note that the equivalent interrupt output enable bit must be set in FF90.)
  92.    Both registers use the following bits to enable/disable device interrupts:
  93.        Bit 5 - TMR        Timer
  94.        Bit 4 - HBORD      Horizontal border
  95.        Bit 3 - VBORD      Vertical border
  96.        Bit 2 - EI2        Serial data input
  97.        Bit 1 - EI1        Keyboard
  98.        Bit 0 - EI0        Cartridge (CART)
  99.  
  100.    I have no idea if both IRQ & FIRQ can be enabled for a device at same time.
  101.  -----------------------------------------------------------------------------
  102.  
  103.  FF94  Timer MSB    Write here to start timer.
  104.  FF95  Timer LSB
  105.   Load starts timer countdown. Interrupts at zero, reloads count & continues.
  106.   Must turn timer interrupt enable off/on again to reset timer IRQ/FIRQ.
  107.  
  108.  FF96  reserved
  109.  FF97  reserved
  110.  -----------------------------------------------------------------------------
  111.  
  112.  FF98  Alpha/graphics Video modes, and lines per row.
  113.         Bit 7 = vidmode  0 is alphanumeric, 1= bit plane (graphics)
  114.         Bit 6 = na       ...
  115.         Bit 5 = DESCEN   1= extra DESCender ENable
  116.         Bit 4 = MOCH     MOnoCHrome bit (composite video output) (1=mono)
  117.         Bit 3 = H50      50hz vs 60hz bit
  118.         Bit 2 = LPR2     Number of lines/char row:
  119.         Bit 1 = LPR1      (Bits 2-1-0 below:)
  120.         Bit 0 = LPR0
  121.                          000 - 1 line/row         100 - 9
  122.                          001 - 2                  101 - 10
  123.                          010 - 3                  110 - 11 (??)
  124.                          011 - 8                  111 - 12 (??)
  125.  -----------------------------------------------------------------------------
  126.  
  127.  FF99  VIDEO RESOLUTION REGISTER
  128.         Bit 7 - na     ...                            (bits 6-5):
  129.         Bit 6 - LPF1   Lines Per Field:       00= 192 lines  10= 210 lines
  130.         Bit 5 - LPF0     "    "    "          01= 200 lines  11= 225 lines
  131.         Bit 4 - HR2    Horizontal Resolution
  132.         Bit 3 - HR1         "        "
  133.         Bit 2 - HR0         "        "        (see below for HR, CRES bits)
  134.         Bit 1 - CRES1  Color RESolution bits
  135.         Bit 0 - CRES0     "      "
  136.  ---------------------------------------------
  137.  TEXT MODES:
  138.  
  139.  Text: CoCo Bit= 0 and FF98 bit7=0.  CRES0 = 1 for: attribute bytes are used.
  140.  
  141.                       HR2 HR1 HR0    (HR1 = don't care for text)
  142.         80 char/line   1   X   1
  143.         64     "       1   X   0
  144.         40     "       0   X   1
  145.         32     "       0   X   0
  146.  
  147.  ---------------------------------------------
  148.  GRAPHICS MODES:
  149.  
  150.          X   Colors   HR2 HR1 HR0  CRES1 CRES0
  151.         640    4   -   1   1   1      0   1
  152.         640    2   -   1   0   1      0   0
  153.  
  154.         512    4   -   1   1   0      0   1
  155.         512    2   -   1   0   0      0   0
  156.  
  157.         320   16   -   1   1   1      1   0         Other combo's are
  158.         320    4   -   1   0   1      0   1         possible, but not
  159.         320    2   -   0   1   1      0   0         supported.
  160.  
  161.         256   16   -   1   1   0      1   0
  162.         256    4   -   1   0   0      0   1
  163.         256    2   -   0   1   0      0   0
  164.  
  165.         160   16   -   1   0   1      1   0
  166.  
  167.  Old SAM modes work if CC Bit set. HR and CRES are Don't Care in SAM mode.
  168.  Note the correspondence of HR2 HR0 to the text mode's bytes/line.
  169.  Also that CRES bits shifted left one = number of colors. --Ke
  170.  -----------------------------------------------------------------------------
  171.  
  172.  FF9A  Border Palette Register RGBRGB (XX00 0000 = CoCo 1/2 compatible)
  173.  FF9B  Reserved
  174.  
  175.  FF9C  Vertical Fine Scroll
  176.  FF9D  Screen Start Address Register 1 (bits 18-11)
  177.  FF9E  Screen Start Address Register 0 (bits 10-3)
  178.  FF9F  Horizontal Offset Register
  179.         Bit 7 = horizontal offset enable bit = 128 char width always
  180.         Bit 6 = X6  ... offset count (0-127)
  181.         Bit 0 = X0
  182.  
  183.  If Bit 7 set & in Text mode, then there are 128 chars (only 80 seen)/line.
  184.  This allows an offset to be specified into a virtual 128 char/line screen,
  185.   useful for horizontal hardware scrolling on wide text or spreadsheets.
  186.  -----------------------------------------------------------------------------
  187.  
  188.  FFA0-AF  MEMORY MANAGEMENT UNIT (MMU)
  189.   FFA0-A7  Task #0 DAT map   (8K block numbers in the 64K map)
  190.   FFA8-AF  Task #1 DAT map   (Task map in use chosen by FF91 Bit 0)
  191.  
  192.  
  193.  Each register has 6 bits into which is stored the block number 0-63 ($00-$3F)
  194.   of the Physical 8K RAM block (out of 512K) that you wish to appear at the
  195.   CPU Logical address corresponding to that register.
  196.  Also can be shown this way: the 6 register bits, when the Logical Address in
  197.   the range of that register, will become the new Physical RAM address bits:
  198.          18  17  16   15  14  13
  199.  
  200.   MMU Register:          CPU:
  201.   Task0  Task1   Logical Address / Block#
  202.    FFA0   FFA8    0000 - 1FFF      0
  203.    FFA1   FFA9    2000 - 3FFF      1
  204.    FFA2   FFAA    4000 - 5FFF      2
  205.    FFA3   FFAB    6000 - 7FFF      3
  206.    FFA4   FFAC    8000 - 9FFF      4
  207.    FFA5   FFAD    A000 - BFFF      5
  208.    FFA6   FFAE    C000 - DFFF      6
  209.    FFA7   FFAF    E000 - FDFF      7
  210.  
  211.  -------------------------------------------------------------------
  212.  Ex: You wish to access Physical RAM address $35001. That Address is:
  213.  
  214.  A- 18  17  16  15  14  13  12  11  10   9   8   7   6   5   4   3   2   1   0
  215.     .....3....  .......5......  .......0......  .......0......  .......1......
  216.      0   1   1   0   1   0   1   0   0   0   0   0   0   0   0   0   0   0   1
  217.  
  218.  Taking address bits 18-13, we have: 0 1 1 0 1 0, or $1A, or 26. This is the
  219.  physical RAM block number, out of the 64 (0-63) available in a 512K machine.
  220.  
  221.  Now, let's say you'd like to have that block appear to the CPU at Logical
  222.   Block 0  (0000-1FFF in the CPU's 64K memory map).
  223.  
  224.  You would store the Physical Block Number ($1A) in either of the two Task Map
  225.   registers that are used for Logical Block 0 (FFA0 or FFA8). Unless your pgrm
  226.   that is doing this is in the Vector RAM at FEXX (set MC3 so ALWAYS there),
  227.   you would want to use your current Task Map register set. If the TR bit at
  228.   FF91 was 0, then you'd use MMU register FFA0 for the $1A data byte.
  229.  
  230.  To find the address within the block, use Address Bits 12-0 plus the Logical
  231.   base address (which in this case is $0000):
  232.  Now you could read/write address $1001, which would actually be $35001.
  233.  -----------------------------------------------------------------------------
  234.  
  235.  FFB0-BF  Color Palette Registers
  236.  
  237.   Reg bits- 5  4  3  2  1  0
  238.   CMP ...  I1 I0 P3 P2 P1 P0    Intensity and Phase (16 colors x 4 shades)
  239.   RGB ...  R1 G1 B1 R0 G0 B0    Red Green Blue      (64 RGB combo's)
  240.  
  241.   When CoCo Bit is set, and palette registers preloaded with certain default
  242. values (ask, if you need these), both the RGB and CMP outputs appear the same
  243. color, supposedly.
  244.  
  245.   40/80 Column Text Screen Bytes are Even=char, Odd=attribute, in memory.
  246.   Characters selected from 128 ASCII.  NO text graphics-chars.
  247.  
  248.   Char Attributes- 8 bits...  F U T T T B B B
  249.        Flashing, Underline, Text foregrnd, Backgrnd colors 0-7.
  250.  -----------------------------------------------------------------------------
  251.  
  252.  FFC0-DF  SAM : same as before (mostly compatible Write-Only Switches)
  253.   FFD8 = CPU .895 MHz   (no address-dependent speed)
  254.   FFD9 =     1.79 MHz
  255.   FFDE = Map RAM/ROM    (RAM accesses use MMU translations)
  256.   FFDF =     all RAM
  257.  -----------------------------------------------------------------------------
  258.  
  259.  
  260.  
  261. GIME2.TXT                      GIME Update - 21 Nov 86  (plus CoCo-3 misc.)
  262.  
  263.          This is an addendum to GIME.TXT elsewhere in this Library.
  264.               Meant for all, but as FREE distribution only.
  265.       Please address info to Kevin Darling 73117,1375 for next update.
  266.      Let's keep the info flowing! The SIG purpose is to share knowledge.
  267.  
  268.      Thanks to Greg Law and his friend Dennis W. for much register info.
  269.    Thanks to Others and Marsha (for my magnifier) on many of the pin-outs.
  270.  ============================================================================
  271.  
  272.  GIME Register Corrections:
  273.  
  274.  $FF91 - Bit 5, Timer Input Select. Looks like 0=slower speed, instead. Haven't
  275. had time to put a scope on it to check actual clocks, yet.
  276.  
  277.  $FF92-3 - Interrupt Request Regs: You can also read these regs to see if there
  278. is a LOW on an interrupt input pin. If you have both the IRQ and FIRQ for the
  279. same device enabled, you read a Set bit on both regs if that input is low.
  280.   For example, if you set $FF02=0 and $FF92=2, then as long as a key is held
  281. down, you will read back Bit 1 as Set.
  282.   The keyboard interrupt input is generated by simply AND'ing all the matrix
  283. pins read back at $FF00. Therefore, you could select the key columns you wished
  284. to get by setting the appropriate bits at $FF02 to zero. Pressing the key drops
  285. the associated $FF00 line to zero, causing the AND output to go low to the
  286. GIME. Setting $FF02 to all Ones would mean only the Joystick Fire buttons would
  287. generate interrupts.
  288.  
  289.  $FF94-95 - Storing a $00 at $FF94 seems to stop the timer. Also, apparently
  290. each time it passes thru zero, the $FF92/93 bit is set without having to
  291. re-enable that Int Request.
  292.  
  293.  $FF98 - Bit 5 is the artifact color shift bit. Change it to flip Pmode 4
  294. colors. A One is what is put there if you hold down the F1 key on reset. POKE
  295. &HFF98,&H13 from Basic if your colors artifact the wrong way for you.
  296.  
  297.  $FF9F - Horz Offset Reg. If you set Bit 7 and you're in Gfx mode, you can
  298. scroll across a 128 byte picture. To use this, of course, you'd have to write
  299. your own gfx routines. On my machine, tho, an offset of more than about 5
  300. crashes.
  301.  
  302.  $FFB0-BF - As I originally had, and we all know by now, FFB0-B7 are used for
  303. the text mode char background colors, and FFB8-BF for char foreground colors,
  304. in addition to their other gfx use.
  305.  ============================================================================
  306.  
  307.  CoCo-3 Internal Tidbits:
  308.  
  309.   The 68B09E address lines finally have pullup resistors on them. Probably put
  310. in for the 2MHz mode, they also help cure a little-known CoCo phantom: since
  311. during disk access, the Halt line tri-states the address, data, and R/W lines,
  312. some old CoCo's would float those lines right into writing junk in memory. Now
  313. $FFFF would be presented to the system bus instead.
  314.   Since the GIME catches the old VDG mode info formerly written to the PIA at
  315. $FF22, those four now-unconnected lines (PB4-7 on the 6821) might have some use
  316. for us.
  317.   Also, Pin 10 of the RGB connector is tied to PB3 on the same PIA. Shades of
  318. the Atari ST. Could possibly be used to detect type of monitor attached, if we
  319. like.
  320.   Data read back from RAM must go thru a buffer, the GIME, and another buffer.
  321. Amazing that it works at 2 MHz.
  322.   In case you didn't catch the hint from GIME.TXT on FF90 Bit 2, the option of
  323. an internal SCS select opens up the possibility of a CoCo-4 with a built-in
  324. disk controller.
  325.  
  326.  
  327.  
  328.  ============================================================================
  329.  GIME PINS:
  330.                  .                                        .
  331.     61 63 65 67 01 03 05 07 09                09 ------- 01 68 ------ 61
  332.  60 62 64 66 68 02 04 06 08 11 10          10                            60
  333.  58 59                      13 12           l                            l
  334.  56 57                      15 14           l                            l
  335.  54 55                      17 16           l                            l
  336.  52 53        Bottom        19 18           l             Top            l
  337.  50 51                      21 20           l                            l
  338.  48 49                      23 22           l                            l
  339.  46 47                      25 24           l                            l
  340.  44 45 42 40 38 36 34 32 30 28 26          26                            44
  341.     43 41 39 37 35 33 31 29 27                27 -------------------- 43
  342.  
  343.  
  344.  01 - GND             18 - D6               35 - +5 Volts        52 - A13
  345.  02 - XTAL            19 - D7               36 - Z3              53 - A14
  346.  03 - XTAL            20 - FIRQ* ->CPU      37 - Z4              54 - A15
  347.  04 - RAS*            21 - IRQ* -->CPU      38 - pullup          55 - VSYNC*
  348.  05 - CAS*            22 - CART* Int in     39 - Z5              56 - HSYNC*
  349.  06 - E               23 - KeyBd* Int in    40 - Z6              57 - D7 (RAM)
  350.  07 - Q               24 - RS232* Int in    41 - Z7              58 - D6
  351.  08 - R/W*            25 - A0 (fm CPU)      42 - Z8              59 - D5
  352.  09 - RESET*          26 - A1               43 - A4 (fm CPU)     60 - D4
  353.  10 - WEn* 0          27 - A2               44 - A5              61 - D3
  354.  11 - WEn* 1          28 - A3               45 - A6              62 - D2
  355.  12 - D0 (CPU)        29 - S2               46 - A7              63 - D1
  356.  13 - D1              30 - S1               47 - A8              64 - D0
  357.  14 - D2              31 - S0               48 - A9              65 - Comp Vid
  358.  15 - D3              32 - Z0 (RAM)         49 - A10             66 - Blue
  359.  16 - D4              33 - Z1               50 - A11             67 - Green
  360.  17 - D5              34 - Z2               51 - A12             68 - Red
  361.  
  362.  Notes: WEnx = Write Enables for Banks 0 and 1 RAM
  363.         S2-0 = (address select code -> 74LS138) :
  364.   000 -0- ROM     010 -2- FF0X, FF2X     100 -4- int SCS    110 -6- norm SCS
  365.   001 -1- CTS     011 -3- FF1X, FF3X     101 -5- n/a        111 -7- ??ram??
  366.  
  367.  ============================================================================
  368.  CONNECTORS:  (CN5,6 - top to bottom, CN2 - left to right)
  369.  
  370.   CN6 - Gnd, +5, D1, D0, D2, D3, D6, D7, D5, D4, WEn1, Gnd
  371.   CN5 - Gnd, D2, D3, D1, WEn0, D0, CAS, D6, D5, D4, D7, Gnd
  372.   CN2 - Gnd, RAS, Z0, Z1 , Z2, Z3, Z4, Z5, Z6, Z7, Z8, Gnd
  373.  
  374.  Note: Since a lot of this is by a QUICK observation, CHECK first if using!
  375.   Tho as far as the CN's go, even if I have messed up all but the CAS, RAS,
  376. WEn's, and +5, you could connect the extra RAM Dx and Zx pins in parallel to
  377. each bank in any order. The RAM's don't care.
  378.   CN6 and CN5 data lines go to separate 256K banks, of course.
  379.  ============================================================================
  380.  General Info:
  381.   Data is written to the RAM by byte thru IC10 or IC11, selected by WEn 0 or 1.
  382.      (write enable 0 = even addresses, write enable 1 = odd addresses)
  383.   Two bank RAM data is read back to the GIME thru IC12 & IC13, byte at a time.
  384.   The CPU can then get it from the GIME by byte.
  385.    IC 10, 11, 12 = 74LS244 buffer.   IC13 = 74LS374 latch clocked by CAS* rise.
  386.      RAM Read --> IC12 --> GIME enabled by CAS low. (read first)
  387.      RAM Read --> IC13 --> GIME enabled by CAS hi.  (latched & read)
  388.  
  389.  Test Points:
  390.    TP 2 = E          TP 4 = RAS        TP 6 = Comp Video      TP 9 = Green
  391.    TP 3 = Q          TP 5 = CAS        TP 8 = Red             TP10 = Blue
  392. ------CUT HERE-----
  393.  
  394.     Stephen - Cyberman@toz.buffalo.ny.us/Cyberman@exucom.com
  395.  
  396.  
  397. ... This tagline will self destruct in 5 seconds.
  398. ---
  399.  * Blue Wave/QWK v2.11 *
  400.                                                                 
  401.