2014-08-29 19:19:19 +00:00
|
|
|
;
|
|
|
|
; memory.s
|
|
|
|
; Memory mapping information
|
|
|
|
;
|
|
|
|
; Created by Quinn Dunki on 8/15/14.
|
|
|
|
; Copyright (c) 2014 One Girl, One Laptop Productions. All rights reserved.
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
; Constants
|
|
|
|
|
|
|
|
CHAR_NORMAL = $ff
|
|
|
|
CHAR_INVERSE = $3f
|
|
|
|
CHAR_FLASH = $7f
|
|
|
|
|
2015-02-09 02:06:14 +00:00
|
|
|
VIEW_STYLE_STEALTH = $00
|
|
|
|
VIEW_STYLE_PLAIN = $01
|
|
|
|
VIEW_STYLE_FANCY = $02
|
2015-07-18 04:38:48 +00:00
|
|
|
VIEW_STYLE_PROGRESS = $03
|
|
|
|
VIEW_STYLE_CHECK = $04
|
|
|
|
VIEW_STYLE_BUTTON = $05
|
2018-02-28 20:43:14 +00:00
|
|
|
VIEW_STYLE_RADIO = $06
|
2015-02-09 02:06:14 +00:00
|
|
|
|
2014-09-05 23:31:33 +00:00
|
|
|
|
2015-07-18 04:38:48 +00:00
|
|
|
VIEW_STYLE_TAKESFOCUS = $04 ; Styles >= this one are selectable
|
2014-08-29 19:19:19 +00:00
|
|
|
|
2014-09-21 01:20:44 +00:00
|
|
|
VIEW_STYLE_APPLESOFT = $80 ; High nybble flag bit for views created from Applesoft
|
2017-12-21 23:50:50 +00:00
|
|
|
VIEW_STYLE_RAWTITLE = $40 ; High nybble flag bit for views with raw titles
|
2014-09-21 01:20:44 +00:00
|
|
|
|
2014-09-28 00:52:57 +00:00
|
|
|
IRQVECTORL = $03fe
|
|
|
|
IRQVECTORH = $03ff
|
|
|
|
|
2015-01-03 00:01:38 +00:00
|
|
|
MEMBITMAP = $bf58 ; ProDOS 8 system memory allocation bitmap
|
2014-09-21 01:20:44 +00:00
|
|
|
|
2014-08-29 19:19:19 +00:00
|
|
|
; ROM entry points
|
|
|
|
|
|
|
|
COUT = $fded
|
|
|
|
BASCALC = $fbc1
|
2014-09-01 18:18:36 +00:00
|
|
|
PRBYTE = $fdda
|
2014-09-06 03:32:16 +00:00
|
|
|
RDKEY = $fd0c
|
2014-09-28 00:52:57 +00:00
|
|
|
BELL = $fbdd
|
2014-08-29 19:19:19 +00:00
|
|
|
|
|
|
|
|
2014-09-01 18:18:36 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2014-08-29 19:19:19 +00:00
|
|
|
; System state
|
2014-09-01 18:18:36 +00:00
|
|
|
;
|
|
|
|
WG_CURSORX: ; In screenspace
|
2014-08-29 19:19:19 +00:00
|
|
|
.byte 0
|
|
|
|
WG_CURSORY:
|
|
|
|
.byte 0
|
|
|
|
|
|
|
|
WG_LOCALCURSORX: ; In current viewspace
|
|
|
|
.byte 0
|
|
|
|
WG_LOCALCURSORY:
|
|
|
|
.byte 0
|
|
|
|
|
|
|
|
WG_ACTIVEVIEW:
|
|
|
|
.byte 0
|
|
|
|
|
2014-09-06 03:32:16 +00:00
|
|
|
WG_FOCUSVIEW:
|
|
|
|
.byte 0
|
|
|
|
|
2014-09-29 20:45:46 +00:00
|
|
|
WG_PENDINGACTIONVIEW:
|
|
|
|
.byte 0
|
|
|
|
|
2014-10-14 02:12:14 +00:00
|
|
|
WG_GOSUB: ; Set if an Applesoft gosub was generated by a view action
|
|
|
|
.byte 0
|
2015-01-14 21:29:12 +00:00
|
|
|
WG_GOSUBLINE: ; Line number for the pending GOSUB
|
|
|
|
.byte 0,0
|
2014-10-14 02:12:14 +00:00
|
|
|
|
2014-09-01 18:18:36 +00:00
|
|
|
WG_VIEWCLIP:
|
|
|
|
; X0,Y0,X1,Y1. Edges of current window, in view space, right span
|
|
|
|
.byte 0,0,0,0,0
|
|
|
|
|
2014-08-29 19:19:19 +00:00
|
|
|
WG_VIEWRECORDS:
|
2014-09-09 01:00:40 +00:00
|
|
|
; 0 1 2 3 4 5 6 7 8 9 10 11 12 13
|
2014-09-21 20:46:41 +00:00
|
|
|
; X, Y, Screen Width, Screen Height, Style, X Offset, Y Offset, View Width, View Height, State, CallbackL, CallbackH, TitleL, TitleH
|
2014-09-01 18:18:36 +00:00
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
2014-09-17 01:01:08 +00:00
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
|
|
|
|
WG_STRINGS: ; Fixed-size block allocator for strings (view titles, mainly)
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
2014-09-01 18:18:36 +00:00
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
|
|
|
|
WG_SCRATCHA:
|
|
|
|
.byte 0
|
|
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; Lookup tables
|
|
|
|
;
|
|
|
|
|
|
|
|
; Video memory
|
2014-08-29 19:19:19 +00:00
|
|
|
TEXTLINES_H:
|
|
|
|
.byte $04 ;0
|
|
|
|
.byte $04 ;1
|
|
|
|
.byte $05 ;2
|
|
|
|
.byte $05 ;3
|
|
|
|
.byte $06 ;4
|
|
|
|
.byte $06 ;5
|
|
|
|
.byte $07 ;6
|
|
|
|
.byte $07 ;7
|
|
|
|
.byte $04 ;8
|
|
|
|
.byte $04 ;9
|
|
|
|
.byte $05 ;10
|
|
|
|
.byte $05 ;11
|
|
|
|
.byte $06 ;12
|
|
|
|
.byte $06 ;13
|
|
|
|
.byte $07 ;14
|
|
|
|
.byte $07 ;15
|
|
|
|
.byte $04 ;16
|
|
|
|
.byte $04 ;17
|
|
|
|
.byte $05 ;18
|
|
|
|
.byte $05 ;19
|
|
|
|
.byte $06 ;20
|
|
|
|
.byte $06 ;21
|
|
|
|
.byte $07 ;22
|
|
|
|
.byte $07 ;23
|
|
|
|
|
|
|
|
TEXTLINES_L:
|
|
|
|
.byte $00 ;0
|
|
|
|
.byte $80 ;1
|
|
|
|
.byte $00 ;2
|
|
|
|
.byte $80 ;3
|
|
|
|
.byte $00 ;4
|
|
|
|
.byte $80 ;5
|
|
|
|
.byte $00 ;6
|
|
|
|
.byte $80 ;7
|
|
|
|
.byte $28 ;8
|
|
|
|
.byte $a8 ;9
|
|
|
|
.byte $28 ;10
|
|
|
|
.byte $a8 ;11
|
|
|
|
.byte $28 ;12
|
|
|
|
.byte $a8 ;13
|
|
|
|
.byte $28 ;14
|
|
|
|
.byte $a8 ;15
|
|
|
|
.byte $50 ;16
|
|
|
|
.byte $d0 ;17
|
|
|
|
.byte $50 ;18
|
|
|
|
.byte $d0 ;19
|
|
|
|
.byte $50 ;20
|
|
|
|
.byte $d0 ;21
|
|
|
|
.byte $50 ;22
|
|
|
|
.byte $d0 ;23
|
2014-09-07 23:06:25 +00:00
|
|
|
|