Subject: Re: PEEK/POKE locations? (softswitches)
From: [email-masked] (Sean Dockery)
Date: Wed, 8 Jun 1994 22:20:17 GMT

[email-masked] wrote the following article:

Most of the equates are listed in pairs, and the comment on the first one
often represents what the second actually does, but refers to with what
function the softswitch pair are associated.
---------------------------------------------------------------------------
* SOFTSWITCHES.S

KEYBOARD	=	$C000		;keyboard data (latched) (RD-only)

CLR80COL	=	$C000		;use 80-column memory mapping (WR-only)
SET80COL	=	$C001

CLRAUXRD	=	$C002		;read from auxilliary 48K
SETAUXRD	=	$C003

CLRAUXWR	=	$C004		;write to auxilliary 48K
SETAUXWR	=	$C005

CLRCXROM	=	$C006		;use external slot ROM
SETCXROM	=	$C007

CLRAUXZP	=	$C008		;use auxilliary ZP, stack, & LC
SETAUXZP	=	$C009

CLRC3ROM	=	$C00A		;use external slot C3 ROM
SETC3ROM	=	$C00B

CLR80VID	=	$C00C		;use 80-column display mode
SET80VID	=	$C00D

CLRALTCH	=	$C00E		;use alternate character set ROM
SETALTCH	=	$C00F

STROBE  	=	$C010		;strobe (unlatch) keyboard data

* bit seven of the following is set (1) if the condition is true

RDLCBNK2	=	$C011		;reading from LC bank $Dx 2
RDLCRAM 	=	$C012		;reading from LC RAM
RDRAMRD 	=	$C013		;reading from auxilliary 48K
RDRAMWR 	=	$C014		;writing to auxilliary 48K
RDCXROM 	=	$C015		;using external slot ROM
RDAUXZP 	=	$C016		;using auxilliary ZP, stack, & LC
RDC3ROM 	=	$C017		;using external slot C3 ROM
RD80COL 	=	$C018		;using 80-column memory mapping
RDVBLBAR	=	$C019		;not VBL (VBL signal low)
RDTEXT  	=	$C01A		;using text mode
RDMIXED 	=	$C01B		;using mixed mode
RDPAGE2 	=	$C01C		;using text/graphics page2
RDHIRES 	=	$C01D		;using Hi-res graphics mode
RDALTCH 	=	$C01E		;using alternate character set ROM
RD80VID 	=	$C01F		;using 80-column display mode

SPEAKER 	=	$C030		;toggle speaker diaphragm

CLRTEXT 	=	$C050		;enable text-only mode
SETTEXT 	=	$C051

CLRMIXED	=	$C052		;enable graphics/text mixed mode
SETMIXED	=	$C053

TXTPAGE1	=	$C054		;select page1/2 (or page1/1x)
TXTPAGE2	=	$C055

CLRHIRES	=	$C056		;enable Hi-res graphics
SETHIRES	=	$C057

SETAN0  	=	$C058		;4-bit annunciator inputs
CLRAN0  	=	$C059
SETAN1  	=	$C05A
CLRAN1  	=	$C05B
SETAN2  	=	$C05C
CLRAN2  	=	$C05D
SETAN3  	=	$C05E
CLRAN3  	=	$C05F

OPNAPPLE	=	$C061		;open apple (command) key data
CLSAPPLE	=	$C062		;closed apple (option) key data

PDLTRIG 	=	$C070		;trigger paddles

* for WR-enable LC RAM, the softswitch REQUIRES two successive reads

			$C080		;RD LC RAM bank2, WR-protect LC RAM
ROMIN   	=	$C081		;RD ROM, WR-enable LC RAM
			$C082		;RD ROM, WR-protect LC RAM
LCBANK2 	=	$C083		;RD LC RAM bank2, WR-enable LC RAM

			$C084		;RD LC RAM bank2, WR-protect LC RAM
			$C085		;RD ROM, WR-enable LC RAM
			$C086		;RD ROM, WR-protect LC RAM
			$C087		;RD LC RAM bank2, WR-enable LC RAM

			$C088		;RD LC RAM bank1, WR-protect LC RAM
			$C089		;RD ROM, WR-enable LC RAM
			$C08A		;RD ROM, WR-protect LC RAM
LCBANK1 	=	$C08B		;RD LC RAM bank1, WR-enable LC RAM

			$C08C		;RD LC RAM bank1, WR-protect LC RAM
			$C08D		;RD ROM, WR-enable LC RAM
			$C08E		;RD ROM, WR-protect LC RAM
			$C08F		;RD LC RAM bank1, WR-enable LC RAM

CLRC8ROM	=	$CFFF		;switch out slot C8 ROM
---------------------------------------------------------------------------
To enable double Hi-res graphics, the following code will accomplish this:

	STA	SETHIRES
	STA	SETAN3
	STA	CLRMIXED
	STA	CLRTEXT
	JSR	$C300