]> git.sur5r.net Git - cc65/blobdiff - libsrc/apple2/apple2.inc
Mouse driver fixes by Oliver Schmidt.
[cc65] / libsrc / apple2 / apple2.inc
index 7002f7aadc26d9aecad93ccf253dedfed0239475..2e5a462bc92464c2dfe1064bb39e34006a3701e7 100644 (file)
 ;-----------------------------------------------------------------------------
 ; Zero page stuff
 
-MIN_X  =       $20
-MAX_X  =       $21
-MIN_Y  =       $22
-MAX_Y  =       $23
-CH     =       $24
-CV     =       $25
-BASL   =       $28
-TEXTTYP        =       $32
-RNDL    =       $4E             ; Random value, low byte
-RNDH    =       $4F             ; Random value, high byte
-MEMSIZE        =       $73             ; Highest free RAM location
+WNDLFT  :=      $20    ; Text window left
+WNDWDTH :=      $21    ; Text window width
+WNDTOP  :=      $22    ; Text window top
+WNDBTM  :=      $23    ; Text window bottom+1
+CH      :=      $24    ; Cursor horizontal position
+CV      :=      $25    ; Cursor vertical position
+BASL    :=      $28    ; Text base address low
+BASH    :=      $29    ; Text base address high
+INVFLG  :=      $32    ; Normal/inverse(/flash)
+PROMPT  :=      $33    ; Used by GETLN
+RNDL    :=      $4E    ; Random counter low
+RNDH    :=      $4F    ; Random counter high
+HIMEM   :=      $73    ; Highest available memory address+1
 
 ;-----------------------------------------------------------------------------
 ; Vectors
 
-BRKVec  =       $03F0           ; Break vector
-RESTOR =       $03D0           ; Goto Dos
-
-; ---------------------------------------------------------------------------
-; Screen size
-
-XSIZE           = 40
-YSIZE           = 24
+DOSWARM :=      $03D0  ; DOS warmstart vector
+BRKVec  :=      $03F0  ; Break vector
+SOFTEV  :=      $03F2  ; Vector for warm start
+PWREDUP :=      $03F4  ; This must be = EOR #$A5 of SOFTEV+1
 
 ;-----------------------------------------------------------------------------
 ; Hardware
 
-; Soft switches
-;
-; Write to USEROM to enable apple rom C000-CFFF
-USEROM =       $C007
-
-; 80 column card switches
-C80ON  =       $C00C
-C80OFF =       $C00D
-RD80COL        =       $C01F
-PG2OFF =       $C054
-PG2ON  =       $C055
-RDPAGE2        =       $C01C
-
-; Keyboard entries
-RDKEY  =       $FD0C
-CLEAR_KEY_STROBE = $C010
-KEY_STROBE       = $C000
+; Keyboard input
+KBD     :=      $C000  ; Read keyboard
+KBDSTRB :=      $C010  ; Clear keyboard strobe
+
+; 80 column video switches
+CLR80COL:=      $C000  ; Disable 80 column store
+SET80COL:=      $C001  ; Enable 80 column store
+RD80VID :=      $C01F   ; >127 if 80 column video enabled
+
+; Character set switches
+CLRALTCHAR :=   $C00E   ; Normal Apple II char set
+SETALTCHAR :=   $C00F   ; Norm/inv LC, no flash
+ALTCHARSET :=   $C01E   ; >127 if alt charset switched in
+
+; Language card switches
+RDLCBNK2 :=    $C011   ; >127 if LC bank 2 in use
+RDLCRAM        :=      $C012   ; >127 if LC is read enabled
+ROMIN  :=      $C081   ; Swap in D000-FFFF ROM
+LCBANK2        :=      $C083   ; Swap in LC bank 2
+LCBANK1        :=      $C08B   ; Swap in LC bank 1
+
+; Video mode switches
+MIXCLR  :=      $C052  ; Disable 4 lines of text
+MIXSET  :=      $C053  ; Enable 4 lines of text
+LOWSCR  :=      $C054  ; Page 1
+HISCR   :=      $C055  ; Page 2
+LORES   :=     $C056   ; Lores graphics
+HIRES   :=     $C057   ; Hires graphics
 
 ; Game controller
-OPEN_APPLE =    $C061
-CLOSED_APPLE =  $C062
-
-;-----------------------------------------------------------------------------
-; ROM routines
-
-; Text output and helpers
-HOME   =       $FC58
-VTABZ  =       $FC24
-COUT    =      $FDED
-
-; Graphics entry points, by cbmnut (applenut??) cbmnut@hushmail.com
-WHITE   = $01           ; White for $1c, I think...
-
-COLOR   = $1C           ; Current plot color
-
-HGR2    = $F3D8         ; Initialize and clear hi-res page 2.
-
-HGR     = $F3E2         ; Initialize and clear hi-res page 1.
-
-HCLR    = $F3F2         ; Clear the current hi-res screen to black.
-
-BKGND   = $F3F6         ; Clear the current hi-res screen to the
-                        ; last plotted color (from ($1C).
-
-HPOSN   = $F411         ; Positions the hi-res cursor without
-                        ; plotting a point.
-                        ; Enter with (A) = Y-coordinate, and
-                        ; (Y,X) = X-coordinate.
-
-HPLOT   = $F457         ; Calls HPOSN and tries to plot a dot at
-                        ; the cursor's position.  If you are
-                        ; trying to plot a non-white color at
-                        ; a complementary color position, no
-                        ; dot will be plotted.
-
-HLIN    = $F53A         ; Draws a line from the last plotted
-                        ; point or line destination to:
-                        ; (X,A) = X-coordinate, and
-                        ; (Y) = Y-coordinate.
-
-HFIND   = $F5CB         ; Converts the hi-res coursor's position
-                        ; back to X- and Y-coordinates; stores
-                        ; X-coordinate at $E0,E1 and Y-coordinate
-                        ; at $E2.
-
-DRAW    = $F601         ; Draws a shape.  Enter with (Y,X) = the
-                        ; address of the shape table, and (A) =
-                        ; the rotation factor.  Uses the current
-                        ; color.
-
-XDRAW   = $F65D         ; Draws a shape by inverting the existing
-                        ; color of the dots the shape draws over.
-                        ; Same entry parameters as DRAW.
-
-SETHCOL = $F6EC         ; Set the hi-res color to (X), where (X)
-                        ; must be between 0 and 7.
+BUTN0   :=      $C061  ; Open-Apple Key
+BUTN1   :=      $C062  ; Closed-Apple Key