]> git.sur5r.net Git - cc65/blob - asminc/telestrat.inc
8e6a66bbdc613238af0402f4f3464df2e2ce23e0
[cc65] / asminc / telestrat.inc
1 ;
2 ; Oric Telemon definition
3 ; Telemon 2.4 & Telemon 3.0
4 ; For telemon 3.0 check http://orix.oric.org
5 ;
6
7
8 ; ---------------------------------------------------------------------------
9 ; Constants
10
11 SCREEN_XSIZE    = 40            ; screen columns
12 SCREEN_YSIZE    = 28            ; screen rows
13
14 FUNCTKEY        = $A5
15
16 FNAME_LEN       = 11            ; maximum length of file-name
17
18
19
20 ; ---------------------------------------------------------------------------
21 ; Zero page
22
23 ; ---------------------------------------------------------------------------
24 ; Page 00
25 RES             := $00
26 RESB            := $02
27
28 TR0             := $0C
29 TR1             := $0D
30 TR2             := $0E
31 TR3             := $0F
32 TR4             := $10
33 TR5             := $11
34 TR6             := $12
35 TR7             := $13
36
37
38
39
40 PTR_READ_DEST   := $2C           ; used for XFREAD and XWRITE only in telemon 3.0
41
42 HRSX            := $46
43 HRSY            := $47
44
45 HRS1            := $4D
46 HRS2            := $4F
47 HRS3            := $51
48 HRS4            := $53
49 HRS5            := $55
50
51
52
53 ; ---------------------------------------------------------------------------
54 ; Low memory
55
56
57
58
59 ; ---------------------------------------------------------------------------
60 ; I/O locations
61
62 ; 6522
63 .struct VIA                     ; Versatile Interface Adapter
64         .res    $0300
65 PRB     .byte                   ; Port Register B
66 PRA     .byte                   ; Port Register A
67 DDRB    .byte                   ; Data Direction Register B
68 DDRA    .byte                   ; Data Direction Register A
69 T1      .word                   ; Timer 1
70 T1L     .word                   ; Timer 1 Latch
71 T2      .word                   ; Timer 2
72 SR      .byte                   ; Shift Register
73 ACR     .byte                   ; Auxiliary Control Register
74 PCR     .byte                   ; Peripheral Control Register
75 IFR     .byte                   ; Interrupt Flags Register
76 IER     .byte                   ; Interrupt Enable Register
77 PRA2    .byte                   ; Port Register A without handshaking
78 .endstruct
79
80
81 .struct VIA2                     ; Versatile Interface Adapter
82         .res    $0320
83 PRB     .byte                   ; Port Register B
84 PRA     .byte                   ; Port Register A
85 DDRB    .byte                   ; Data Direction Register B
86 DDRA    .byte                   ; Data Direction Register A
87 T1      .word                   ; Timer 1
88 T1L     .word                   ; Timer 1 Latch
89 T2      .word                   ; Timer 2
90 SR      .byte                   ; Shift Register
91 ACR     .byte                   ; Auxiliary Control Register
92 PCR     .byte                   ; Peripheral Control Register
93 IFR     .byte                   ; Interrupt Flags Register
94 IER     .byte                   ; Interrupt Enable Register
95 PRA2    .byte                   ; Port Register A without handshaking
96 .endstruct
97
98 ; 6551
99 .struct ACIA                    ; Asynchronous Communications Interface Adapter
100         .res    $031C
101 DATA    .byte
102 STATUS  .byte
103 CMD     .byte                   ; Command register
104 CTRL    .byte                   ; Control register
105 .endstruct
106
107 SCREEN          := $BB80
108
109
110 ; ---------------------------------------------------------------------------
111 ; ROM entries
112
113 ; primitives telemon 2.4 
114 XRD0             = $08
115 XRDW0            = $0C
116 XWR0             = $10 
117 XWSTR0           = $14 
118 XTEXT            = $19
119 XHIRES           = $1A
120 XFILLM           = $1C
121 XMINMA           = $1F
122 XVARS            = $24          ; only in TELEMON 3.0, in telemon 2.4, it's XNOMFI ($24)
123 XFREAD           = $27          ; only in TELEMON 3.0
124 XOPEN            = $30          ; only in TELEMON 3.0
125 XCOSCR           = $34          ; switch off cursor
126 XCSSCR           = $35          ; switch on cursor
127 XCLOSE           = $3A          ; only in TELEMON 3.0 Close file
128 XFWRITE          = $3B          ; only in TELEMON 3.0 write file
129 XSONPS           = $40
130 XOUPS            = $42
131 XPLAY            = $43
132 XSOUND           = $44 
133 XMUSIC           = $45 
134 XZAP             = $46
135 XSHOOT           = $47
136 XCIRCL           = $8F
137 XCURSE           = $90
138 XPAPER           = $92
139 XINK             = $93
140 XEXPLO           = $9C 
141 XPING            = $9D
142
143 ; ---------------------------------------------------------------------------
144 ; ROM entries variables
145
146 PWD_PTR          = $00
147
148 ; ---------------------------------------------------------------------------
149 ; Page $200
150 SCRX             := $220
151 SCRY             := $224
152 ADSCRL           := $218
153 ADSCRH           := $21C
154 IRQVECTOR        := $2FA
155
156
157 ; ---------------------------------------------------------------------------
158 ; Page $500
159
160 BUFNOM           := $517
161 BUFEDT           := $590
162
163 MAX_BUFEDT_LENGTH=110
164
165 ; Hardware
166 CH376_DATA       := $340
167 CH376_COMMAND    := $341
168
169 ; MACRO 
170
171 .macro  BRK_TELEMON   value
172         .byte $00,value
173 .endmacro