]> git.sur5r.net Git - cc65/blob - asminc/telestrat.inc
Comment correction
[cc65] / asminc / telestrat.inc
1 ;
2 ; Oric Telemon definition
3 ; Telemon 2.4 & Telemon 3.x
4 ; For telemon 3.x 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 ; I/O Identifier
20 ; theses identifers are used for channel management
21
22
23 XKBD            = $80           ; keyboard
24 XRSE            = $83           ; RS232 in
25 XSCR            = $88           ; screen
26 XRSS            = $90           ; RS232 out
27
28
29 ; ---------------------------------------------------------------------------
30 ; Zero page
31
32 ; ---------------------------------------------------------------------------
33 ; Page 00
34 RES             := $00
35 RESB            := $02
36
37 TR0             := $0C
38 TR1             := $0D
39 TR2             := $0E
40 TR3             := $0F
41 TR4             := $10
42 TR5             := $11
43 TR6             := $12
44 TR7             := $13
45
46 PTR_READ_DEST   := $2C           ; used for XFREAD and XWRITE only in telemon 3.x
47
48 HRSX            := $46
49 HRSY            := $47
50
51 HRS1            := $4D
52 HRS2            := $4F
53 HRS3            := $51
54 HRS4            := $53
55 HRS5            := $55
56
57 HRSFB           := $57
58
59 ; RS232T
60 ; b0-b3 : speed 
61 ;         1111 => 19200 bps  (please note that telestrat can't handle this speed without stopping all IRQ except ACIA's one)
62 ;         1100 =>  9600 bps  (default from telemon)
63 ;         1110 =>  4800 bps 
64 ;         1010 =>  2400 bps 
65 ;         1000 =>  1200 bps 
66 ;         0111 =>   600 bps 
67 ;         0110 =>   300 bps 
68 ;         0101 =>   150 bps 
69 ;         0010 =>    75 bps 
70
71 ; b4    : 0 external clock, 1 internal clock
72 ; b6-b5 : 00 8 bits
73 ;         01 7 bits
74 ;         10 6 bits
75 ;         11 5 bits
76 ; b7    : 0  a stop  
77
78 RS232T          := $59
79
80 ; RS232C 
81 ; b0-b3 : 0
82 ; b4    : 1 if echo
83 ; b5    : 1 if parity
84 ; b7-b6 : 00 in/out parity odd
85 ;       : 01 on/out parity even
86 ;       : 10 parity sent, answer not tested
87 ;       : 11 SPACE SENT, reception not tested
88
89 RS232C          := $5A
90
91 ; ---------------------------------------------------------------------------
92 ; Low memory
93 IRQVec          := $02FB        ; "fast" interrupt vector
94
95
96
97 ; ---------------------------------------------------------------------------
98 ; I/O locations
99
100 ; 6522
101 .struct VIA                     ; Versatile Interface Adapter
102         .res    $0300
103 PRB     .byte                   ; Port Register B
104 PRA     .byte                   ; Port Register A
105 DDRB    .byte                   ; Data Direction Register B
106 DDRA    .byte                   ; Data Direction Register A
107 T1      .word                   ; Timer 1
108 T1L     .word                   ; Timer 1 Latch
109 T2      .word                   ; Timer 2
110 SR      .byte                   ; Shift Register
111 ACR     .byte                   ; Auxiliary Control Register
112 PCR     .byte                   ; Peripheral Control Register
113 IFR     .byte                   ; Interrupt Flags Register
114 IER     .byte                   ; Interrupt Enable Register
115 PRA2    .byte                   ; Port Register A without handshaking
116 .endstruct
117
118
119 .struct VIA2                    ; Versatile Interface Adapter
120         .res    $0320
121 PRB     .byte                   ; Port Register B
122 PRA     .byte                   ; Port Register A
123 DDRB    .byte                   ; Data Direction Register B
124 DDRA    .byte                   ; Data Direction Register A
125 T1      .word                   ; Timer 1
126 T1L     .word                   ; Timer 1 Latch
127 T2      .word                   ; Timer 2
128 SR      .byte                   ; Shift Register
129 ACR     .byte                   ; Auxiliary Control Register
130 PCR     .byte                   ; Peripheral Control Register
131 IFR     .byte                   ; Interrupt Flags Register
132 IER     .byte                   ; Interrupt Enable Register
133 PRA2    .byte                   ; Port Register A without handshaking
134 .endstruct
135
136 ; 6551
137 .struct ACIA                    ; Asynchronous Communications Interface Adapter
138         .res    $031C
139 DATA    .byte
140 STATUS  .byte
141 CMD     .byte                   ; Command register
142 CTRL    .byte                   ; Control register
143 .endstruct
144
145 SCREEN          := $BB80
146
147
148 ; ---------------------------------------------------------------------------
149 ; ROM entries
150
151 ; telemon primitives (2.4 & 3.x)
152 XRD0             = $08
153 XRDW0            = $0C
154 XWR0             = $10 
155 XWSTR0           = $14          ; write a string in text mode
156 XTEXT            = $19
157 XHIRES           = $1A
158 XFILLM           = $1C
159 XMINMA           = $1F
160 XVARS            = $24          ; only in TELEMON 3.x, in telemon 2.4, it's XNOMFI ($24)
161 XFREAD           = $27          ; only in TELEMON 3.x
162 XOPEN            = $30          ; only in TELEMON 3.x
163 XCOSCR           = $34          ; switch off cursor
164 XCSSCR           = $35          ; switch on cursor
165 XCLOSE           = $3A          ; only in TELEMON 3.x Close file
166 XFWRITE          = $3B          ; only in TELEMON 3.x write file
167 XSONPS           = $40
168 XOUPS            = $42          ; send Oups sound into PSG
169 XPLAY            = $43
170 XSOUND           = $44 
171 XMUSIC           = $45 
172 XZAP             = $46
173 XSHOOT           = $47
174 XSOUT            = $67          ; send A register to RS232, available in telemon 2.4 & 3.x
175 XHRSSE           = $8C          ; set hires position cursor
176 XDRAWA           = $8D          ; draw a line 
177 XDRAWR           = $8E          ; draw a line 
178 XCIRCL           = $8F
179 XCURSE           = $90
180 XCURMO           = $91
181 XPAPER           = $92
182 XINK             = $93
183 XBOX             = $94
184 XABOX            = $95
185 XFILL            = $96
186 XCHAR            = $97
187 XSCHAR           = $98          ; draw a string in hires
188 XEXPLO           = $9C 
189 XPING            = $9D
190
191 ; ---------------------------------------------------------------------------
192 ; ROM entries variables
193
194 PWD_PTR          = $00
195
196 ; ---------------------------------------------------------------------------
197 ; Page $200
198 SCRX             := $220
199 SCRY             := $224
200 ADSCRL           := $218
201 ADSCRH           := $21C
202 HRSPAT           := $2AA        ; hires pattern : it's used to draw pattern for a line or a circle
203 IRQVECTOR        := $2FA
204
205
206 ; ---------------------------------------------------------------------------
207 ; Page $500
208
209 BUFNOM           := $517
210 BUFEDT           := $590
211
212 MAX_BUFEDT_LENGTH=110
213
214 ; Hardware
215 CH376_DATA       := $340
216 CH376_COMMAND    := $341
217
218 ; MACRO 
219
220 .macro  BRK_TELEMON   value
221         .byte $00,value
222 .endmacro