/[projet1]/users/coco/origa/rout_hires.s
Defence Force logotype

Contents of /users/coco/origa/rout_hires.s

Parent Directory Parent Directory | Revision Log Revision Log


Revision 719 - (show annotations)
Fri Nov 4 21:49:17 2011 UTC (8 years, 6 months ago) by coco
File size: 6822 byte(s)


1
2 ; -------------------------------------------------------------------
3 ; This is a hires display module
4 ; called by the C part of the program
5 ; We define the adress of the HIRES screen.
6 ;
7 #define HIRES_ADRESS $A000
8 #define HIRES_ADRESS_TXT $BF40
9
10 ; Routine d'effacement de l'écran HIRES
11 ; Effacer l'ecran de $A000 à $BF3F inclus soit 8000 octets
12 ; soit 31*256 + 64 octets
13 ; -------------------------------------------------------------------
14 _HiresClear
15 .(
16 lda #$40 ; pixel eteint
17 ldx #0 ; compteur de boucle a 256
18 loop_x
19 sta HIRES_ADRESS+256*0,x
20 sta HIRES_ADRESS+256*1,x
21 sta HIRES_ADRESS+256*2,x
22 sta HIRES_ADRESS+256*3,x
23 sta HIRES_ADRESS+256*4,x
24 sta HIRES_ADRESS+256*5,x
25 sta HIRES_ADRESS+256*6,x
26 sta HIRES_ADRESS+256*7,x
27 sta HIRES_ADRESS+256*8,x
28 sta HIRES_ADRESS+256*9,x
29 sta HIRES_ADRESS+256*10,x
30 sta HIRES_ADRESS+256*11,x
31 sta HIRES_ADRESS+256*12,x
32 sta HIRES_ADRESS+256*13,x
33 sta HIRES_ADRESS+256*14,x
34 sta HIRES_ADRESS+256*15,x
35 sta HIRES_ADRESS+256*16,x
36 sta HIRES_ADRESS+256*17,x
37 sta HIRES_ADRESS+256*18,x
38 sta HIRES_ADRESS+256*19,x
39 sta HIRES_ADRESS+256*20,x
40 sta HIRES_ADRESS+256*21,x
41 sta HIRES_ADRESS+256*22,x
42 sta HIRES_ADRESS+256*23,x
43 sta HIRES_ADRESS+256*24,x
44 sta HIRES_ADRESS+256*25,x
45 sta HIRES_ADRESS+256*26,x
46 sta HIRES_ADRESS+256*27,x
47 sta HIRES_ADRESS+256*28,x
48 sta HIRES_ADRESS+256*29,x
49 sta HIRES_ADRESS+256*30,x
50 sta HIRES_ADRESS+8000-256,x
51 dex
52 bne loop_x
53 rts
54 .)
55
56 ;
57 ; Effacement des 3 lignes de texte en bas de la zone HIRES soit de $BF40 à $BFDF
58 ; -------------------------------------------------------
59 _HiresClearText
60 .(
61 lda #$0 ; caractere noir
62 ldx #120 ; compteur de boucle a 120
63 loop_x
64 sta HIRES_ADRESS+8000-1,x
65 dex
66 bne loop_x
67 rts
68 .)
69
70 ; -------------------------------------------------------
71 ; Copie d'une image écran vers l'ecran HIRES
72 ; 8000/256=31.25
73 ; Routine originale issue de l'intro de SPACE 1999, modifiée en Aout 2010
74 ; par Didier (coco.oric) pour faire une copie d'écran complète du buffer vers l'écran HIRES
75 ;
76 _ScreenCopyHires
77 .(
78 ldx #0
79 loop_x
80 lda _Origa_Titre+256*0,x
81 sta $a000+256*0,x
82 lda _Origa_Titre+256*1,x
83 sta $a000+256*1,x
84 lda _Origa_Titre+256*2,x
85 sta $a000+256*2,x
86 lda _Origa_Titre+256*3,x
87 sta $a000+256*3,x
88 lda _Origa_Titre+256*4,x
89 sta $a000+256*4,x
90 lda _Origa_Titre+256*5,x
91 sta $a000+256*5,x
92 lda _Origa_Titre+256*6,x
93 sta $a000+256*6,x
94 lda _Origa_Titre+256*7,x
95 sta $a000+256*7,x
96 lda _Origa_Titre+256*8,x
97 sta $a000+256*8,x
98 lda _Origa_Titre+256*9,x
99 sta $a000+256*9,x
100
101 lda _Origa_Titre+256*10,x
102 sta $a000+256*10,x
103 lda _Origa_Titre+256*11,x
104 sta $a000+256*11,x
105 lda _Origa_Titre+256*12,x
106 sta $a000+256*12,x
107 lda _Origa_Titre+256*13,x
108 sta $a000+256*13,x
109 lda _Origa_Titre+256*14,x
110 sta $a000+256*14,x
111 lda _Origa_Titre+256*15,x
112 sta $a000+256*15,x
113 lda _Origa_Titre+256*16,x
114 sta $a000+256*16,x
115 lda _Origa_Titre+256*17,x
116 sta $a000+256*17,x
117 lda _Origa_Titre+256*18,x
118 sta $a000+256*18,x
119 lda _Origa_Titre+256*19,x
120 sta $a000+256*19,x
121
122 lda _Origa_Titre+256*20,x
123 sta $a000+256*20,x
124 lda _Origa_Titre+256*21,x
125 sta $a000+256*21,x
126 lda _Origa_Titre+256*22,x
127 sta $a000+256*22,x
128 lda _Origa_Titre+256*23,x
129 sta $a000+256*23,x
130 lda _Origa_Titre+256*24,x
131 sta $a000+256*24,x
132 lda _Origa_Titre+256*25,x
133 sta $a000+256*25,x
134 lda _Origa_Titre+256*26,x
135 sta $a000+256*26,x
136 lda _Origa_Titre+256*27,x
137 sta $a000+256*27,x
138 lda _Origa_Titre+256*28,x
139 sta $a000+256*28,x
140 lda _Origa_Titre+256*29,x
141 sta $a000+256*29,x
142 lda _Origa_Titre+256*30,x
143 sta $a000+256*30,x
144 dex
145 beq end
146 jmp loop_x
147 end
148 ldx #64
149 loop_x31
150 lda _Origa_Titre-1+256*31,x
151 sta $a000-1+256*31,x
152 dex
153 beq end_x31
154 jmp loop_x31
155 end_x31
156 rts
157 .)
158
159 ; Routine de passage en Hires mode sans ROM
160 ; -------------------------------------------------------------------
161 _HiresLocal
162 .(
163 lda #$1E
164 sta $BFDF
165 lda #$1
166 sta $21F ; ATMOS
167 rts
168 .)
169
170 ; Routine de passage en Text mode sans ROM
171 ; -------------------------------------------------------------------
172 _TextLocal
173 .(
174 lda #$1A
175 sta $BFDF
176 lda #$0
177 sta $21F ; ATMOS
178 rts
179 .)
180
181
182 ; -------------------------------------------------------------------
183 ; We use a table of bytes to avoid the multiplication
184 ; by x. We could have used a multiplication routine
185 ; but introducing table accessing is not a bad thing.
186 ; In order to speed up things, we precompute the real
187 ; adress of each start of line.
188 ;
189 #define DISPLAY_HIRES $A000
190
191 ; This table contains lower 8 bits of the adress
192 HiresTextLow
193 .byt <(DISPLAY_HIRES+320*0) ; ligne 0
194 .byt <(DISPLAY_HIRES+320*1)
195 .byt <(DISPLAY_HIRES+320*2)
196 .byt <(DISPLAY_HIRES+320*3)
197 .byt <(DISPLAY_HIRES+320*4)
198 .byt <(DISPLAY_HIRES+320*5)
199 .byt <(DISPLAY_HIRES+320*6)
200 .byt <(DISPLAY_HIRES+320*7)
201 .byt <(DISPLAY_HIRES+320*8)
202 .byt <(DISPLAY_HIRES+320*9)
203 .byt <(DISPLAY_HIRES+320*10)
204 .byt <(DISPLAY_HIRES+320*11)
205 .byt <(DISPLAY_HIRES+320*12)
206 .byt <(DISPLAY_HIRES+320*13)
207 .byt <(DISPLAY_HIRES+320*14)
208 .byt <(DISPLAY_HIRES+320*15)
209 .byt <(DISPLAY_HIRES+320*16)
210 .byt <(DISPLAY_HIRES+320*17)
211 .byt <(DISPLAY_HIRES+320*18)
212 .byt <(DISPLAY_HIRES+320*19)
213 .byt <(DISPLAY_HIRES+320*20)
214 .byt <(DISPLAY_HIRES+320*21)
215 .byt <(DISPLAY_HIRES+320*22)
216 .byt <(DISPLAY_HIRES+320*23)
217 .byt <(DISPLAY_HIRES+320*24)
218 .byt <(DISPLAY_HIRES+8000+40) ; ligne 25 (1ere ligne de texte réelle) à $A000 + 8000 + 40
219 .byt <(DISPLAY_HIRES+8000+80)
220 .byt <(DISPLAY_HIRES+8000+120)
221
222 ; This table contains hight 8 bits of the adress
223 HiresTextHigh
224 .byt >(DISPLAY_HIRES+320*0)
225 .byt >(DISPLAY_HIRES+320*1)
226 .byt >(DISPLAY_HIRES+320*2)
227 .byt >(DISPLAY_HIRES+320*3)
228 .byt >(DISPLAY_HIRES+320*4)
229 .byt >(DISPLAY_HIRES+320*5)
230 .byt >(DISPLAY_HIRES+320*6)
231 .byt >(DISPLAY_HIRES+320*7)
232 .byt >(DISPLAY_HIRES+320*8)
233 .byt >(DISPLAY_HIRES+320*9)
234 .byt >(DISPLAY_HIRES+320*10)
235 .byt >(DISPLAY_HIRES+320*11)
236 .byt >(DISPLAY_HIRES+320*12)
237 .byt >(DISPLAY_HIRES+320*13)
238 .byt >(DISPLAY_HIRES+320*14)
239 .byt >(DISPLAY_HIRES+320*15)
240 .byt >(DISPLAY_HIRES+320*16)
241 .byt >(DISPLAY_HIRES+320*17)
242 .byt >(DISPLAY_HIRES+320*18)
243 .byt >(DISPLAY_HIRES+320*19)
244 .byt >(DISPLAY_HIRES+320*20)
245 .byt >(DISPLAY_HIRES+320*21)
246 .byt >(DISPLAY_HIRES+320*22)
247 .byt >(DISPLAY_HIRES+320*23)
248 .byt >(DISPLAY_HIRES+320*24)
249 .byt >(DISPLAY_HIRES+320*25+40)
250 .byt >(DISPLAY_HIRES+320*25+80)
251 .byt >(DISPLAY_HIRES+320*25+80)
252
253 _SetMurTop
254 .(
255 loop_x
256 lda _mur_top_24x7
257 sta HIRES_ADRESS+256*0+0
258 sta HIRES_ADRESS+256*0+4
259 sta HIRES_ADRESS+256*0+8
260 sta HIRES_ADRESS+256*0+12
261 sta HIRES_ADRESS+256*0+16
262 sta HIRES_ADRESS+256*0+20
263 sta HIRES_ADRESS+256*0+24
264 sta HIRES_ADRESS+256*0+28
265 sta HIRES_ADRESS+256*0+32
266 sta HIRES_ADRESS+256*0+36
267 rts
268 .)
269
270 _SetMurBas
271 .(
272 rts
273 .)

  ViewVC Help
Powered by ViewVC 1.1.26