]> git.sur5r.net Git - cc65/blob - libsrc/apple2/apple2.inc
Added TEXT entry point, use new assignment operator
[cc65] / libsrc / apple2 / apple2.inc
1
2 ;-----------------------------------------------------------------------------
3 ; Zero page stuff
4
5 MIN_X   =       $20
6 MAX_X   =       $21
7 MIN_Y   =       $22
8 MAX_Y   =       $23
9 CH      =       $24
10 CV      =       $25
11 BASL    =       $28
12 TEXTTYP =       $32
13 RNDL    =       $4E             ; Random value, low byte
14 RNDH    =       $4F             ; Random value, high byte
15 MEMSIZE =       $73             ; Highest free RAM location
16
17 ;-----------------------------------------------------------------------------
18 ; Vectors
19
20 BRKVec  =       $03F0           ; Break vector
21 RESTOR  =       $03D0           ; Goto Dos
22
23 ; ---------------------------------------------------------------------------
24 ; Screen size
25
26 XSIZE           = 40
27 YSIZE           = 24
28
29 ;-----------------------------------------------------------------------------
30 ; Hardware
31
32 ; Soft switches
33 ;
34 ; Write to USEROM to enable apple rom C000-CFFF
35 USEROM  :=      $C007
36
37 ; 80 column card switches
38 C80ON   :=      $C00C
39 C80OFF  :=      $C00D
40 RD80COL :=      $C01F
41 PG2OFF  :=      $C054
42 PG2ON   :=      $C055
43 RDPAGE2 :=      $C01C
44
45 ; Keyboard entries
46 CLEAR_KEY_STROBE:= $C010
47 KEY_STROBE      := $C000
48
49 ; Game controller
50 OPEN_APPLE      := $C061
51 CLOSED_APPLE    := $C062
52
53 ;-----------------------------------------------------------------------------
54 ; ROM routines
55
56 RDKEY   :=      $FD0C
57
58 ; Text output and helpers
59 HOME    :=      $FC58
60 VTABZ   :=      $FC24
61 COUT    :=      $FDED
62
63 ; Graphics entry points, by cbmnut (applenut??) cbmnut@hushmail.com
64 WHITE   = $01           ; White for $1c, I think...
65 COLOR   = $1C           ; Current plot color
66
67 TEXT    := $F399        ; Return to text screen
68 HGR2    := $F3D8        ; Initialize and clear hi-res page 2.
69 HGR     := $F3E2        ; Initialize and clear hi-res page 1.
70 HCLR    := $F3F2        ; Clear the current hi-res screen to black.
71 BKGND   := $F3F6        ; Clear the current hi-res screen to the
72                         ; last plotted color (from ($1C).
73 HPOSN   := $F411        ; Positions the hi-res cursor without
74                         ; plotting a point.
75                         ; Enter with (A) = Y-coordinate, and
76                         ; (Y,X) = X-coordinate.
77 HPLOT   := $F457        ; Calls HPOSN and tries to plot a dot at
78                         ; the cursor's position.  If you are
79                         ; trying to plot a non-white color at
80                         ; a complementary color position, no
81                         ; dot will be plotted.
82 HLIN    := $F53A        ; Draws a line from the last plotted
83                         ; point or line destination to:
84                         ; (X,A) = X-coordinate, and
85                         ; (Y) = Y-coordinate.
86 HFIND   := $F5CB        ; Converts the hi-res coursor's position
87                         ; back to X- and Y-coordinates; stores
88                         ; X-coordinate at $E0,E1 and Y-coordinate
89                         ; at $E2.
90 DRAW    := $F601        ; Draws a shape.  Enter with (Y,X) = the
91                         ; address of the shape table, and (A) =
92                         ; the rotation factor.  Uses the current
93                         ; color.
94 XDRAW   := $F65D        ; Draws a shape by inverting the existing
95                         ; color of the dots the shape draws over.
96                         ; Same entry parameters as DRAW.
97 SETHCOL := $F6EC        ; Set the hi-res color to (X), where (X)
98                         ; must be between 0 and 7.
99 PREAD   := $FB1E        ; Read paddle in X, return AD conv. value in Y