/[projet1]/public/oric/demos/SlideShowDemo/code/transitions.s
Defence Force logotype

Contents of /public/oric/demos/SlideShowDemo/code/transitions.s

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1045 - (show annotations)
Fri Dec 20 17:42:53 2013 UTC (6 years, 1 month ago) by dbug
File size: 5352 byte(s)
Floppy Builder 0.11
- Added support for metadata that can be used later on by the programmer
Also modified Link65 to handle #include correctly in assembler source files
The SlideShow now correctly displays the name of the pictures and their authors from the exported metadata (Still need transitions)

1
2 .zero
3
4 pos_y .dsb 1
5 save_y .dsb 1
6
7 .text
8
9 #define METADATA_STORAGE
10 #include "floppy_description.h"
11 #undef METADATA_STORAGE
12
13 ; Unresolved external: _MetaData_name_Low
14 ; Unresolved external: _MetaData_name_High
15
16 _PrintDescription
17 .(
18 ldy _LoaderApiEntryIndex
19 lda _MetaData_name_Low,y
20 sta tmp0+0
21 lda _MetaData_name_High,y
22 sta tmp0+1
23
24 ldy #0
25 ldx #0
26 loop_name
27 lda (tmp0),y
28 beq end_name
29 sta $bb80+40*25,x
30 iny
31 inx
32 bne loop_name
33 end_name
34
35 lda #32
36 sta $bb80+40*25,x
37 inx
38
39 lda #"b"
40 sta $bb80+40*25,x
41 inx
42
43 lda #"y"
44 sta $bb80+40*25,x
45 inx
46
47 lda #32
48 sta $bb80+40*25,x
49 inx
50
51 ldy _LoaderApiEntryIndex
52 lda _MetaData_author_Low,y
53 sta tmp0+0
54 lda _MetaData_author_High,y
55 sta tmp0+1
56
57 ldy #0
58 loop_author
59 lda (tmp0),y
60 beq end_author
61 sta $bb80+40*25,x
62 iny
63 inx
64 bne loop_author
65 end_author
66
67 lda #0
68 sta $bb80+40*25,x
69 inx
70
71 rts
72 .)
73
74
75 TransitionType .byt 1
76
77 _PictureDoTransition
78 .(
79 ldx TransitionType
80 inx
81 cpx #3
82 bne skip
83 ldx #0
84 skip
85 stx TransitionType
86 .)
87 cpx #0
88 beq _PictureTransitionUnroll
89 cpx #1
90 beq _PictureTransitionVenicianStore
91 jmp _PictureTransitionFromTopAndBottom
92 rts
93
94
95 ; 16 entries
96 MiniTableUnroll
97 .byt 0 ; The normal line of the picture
98 .byt 255 ; A black line for special effect
99 .byt 32
100 .byt 29
101 .byt 27
102 .byt 26
103 .byt 25
104 .byt 24
105 .byt 23
106 .byt 22
107 .byt 21
108 .byt 20
109 .byt 19
110 .byt 17
111 .byt 14
112 .byt 10
113 .byt 255 ; A black line for special effect
114
115
116
117 _PictureTransitionUnroll
118 .(
119 ldy #238
120 loop_frame
121 sty pos_y
122
123 ldx #0
124 loop_roll
125 lda MiniTableUnroll,x
126 bmi no_wrap
127 clc
128 adc pos_y
129 no_wrap
130 tay
131
132 lda _PictureLoadBufferAddrLow,y
133 sta tmp0+0
134 lda _PictureLoadBufferAddrHigh,y
135 sta tmp0+1
136
137 clc
138 txa
139 adc pos_y
140 tay
141
142 lda _ScreenAddrLow,y
143 sta tmp1+0
144 lda _ScreenAddrHigh,y
145 sta tmp1+1
146
147 ; Copy from right to left to limit the attribute corruption effects
148 ldy #40
149 loop
150 lda (tmp0),y
151 sta (tmp1),y
152 dey
153 bne loop
154
155 inx
156 cpx #16
157 bne loop_roll
158
159 jsr _VSync
160
161 ldy pos_y
162 iny
163 cpy #216
164 bne loop_frame
165
166 rts
167 .)
168
169
170
171 ; A simple copy with multiple simultaneous displayed bands
172 ; tmp0 -> tmp1
173 ; tmp2 -> tmp3
174 ; tmp4 -> tmp5
175 ; tmp6 -> tmp7
176 _PictureTransitionVenicianStore
177 .(
178 ldx #0
179 loop_frame
180
181 lda _PictureLoadBufferAddrLow,x
182 sta tmp0+0
183 lda _PictureLoadBufferAddrHigh,x
184 sta tmp0+1
185
186 lda _ScreenAddrLow,x
187 sta tmp1+0
188 lda _ScreenAddrHigh,x
189 sta tmp1+1
190
191
192 lda _PictureLoadBufferAddrLow+50,x
193 sta tmp2+0
194 lda _PictureLoadBufferAddrHigh+50,x
195 sta tmp2+1
196
197 lda _ScreenAddrLow+50,x
198 sta tmp3+0
199 lda _ScreenAddrHigh+50,x
200 sta tmp3+1
201
202 lda _PictureLoadBufferAddrLow+100,x
203 sta tmp4+0
204 lda _PictureLoadBufferAddrHigh+100,x
205 sta tmp4+1
206
207 lda _ScreenAddrLow+100,x
208 sta tmp5+0
209 lda _ScreenAddrHigh+100,x
210 sta tmp5+1
211
212
213 lda _PictureLoadBufferAddrLow+150,x
214 sta tmp6+0
215 lda _PictureLoadBufferAddrHigh+150,x
216 sta tmp6+1
217
218 lda _ScreenAddrLow+150,x
219 sta tmp7+0
220 lda _ScreenAddrHigh+150,x
221 sta tmp7+1
222
223 ; Copy from right to left to limit the attribute corruption effects
224 ldy #40
225 loop
226 lda (tmp0),y
227 sta (tmp1),y
228
229 lda (tmp2),y
230 sta (tmp3),y
231
232 lda (tmp4),y
233 sta (tmp5),y
234
235 lda (tmp6),y
236 sta (tmp7),y
237
238 dey
239 bne loop
240
241 jsr _VSync
242
243 inx
244 cpx #50
245 bne loop_frame
246
247 rts
248 .)
249
250
251
252 ; A simple copy from the top and bottom at the same time
253 ; tmp0 -> tmp1
254 ; tmp2 -> tmp3
255 _PictureTransitionFromTopAndBottom
256 .(
257 ldx #0
258 ldy #199
259 loop_frame
260
261 lda _PictureLoadBufferAddrLow,x
262 sta tmp0+0
263 lda _PictureLoadBufferAddrHigh,x
264 sta tmp0+1
265
266 lda _ScreenAddrLow,x
267 sta tmp1+0
268 lda _ScreenAddrHigh,x
269 sta tmp1+1
270
271 lda _PictureLoadBufferAddrLow,y
272 sta tmp2+0
273 lda _PictureLoadBufferAddrHigh,y
274 sta tmp2+1
275
276 lda _ScreenAddrLow,y
277 sta tmp3+0
278 lda _ScreenAddrHigh,y
279 sta tmp3+1
280
281 sty save_y
282
283 ; Copy from right to left to limit the attribute corruption effects
284 ldy #40
285 loop
286 lda (tmp0),y
287 sta (tmp1),y
288 lda (tmp2),y
289 sta (tmp3),y
290 dey
291 bne loop
292
293 jsr _VSync
294
295 ldy save_y
296 dey
297 inx
298 cpx #100
299 bne loop_frame
300
301 rts
302 .)
303
304
305
306
307
308 _InitTransitionData
309 .(
310 lda #<_PictureLoadBuffer-1
311 sta tmp0+0
312 lda #>_PictureLoadBuffer-1
313 sta tmp0+1
314
315 lda #<$a000-1
316 sta tmp1+0
317 lda #>$a000-1
318 sta tmp1+1
319
320 .(
321 ldx #0
322 loop
323 clc
324 lda tmp0+0
325 sta _PictureLoadBufferAddrLow,x
326 adc #40
327 sta tmp0+0
328 lda tmp0+1
329 sta _PictureLoadBufferAddrHigh,x
330 adc #0
331 sta tmp0+1
332
333 clc
334 lda tmp1+0
335 sta _ScreenAddrLow,x
336 adc #40
337 sta tmp1+0
338 lda tmp1+1
339 sta _ScreenAddrHigh,x
340 adc #0
341 sta tmp1+1
342
343 inx
344 cpx #200
345 bne loop
346 .)
347
348 .(
349 loop
350 lda #<_EmptySourceScanLine
351 sta _PictureLoadBufferAddrLow,x
352 lda #>_EmptySourceScanLine
353 sta _PictureLoadBufferAddrHigh,x
354
355 lda #<_EmptyDestinationScanLine
356 sta _ScreenAddrLow,x
357 lda #>_EmptyDestinationScanLine
358 sta _ScreenAddrHigh,x
359
360 inx
361 bne loop
362 .)
363
364 rts
365 .)
366
367
368 .dsb 256-(*&255)
369
370 _ScreenAddrLow .dsb 256
371 _ScreenAddrHigh .dsb 256
372
373 _PictureLoadBufferAddrLow .dsb 256
374 _PictureLoadBufferAddrHigh .dsb 256
375
376 _EmptySourceScanLine .dsb 256 ; Only zeroes, can be used for special effects
377 _EmptyDestinationScanLine .dsb 256 ; Only zeroes, can be used for special effects
378
379 _PictureLoadBuffer .dsb 8192 ; 32*256 (Because it loads full sectors...)
380

  ViewVC Help
Powered by ViewVC 1.1.26