2000-05-28 13:40:48 +00:00
|
|
|
|
2002-11-07 12:16:15 +00:00
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
; Zero page stuff
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
MIN_X = $20
|
|
|
|
MAX_X = $21
|
|
|
|
MIN_Y = $22
|
|
|
|
MAX_Y = $23
|
|
|
|
CH = $24
|
|
|
|
CV = $25
|
|
|
|
BASL = $28
|
|
|
|
TEXTTYP = $32
|
2002-11-07 12:16:15 +00:00
|
|
|
RNDL = $4E ; Random value, low byte
|
|
|
|
RNDH = $4F ; Random value, high byte
|
2002-07-15 20:03:37 +00:00
|
|
|
MEMSIZE = $73 ; Highest free RAM location
|
2002-11-07 12:16:15 +00:00
|
|
|
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
; Vectors
|
|
|
|
|
|
|
|
BRKVec = $03F0 ; Break vector
|
|
|
|
RESTOR = $03D0 ; Goto Dos
|
|
|
|
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
; Hardware
|
|
|
|
|
|
|
|
; Soft switches
|
|
|
|
;
|
|
|
|
; Write to USEROM to enable apple rom C000-CFFF
|
2003-10-23 10:02:59 +00:00
|
|
|
USEROM := $C007
|
2002-11-07 12:16:15 +00:00
|
|
|
|
|
|
|
; 80 column card switches
|
2003-10-23 10:02:59 +00:00
|
|
|
C80ON := $C00C
|
|
|
|
C80OFF := $C00D
|
|
|
|
RD80COL := $C01F
|
2003-11-12 16:41:09 +00:00
|
|
|
MIXOFF := $C052
|
2003-10-23 10:02:59 +00:00
|
|
|
PG2OFF := $C054
|
|
|
|
PG2ON := $C055
|
|
|
|
RDPAGE2 := $C01C
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
; Keyboard entries
|
2003-10-23 10:02:59 +00:00
|
|
|
CLEAR_KEY_STROBE:= $C010
|
|
|
|
KEY_STROBE := $C000
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
; Game controller
|
2003-10-23 10:02:59 +00:00
|
|
|
OPEN_APPLE := $C061
|
|
|
|
CLOSED_APPLE := $C062
|
2002-11-07 12:16:15 +00:00
|
|
|
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
; ROM routines
|
|
|
|
|
2003-10-23 10:02:59 +00:00
|
|
|
RDKEY := $FD0C
|
|
|
|
|
2002-11-07 12:16:15 +00:00
|
|
|
; Text output and helpers
|
2003-10-23 10:02:59 +00:00
|
|
|
HOME := $FC58
|
|
|
|
VTABZ := $FC24
|
|
|
|
COUT := $FDED
|
2002-07-15 20:07:30 +00:00
|
|
|
|
2002-11-07 12:16:15 +00:00
|
|
|
; Graphics entry points, by cbmnut (applenut??) cbmnut@hushmail.com
|
|
|
|
WHITE = $01 ; White for $1c, I think...
|
|
|
|
COLOR = $1C ; Current plot color
|
2002-07-15 20:07:30 +00:00
|
|
|
|
2003-10-23 10:02:59 +00:00
|
|
|
TEXT := $F399 ; Return to text screen
|
|
|
|
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
|
2002-11-07 12:16:15 +00:00
|
|
|
; last plotted color (from ($1C).
|
2003-10-23 10:02:59 +00:00
|
|
|
HPOSN := $F411 ; Positions the hi-res cursor without
|
2002-11-07 12:16:15 +00:00
|
|
|
; plotting a point.
|
|
|
|
; Enter with (A) = Y-coordinate, and
|
|
|
|
; (Y,X) = X-coordinate.
|
2003-10-23 10:02:59 +00:00
|
|
|
HPLOT := $F457 ; Calls HPOSN and tries to plot a dot at
|
2002-11-07 12:16:15 +00:00
|
|
|
; the cursor's position. If you are
|
|
|
|
; trying to plot a non-white color at
|
|
|
|
; a complementary color position, no
|
|
|
|
; dot will be plotted.
|
2003-10-23 10:02:59 +00:00
|
|
|
HLIN := $F53A ; Draws a line from the last plotted
|
2002-11-07 12:16:15 +00:00
|
|
|
; point or line destination to:
|
|
|
|
; (X,A) = X-coordinate, and
|
|
|
|
; (Y) = Y-coordinate.
|
2003-10-23 10:02:59 +00:00
|
|
|
HFIND := $F5CB ; Converts the hi-res coursor's position
|
2002-11-07 12:16:15 +00:00
|
|
|
; back to X- and Y-coordinates; stores
|
|
|
|
; X-coordinate at $E0,E1 and Y-coordinate
|
|
|
|
; at $E2.
|
2003-10-23 10:02:59 +00:00
|
|
|
DRAW := $F601 ; Draws a shape. Enter with (Y,X) = the
|
2002-11-07 12:16:15 +00:00
|
|
|
; address of the shape table, and (A) =
|
|
|
|
; the rotation factor. Uses the current
|
|
|
|
; color.
|
2003-10-23 10:02:59 +00:00
|
|
|
XDRAW := $F65D ; Draws a shape by inverting the existing
|
2002-11-07 12:16:15 +00:00
|
|
|
; color of the dots the shape draws over.
|
|
|
|
; Same entry parameters as DRAW.
|
2003-10-23 10:02:59 +00:00
|
|
|
SETHCOL := $F6EC ; Set the hi-res color to (X), where (X)
|
2002-11-07 12:16:15 +00:00
|
|
|
; must be between 0 and 7.
|
2003-10-23 10:02:59 +00:00
|
|
|
PREAD := $FB1E ; Read paddle in X, return AD conv. value in Y
|