[comp.sys.apple2] Display Softswitches

alfter@uns-helios.nevada.edu (SCOTT ALFTER) (10/11/90)

I've finally gotten around to looking up the display softswitches, for whoever
it was that asked.  This information is out of the _Apple_IIe_Technical_
_Reference_Manual_.

Switch    Description                           Address
--------- ------------------------------------- -------
TEXT      on: display text                      C051
          off: display graphics                 C050
          read TEXT switch                      C01A
MIXED     on: graphics w/4-line text window     C053
          off: graphics only                    C052
          read MIXED switch                     C01B
PAGE2     on: select text/graphics page 2       C055
          off: select text/graphics page 1      C054
          read PAGE2 switch                     C01C
HIRES     on: Hi-Res graphics                   C057
          off: Lo-Res graphics                  C056
          read HIRES switch                     C01D
80COL     on: 80-column text                    C00D
          off: 40-column text                   C00C
          read 80COL switch                     C01F
80STORE   on: write display info to aux. mem.   C001
          off: write display info to main mem.  C000
          read 80STORE switch                   C018
ALTCHAR   on: inverse lowercase & MouseText     C00F
          off: flashing text                    C00E
          read ALTCHAR switch                   C01E
AN3       on: double Hi-Res (also annunciator   C060
              3 output at the game I/O port)
          off: regular Hi-Res                   C05F
VBL       read vertical blanking                C019

To set a switch, store something to that address (POKE it from BASIC).  If you
want to read a switch, load from that address (PEEK it from BASIC); the switch
is set if the high bit is set.  Note that you can't read the setting of AN3.
Also, VBL doesn't indicate the setting of a switch, but indicates when the
video circuitry isn't tracing the picture.  For smoother graphics, only change
the screen contents when the high bit of VBL is clear.

-----------------------------------------------------------------------------
Scott Alfter                             _/_
                                        / v \ Apple II:
Internet: alfter@uns-helios.nevada.edu (    ( the power to be your best!
   GEnie: S.ALFTER                      \_^_/

reeder@reed.UUCP (Doug Reeder) (10/23/90)

In article <2142@unsvax.NEVADA.EDU> alfter@uns-helios.uucp (SCOTT ALFTER) writes:
_Switch    Description                           Address
_--------- ------------------------------------- -------
_VBL       read vertical blanking                C019
_
_Also, VBL doesn't indicate the setting of a switch, but indicates when the
_video circuitry isn't tracing the picture.  For smoother graphics, only change
_the screen contents when the high bit of VBL is clear.

    Note, however, that this won't work on a IIc, because Vertical Blanking
is available only as an interrupt.  (And what fun it is to have a source of
regular interrupts!)


-- 
Doug Reeder                                   USENET: ...!tektronix!reed!reeder
from ARPA: tektronix!reed!reeder@berkeley.EDU BITNET: reeder@reed.BITNET
7th: Each swallow works hard to be perfect pilot-provider-builder-trainer-
teacher-lover-mate,no half-true hate!   - Dr.Brommer's 18-in-1 Pure Castile Soap

ART100@psuvm.psu.edu (Andy Tefft) (10/23/90)

In article <15593@reed.UUCP>, reeder@reed.UUCP (Doug Reeder) says:
>
>_VBL       read vertical blanking                C019
>_the screen contents when the high bit of VBL is clear.
>
>    Note, however, that this won't work on a IIc, because Vertical Blanking
>is available only as an interrupt.  (And what fun it is to have a source of
>regular interrupts!)

Not exactly true. The VBL does work differently (as I found out
the hard way) but Dave Lyons sent me a preliminary tech note
that explained it. Apparently the difference is you first have
to enable the vbl; you also have to reset it once you poll it if
the high bit is set.

THROOP@GRIN1.BITNET ("Throop,Henry B") (10/25/90)

[stuff about VBL interrupts on IIc]

Keep in mind with all this confusion that the gs and the //e handle the VBL
register (at $c019) differently - on the //e, the high bit clear means VBL
blanking, and on the gs, it's the high bit set.  You can also, of course, set
VBL interrupts on the gs, but not on the //e.  The ][+ doesn't have a VBL
register, but with a one wire mod you can take the VBL signal and put it in
one of the pdl switch inputs.

--
Henry Throop
THROOP@GRIN1.BITNET
throoph@jacobs.cs.orst.edu