• R/O
  • SSH
  • HTTPS

oricsdk: Commit


Commit MetaInfo

Revision365 (tree)
Time2010-07-19 19:58:27
Authordbug

Log Message

Added the Space:1999 Trailer to the repository.

Change Summary

Incremental Difference

--- public/oric/games/Space 1999/Sources/trailer/Main.c (nonexistent)
+++ public/oric/games/Space 1999/Sources/trailer/Main.c (revision 365)
@@ -0,0 +1,406 @@
1+
2+#include <lib.h>
3+
4+// --------------------------------------
5+// Space: 1999
6+// The Game Trailer
7+// --------------------------------------
8+// (c) 2010 Mickael Pointier.
9+// This code is provided as-is.
10+// I do not assume any responsability
11+// concerning the fact this is a bug-free
12+// software !!!
13+// Except that, you can use this example
14+// without any limitation !
15+// If you manage to do something with that
16+// please, contact me :)
17+// --------------------------------------
18+// For more information, please contact me
19+// on internet:
20+// e-mail: mike@defence-force.org
21+// URL: http://www.defence-force.org
22+// --------------------------------------
23+// Note: This text was typed with a Win32
24+// editor. So perhaps the text will not be
25+// displayed correctly with other OS.
26+
27+// http://www.space1999.net/catacombs/main/pguide/up10.html <- Good pictures !
28+
29+//#define ENABLE_TESTS
30+
31+#define ENABLE_MUSIC
32+#define ENABLE_RATING
33+#define ENABLE_QUOTES
34+#define ENABLE_ITC_LOGO
35+#define ENABLE_DEFENCEFORCE_LOGO
36+#define ENABLE_SPACE1999_LOGO
37+#define ENABLE_CREDIT_PICTURES
38+
39+
40+// Sequences.s
41+void SequenceRating();
42+void SequenceQuotes();
43+void SequenceItcLogo();
44+void SequenceSpace1999Logo();
45+void SequenceDefenceForceLogo();
46+void SequenceMartinLandau();
47+void SequenceBarbaraBain();
48+void SequenceBarryMorse();
49+void SequenceSylviaAnderson();
50+void SequenceGerryAnderson();
51+
52+void SequenceChema();
53+void SequenceTwilighte();
54+void SequenceDbug();
55+
56+void SequenceMoonExplodes();
57+
58+void SequenceEmergency();
59+
60+void SequenceEndMessage();
61+
62+void SequenceThisEpisode();
63+void Sequence13September1999();
64+
65+void SetInkYellow();
66+void SetInkBlack();
67+
68+void UnpackFont();
69+
70+// Tables.s
71+
72+extern unsigned char BufferUnpack[8000];
73+
74+extern unsigned char CosTable[];
75+
76+void TablesInit();
77+void CreateHalfDisc();
78+void GenerateSquareTables();
79+void MirrorTheDisc();
80+
81+// Display.s
82+void DisplayDefenceForceFrame();
83+void DisplayMakeShiftedLogos();
84+void DisplayScrappIt();
85+
86+// Bitmap.s
87+void FontInit();
88+void BlackScreen();
89+void DrawCar();
90+
91+// Draw.s
92+extern unsigned char X0,X1,Y;
93+extern unsigned char CX,CY,RAY;
94+
95+extern unsigned char FrameCounter;
96+extern unsigned char TimerCounter;
97+
98+void DrawDisc();
99+void FlipToScreen();
100+
101+extern unsigned char FontTableX0[];
102+extern unsigned char FontTableY0[];
103+extern unsigned char FontTableWidth[];
104+extern unsigned char FontTableHeight[];
105+extern unsigned char TableBit6Reverse[];
106+
107+extern char Message_StarringBarbaraBain[];
108+extern char Message_StarringMartinLandau[];
109+extern char Message_StarringBarryMorse[];
110+extern char Message_SylviaAnderson[];
111+extern char Message_GerryAnderson[];
112+extern char Message_Chema[];
113+extern char Message_Dbug[];
114+extern char Message_Music[];
115+extern char Message_Twilighte[];
116+
117+extern char Message_Exclusive[];
118+extern char Message_Title[];
119+extern char Message_Website[];
120+extern char Message_Quote1[];
121+extern char Message_Quote2[];
122+extern char Message_Quote3[];
123+extern char Message_Quote4[];
124+
125+
126+extern char FontChars[];
127+extern unsigned char FontCharOffset;
128+
129+extern unsigned char FontIndex[];
130+
131+extern unsigned char X;
132+extern unsigned char Y;
133+extern unsigned char CAR;
134+
135+// Auxiliar
136+extern void switch_ovl(void);
137+
138+unsigned char gShadingAngle=0;
139+
140+
141+// part three, filter out the part of the cycling which are hidden by graphics
142+void FilterTheDisc1();
143+void FilterTheDisc2();
144+
145+
146+
147+void DisplayPaperSet();
148+int counter; // That one as a local trashes the music
149+
150+
151+extern unsigned char BoomColorBase;
152+extern unsigned char GlowColor[6];
153+extern unsigned char BoomColorMinus16[37+16];
154+extern unsigned char BoomColor[37];
155+
156+void DrawNuclearBoom();
157+
158+void UnpackToBuffer(void *pPackedData)
159+{
160+ file_unpack(BufferUnpack,pPackedData);
161+}
162+
163+
164+unsigned char yscroll;
165+unsigned char* ptrscroll;
166+
167+void MoonScrollsDown()
168+{
169+ gShadingAngle=64;
170+
171+ //BlackScreen();
172+
173+ //UnpackToBuffer(LabelPictureLogo);
174+ //BlitRectangle((unsigned char*)0xa000+(40*89),BufferUnpack+(40*89),40,111);
175+
176+ FrameCounter=64;
177+ while (FrameCounter--)
178+ {
179+ yscroll=112;
180+ ptrscroll=(unsigned char*)0xa000+(40*197);
181+
182+ RAY=20;
183+ CX=120;
184+ CY=50;
185+
186+ DrawDisc();
187+
188+ gShadingAngle+=3;
189+
190+ while (yscroll)
191+ {
192+ memcpy(ptrscroll+80,ptrscroll,80);
193+ ptrscroll-=80;
194+ yscroll-=2;
195+ }
196+ }
197+}
198+
199+/*
200+void MoonZoomer()
201+{
202+ RAY=1;
203+ CX=120;
204+ CY=100;
205+
206+ gShadingAngle=64;
207+
208+ while (1)
209+ {
210+ //RAY=1;
211+ DrawDisc();
212+ //draw_disc();
213+
214+ //printf("%d\n",gShadingAngle);
215+ if (RAY<64)
216+ {
217+ RAY++;
218+ }
219+ if (RAY>30)
220+ {
221+ gShadingAngle+=3;
222+ }
223+ if (RAY==64)
224+ {
225+ break;
226+ }
227+ }
228+}
229+*/
230+
231+
232+
233+
234+
235+void main()
236+{
237+ //paper(0);
238+ hires();
239+
240+ switch_ovl();
241+
242+ init_irq_routine();
243+
244+ TablesInit();
245+ FontInit();
246+
247+#ifdef ENABLE_TESTS
248+ {
249+ // Tests
250+ while (1)
251+ {
252+ SequenceMoonExplodes();
253+ }
254+ SequenceEmergency();
255+ SequenceDefenceForceLogo();
256+ SequenceThisEpisode();
257+ Sequence13September1999();
258+ SequenceRating();
259+ SequenceTwilighte();
260+ SequenceSylviaAnderson();
261+ SequenceBarbaraBain();
262+ SequenceQuotes();
263+ SequenceGerryAnderson();
264+ SequenceDbug();
265+ SequenceBarryMorse();
266+ SequenceChema();
267+ while (1);
268+ }
269+#endif
270+
271+#ifdef ENABLE_RATING
272+ //
273+ // Need some kind of "all audience advisory" whatnots
274+ //
275+ SequenceRating();
276+ //while (1);
277+#endif
278+
279+
280+#ifdef ENABLE_QUOTES
281+ //
282+ // Start by some quotes - no music
283+ //
284+ SequenceQuotes();
285+#endif
286+
287+
288+#ifdef ENABLE_MUSIC
289+ //
290+ // Start the music
291+ //
292+ PlayMainTune();
293+#endif
294+
295+
296+#ifdef ENABLE_ITC_LOGO
297+ //
298+ // ITC entertainment logo
299+ //
300+ SequenceItcLogo();
301+#endif
302+
303+#ifdef ENABLE_CREDIT_PICTURES
304+ //
305+ // Starring Martin Landau
306+ //
307+ SequenceMartinLandau();
308+
309+ //
310+ // Starring Barbara Bain
311+ //
312+ SequenceBarbaraBain();
313+#endif
314+
315+#ifdef ENABLE_SPACE1999_LOGO
316+ //
317+ // Space:1999 title picture
318+ //
319+ SequenceSpace1999Logo();
320+#endif
321+
322+ //
323+ // Emergency RED ALERT
324+ //
325+ SequenceEmergency();
326+
327+#ifdef ENABLE_CREDIT_PICTURES
328+ // ---- This Episode yellow message
329+ //
330+ // This episode
331+ //
332+ SequenceThisEpisode();
333+
334+ //
335+ // designer/programmer Jose Maria "Chema" Enguita
336+ //
337+ SequenceChema();
338+#endif
339+
340+#ifdef ENABLE_DEFENCEFORCE_LOGO
341+ //
342+ // Show the animated logo
343+ //
344+ SequenceDefenceForceLogo();
345+#endif
346+
347+#ifdef ENABLE_CREDIT_PICTURES
348+ // Original theme - Barry Gray
349+ // adaptation Jonathan "Twilighte" Bristow
350+ SequenceTwilighte();
351+
352+ // ---- This Episode yellow message
353+ //
354+ // This episode
355+ //
356+ SequenceThisEpisode();
357+
358+ //
359+ // Also starring Barry Morse
360+ //
361+ SequenceBarryMorse();
362+
363+ //
364+ // Producer Sylvia Anderson
365+ //
366+ SequenceSylviaAnderson();
367+
368+ //
369+ // Executive producer Gerry Anderson
370+ //
371+ SequenceGerryAnderson();
372+
373+ //
374+ // in fast succession:
375+ // - September
376+ // - 13th
377+ // - 1999
378+ //
379+ Sequence13September1999();
380+
381+ //
382+ // Explosion on the moon
383+ // The moon base alpha scroll downs with the earth standing still
384+ //
385+ SequenceMoonExplodes();
386+
387+ //
388+ // intro Mickael "Dbug" Pointier
389+ //
390+ SequenceDbug();
391+#endif
392+
393+ StopMusic();
394+
395+ //
396+ // Out Of Memory title message
397+ //
398+ SequenceEndMessage();
399+
400+ while (1);
401+
402+ BlackScreen();
403+ while (1);
404+
405+}
406+
--- public/oric/games/Space 1999/Sources/trailer/costable.s (nonexistent)
+++ public/oric/games/Space 1999/Sources/trailer/costable.s (revision 365)
@@ -0,0 +1,1293 @@
1+
2+_AlignPadding
3+
4+ .dsb 256-(*&255)
5+
6+; Non signed values, from 0 to 255
7+_CosTable ; Used by the DF logo
8+ .byt 254
9+ .byt 253
10+ .byt 253
11+ .byt 253
12+ .byt 253
13+ .byt 253
14+ .byt 252
15+ .byt 252
16+ .byt 251
17+ .byt 250
18+ .byt 250
19+ .byt 249
20+ .byt 248
21+ .byt 247
22+ .byt 246
23+ .byt 245
24+ .byt 244
25+ .byt 243
26+ .byt 241
27+ .byt 240
28+ .byt 239
29+ .byt 237
30+ .byt 235
31+ .byt 234
32+ .byt 232
33+ .byt 230
34+ .byt 229
35+ .byt 227
36+ .byt 225
37+ .byt 223
38+ .byt 221
39+ .byt 218
40+ .byt 216
41+ .byt 214
42+ .byt 212
43+ .byt 209
44+ .byt 207
45+ .byt 205
46+ .byt 202
47+ .byt 200
48+ .byt 197
49+ .byt 194
50+ .byt 192
51+ .byt 189
52+ .byt 186
53+ .byt 184
54+ .byt 181
55+ .byt 178
56+ .byt 175
57+ .byt 172
58+ .byt 169
59+ .byt 166
60+ .byt 163
61+ .byt 160
62+ .byt 157
63+ .byt 154
64+ .byt 151
65+ .byt 148
66+ .byt 145
67+ .byt 142
68+ .byt 139
69+ .byt 136
70+ .byt 133
71+ .byt 130
72+ .byt 127
73+ .byt 124
74+ .byt 121
75+ .byt 118
76+ .byt 115
77+ .byt 112
78+ .byt 109
79+ .byt 106
80+ .byt 103
81+ .byt 100
82+ .byt 97
83+ .byt 94
84+ .byt 91
85+ .byt 88
86+ .byt 85
87+ .byt 82
88+ .byt 79
89+ .byt 76
90+ .byt 73
91+ .byt 70
92+ .byt 68
93+ .byt 65
94+ .byt 62
95+ .byt 60
96+ .byt 57
97+ .byt 54
98+ .byt 52
99+ .byt 49
100+ .byt 47
101+ .byt 45
102+ .byt 42
103+ .byt 40
104+ .byt 38
105+ .byt 36
106+ .byt 33
107+ .byt 31
108+ .byt 29
109+ .byt 27
110+ .byt 25
111+ .byt 24
112+ .byt 22
113+ .byt 20
114+ .byt 19
115+ .byt 17
116+ .byt 15
117+ .byt 14
118+ .byt 13
119+ .byt 11
120+ .byt 10
121+ .byt 9
122+ .byt 8
123+ .byt 7
124+ .byt 6
125+ .byt 5
126+ .byt 4
127+ .byt 4
128+ .byt 3
129+ .byt 2
130+ .byt 2
131+ .byt 1
132+ .byt 1
133+ .byt 1
134+ .byt 1
135+ .byt 1
136+ .byt 0
137+ .byt 1
138+ .byt 1
139+ .byt 1
140+ .byt 1
141+ .byt 1
142+ .byt 2
143+ .byt 2
144+ .byt 3
145+ .byt 4
146+ .byt 4
147+ .byt 5
148+ .byt 6
149+ .byt 7
150+ .byt 8
151+ .byt 9
152+ .byt 10
153+ .byt 11
154+ .byt 13
155+ .byt 14
156+ .byt 15
157+ .byt 17
158+ .byt 19
159+ .byt 20
160+ .byt 22
161+ .byt 24
162+ .byt 25
163+ .byt 27
164+ .byt 29
165+ .byt 31
166+ .byt 33
167+ .byt 36
168+ .byt 38
169+ .byt 40
170+ .byt 42
171+ .byt 45
172+ .byt 47
173+ .byt 49
174+ .byt 52
175+ .byt 54
176+ .byt 57
177+ .byt 60
178+ .byt 62
179+ .byt 65
180+ .byt 68
181+ .byt 70
182+ .byt 73
183+ .byt 76
184+ .byt 79
185+ .byt 82
186+ .byt 85
187+ .byt 88
188+ .byt 91
189+ .byt 94
190+ .byt 97
191+ .byt 100
192+ .byt 103
193+ .byt 106
194+ .byt 109
195+ .byt 112
196+ .byt 115
197+ .byt 118
198+ .byt 121
199+ .byt 124
200+ .byt 127
201+ .byt 130
202+ .byt 133
203+ .byt 136
204+ .byt 139
205+ .byt 142
206+ .byt 145
207+ .byt 148
208+ .byt 151
209+ .byt 154
210+ .byt 157
211+ .byt 160
212+ .byt 163
213+ .byt 166
214+ .byt 169
215+ .byt 172
216+ .byt 175
217+ .byt 178
218+ .byt 181
219+ .byt 184
220+ .byt 186
221+ .byt 189
222+ .byt 192
223+ .byt 194
224+ .byt 197
225+ .byt 200
226+ .byt 202
227+ .byt 205
228+ .byt 207
229+ .byt 209
230+ .byt 212
231+ .byt 214
232+ .byt 216
233+ .byt 218
234+ .byt 221
235+ .byt 223
236+ .byt 225
237+ .byt 227
238+ .byt 229
239+ .byt 230
240+ .byt 232
241+ .byt 234
242+ .byt 235
243+ .byt 237
244+ .byt 239
245+ .byt 240
246+ .byt 241
247+ .byt 243
248+ .byt 244
249+ .byt 245
250+ .byt 246
251+ .byt 247
252+ .byt 248
253+ .byt 249
254+ .byt 250
255+ .byt 250
256+ .byt 251
257+ .byt 252
258+ .byt 252
259+ .byt 253
260+ .byt 253
261+ .byt 253
262+ .byt 253
263+ .byt 253
264+
265+_CosTableDither
266+ .byt 56
267+ .byt 64
268+ .byt 64
269+ .byt 64
270+ .byt 72
271+ .byt 72
272+ .byt 80
273+ .byt 80
274+ .byt 80
275+ .byt 88
276+ .byt 88
277+ .byt 88
278+ .byt 88
279+ .byt 96
280+ .byt 96
281+ .byt 96
282+ .byt 104
283+ .byt 104
284+ .byt 104
285+ .byt 104
286+ .byt 104
287+ .byt 112
288+ .byt 112
289+ .byt 112
290+ .byt 112
291+ .byt 112
292+ .byt 112
293+ .byt 112
294+ .byt 112
295+ .byt 112
296+ .byt 112
297+ .byt 120
298+ .byt 120
299+ .byt 120
300+ .byt 120
301+ .byt 120
302+ .byt 120
303+ .byt 120
304+ .byt 120
305+ .byt 120
306+ .byt 120
307+ .byt 120
308+ .byt 120
309+ .byt 120
310+ .byt 120
311+ .byt 120
312+ .byt 120
313+ .byt 120
314+ .byt 120
315+ .byt 120
316+ .byt 120
317+ .byt 120
318+ .byt 120
319+ .byt 120
320+ .byt 120
321+ .byt 120
322+ .byt 120
323+ .byt 120
324+ .byt 120
325+ .byt 120
326+ .byt 120
327+ .byt 120
328+ .byt 120
329+ .byt 120
330+ .byt 120
331+ .byt 120
332+ .byt 120
333+ .byt 120
334+ .byt 120
335+ .byt 120
336+ .byt 120
337+ .byt 120
338+ .byt 120
339+ .byt 120
340+ .byt 120
341+ .byt 120
342+ .byt 120
343+ .byt 120
344+ .byt 120
345+ .byt 120
346+ .byt 120
347+ .byt 120
348+ .byt 120
349+ .byt 120
350+ .byt 120
351+ .byt 120
352+ .byt 120
353+ .byt 120
354+ .byt 120
355+ .byt 120
356+ .byt 120
357+ .byt 120
358+ .byt 120
359+ .byt 120
360+ .byt 120
361+ .byt 120
362+ .byt 112
363+ .byt 112
364+ .byt 112
365+ .byt 112
366+ .byt 112
367+ .byt 112
368+ .byt 112
369+ .byt 112
370+ .byt 112
371+ .byt 112
372+ .byt 104
373+ .byt 104
374+ .byt 104
375+ .byt 104
376+ .byt 104
377+ .byt 96
378+ .byt 96
379+ .byt 96
380+ .byt 88
381+ .byt 88
382+ .byt 88
383+ .byt 88
384+ .byt 80
385+ .byt 80
386+ .byt 80
387+ .byt 72
388+ .byt 72
389+ .byt 64
390+ .byt 64
391+ .byt 64
392+ .byt 56
393+ .byt 56
394+ .byt 56
395+ .byt 48
396+ .byt 48
397+ .byt 48
398+ .byt 40
399+ .byt 40
400+ .byt 32
401+ .byt 32
402+ .byt 32
403+ .byt 24
404+ .byt 24
405+ .byt 24
406+ .byt 24
407+ .byt 16
408+ .byt 16
409+ .byt 16
410+ .byt 8
411+ .byt 8
412+ .byt 8
413+ .byt 8
414+ .byt 8
415+ .byt 0
416+ .byt 0
417+ .byt 0
418+ .byt 0
419+ .byt 0
420+ .byt 0
421+ .byt 0
422+ .byt 0
423+ .byt 0
424+ .byt 0
425+ .byt 0
426+ .byt 0
427+ .byt 0
428+ .byt 0
429+ .byt 0
430+ .byt 0
431+ .byt 0
432+ .byt 0
433+ .byt 0
434+ .byt 0
435+ .byt 0
436+ .byt 0
437+ .byt 0
438+ .byt 0
439+ .byt 0
440+ .byt 0
441+ .byt 0
442+ .byt 0
443+ .byt 0
444+ .byt 0
445+ .byt 0
446+ .byt 0
447+ .byt 0
448+ .byt 0
449+ .byt 0
450+ .byt 0
451+ .byt 0
452+ .byt 0
453+ .byt 0
454+ .byt 0
455+ .byt 0
456+ .byt 0
457+ .byt 0
458+ .byt 0
459+ .byt 0
460+ .byt 0
461+ .byt 0
462+ .byt 0
463+ .byt 0
464+ .byt 0
465+ .byt 0
466+ .byt 0
467+ .byt 0
468+ .byt 0
469+ .byt 0
470+ .byt 0
471+ .byt 0
472+ .byt 0
473+ .byt 0
474+ .byt 0
475+ .byt 0
476+ .byt 0
477+ .byt 0
478+ .byt 0
479+ .byt 0
480+ .byt 0
481+ .byt 0
482+ .byt 0
483+ .byt 0
484+ .byt 0
485+ .byt 0
486+ .byt 0
487+ .byt 0
488+ .byt 0
489+ .byt 0
490+ .byt 0
491+ .byt 0
492+ .byt 0
493+ .byt 0
494+ .byt 0
495+ .byt 0
496+ .byt 0
497+ .byt 0
498+ .byt 0
499+ .byt 0
500+ .byt 8
501+ .byt 8
502+ .byt 8
503+ .byt 8
504+ .byt 8
505+ .byt 16
506+ .byt 16
507+ .byt 16
508+ .byt 24
509+ .byt 24
510+ .byt 24
511+ .byt 24
512+ .byt 32
513+ .byt 32
514+ .byt 32
515+ .byt 40
516+ .byt 40
517+ .byt 48
518+ .byt 48
519+ .byt 48
520+ .byt 56
521+ .byt 56
522+
523+
524+
525+_SteppingTableDitherLow
526+ .byt 0
527+ .byt 129
528+ .byt 64
529+ .byt 43
530+ .byt 160
531+ .byt 77
532+ .byt 21
533+ .byt 18
534+ .byt 208
535+ .byt 14
536+ .byt 166
537+ .byt 128
538+ .byt 138
539+ .byt 187
540+ .byt 9
541+ .byt 111
542+ .byt 232
543+ .byt 113
544+ .byt 7
545+ .byt 168
546+ .byt 83
547+ .byt 6
548+ .byt 192
549+ .byt 128
550+ .byt 69
551+ .byt 15
552+ .byt 221
553+ .byt 175
554+ .byt 132
555+ .byt 92
556+ .byt 55
557+ .byt 20
558+ .byt 244
559+ .byt 213
560+ .byt 184
561+ .byt 157
562+ .byt 131
563+ .byt 107
564+ .byt 84
565+ .byt 62
566+ .byt 41
567+ .byt 21
568+ .byt 3
569+ .byt 241
570+ .byt 224
571+ .byt 207
572+ .byt 192
573+ .byt 177
574+ .byt 162
575+ .byt 148
576+ .byt 135
577+ .byt 123
578+ .byt 110
579+ .byt 99
580+ .byt 87
581+ .byt 76
582+ .byt 66
583+ .byt 56
584+ .byt 46
585+ .byt 36
586+ .byt 27
587+ .byt 18
588+ .byt 10
589+ .byt 2
590+ .byt 250
591+ .byt 242
592+ .byt 234
593+ .byt 227
594+ .byt 220
595+ .byt 213
596+ .byt 206
597+ .byt 200
598+ .byt 193
599+ .byt 187
600+ .byt 181
601+ .byt 175
602+ .byt 170
603+ .byt 164
604+ .byt 159
605+ .byt 153
606+ .byt 148
607+ .byt 143
608+ .byt 138
609+ .byt 134
610+ .byt 129
611+ .byt 125
612+ .byt 120
613+ .byt 116
614+ .byt 112
615+ .byt 107
616+ .byt 103
617+ .byt 99
618+ .byt 96
619+ .byt 92
620+ .byt 88
621+ .byt 84
622+ .byt 81
623+ .byt 77
624+ .byt 74
625+ .byt 71
626+ .byt 67
627+ .byt 64
628+ .byt 61
629+ .byt 58
630+ .byt 55
631+ .byt 52
632+ .byt 49
633+ .byt 46
634+ .byt 43
635+ .byt 41
636+ .byt 38
637+ .byt 35
638+ .byt 33
639+ .byt 30
640+ .byt 28
641+ .byt 25
642+ .byt 23
643+ .byt 20
644+ .byt 18
645+ .byt 16
646+ .byt 13
647+ .byt 11
648+ .byt 9
649+ .byt 7
650+ .byt 5
651+ .byt 3
652+ .byt 1
653+ .byt 255
654+ .byt 253
655+ .byt 251
656+ .byt 249
657+ .byt 247
658+ .byt 245
659+ .byt 243
660+ .byt 241
661+ .byt 239
662+ .byt 238
663+ .byt 236
664+ .byt 234
665+ .byt 232
666+ .byt 231
667+ .byt 229
668+ .byt 228
669+ .byt 226
670+ .byt 224
671+ .byt 223
672+ .byt 221
673+ .byt 220
674+ .byt 218
675+ .byt 217
676+ .byt 215
677+ .byt 214
678+ .byt 213
679+ .byt 211
680+ .byt 210
681+ .byt 208
682+ .byt 207
683+ .byt 206
684+ .byt 204
685+ .byt 203
686+ .byt 202
687+ .byt 201
688+ .byt 199
689+ .byt 198
690+ .byt 197
691+ .byt 196
692+ .byt 195
693+ .byt 193
694+ .byt 192
695+ .byt 191
696+ .byt 190
697+ .byt 189
698+ .byt 188
699+ .byt 187
700+ .byt 186
701+ .byt 185
702+ .byt 184
703+ .byt 182
704+ .byt 181
705+ .byt 180
706+ .byt 179
707+ .byt 178
708+ .byt 177
709+ .byt 176
710+ .byt 176
711+ .byt 175
712+ .byt 174
713+ .byt 173
714+ .byt 172
715+ .byt 171
716+ .byt 170
717+ .byt 169
718+ .byt 168
719+ .byt 167
720+ .byt 166
721+ .byt 166
722+ .byt 165
723+ .byt 164
724+ .byt 163
725+ .byt 162
726+ .byt 161
727+ .byt 161
728+ .byt 160
729+ .byt 159
730+ .byt 158
731+ .byt 157
732+ .byt 157
733+ .byt 156
734+ .byt 155
735+ .byt 154
736+ .byt 154
737+ .byt 153
738+ .byt 152
739+ .byt 152
740+ .byt 151
741+ .byt 150
742+ .byt 149
743+ .byt 149
744+ .byt 148
745+ .byt 147
746+ .byt 147
747+ .byt 146
748+ .byt 145
749+ .byt 145
750+ .byt 144
751+ .byt 143
752+ .byt 143
753+ .byt 142
754+ .byt 142
755+ .byt 141
756+ .byt 140
757+ .byt 140
758+ .byt 139
759+ .byt 138
760+ .byt 138
761+ .byt 137
762+ .byt 137
763+ .byt 136
764+ .byt 136
765+ .byt 135
766+ .byt 134
767+ .byt 134
768+ .byt 133
769+ .byt 133
770+ .byt 132
771+ .byt 132
772+ .byt 131
773+ .byt 131
774+ .byt 130
775+ .byt 130
776+ .byt 129
777+ .byt 129
778+ .byt 128
779+ .byt 128
780+ .byt 127
781+ .byt 127
782+
783+
784+_SteppingTableDitherHigh
785+ .byt 0
786+ .byt 126
787+ .byt 63
788+ .byt 42
789+ .byt 31
790+ .byt 25
791+ .byt 21
792+ .byt 18
793+ .byt 15
794+ .byt 14
795+ .byt 12
796+ .byt 11
797+ .byt 10
798+ .byt 9
799+ .byt 9
800+ .byt 8
801+ .byt 7
802+ .byt 7
803+ .byt 7
804+ .byt 6
805+ .byt 6
806+ .byt 6
807+ .byt 5
808+ .byt 5
809+ .byt 5
810+ .byt 5
811+ .byt 4
812+ .byt 4
813+ .byt 4
814+ .byt 4
815+ .byt 4
816+ .byt 4
817+ .byt 3
818+ .byt 3
819+ .byt 3
820+ .byt 3
821+ .byt 3
822+ .byt 3
823+ .byt 3
824+ .byt 3
825+ .byt 3
826+ .byt 3
827+ .byt 3
828+ .byt 2
829+ .byt 2
830+ .byt 2
831+ .byt 2
832+ .byt 2
833+ .byt 2
834+ .byt 2
835+ .byt 2
836+ .byt 2
837+ .byt 2
838+ .byt 2
839+ .byt 2
840+ .byt 2
841+ .byt 2
842+ .byt 2
843+ .byt 2
844+ .byt 2
845+ .byt 2
846+ .byt 2
847+ .byt 2
848+ .byt 2
849+ .byt 1
850+ .byt 1
851+ .byt 1
852+ .byt 1
853+ .byt 1
854+ .byt 1
855+ .byt 1
856+ .byt 1
857+ .byt 1
858+ .byt 1
859+ .byt 1
860+ .byt 1
861+ .byt 1
862+ .byt 1
863+ .byt 1
864+ .byt 1
865+ .byt 1
866+ .byt 1
867+ .byt 1
868+ .byt 1
869+ .byt 1
870+ .byt 1
871+ .byt 1
872+ .byt 1
873+ .byt 1
874+ .byt 1
875+ .byt 1
876+ .byt 1
877+ .byt 1
878+ .byt 1
879+ .byt 1
880+ .byt 1
881+ .byt 1
882+ .byt 1
883+ .byt 1
884+ .byt 1
885+ .byt 1
886+ .byt 1
887+ .byt 1
888+ .byt 1
889+ .byt 1
890+ .byt 1
891+ .byt 1
892+ .byt 1
893+ .byt 1
894+ .byt 1
895+ .byt 1
896+ .byt 1
897+ .byt 1
898+ .byt 1
899+ .byt 1
900+ .byt 1
901+ .byt 1
902+ .byt 1
903+ .byt 1
904+ .byt 1
905+ .byt 1
906+ .byt 1
907+ .byt 1
908+ .byt 1
909+ .byt 1
910+ .byt 1
911+ .byt 1
912+ .byt 0
913+ .byt 0
914+ .byt 0
915+ .byt 0
916+ .byt 0
917+ .byt 0
918+ .byt 0
919+ .byt 0
920+ .byt 0
921+ .byt 0
922+ .byt 0
923+ .byt 0
924+ .byt 0
925+ .byt 0
926+ .byt 0
927+ .byt 0
928+ .byt 0
929+ .byt 0
930+ .byt 0
931+ .byt 0
932+ .byt 0
933+ .byt 0
934+ .byt 0
935+ .byt 0
936+ .byt 0
937+ .byt 0
938+ .byt 0
939+ .byt 0
940+ .byt 0
941+ .byt 0
942+ .byt 0
943+ .byt 0
944+ .byt 0
945+ .byt 0
946+ .byt 0
947+ .byt 0
948+ .byt 0
949+ .byt 0
950+ .byt 0
951+ .byt 0
952+ .byt 0
953+ .byt 0
954+ .byt 0
955+ .byt 0
956+ .byt 0
957+ .byt 0
958+ .byt 0
959+ .byt 0
960+ .byt 0
961+ .byt 0
962+ .byt 0
963+ .byt 0
964+ .byt 0
965+ .byt 0
966+ .byt 0
967+ .byt 0
968+ .byt 0
969+ .byt 0
970+ .byt 0
971+ .byt 0
972+ .byt 0
973+ .byt 0
974+ .byt 0
975+ .byt 0
976+ .byt 0
977+ .byt 0
978+ .byt 0
979+ .byt 0
980+ .byt 0
981+ .byt 0
982+ .byt 0
983+ .byt 0
984+ .byt 0
985+ .byt 0
986+ .byt 0
987+ .byt 0
988+ .byt 0
989+ .byt 0
990+ .byt 0
991+ .byt 0
992+ .byt 0
993+ .byt 0
994+ .byt 0
995+ .byt 0
996+ .byt 0
997+ .byt 0
998+ .byt 0
999+ .byt 0
1000+ .byt 0
1001+ .byt 0
1002+ .byt 0
1003+ .byt 0
1004+ .byt 0
1005+ .byt 0
1006+ .byt 0
1007+ .byt 0
1008+ .byt 0
1009+ .byt 0
1010+ .byt 0
1011+ .byt 0
1012+ .byt 0
1013+ .byt 0
1014+ .byt 0
1015+ .byt 0
1016+ .byt 0
1017+ .byt 0
1018+ .byt 0
1019+ .byt 0
1020+ .byt 0
1021+ .byt 0
1022+ .byt 0
1023+ .byt 0
1024+ .byt 0
1025+ .byt 0
1026+ .byt 0
1027+ .byt 0
1028+ .byt 0
1029+ .byt 0
1030+ .byt 0
1031+ .byt 0
1032+ .byt 0
1033+ .byt 0
1034+ .byt 0
1035+ .byt 0
1036+ .byt 0
1037+ .byt 0
1038+ .byt 0
1039+ .byt 0
1040+ .byt 0
1041+
1042+
1043+
1044+_TableBit6Reverse
1045+ .byt 32,16,8,4,2,1
1046+ .byt 32,16,8,4,2,1
1047+ .byt 32,16,8,4,2,1
1048+ .byt 32,16,8,4,2,1
1049+ .byt 32,16,8,4,2,1
1050+ .byt 32,16,8,4,2,1
1051+ .byt 32,16,8,4,2,1
1052+ .byt 32,16,8,4,2,1
1053+ .byt 32,16,8,4,2,1
1054+ .byt 32,16,8,4,2,1
1055+
1056+ .byt 32,16,8,4,2,1
1057+ .byt 32,16,8,4,2,1
1058+ .byt 32,16,8,4,2,1
1059+ .byt 32,16,8,4,2,1
1060+ .byt 32,16,8,4,2,1
1061+ .byt 32,16,8,4,2,1
1062+ .byt 32,16,8,4,2,1
1063+ .byt 32,16,8,4,2,1
1064+ .byt 32,16,8,4,2,1
1065+ .byt 32,16,8,4,2,1
1066+
1067+ .byt 32,16,8,4,2,1
1068+ .byt 32,16,8,4,2,1
1069+ .byt 32,16,8,4,2,1
1070+ .byt 32,16,8,4,2,1
1071+ .byt 32,16,8,4,2,1
1072+ .byt 32,16,8,4,2,1
1073+ .byt 32,16,8,4,2,1
1074+ .byt 32,16,8,4,2,1
1075+ .byt 32,16,8,4,2,1
1076+ .byt 32,16,8,4,2,1
1077+
1078+ .byt 32,16,8,4,2,1
1079+ .byt 32,16,8,4,2,1
1080+ .byt 32,16,8,4,2,1
1081+ .byt 32,16,8,4,2,1
1082+ .byt 32,16,8,4,2,1
1083+ .byt 32,16,8,4,2,1
1084+ .byt 32,16,8,4,2,1
1085+ .byt 32,16,8,4,2,1
1086+ .byt 32,16,8,4,2,1
1087+ .byt 32,16,8,4,2,1
1088+
1089+
1090+
1091+// 6x6=36 pixels
1092+
1093+// 0% = 0
1094+// 16.66% = 6
1095+// 33.33% = 12
1096+// 50% = 18
1097+// 66.66% = 24
1098+// 83.33% = 30
1099+// 100% = 36
1100+
1101+
1102+_TableDithering
1103+ ; -7 => 0% [48*0]
1104+ .byt 64+%000000
1105+ .byt 64+%000000
1106+ .byt 64+%000000
1107+ .byt 64+%000000
1108+ .byt 64+%000000
1109+ .byt 64+%000000
1110+ .byt 64+%000000
1111+ .byt 64+%000000
1112+
1113+ ; -6 => 7.14% [3.4 pixels]
1114+ .byt 64+%100000
1115+ .byt 64+%000000
1116+ .byt 64+%000000
1117+ .byt 64+%001000
1118+ .byt 64+%000000
1119+ .byt 64+%000010
1120+ .byt 64+%000000
1121+ .byt 64+%000000
1122+
1123+ ; -5 => 14.28% [6.8 pixels]
1124+ .byt 64+%100000
1125+ .byt 64+%000010
1126+ .byt 64+%001000
1127+ .byt 64+%000000
1128+ .byt 64+%100000
1129+ .byt 64+%001000
1130+ .byt 64+%000010
1131+ .byt 64+%000000
1132+
1133+ ; -4 => 21.42% [11.72 pixels]
1134+ .byt 64+%100100
1135+ .byt 64+%010010
1136+ .byt 64+%001000
1137+ .byt 64+%100010
1138+ .byt 64+%001000
1139+ .byt 64+%000101
1140+ .byt 64+%010000
1141+ .byt 64+%000010
1142+
1143+ ; -3 => 28.57% [13.71 pixels]
1144+ .byt 64+%100100
1145+ .byt 64+%010010
1146+ .byt 64+%000100
1147+ .byt 64+%001001
1148+ .byt 64+%100100
1149+ .byt 64+%010010
1150+ .byt 64+%000100
1151+ .byt 64+%001001
1152+
1153+ ; -2 => 35.71% [17.85 pixels]
1154+ .byt 64+%100100
1155+ .byt 64+%010010
1156+ .byt 64+%001001
1157+ .byt 64+%010010
1158+ .byt 64+%100100
1159+ .byt 64+%010010
1160+ .byt 64+%001001
1161+ .byt 64+%010010
1162+
1163+ ; -1 => 42.85% [20.56 pixels]
1164+ .byt 64+%101010
1165+ .byt 64+%010001
1166+ .byt 64+%101010
1167+ .byt 64+%000101
1168+ .byt 64+%101010
1169+ .byt 64+%010101
1170+ .byt 64+%101000
1171+ .byt 64+%010101
1172+
1173+ ; 0 => 50% [24 points]
1174+ .byt 64+%101010
1175+ .byt 64+%010101
1176+ .byt 64+%101010
1177+ .byt 64+%010101
1178+ .byt 64+%101010
1179+ .byt 64+%010101
1180+ .byt 64+%101010
1181+ .byt 64+%010101
1182+
1183+ ; +1 => 57.14% [27.42 pixels]
1184+ .byt 64+%101010
1185+ .byt 64+%011101
1186+ .byt 64+%101010
1187+ .byt 64+%110101
1188+ .byt 64+%101010
1189+ .byt 64+%010101
1190+ .byt 64+%101110
1191+ .byt 64+%010101
1192+
1193+ ; +2 => 64.28% [30.85 pixels]
1194+ .byt 64+%011011
1195+ .byt 64+%101101
1196+ .byt 64+%110110
1197+ .byt 64+%101101
1198+ .byt 64+%011011
1199+ .byt 64+%101101
1200+ .byt 64+%110110
1201+ .byt 64+%101101
1202+
1203+ ; +3 => 71.42% [34.28 pixels]
1204+ .byt 64+%011011
1205+ .byt 64+%101101
1206+ .byt 64+%111011
1207+ .byt 64+%110110
1208+ .byt 64+%011011
1209+ .byt 64+%101101
1210+ .byt 64+%111011
1211+ .byt 64+%110110
1212+
1213+ ; +4 => 78.57% [37.71 pixels]
1214+ .byt 64+%011011
1215+ .byt 64+%111111
1216+ .byt 64+%101010
1217+ .byt 64+%111111
1218+ .byt 64+%011011
1219+ .byt 64+%111111
1220+ .byt 64+%101010
1221+ .byt 64+%111111
1222+
1223+ ; +5 => 85.71% [41.14 pixels]
1224+ .byt 64+%011111
1225+ .byt 64+%111101
1226+ .byt 64+%101111
1227+ .byt 64+%111111
1228+ .byt 64+%111011
1229+ .byt 64+%101111
1230+ .byt 64+%111101
1231+ .byt 64+%110111
1232+
1233+ ; +6 => 92.85% [44.56 pixels]
1234+ .byt 64+%011111
1235+ .byt 64+%111111
1236+ .byt 64+%111111
1237+ .byt 64+%111011
1238+ .byt 64+%111111
1239+ .byt 64+%111111
1240+ .byt 64+%110111
1241+ .byt 64+%111111
1242+
1243+ ; +7 => 100% [48 pixels]
1244+ .byt 64+%111111
1245+ .byt 64+%111111
1246+ .byt 64+%111111
1247+ .byt 64+%111111
1248+ .byt 64+%111111
1249+ .byt 64+%111111
1250+ .byt 64+%111111
1251+ .byt 64+%111111
1252+
1253+ ; Bonus map...
1254+ .byt 64+%111111
1255+ .byt 64+%111111
1256+ .byt 64+%111111
1257+ .byt 64+%111111
1258+ .byt 64+%111111
1259+ .byt 64+%111111
1260+ .byt 64+%111111
1261+ .byt 64+%111111
1262+
1263+
1264+_DIV6 .byt 0
1265+_MOD6 .byt 0
1266+
1267+_LeftPattern
1268+ .byt 1+2+4+8+16+32
1269+ .byt 1+2+4+8+16
1270+ .byt 1+2+4+8
1271+ .byt 1+2+4
1272+ .byt 1+2
1273+ .byt 1
1274+
1275+_RightPattern
1276+ .byt 63-(1+2+4+8+16+32)
1277+ .byt 63-(1+2+4+8+16)
1278+ .byt 63-(1+2+4+8)
1279+ .byt 63-(1+2+4)
1280+ .byt 63-(1+2)
1281+ .byt 63-(1)
1282+
1283+_ShadingTable
1284+ .byt %000000
1285+ .byt %000001
1286+ .byt %010010
1287+ .byt %100101
1288+ .byt %100101
1289+ .byt %110110
1290+ .byt %111011
1291+ .byt %111111
1292+
1293+
\ No newline at end of file
--- public/oric/games/Space 1999/Sources/trailer/draw.s (nonexistent)
+++ public/oric/games/Space 1999/Sources/trailer/draw.s (revision 365)
@@ -0,0 +1,737 @@
1+// ============================================================================
2+//
3+// Draw.s
4+//
5+// ============================================================================
6+//
7+// Code that draw the planet
8+//
9+// ============================================================================
10+
11+ .zero
12+
13+_X0 .dsb 1
14+_X1 .dsb 1
15+_CURY .dsb 1
16+_CX .dsb 1
17+_CY .dsb 1
18+_RAY .dsb 1
19+
20+_X .dsb 1
21+_Y .dsb 1
22+_A .dsb 1
23+
24+
25+y_modulo_3 .dsb 1
26+
27+ptr_scanline
28+ptr_scanline_low .dsb 1
29+ptr_scanline_high .dsb 1
30+
31+shading_offset_low .dsb 1
32+shading_offset_high .dsb 1
33+
34+shading_step_low .dsb 1
35+shading_step_high .dsb 1
36+
37+
38+left_mask .dsb 1
39+right_mask .dsb 1
40+
41+left_offset .dsb 1
42+
43+block_lenght .dsb 1
44+
45+shading_table .dsb 1
46+
47+ .text
48+
49+
50+_DrawDisc
51+.(
52+ ;unsigned char x;
53+ ;int y;
54+ ;char a;
55+
56+ ;
57+ ; Top part
58+ ;
59+
60+ ;y = RAY;
61+ ;x = 0;
62+ ;a = RAY/2;
63+ lda #0
64+ sta _X
65+
66+ lda _RAY
67+ sta _Y
68+
69+ lsr
70+ sta _A
71+ ;do
72+ ;{
73+.(
74+loop
75+ ; x++;
76+ ; a-=x;
77+ inc _X
78+
79+ sec
80+ lda _A
81+ sbc _X
82+ sta _A
83+ ; if (a<0)
84+ bpl test
85+
86+neg
87+ ; X0=CX-x;
88+ ; X1=CX+x;
89+ ; Y=CY-y;
90+ ; DrawSegment();
91+ sec
92+ lda _CX
93+ sbc _X
94+ sta _X0
95+
96+ clc
97+ lda _CX
98+ adc _X
99+ sta _X1
100+
101+ sec
102+ lda _CY
103+ sbc _Y
104+ sta _CURY
105+
106+ jsr _DrawSegment
107+
108+ ; Y=CY+y;
109+ ; DrawSegment();
110+ clc
111+ lda _CY
112+ adc _Y
113+ sta _CURY
114+
115+ jsr _DrawSegment
116+
117+ ; a+=y;
118+ ; y--;
119+ clc
120+ lda _A
121+ adc _Y
122+ sta _A
123+
124+ dec _Y
125+
126+test
127+ ;while (x<y);
128+ lda _X
129+ cmp _Y
130+ bcc loop
131+
132+
133+.)
134+
135+ lda _Y
136+ beq end_of_disc
137+;jmp end_of_disc
138+ ;
139+ ; Middle part
140+ ;
141+ // Now more or less reverse the above to get the other eighth
142+ ;a = -RAY/2 - 1;
143+ lda _RAY
144+ lsr
145+ sta tmp
146+
147+ sec
148+ lda #0
149+ sbc tmp
150+ sec
151+ sbc #1
152+ sta _A
153+
154+ ;do
155+ ;{
156+.(
157+loop
158+ ; X0=CX-x;
159+ ; X1=CX+x;
160+ ; Y=CY-y;
161+ ; DrawSegment();
162+ sec
163+ lda _CX
164+ sbc _X
165+ sta _X0
166+
167+ clc
168+ lda _CX
169+ adc _X
170+ sta _X1
171+
172+ sec
173+ lda _CY
174+ sbc _Y
175+ sta _CURY
176+
177+ jsr _DrawSegment
178+
179+ ; Y=CY+y;
180+ ; DrawSegment();
181+ clc
182+ lda _CY
183+ adc _Y
184+ sta _CURY
185+
186+ jsr _DrawSegment
187+
188+ ; a+=y;
189+ ; y--;
190+ clc
191+ lda _A
192+ adc _Y
193+ sta _A
194+
195+ dec _Y
196+
197+ ; if (a>0)
198+ ; {
199+ ; x++;
200+ ; a-=x;
201+ ; }
202+ ;}
203+ lda _A
204+ bmi end_test
205+
206+ inc _X
207+
208+ sec
209+ lda _A
210+ sbc _X
211+ sta _A
212+
213+end_test
214+ ;while (y>0)
215+ lda _Y
216+ bne loop
217+
218+.)
219+
220+ ;
221+ ; Final segment in the middle
222+ ; Actually that one is not drawn at all due to the odd/even line thingy :)
223+ ;
224+ sec
225+ lda _CX
226+ sbc _RAY
227+ sta _X0
228+
229+ clc
230+ lda _CX
231+ adc _RAY
232+ sta _X1
233+
234+ lda _CY
235+ sta _CURY
236+
237+ jsr _DrawSegment
238+end_of_disc
239+
240+ rts
241+.)
242+
243+
244+_DrawSegment
245+.(
246+ ;unsigned char left_offset=TableDiv6[x0];
247+ ;unsigned char left_mask=64|Mod6Left[x0];
248+ ldx _X0
249+
250+ lda _TableDiv6,x
251+ sta left_offset
252+
253+ lda _Mod6Left,x
254+ sta left_mask
255+
256+
257+ ;unsigned char right_offset=TableDiv6[x1];
258+ ;unsigned char block_lenght=right_offset-left_offset;
259+ ;unsigned char right_mask=64|Mod6Right[x1];
260+ ;unsigned int shading_step=SteppingTableDitherWord[block_lenght];
261+ ldx _X1
262+
263+ lda _Mod6Right,x
264+ sta right_mask
265+
266+ lda _TableDiv6,x
267+ sec
268+ sbc left_offset
269+ sta block_lenght
270+
271+ tax
272+ lda _SteppingTableDitherLow,x
273+ sta shading_step_low
274+ lda _SteppingTableDitherHigh,x
275+ sta shading_step_high
276+
277+ ;unsigned int shading_offset=gShadingAngle;
278+ ;shading_offset <<=8;
279+ lda _CURY
280+ asr a
281+ clc
282+ adc _gShadingAngle
283+ sta shading_offset_high
284+ lda #0
285+ sta shading_offset_low
286+
287+
288+ ;
289+ ;unsigned int offset_line=HiresAddrHigh[y];
290+ ;offset_line<<=8;
291+ ;offset_line|=HiresAddrLow[y];
292+
293+ ;ptr_line=(unsigned char*)offset_line;
294+
295+ ldy _CURY
296+ lda _HiresAddrLow,y
297+ sta ptr_scanline_low
298+ lda _HiresAddrHigh,y
299+ sta ptr_scanline_high
300+
301+ tya
302+ and #3
303+ sta y_modulo_3
304+
305+
306+ ;if (y&1)
307+ ;{
308+ ; ptr_line[left_offset-1]=4; // Blue
309+ ;}
310+ ;else
311+ ;{
312+ ; ptr_line[left_offset-1]=2; // Green
313+ ; //ptr_line[left_offset-1]=0; // Black
314+ ;}
315+ .(
316+ ldy left_offset
317+
318+ lda _CURY
319+ and #1
320+ beq even
321+
322+odd
323+ lda #4 ;4 ;+16
324+ sta (ptr_scanline),y
325+ jmp end
326+
327+even
328+ rts
329+ lda #5 ;2 ;+16
330+ sta (ptr_scanline),y
331+
332+end
333+ iny
334+ .)
335+
336+ ;
337+ ; Check if it's more than one byte long
338+ ; if (!block_lenght)
339+ ;
340+ .(
341+ lda block_lenght
342+ bne long_line
343+
344+short_line
345+ // Same block segment
346+ ;shading_table=CosTableDither[shading_offset>>8];
347+ ;shading_value=64|LabelBumpReconf[shading_table|(y&3)];
348+ ;ptr_line[left_offset]=left_mask&right_mask&shading_value;
349+ ldx shading_offset_high
350+ lda _CosTableDither,x
351+ ora y_modulo_3
352+ tax
353+ lda _TableDithering,x
354+ and left_mask
355+ and right_mask
356+
357+ sta (ptr_scanline),y
358+
359+ rts
360+
361+long_line
362+ // Repeat segment
363+ ;shading_offset+=shading_step;
364+ clc
365+ lda shading_offset_low
366+ adc shading_step_low
367+ sta shading_offset_low
368+ lda shading_offset_high
369+ tax
370+ adc shading_step_high
371+ sta shading_offset_high
372+
373+ ;shading_table=CosTableDither[shading_offset>>8];
374+ ;shading_value=64|LabelBumpReconf[shading_table|(y&3)];
375+ ;ptr_line[left_offset]=left_mask&shading_value;
376+ lda _CosTableDither,x
377+ ora y_modulo_3
378+ tax
379+ lda _TableDithering,x
380+ and left_mask
381+
382+ sta (ptr_scanline),y
383+ iny
384+
385+ ;
386+ ; Loop on intermediate elements
387+ ;
388+ dec block_lenght
389+ beq end
390+loop
391+ ; shading_offset+=shading_step;
392+ clc
393+ lda shading_offset_low
394+ adc shading_step_low
395+ sta shading_offset_low
396+ lda shading_offset_high
397+ tax
398+ adc shading_step_high
399+ sta shading_offset_high
400+
401+ ; shading_table=CosTableDither[shading_offset>>8];
402+ ; shading_value=64|LabelBumpReconf[shading_table|(y&3)];
403+ ; ptr_line[left_offset]=64+32+16+8+4+2+1&shading_value;
404+ lda _CosTableDither,x
405+ ora y_modulo_3
406+ tax
407+ lda _TableDithering,x
408+
409+ sta (ptr_scanline),y
410+ iny
411+
412+ dec block_lenght
413+ bne loop
414+end
415+
416+ ;
417+ ; Final bloc
418+ ;
419+ ;shading_table=CosTableDither[shading_offset>>8];
420+ ;shading_value=64|LabelBumpReconf[shading_table|(y&3)];
421+ ;ptr_line[left_offset]=right_mask&shading_value;
422+ ldx shading_offset_high
423+ lda _CosTableDither,x
424+ ora y_modulo_3
425+ tax
426+ lda _TableDithering,x
427+ and right_mask
428+
429+ sta (ptr_scanline),y
430+ .)
431+
432+ rts
433+.)
434+
435+
436+// 8000/256=31.25
437+_FlipToScreen
438+.(
439+ ldx #0
440+loop_x
441+ lda _BufferUnpack+256*0,x
442+ sta $a000+256*0,x
443+ lda _BufferUnpack+256*1,x
444+ sta $a000+256*1,x
445+ lda _BufferUnpack+256*2,x
446+ sta $a000+256*2,x
447+ lda _BufferUnpack+256*3,x
448+ sta $a000+256*3,x
449+ lda _BufferUnpack+256*4,x
450+ sta $a000+256*4,x
451+ lda _BufferUnpack+256*5,x
452+ sta $a000+256*5,x
453+ lda _BufferUnpack+256*6,x
454+ sta $a000+256*6,x
455+ lda _BufferUnpack+256*7,x
456+ sta $a000+256*7,x
457+ lda _BufferUnpack+256*8,x
458+ sta $a000+256*8,x
459+ lda _BufferUnpack+256*9,x
460+ sta $a000+256*9,x
461+
462+ lda _BufferUnpack+256*10,x
463+ sta $a000+256*10,x
464+ lda _BufferUnpack+256*11,x
465+ sta $a000+256*11,x
466+ lda _BufferUnpack+256*12,x
467+ sta $a000+256*12,x
468+ lda _BufferUnpack+256*13,x
469+ sta $a000+256*13,x
470+ lda _BufferUnpack+256*14,x
471+ sta $a000+256*14,x
472+ lda _BufferUnpack+256*15,x
473+ sta $a000+256*15,x
474+ lda _BufferUnpack+256*16,x
475+ sta $a000+256*16,x
476+ lda _BufferUnpack+256*17,x
477+ sta $a000+256*17,x
478+ lda _BufferUnpack+256*18,x
479+ sta $a000+256*18,x
480+ lda _BufferUnpack+256*19,x
481+ sta $a000+256*19,x
482+
483+ lda _BufferUnpack+256*20,x
484+ sta $a000+256*20,x
485+ lda _BufferUnpack+256*21,x
486+ sta $a000+256*21,x
487+ lda _BufferUnpack+256*22,x
488+ sta $a000+256*22,x
489+ lda _BufferUnpack+256*23,x
490+ sta $a000+256*23,x
491+ lda _BufferUnpack+256*24,x
492+ sta $a000+256*24,x
493+ lda _BufferUnpack+256*25,x
494+ sta $a000+256*25,x
495+ lda _BufferUnpack+256*26,x
496+ sta $a000+256*26,x
497+ lda _BufferUnpack+256*27,x
498+ sta $a000+256*27,x
499+ lda _BufferUnpack+256*28,x
500+ sta $a000+256*28,x
501+ lda _BufferUnpack+256*29,x
502+ sta $a000+256*29,x
503+
504+ lda _BufferUnpack+256*30,x
505+ sta $a000+256*30,x
506+
507+ lda _BufferUnpack+8000-256,x
508+ sta $a000+8000-256,x
509+
510+ dex
511+ beq end
512+ jmp loop_x
513+end
514+
515+ rts
516+.)
517+
518+
519+
520+
521+/*
522+void DrawNuclearBoom(unsigned char base)
523+{
524+ unsigned char color_value;
525+ unsigned char x,y;
526+ unsigned char* ptr_screen;
527+ unsigned char* ptr_full_buffer;
528+ unsigned int nSquareDistance;
529+ unsigned char nSquareRoot;
530+
531+ ptr_screen=(unsigned char*)0xa000;
532+ ptr_full_buffer=DiscFullTable;
533+ for (y=0;y<110;y++)
534+ {
535+ for (x=1;x<40;x++)
536+ {
537+ nSquareRoot=ptr_full_buffer[x];
538+ if (nSquareRoot==255)
539+ {
540+ // Do nothing
541+ ptr_screen[x]=16+2;
542+ }
543+ else
544+ if (nSquareRoot==254)
545+ {
546+ ptr_screen[x]=16;
547+ }
548+ else
549+ {
550+ color_value=16+BoomColor[(base+nSquareRoot)&15];
551+ ptr_screen[x]=color_value;
552+ }
553+ }
554+ ptr_screen+=40;
555+ ptr_full_buffer+=40;
556+ }
557+}
558+*/
559+
560+; White, yellow, red, magenta, blue, dark
561+_GlowColor
562+ .byt 16+7,16+3,16+1,16+5,16+4,16+0
563+
564+
565+_BoomColorMinus16
566+ .byt 16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0 ; 16
567+_BoomColor
568+ .byt 16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0 ; 16
569+ .byt 16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0 ; 16
570+ .byt 16+0,16+0,16+0,16+0,16+0
571+ ; 37 values
572+ .byt 16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0,16+0 ; 16
573+
574+ ;.byt 16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1
575+ ;.byt 16+7,16+7,16+7,16+3,16+7,16+3,16+3,16+1,16+3,16+1,16+5,16+1,16+5,16+4,16+0,16+0
576+ ;.byt 16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1
577+ ;.byt 16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1
578+ ;.byt 16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1
579+ ;.byt 16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1
580+ ;.byt 16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1,16+1
581+
582+_BoomColorBase .byt 0
583+_BoomCounter .byt 0
584+
585+bob
586+_DrawNuclearBoom
587+.(
588+ lda #<_DiscFullTable
589+ sta __patch_src+1
590+ lda #>_DiscFullTable
591+ sta __patch_src+2
592+
593+ lda #<$a000
594+ sta __patch_dst+1
595+ lda #>$a000
596+ sta __patch_dst+2
597+
598+ lda #110
599+ sta _BoomCounter
600+loop_y
601+
602+ ldy #39
603+loop_x
604+__patch_src
605+ lda $1234,y
606+ cmp #254
607+ bcs test_high
608+
609+patch_color
610+ ; color_value=16+BoomColor[(base+nSquareRoot)&15];
611+ ; ptr_screen[x]=color_value;
612+ ;clc
613+ ;adc _BoomColorBase
614+ ;and #15
615+ tax
616+ lda _BoomColor,x
617+
618+do_it
619+__patch_dst
620+ sta $1234,y
621+skip_it
622+
623+ dey
624+ bne loop_x
625+
626+ .(
627+ clc
628+ lda __patch_src+1
629+ adc #40
630+ sta __patch_src+1
631+ sta __patch_dst+1
632+ bcc skip
633+ inc __patch_src+2
634+ inc __patch_dst+2
635+skip
636+ .)
637+
638+ dec _BoomCounter
639+ bne loop_y
640+ rts
641+
642+test_high
643+ cmp #255
644+ beq do_nothing
645+
646+paper_black
647+ lda #16
648+ bne do_it
649+
650+do_nothing
651+ lda #16+2
652+ bne skip_it
653+ bne do_it
654+.)
655+
656+
657+
658+
659+; unsigned char* psrc -> tmp0
660+; unsigned char* pdst -> tmp1
661+; unsigned char width -> _W
662+; unsigned char height -> _H
663+; a/x -> pointer on description
664+_CopyRectangle
665+.(
666+ sta tmp0+0
667+ stx tmp0+1
668+
669+ ldy #0
670+
671+ sec
672+ lda (tmp0),y
673+ iny
674+ sbc #1
675+ sta __patch_src+1
676+ lda (tmp0),y
677+ iny
678+ sbc #0
679+ sta __patch_src+2
680+
681+ sec
682+ lda (tmp0),y
683+ iny
684+ sbc #1
685+ sta __patch_dst+1
686+ lda (tmp0),y
687+ iny
688+ sbc #0
689+ sta __patch_dst+2
690+
691+ lda (tmp0),y
692+ iny
693+ sta _W
694+
695+ lda (tmp0),y
696+ iny
697+ sta _H
698+
699+ ldy _H
700+loop_y
701+ ldx _W
702+loop_x
703+__patch_src
704+ lda $1234,x
705+__patch_dst
706+ sta $1234,x
707+ dex
708+ bne loop_x
709+
710+ .(
711+ clc
712+ lda __patch_src+1
713+ adc #40
714+ sta __patch_src+1
715+ bcc skip
716+ inc __patch_src+2
717+skip
718+ .)
719+
720+ .(
721+ clc
722+ lda __patch_dst+1
723+ adc #40
724+ sta __patch_dst+1
725+ bcc skip
726+ inc __patch_dst+2
727+skip
728+ .)
729+
730+ dey
731+ bne loop_y
732+
733+ rts
734+.)
735+
736+
737+
--- public/oric/games/Space 1999/Sources/trailer/draw_df_logo.s (nonexistent)
+++ public/oric/games/Space 1999/Sources/trailer/draw_df_logo.s (revision 365)
@@ -0,0 +1,500 @@
1+
2+
3+
4+#define ADDR_LOGO $a000+40*60
5+#define ADDR_LOGO_LETTERS $a000+40*71+5
6+
7+
8+TempX .byt 0
9+TempY .byt 0
10+TempOffset .byt 0
11+TempColor .byt 0
12+
13+DiplayAngle1 .byt 0
14+DiplayAngle2 .byt 0
15+DisplayPosX .byt 0
16+DisplayMemoX .byt 0
17+
18+OldByte .byt 0
19+blablabla .byt 0
20+
21+
22+DisplayParamBlackFrameTop
23+ .byt 10 ; Count
24+ .byt 2 ,64+1+2 ; Black pixels
25+ .byt 2+40,64+1+2 ; Black pixels
26+ .byt 3 ,16+0 ; Black paper
27+ .byt 3+40,16+0 ; Black paper
28+ .byt 36 ,0 ; Black ink
29+ .byt 36+40 ,0 ; Black ink
30+ .byt 37 ,64+1+2 ; Black pixels
31+ .byt 37+40,64+1+2 ; Black pixels
32+ .byt 38 ,16+7 ; White paper
33+ .byt 38+40,16+7 ; White paper
34+
35+DisplayParamBlueFrame
36+ .byt 12
37+ .byt 2 ,64+1+2 ; Black pixels
38+ .byt 2+40 ,64+1+2 ; Black pixels
39+ .byt 3 ,16+4 ; Blue paper
40+ .byt 3+40 ,16+6 ; Cyan paper
41+ .byt 4 ,3 ; Yellow ink
42+ .byt 4+40 ,1 ; Red ink
43+ .byt 36 ,0 ; Black ink
44+ .byt 36+40 ,0 ; Black ink
45+ .byt 37 ,64+1+2 ; Black pixels
46+ .byt 37+40,64+1+2 ; Black pixels
47+ .byt 38 ,16+7 ; White paper
48+ .byt 38+40,16+7 ; White paper
49+
50+DisplayParamBlueFrameShadow
51+ .byt 14
52+ .byt 2 ,64+1+2 ; Black pixels
53+ .byt 2+40 ,64+1+2 ; Black pixels
54+ .byt 3 ,16+4 ; Blue paper
55+ .byt 3+40 ,16+6 ; Cyan paper
56+ .byt 4 ,3 ; Yellow ink
57+ .byt 4+40 ,1 ; Red ink
58+ .byt 36 ,0 ; Black ink
59+ .byt 36+40 ,0 ; Black ink
60+ .byt 37 ,64+1+2 ; Black pixels
61+ .byt 37+40,64+1+2 ; Black pixels
62+ .byt 38 ,16+0 ; Black paper
63+ .byt 38+40,16+0 ; Black paper
64+ .byt 39 ,16+7 ; White paper
65+ .byt 39+40,16+7 ; White paper
66+
67+DisplayParamBlackFrameBottom
68+ .byt 12 ; Count
69+ .byt 2 ,64+1+2 ; Black pixels
70+ .byt 2+40,64+1+2 ; Black pixels
71+ .byt 3 ,16+0 ; Black paper
72+ .byt 3+40,16+0 ; Black paper
73+ .byt 36 ,0 ; Black ink
74+ .byt 36+40 ,0 ; Black ink
75+ .byt 37 ,64+1+2 ; Black pixels
76+ .byt 37+40,64+1+2 ; Black pixels
77+ .byt 38 ,16+0 ; Black paper
78+ .byt 38+40,16+0 ; Black paper
79+ .byt 39 ,16+7 ; White paper
80+ .byt 39+40,16+7 ; White paper
81+
82+DisplayParamBlackFrameBottomShadow
83+ .byt 6 ; Count
84+ .byt 4 ,16+0 ; Black paper
85+ .byt 4+40,16+0 ; Black paper
86+ .byt 38 ,16+0 ; Black paper
87+ .byt 38+40,16+0 ; Black paper
88+ .byt 39 ,16+7 ; White paper
89+ .byt 39+40,16+7 ; White paper
90+
91+
92+
93+DisplayNextLine
94+ clc
95+ lda tmp1
96+ adc #80
97+ sta tmp1
98+ bcc skip_display_rasters
99+ inc tmp1+1
100+skip_display_rasters
101+ rts
102+
103+
104+
105+DisplayScanLine
106+ stx TempX
107+
108+LoopDisplayScanLineOuter
109+ ldy #0
110+ lda (tmp0),y
111+ iny
112+ tax
113+
114+LoopDisplayScanLine
115+ lda (tmp0),y // Get offset
116+ sta TempOffset
117+ iny
118+ lda (tmp0),y // Get color
119+ sta TempColor
120+ iny
121+ sty TempY
122+
123+ ldy TempOffset
124+ lda TempColor
125+ sta (tmp1),y
126+
127+ ldy TempY
128+
129+ dex
130+ bne LoopDisplayScanLine
131+
132+ jsr DisplayNextLine
133+
134+ dec TempX
135+ bne LoopDisplayScanLineOuter
136+
137+ rts
138+
139+
140+
141+_DisplayDefenceForceFrame
142+ lda #<ADDR_LOGO
143+ sta tmp1+0
144+ lda #>ADDR_LOGO
145+ sta tmp1+1
146+
147+ ;
148+ lda #<DisplayParamBlackFrameTop
149+ sta tmp0+0
150+ lda #>DisplayParamBlackFrameTop
151+ sta tmp0+1
152+
153+ ldx #1
154+ jsr DisplayScanLine
155+
156+ ;
157+ lda #<DisplayParamBlueFrame
158+ sta tmp0+0
159+ lda #>DisplayParamBlueFrame
160+ sta tmp0+1
161+
162+ ldx #3
163+ jsr DisplayScanLine
164+
165+ ;
166+ lda #<DisplayParamBlueFrameShadow
167+ sta tmp0+0
168+ lda #>DisplayParamBlueFrameShadow
169+ sta tmp0+1
170+
171+ ldx #40
172+ jsr DisplayScanLine
173+
174+ ;
175+ lda #<DisplayParamBlackFrameBottom
176+ sta tmp0+0
177+ lda #>DisplayParamBlackFrameBottom
178+ sta tmp0+1
179+
180+ ldx #1
181+ jsr DisplayScanLine
182+
183+ ;
184+ lda #<DisplayParamBlackFrameBottomShadow
185+ sta tmp0+0
186+ lda #>DisplayParamBlackFrameBottomShadow
187+ sta tmp0+1
188+
189+ ldx #3
190+ jsr DisplayScanLine
191+
192+ rts
193+
194+
195+
196+
197+
198+
199+DisplayMakeShiftedLogo
200+ ldx #67
201+LoopDisplayMakeShiftedLogo_Y
202+
203+ lda #0
204+ sta OldByte
205+ ldy #0
206+LoopDisplayMakeShiftedLogo_X
207+ lda (tmp0),y
208+ sta blablabla
209+ ;pha
210+ and #63
211+ lsr
212+ ora OldByte
213+ ora #64
214+ sta (tmp1),y
215+
216+ lda blablabla
217+ ;pla
218+ and #1
219+ asl
220+ asl
221+ asl
222+ asl
223+ asl
224+ sta OldByte
225+
226+ iny
227+ cpy #30
228+ bne LoopDisplayMakeShiftedLogo_X
229+
230+ clc
231+ lda tmp0
232+ adc #30
233+ sta tmp0
234+ bcc skip_src
235+ inc tmp0+1
236+ clc
237+skip_src
238+
239+ lda tmp1
240+ adc #30
241+ sta tmp1
242+ bcc skip_dst
243+ inc tmp1+1
244+skip_dst
245+
246+ dex
247+ bne LoopDisplayMakeShiftedLogo_Y
248+ rts
249+
250+
251+_DisplayMakeShiftedLogos
252+ ; 0
253+ lda #<_BufferUnpack
254+ sta tmp0
255+ lda #>_BufferUnpack
256+ sta tmp0+1
257+ lda #<_LabelPicture1
258+ sta tmp1
259+ lda #>_LabelPicture1
260+ sta tmp1+1
261+ jsr DisplayMakeShiftedLogo
262+
263+ ; 1
264+ lda #<_LabelPicture1
265+ sta tmp0
266+ lda #>_LabelPicture1
267+ sta tmp0+1
268+ lda #<_LabelPicture2
269+ sta tmp1
270+ lda #>_LabelPicture2
271+ sta tmp1+1
272+ jsr DisplayMakeShiftedLogo
273+
274+ ; 2
275+ lda #<_LabelPicture2
276+ sta tmp0
277+ lda #>_LabelPicture2
278+ sta tmp0+1
279+ lda #<_LabelPicture3
280+ sta tmp1
281+ lda #>_LabelPicture3
282+ sta tmp1+1
283+ jsr DisplayMakeShiftedLogo
284+
285+ ; 3
286+ lda #<_LabelPicture3
287+ sta tmp0
288+ lda #>_LabelPicture3
289+ sta tmp0+1
290+ lda #<_LabelPicture4
291+ sta tmp1
292+ lda #>_LabelPicture4
293+ sta tmp1+1
294+ jsr DisplayMakeShiftedLogo
295+
296+ ; 4
297+ lda #<_LabelPicture4
298+ sta tmp0
299+ lda #>_LabelPicture4
300+ sta tmp0+1
301+ lda #<_LabelPicture5
302+ sta tmp1
303+ lda #>_LabelPicture5
304+ sta tmp1+1
305+ jsr DisplayMakeShiftedLogo
306+ rts
307+
308+
309+DisplayTableLogoLow
310+ .byt <_BufferUnpack
311+ .byt <_LabelPicture1
312+ .byt <_LabelPicture2
313+ .byt <_LabelPicture3
314+ .byt <_LabelPicture4
315+ .byt <_LabelPicture5
316+
317+DisplayTableLogoHigh
318+ .byt >_BufferUnpack
319+ .byt >_LabelPicture1
320+ .byt >_LabelPicture2
321+ .byt >_LabelPicture3
322+ .byt >_LabelPicture4
323+ .byt >_LabelPicture5
324+
325+
326+
327+_DisplayScrappIt
328+ clc
329+ lda DiplayAngle1
330+ sta tmp4
331+ adc #2
332+ sta DiplayAngle1
333+
334+ clc
335+ lda DiplayAngle2
336+ sta reg1
337+ adc #5
338+ sta DiplayAngle2
339+
340+ ; Offset source
341+ lda #<0
342+ sta tmp0
343+ lda #>0
344+ sta tmp0+1
345+
346+ ; Screen address
347+ lda #<ADDR_LOGO_LETTERS
348+ sta tmp1
349+ lda #>ADDR_LOGO_LETTERS
350+ sta tmp1+1
351+
352+ ldx #67
353+LoopDisplayScrappItY
354+ stx DisplayMemoX
355+
356+ ; pos_x=(int)CosTable[angle_1];
357+ ; pos_x+=(int)CosTable[angle_2];
358+ ; pos_x=(pos_x*12)/(256*2);
359+ clc
360+ ldx tmp4
361+ lda _CosTable,x
362+ ldx reg1
363+ adc _CosTable,x
364+ tax
365+
366+ ; Increment angles
367+ inc tmp4
368+
369+ clc
370+ lda reg1
371+ adc #5
372+ sta reg1
373+
374+ ; Compute src adress
375+ lda _TableMod6,x
376+ tay
377+ clc
378+ lda DisplayTableLogoLow,y
379+ adc tmp0
380+ sta tmp2
381+ lda DisplayTableLogoHigh,y
382+ adc tmp0+1
383+ sta tmp2+1
384+
385+
386+ ; Compute dst adress
387+ clc
388+ lda _TableDiv6,x
389+ adc tmp1
390+ sta tmp3
391+ lda tmp1+1
392+ adc #0
393+ sta tmp3+1
394+
395+ ldy #0
396+LoopDisplayScrappItX
397+ lda (tmp2),y
398+ sta (tmp3),y
399+ iny
400+
401+ lda (tmp2),y
402+ sta (tmp3),y
403+ iny
404+
405+ lda (tmp2),y
406+ sta (tmp3),y
407+ iny
408+
409+ lda (tmp2),y
410+ sta (tmp3),y
411+ iny
412+
413+ lda (tmp2),y
414+ sta (tmp3),y
415+ iny
416+
417+ lda (tmp2),y
418+ sta (tmp3),y
419+ iny
420+
421+ lda (tmp2),y
422+ sta (tmp3),y
423+ iny
424+
425+ lda (tmp2),y
426+ sta (tmp3),y
427+ iny
428+
429+ lda (tmp2),y
430+ sta (tmp3),y
431+ iny
432+
433+ lda (tmp2),y
434+ sta (tmp3),y
435+ iny
436+
437+ cpy #30
438+ bne LoopDisplayScrappItX
439+
440+ clc
441+ lda tmp0
442+ adc #30
443+ sta tmp0
444+ bcc display_skip_src
445+ inc tmp0+1
446+ clc
447+display_skip_src
448+
449+ lda tmp1
450+ adc #40
451+ sta tmp1
452+ bcc display_skip_dst
453+ inc tmp1+1
454+display_skip_dst
455+
456+ ldx DisplayMemoX
457+
458+ dex
459+ beq DisplayScrappItYEnd
460+ jmp LoopDisplayScrappItY
461+
462+DisplayScrappItYEnd
463+ rts
464+
465+
466+_DisplayPaperSet
467+ lda #$00
468+ sta tmp0
469+ lda #$a0
470+ sta tmp0+1
471+
472+ ldx #200
473+LoopDisplayPaperSet
474+ ldy #0
475+ lda #16+7
476+ sta (tmp0),y
477+ iny
478+ lda #0
479+ sta (tmp0),y
480+
481+ lda tmp0
482+ clc
483+ adc #40
484+ sta tmp0
485+ bcc skipbla
486+ inc tmp0+1
487+skipbla
488+
489+ dex
490+ bne LoopDisplayPaperSet
491+ rts
492+
493+
494+
495+
496+
497+
498+
499+
500+
--- public/oric/games/Space 1999/Sources/trailer/how_to_build.txt (nonexistent)
+++ public/oric/games/Space 1999/Sources/trailer/how_to_build.txt (revision 365)
@@ -0,0 +1,8 @@
1+1. Make sure you have the OSDK installed, if not download it from http://osdk.defence-force.org and install it
2+2. Run osdk_makedata.bat, this will convert the content of the Graphics folder as oric compatible data
3+3. Run osdk_build.bat, this will build the project, creating a BUILD folder containing the DSK file
4+4. Run osdk_execute.bat, this will launch an emulator and automatically run the DSK image file
5+5. Profit !
6+
7+Enjoy :)
8+
--- public/oric/games/Space 1999/Sources/trailer/osdk_build.bat (nonexistent)
+++ public/oric/games/Space 1999/Sources/trailer/osdk_build.bat (revision 365)
@@ -0,0 +1,36 @@
1+@ECHO OFF
2+
3+
4+::
5+:: Initial check.
6+:: Verify if the SDK is correctly configurated
7+::
8+IF "%OSDK%"=="" GOTO ErCfg
9+
10+
11+::
12+:: Set the build paremeters
13+::
14+CALL osdk_config.bat
15+
16+
17+::
18+:: Launch the compilation of files
19+::
20+CALL %OSDK%\bin\make.bat %OSDKFILE%
21+GOTO End
22+
23+
24+::
25+:: Outputs an error message
26+::
27+:ErCfg
28+ECHO == ERROR ==
29+ECHO The Oric SDK was not configured properly
30+ECHO You should have a OSDK environment variable setted to the location of the SDK
31+IF "%OSDKBRIEF%"=="" PAUSE
32+GOTO End
33+
34+
35+:End
36+pause
\ No newline at end of file
--- public/oric/games/Space 1999/Sources/trailer/osdk_config.bat (nonexistent)
+++ public/oric/games/Space 1999/Sources/trailer/osdk_config.bat (revision 365)
@@ -0,0 +1,23 @@
1+@ECHO OFF
2+
3+::
4+:: Set the build paremeters
5+::
6+SET OSDKADDR=$600
7+SET OSDKNAME=INTRO
8+SET OSDKFILE=main draw sound draw_df_logo text sequences
9+SET OSDKFILE=%OSDKFILE% pic_logo pic_landau pic_bain pic_producer pic_itc pic_episode pic_morse pic_sylvia pic_font pic_defenceforce pic_misc
10+SET OSDKFILE=%OSDKFILE% tables
11+SET OSDKFILE=%OSDKFILE% costable
12+
13+::SET OSDKFILE=pouet
14+::SET OSDKLINK=-B
15+SET OSDKTAPNAME="SPINTRO"
16+SET OSDKDISK= BUILD/%OSDKNAME%.TAP
17+SET OSDKINIST="HIRES:SPINTRO"
18+
19+::SET OSDKDOSBOX=
20+
21+
22+
23+
--- public/oric/games/Space 1999/Sources/trailer/osdk_execute.bat (nonexistent)
+++ public/oric/games/Space 1999/Sources/trailer/osdk_execute.bat (revision 365)
@@ -0,0 +1,37 @@
1+@ECHO OFF
2+
3+
4+::
5+:: Initial check.
6+:: Verify if the SDK is correctly configurated,
7+::
8+IF "%OSDK%"=="" GOTO ErCfg
9+
10+
11+::
12+:: Set the build paremeters
13+::
14+CALL osdk_config.bat
15+
16+
17+::
18+:: Run Euphoric using the common batch
19+::
20+CALL %OSDK%\Euphoric\osdk_euphoric.bat
21+GOTO End
22+
23+
24+::
25+:: Outputs an error message about configuration
26+::
27+:ErCfg
28+ECHO == ERROR ==
29+ECHO The Oric SDK was not configured properly
30+ECHO You should have a OSDK environment variable setted to the location of the SDK
31+ECHO ===========
32+IF "%OSDKBRIEF%"=="" PAUSE
33+GOTO End
34+
35+:End
36+
37+
--- public/oric/games/Space 1999/Sources/trailer/osdk_makedata.bat (nonexistent)
+++ public/oric/games/Space 1999/Sources/trailer/osdk_makedata.bat (revision 365)
@@ -0,0 +1,59 @@
1+@ECHO OFF
2+
3+:: Defence Force logo
4+%OSDK%\bin\PictConv -f1 -d0 -o2 Graphics\dflogo.png %OSDK%\tmp\picture.hir
5+%OSDK%\bin\FilePack -p %OSDK%\tmp\picture.hir %OSDK%\tmp\picture.pak
6+%OSDK%\bin\Bin2Txt -s1 -f2 %OSDK%\tmp\picture.pak pic_defenceforce.s _LabelPictureDefenceForce
7+
8+:: Space station
9+%OSDK%\bin\PictConv -f1 -d0 -o2 Graphics\Space1999_logo.png %OSDK%\tmp\picture.hir
10+%OSDK%\bin\FilePack -p %OSDK%\tmp\picture.hir %OSDK%\tmp\picture.pak
11+%OSDK%\bin\Bin2Txt -s1 -f2 %OSDK%\tmp\picture.pak pic_logo.s _LabelPictureLogo
12+
13+:: Martin Landau
14+%OSDK%\bin\PictConv -f1 -d0 -o2 Graphics\oric_staring_martin_landeau_final.png %OSDK%\tmp\picture.hir
15+%OSDK%\bin\FilePack -p %OSDK%\tmp\picture.hir %OSDK%\tmp\picture.pak
16+%OSDK%\bin\Bin2Txt -s1 -f2 %OSDK%\tmp\picture.pak pic_landau.s _LabelPictureMartinLandau
17+
18+:: Barbara Bain
19+%OSDK%\bin\PictConv -f0 -d0 -o2 Graphics\oric_staring_barbara_bain_final.png %OSDK%\tmp\picture.hir
20+%OSDK%\bin\FilePack -p %OSDK%\tmp\picture.hir %OSDK%\tmp\picture.pak
21+%OSDK%\bin\Bin2Txt -s1 -f2 %OSDK%\tmp\picture.pak pic_bain.s _LabelPictureBarbaraBain
22+
23+:: Executive producer
24+%OSDK%\bin\PictConv -f0 -d0 -o2 Graphics\oric_executive_producer_gerry_anderson_final.png %OSDK%\tmp\picture.hir
25+%OSDK%\bin\FilePack -p %OSDK%\tmp\picture.hir %OSDK%\tmp\picture.pak
26+%OSDK%\bin\Bin2Txt -s1 -f2 %OSDK%\tmp\picture.pak pic_producer.s _LabelPictureProducer
27+
28+:: ITC logo
29+%OSDK%\bin\PictConv -f0 -d0 -o2 Graphics\itc_logo.png %OSDK%\tmp\picture.hir
30+%OSDK%\bin\FilePack -p %OSDK%\tmp\picture.hir %OSDK%\tmp\picture.pak
31+%OSDK%\bin\Bin2Txt -s1 -f2 %OSDK%\tmp\picture.pak pic_itc.s _LabelPictureItcLogo
32+
33+:: this episode
34+%OSDK%\bin\PictConv -f0 -d0 -o2 Graphics\this_episode.png %OSDK%\tmp\picture.hir
35+%OSDK%\bin\FilePack -p %OSDK%\tmp\picture.hir %OSDK%\tmp\picture.pak
36+%OSDK%\bin\Bin2Txt -s1 -f2 %OSDK%\tmp\picture.pak pic_episode.s _LabelPictureEpisode
37+
38+:: Barry Morse
39+%OSDK%\bin\PictConv -f0 -d0 -o2 Graphics\oric_starring_barry_morse_final.png %OSDK%\tmp\picture.hir
40+%OSDK%\bin\FilePack -p %OSDK%\tmp\picture.hir %OSDK%\tmp\picture.pak
41+%OSDK%\bin\Bin2Txt -s1 -f2 %OSDK%\tmp\picture.pak pic_morse.s _LabelPictureBarryMorse
42+
43+:: Producer
44+%OSDK%\bin\PictConv -f0 -d0 -o2 Graphics\oric_producer_sylvia_anderson_final.png %OSDK%\tmp\picture.hir
45+%OSDK%\bin\FilePack -p %OSDK%\tmp\picture.hir %OSDK%\tmp\picture.pak
46+%OSDK%\bin\Bin2Txt -s1 -f2 %OSDK%\tmp\picture.pak pic_sylvia.s _LabelPictureSylviaAnderson
47+
48+:: Font
49+%OSDK%\bin\PictConv -f0 -d0 -o2 Graphics\space1999_font.png %OSDK%\tmp\picture.hir
50+%OSDK%\bin\FilePack -p %OSDK%\tmp\picture.hir %OSDK%\tmp\picture.pak
51+%OSDK%\bin\Bin2Txt -s1 -f2 %OSDK%\tmp\picture.pak pic_font.s _LabelPictureFont
52+
53+:: Various stuff (moonbase alpha logo...)
54+%OSDK%\bin\PictConv -f0 -d0 -o2 Graphics\pictures.png %OSDK%\tmp\picture.hir
55+%OSDK%\bin\FilePack -p %OSDK%\tmp\picture.hir %OSDK%\tmp\picture.pak
56+%OSDK%\bin\Bin2Txt -s1 -f2 %OSDK%\tmp\picture.pak pic_misc.s _LabelPictureMisc
57+
58+pause
59+
--- public/oric/games/Space 1999/Sources/trailer/osdk_showmap.bat (nonexistent)
+++ public/oric/games/Space 1999/Sources/trailer/osdk_showmap.bat (revision 365)
@@ -0,0 +1,34 @@
1+@ECHO OFF
2+
3+::
4+:: Initial check.
5+:: Verify if the SDK is correctly configurated
6+::
7+IF "%OSDK%"=="" GOTO ErCfg
8+
9+::
10+:: Set the build paremeters
11+::
12+CALL osdk_config.bat
13+
14+
15+%OSDK%\bin\MemMap.exe build\symbols build\map.htm %OSDKNAME% %OSDK%\documentation\documentation.css
16+build\map.htm
17+
18+
19+GOTO End
20+
21+
22+::
23+:: Outputs an error message
24+::
25+:ErCfg
26+ECHO == ERROR ==
27+ECHO The Oric SDK was not configured properly
28+ECHO You should have a OSDK environment variable setted to the location of the SDK
29+pause
30+GOTO End
31+
32+
33+:End
34+
--- public/oric/games/Space 1999/Sources/trailer/pouet.s (nonexistent)
+++ public/oric/games/Space 1999/Sources/trailer/pouet.s (revision 365)
@@ -0,0 +1,6 @@
1+pouet
2+ ldy $ff
3+ ldy $00
4+ jmp pouet
5+
6+
--- public/oric/games/Space 1999/Sources/trailer/sequences.s (nonexistent)
+++ public/oric/games/Space 1999/Sources/trailer/sequences.s (revision 365)
@@ -0,0 +1,1223 @@
1+// ============================================================================
2+//
3+// Sequences.s
4+//
5+// ============================================================================
6+//
7+// Just the various parts shown in the demo
8+//
9+// ============================================================================
10+
11+
12+_LogoColor .byt 7,7,7,3,7,3,3,1,3,1,1,3,1,3,3,3
13+_EarthColor .byt 4,4,4,6,4,6,6,2,6,2,2,6,2,6,6,6
14+
15+i0 .byt 0
16+i1 .byt 0
17+
18+ii0 .byt 0
19+ii1 .byt 0
20+
21+_W .byt 0
22+_H .byt 0
23+
24+
25+_ColorsFadeStartPtr .word 0
26+_ColorsFadeCurrentPtr .word 0
27+
28+_ColorPaperDarkGreen
29+ .byt 2
30+ .byt 16+2,16+0
31+
32+_ColorPaperBlack
33+ .byt 1
34+ .byt 16+0
35+
36+_ColorPaperDarkBlue
37+ .byt 2
38+ .byt 16+4,16+0
39+
40+_ColorPaperBlue
41+ .byt 1
42+ .byt 16+4
43+
44+_ColorPaperDarkCyan
45+ .byt 2
46+ .byt 16+6,16+4
47+
48+_ColorPaperCyan
49+ .byt 1
50+ .byt 16+6
51+
52+_ColorPaperDarkWhite
53+ .byt 2
54+ .byt 16+7,16+6
55+
56+_ColorPaperWhite
57+ .byt 1
58+ .byt 16+7
59+
60+_ColorPaperYellow
61+ .byt 1
62+ .byt 16+3
63+
64+_ColorPaperRed
65+ .byt 1
66+ .byt 16+1
67+
68+_ColorInkYellow
69+ .byt 1
70+ .byt 3
71+
72+_ColorInkBlack
73+ .byt 1
74+ .byt 0
75+
76+_ColorInkWhite
77+ .byt 1
78+ .byt 7
79+
80+_ColorInkBlue
81+ .byt 1
82+ .byt 4
83+
84+_ColorInkCyan
85+ .byt 1
86+ .byt 6
87+
88+_ColorInkDarkCyan
89+ .byt 2
90+ .byt 6,4
91+
92+_ColorInkOrange
93+ .byt 2
94+ .byt 1,3
95+
96+_ColorInkRed
97+ .byt 1
98+ .byt 1
99+
100+; 1,2,4 = default
101+; 4,2,1 = interesting
102+
103+_ColorInkDefaultRGB
104+ .byt 3
105+ .byt 1,2,4
106+
107+_ColorInkAlternateRGB
108+ .byt 3
109+ .byt 2,4,1
110+
111+
112+_ColorsCrescentMoon
113+ .byt 19,10,70,<_ColorsFadeList,>_ColorsFadeList ; X,Y,H,Fadelist
114+
115+_ColorsDoublePlanet
116+ .byt 20,20,70,<_ColorsFadeList,>_ColorsFadeList ; X,Y,H,Fadelist
117+
118+_ColorsBarbaraBain
119+ .byt 24,51,55,<_ColorsFadeList,>_ColorsFadeList ; X,Y,H,Fadelist
120+
121+_ColorsSylviaAnderson
122+ .byt 11,117,55,<_ColorsFadeList,>_ColorsFadeList ; X,Y,H,Fadelist
123+
124+_ColorsTwilighte
125+ .byt 1,80,120,<_ColorsFadeList,>_ColorsFadeList ; X,Y,H,Fadelist
126+
127+_ColorsQuote1
128+ .byt 0,0,50,<_ColorsFadeList,>_ColorsFadeList ; X,Y,H,Fadelist
129+
130+_ColorsQuote2
131+ .byt 0,50,50,<_ColorsFadeList,>_ColorsFadeList ; X,Y,H,Fadelist
132+
133+_ColorsQuote3
134+ .byt 0,100,70,<_ColorsFadeList,>_ColorsFadeList ; X,Y,H,Fadelist
135+
136+_ColorsQuote4
137+ .byt 0,170,30,<_ColorsFadeList,>_ColorsFadeList ; X,Y,H,Fadelist
138+
139+_ColorsQuoteAll
140+ .byt 0,0,200,<_ColorsFadeListOut,>_ColorsFadeListOut ; X,Y,H,Fadelist
141+
142+_ColorsFadeToWhite
143+ .byt 0,0,200,<_ColorsPaperFadeList,>_ColorsPaperFadeList ; X,Y,H,Fadelist
144+
145+_ColorsFadeList
146+ .byt <_ColorInkBlack,>_ColorInkBlack
147+ .byt <_ColorInkBlue,>_ColorInkBlue
148+ .byt <_ColorInkCyan,>_ColorInkCyan
149+ .byt <_ColorInkWhite,>_ColorInkWhite
150+_ColorsFadeListOut
151+ .byt <_ColorInkYellow,>_ColorInkYellow
152+ .byt <_ColorInkRed,>_ColorInkRed
153+ .byt <_ColorInkBlue,>_ColorInkBlue
154+ .byt <_ColorInkBlack,>_ColorInkBlack
155+
156+
157+_ColorsPaperFadeList
158+ .byt <_ColorPaperBlack,>_ColorPaperBlack
159+ .byt <_ColorPaperBlack,>_ColorPaperBlack
160+ .byt <_ColorPaperDarkBlue,>_ColorPaperDarkBlue
161+ .byt <_ColorPaperBlue,>_ColorPaperBlue
162+ .byt <_ColorPaperDarkCyan,>_ColorPaperDarkCyan
163+ .byt <_ColorPaperCyan,>_ColorPaperCyan
164+ .byt <_ColorPaperDarkWhite,>_ColorPaperDarkWhite
165+ .byt <_ColorPaperWhite,>_ColorPaperWhite
166+_ColorsPaperFadeListOut
167+ .byt <_ColorPaperYellow,>_ColorPaperYellow
168+ .byt <_ColorPaperRed,>_ColorPaperRed
169+ .byt <_ColorPaperBlue,>_ColorPaperBlue
170+ .byt <_ColorPaperBlack,>_ColorPaperBlack
171+
172+
173+_ColorCyclespace1999Logo
174+.(
175+ lda #128
176+ sta _FrameCounter
177+couterloop
178+ ; ii0=i0;
179+ ; ii1=i1;
180+ lda i0
181+ sta ii0
182+
183+ lda i1
184+ sta ii1
185+
186+ ; pLine=(unsigned char*)0xa000+2;
187+ lda #<$a000+2
188+ sta tmp0+0
189+ lda #>$a000+2
190+ sta tmp0+1
191+
192+ ldx #0
193+loop_y
194+ txa
195+ and #1
196+ beq logo
197+
198+earth
199+ lda ii1
200+ and #15
201+ tay
202+ lda _EarthColor,y
203+ iny
204+ sty ii1
205+ jmp end
206+
207+logo
208+ lda ii0
209+ and #15
210+ tay
211+ lda _LogoColor,y
212+ iny
213+ sty ii0
214+ jmp end
215+
216+end
217+ ldy #0
218+ sta (tmp0),y
219+
220+ ; pLine+=40;
221+ clc
222+ lda tmp0+0
223+ adc #40
224+ sta tmp0+0
225+ lda tmp0+1
226+ adc #0
227+ sta tmp0+1
228+
229+ inx
230+ cpx #90
231+ bne loop_y
232+
233+ inc i0
234+ dec i1
235+
236+ lda #3
237+ sta _TimerCounter
238+wait
239+ lda _TimerCounter
240+ bne wait
241+
242+ dec _FrameCounter
243+ bne couterloop
244+
245+ rts
246+.)
247+
248+
249+; Call with a/x pointing on the file to unpack
250+; Will unpack to the _BufferUnpack
251+_FileUnpackToBuffer
252+.(
253+ sta ptr_source+0
254+ stx ptr_source+1
255+
256+ lda #<_BufferUnpack
257+ sta ptr_destination+0
258+ lda #>_BufferUnpack
259+ sta ptr_destination+1
260+
261+ jmp _FileUnpack
262+.)
263+
264+_SequenceSpace1999Logo
265+ lda #<_LabelPictureLogo
266+ ldx #>_LabelPictureLogo
267+ jsr _FileUnpackToBuffer
268+
269+ jsr _FlipToScreen
270+
271+ ; color_cycle(255);//64);
272+ jmp _ColorCyclespace1999Logo
273+
274+
275+_SequenceItcLogo
276+ lda #<_LabelPictureItcLogo
277+ ldx #>_LabelPictureItcLogo
278+ jsr _FileUnpackToBuffer
279+
280+ jsr _FlipToScreen
281+
282+ ldx #4
283+ jmp _WaitSecond
284+
285+
286+_SequenceDefenceForceLogo
287+.(
288+ jsr _BlackScreen
289+
290+ lda #<_ColorsFadeToWhite
291+ ldx #>_ColorsFadeToWhite
292+ jsr _ColorsFadeInit
293+
294+ jsr _UnpackFont
295+ lda #<_Message_ProducedBy
296+ ldx #>_Message_ProducedBy
297+ jsr _DrawTextAsm
298+
299+ lda #<_LabelPictureDefenceForce
300+ ldx #>_LabelPictureDefenceForce
301+ jsr _FileUnpackToBuffer
302+
303+ jsr _FadeInOrOut
304+ jsr _FadeInOrOut
305+ jsr _DisplayPaperSet
306+
307+ jsr _DisplayMakeShiftedLogos
308+ jsr _DisplayDefenceForceFrame
309+
310+ lda #100
311+ sta _FrameCounter
312+loop
313+ jsr _DisplayScrappIt
314+ dec _FrameCounter
315+ bne loop
316+
317+ jsr _BlackScreen
318+ rts
319+.)
320+
321+
322+
323+
324+
325+
326+
327+
328+_UnpackFont
329+.(
330+ lda #<_LabelPictureFont
331+ sta ptr_source+0
332+ lda #>_LabelPictureFont
333+ sta ptr_source+1
334+
335+ lda #<_BufferUnpack
336+ sta ptr_destination+0
337+ lda #>_BufferUnpack
338+ sta ptr_destination+1
339+
340+ jmp _FileUnpack
341+.)
342+
343+
344+
345+
346+
347+; tmp0=pointer on color
348+; _X=start column
349+; _Y=start row
350+; _H=height
351+_SetColorBand
352+ ;jmp _SetColorBand
353+.(
354+ ; pdst_line=(unsigned char*)0xa000+Y*40; -> tmp5
355+ ldy _Y
356+ clc
357+ lda _HiresAddrLow,y
358+ adc _X
359+ sta __patch_hires+1
360+ lda _HiresAddrHigh,y
361+ adc #0
362+ sta __patch_hires+2
363+
364+ ldy #0
365+ lda (tmp0),y
366+ sta __patch_wrap+1
367+ inc __patch_wrap+1
368+
369+ lda tmp0+0
370+ sta __patch_colors+1
371+ lda tmp0+1
372+ sta __patch_colors+2
373+
374+ ldx #1
375+ ldy _H
376+loop_y
377+__patch_colors
378+ lda $1234,x
379+__patch_hires
380+ sta $a000
381+
382+ clc
383+ lda __patch_hires+1
384+ adc #40
385+ sta __patch_hires+1
386+ lda __patch_hires+2
387+ adc #0
388+ sta __patch_hires+2
389+
390+ inx
391+__patch_wrap
392+ cpx #$12
393+ bne skip
394+ ldx #1
395+skip
396+
397+ dey
398+ bne loop_y
399+ rts
400+.)
401+
402+; a/x=pointer on color
403+_SetPaperColor
404+ sta tmp0+0
405+ stx tmp0+1
406+
407+ lda #0
408+ sta _X
409+
410+ lda #0
411+ sta _Y
412+
413+ lda #200
414+ sta _H
415+
416+ jmp _SetColorBand
417+
418+; a/x=pointer on color
419+_SetInkColor
420+ sta tmp0+0
421+ stx tmp0+1
422+
423+ lda #1
424+ sta _X
425+
426+ lda #0
427+ sta _Y
428+
429+ lda #200
430+ sta _H
431+
432+ jmp _SetColorBand
433+
434+_SetInkYellow
435+ lda #<_ColorInkYellow
436+ ldx #>_ColorInkYellow
437+ jmp _SetInkColor
438+
439+_SetInkBlack
440+ lda #<_ColorInkBlack
441+ ldx #>_ColorInkBlack
442+ jmp _SetInkColor
443+
444+_SetInkWhite
445+ lda #<_ColorInkWhite
446+ ldx #>_ColorInkWhite
447+ jmp _SetInkColor
448+
449+
450+; a=low adr
451+; x=high adr
452+_ColorsFadeInit
453+ sta _ColorsFadeStartPtr+0
454+ stx _ColorsFadeStartPtr+1
455+
456+ clc
457+ adc #3
458+ sta tmp0+0
459+ txa
460+ adc #0
461+ sta tmp0+1
462+
463+ ldy #0
464+ lda (tmp0),y
465+ sta _ColorsFadeCurrentPtr+0
466+ iny
467+ lda (tmp0),y
468+ sta _ColorsFadeCurrentPtr+1
469+
470+ jmp _ColorsFadeDo
471+
472+_ColorsFadeDo
473+ lda _ColorsFadeStartPtr+0
474+ sta tmp0+0
475+ lda _ColorsFadeStartPtr+1
476+ sta tmp0+1
477+
478+ ldy #0
479+ lda (tmp0),y
480+ sta _X
481+
482+ iny
483+ lda (tmp0),y
484+ sta _Y
485+
486+ iny
487+ lda (tmp0),y
488+ sta _H
489+
490+ clc
491+ lda _ColorsFadeCurrentPtr+0
492+ sta tmp1+0
493+ adc #2
494+ sta _ColorsFadeCurrentPtr+0
495+ lda _ColorsFadeCurrentPtr+1
496+ sta tmp1+1
497+ adc #0
498+ sta _ColorsFadeCurrentPtr+1
499+
500+ ldy #0
501+ lda (tmp1),y
502+ sta tmp0+0
503+
504+ iny
505+ lda (tmp1),y
506+ sta tmp0+1
507+
508+ jsr _SetColorBand
509+
510+ rts
511+
512+
513+
514+DrawRatingBox
515+.(
516+ .(
517+ ; The thick horizontal lines
518+ ldx #36
519+ lda #%01111111
520+loop_horizontal
521+ sta $a001+40*119,x
522+ sta $a001+40*120,x
523+
524+ sta $a001+40*142,x
525+ sta $a001+40*143,x
526+
527+ sta $a001+40*158,x
528+
529+ sta $a001+40*173,x
530+ sta $a001+40*174,x
531+ dex
532+ bne loop_horizontal
533+ .)
534+
535+ .(
536+ ; The vertical lines on each side to close the box
537+ lda #<$a001+40*119
538+ sta tmp0+0
539+ lda #>$a001+40*119
540+ sta tmp0+1
541+ ldx #56
542+loop_vertical
543+ lda #%01000011
544+ ldy #0
545+ sta (tmp0),y
546+
547+ lda #%01110000
548+ ldy #37
549+ sta (tmp0),y
550+
551+ clc
552+ lda tmp0+0
553+ adc #40
554+ sta tmp0+0
555+ lda tmp0+1
556+ adc #0
557+ sta tmp0+1
558+
559+ dex
560+ bne loop_vertical
561+ .)
562+
563+ .(
564+ ; The small line to split the box with the General Audiences texte
565+ lda #<$a001+40*121
566+ sta tmp0+0
567+ lda #>$a001+40*121
568+ sta tmp0+1
569+ ldx #21
570+loop_vertical
571+ lda #%01110000
572+ ldy #5
573+ sta (tmp0),y
574+
575+ clc
576+ lda tmp0+0
577+ adc #40
578+ sta tmp0+0
579+ lda tmp0+1
580+ adc #0
581+ sta tmp0+1
582+
583+ dex
584+ bne loop_vertical
585+ .)
586+
587+ rts
588+.)
589+
590+
591+_SequenceRating
592+.(
593+ jsr _UnpackFont
594+
595+ jsr _SetInkBlack
596+
597+ lda #<_Message_Rating
598+ ldx #>_Message_Rating
599+ jsr _DrawTextAsm
600+
601+ lda #<_Message_Rating_Bottom
602+ ldx #>_Message_Rating_Bottom
603+ sta tmp0+1
604+ jsr _DrawTextAsm
605+
606+ lda #<_ColorPaperDarkGreen
607+ ldx #>_ColorPaperDarkGreen
608+ jsr _SetPaperColor
609+ jsr _SetInkWhite
610+
611+ jsr DrawRatingBox
612+
613+ ldx #6
614+ jmp _WaitSecond
615+.)
616+
617+
618+_SequenceMartinLandau
619+ lda #<_LabelPictureMartinLandau
620+ ldx #>_LabelPictureMartinLandau
621+ jsr _FileUnpackToBuffer
622+
623+ jsr _FlipToScreen
624+
625+ jsr _UnpackFont
626+
627+ lda #<_Message_StarringMartinLandau
628+ ldx #>_Message_StarringMartinLandau
629+ jsr _DrawTextAsm
630+
631+ ldx #3
632+ jmp _WaitSecond
633+
634+
635+_SequenceSylviaAnderson
636+.(
637+ lda #0
638+ jsr _ShowPictureBlueGalaxies
639+
640+ lda #<_ColorsSylviaAnderson
641+ ldx #>_ColorsSylviaAnderson
642+ jsr _ColorsFadeInit
643+
644+ jsr _UnpackFont
645+
646+ lda #<_Message_SylviaAnderson
647+ ldx #>_Message_SylviaAnderson
648+ jmp _DrawTextAndFadeInAndOut
649+
650+ jsr _UnpackFont
651+
652+ lda #<_Message_SylviaAnderson
653+ ldx #>_Message_SylviaAnderson
654+ jsr _DrawTextAsm
655+
656+ ldx #4
657+ jmp _WaitSecond
658+.)
659+
660+
661+; a=0/1 for color set
662+_ShowPictureBlueGalaxies
663+.(
664+ pha
665+ lda #<_LabelPictureSylviaAnderson
666+ ldx #>_LabelPictureSylviaAnderson
667+ jsr _FileUnpackToBuffer
668+
669+ jsr _FlipToScreen
670+ pla
671+
672+ beq default_colors
673+ jsr SetAlternateRGB
674+ jmp end
675+default_colors
676+ jsr SetDefaultRGB
677+end
678+ ; Forces the second set of colors, reusing the previous value in tmp0
679+ lda #17
680+ sta _X
681+
682+ lda #81
683+ sta _Y
684+
685+ lda #35
686+ sta _H
687+
688+ jsr _SetColorBand
689+
690+ ; Forces the third set of colors, reusing the previous value in tmp0
691+ lda #29
692+ sta _X
693+
694+ lda #114
695+ sta _Y
696+
697+ lda #35
698+ sta _H
699+
700+ jsr _SetColorBand
701+
702+ ; Forces the fourth set of colors, reusing the previous value in tmp0
703+ lda #33
704+ sta _X
705+
706+ lda #147
707+ sta _Y
708+
709+ lda #35
710+ sta _H
711+
712+ jsr _SetColorBand
713+
714+ rts
715+.)
716+
717+
718+; a=0/1 for color set
719+_ShowPictureCrescentMoon
720+ pha
721+ lda #<_LabelPictureBarryMorse
722+ ldx #>_LabelPictureBarryMorse
723+ jsr _FileUnpackToBuffer
724+
725+ jsr _FlipToScreen
726+ pla
727+ bne SetAlternateRGB
728+ jmp SetDefaultRGB
729+
730+; a=0/1 for color set
731+_ShowPictureDoublePlanet
732+ pha
733+ lda #<_LabelPictureProducer
734+ ldx #>_LabelPictureProducer
735+ jsr _FileUnpackToBuffer
736+
737+ jsr _FlipToScreen
738+ pla
739+ bne SetAlternateRGB
740+ jmp SetDefaultRGB
741+
742+SetDefaultRGB
743+ lda #<_ColorInkDefaultRGB
744+ ldx #>_ColorInkDefaultRGB
745+ jmp _SetPaperColor
746+
747+SetAlternateRGB
748+ lda #<_ColorInkAlternateRGB
749+ ldx #>_ColorInkAlternateRGB
750+ jmp _SetPaperColor
751+
752+
753+_SequenceBarryMorse
754+ lda #0
755+ jsr _ShowPictureCrescentMoon
756+
757+ lda #<_ColorsCrescentMoon
758+ ldx #>_ColorsCrescentMoon
759+ jsr _ColorsFadeInit
760+
761+ jsr _UnpackFont
762+
763+ lda #<_Message_StarringBarryMorse
764+ ldx #>_Message_StarringBarryMorse
765+ jmp _DrawTextAndFadeInAndOut
766+
767+
768+_SequenceChema
769+ lda #1
770+ jsr _ShowPictureCrescentMoon
771+
772+ lda #<_ColorsCrescentMoon
773+ ldx #>_ColorsCrescentMoon
774+ jsr _ColorsFadeInit
775+
776+ jsr _UnpackFont
777+
778+ lda #<_Message_Chema
779+ ldx #>_Message_Chema
780+ jmp _DrawTextAndFadeInAndOut
781+
782+
783+_SequenceDbug
784+ lda #1
785+ jsr _ShowPictureDoublePlanet
786+
787+ lda #<_ColorsDoublePlanet
788+ ldx #>_ColorsDoublePlanet
789+ jsr _ColorsFadeInit
790+
791+ jsr _UnpackFont
792+
793+ lda #<_Message_Dbug
794+ ldx #>_Message_Dbug
795+ jsr _DrawTextAndFadeInAndOut
796+
797+ ldx #1
798+ jsr _WaitSecond
799+
800+ rts
801+
802+
803+
804+_SequenceGerryAnderson
805+ lda #0
806+ jsr _ShowPictureDoublePlanet
807+
808+ lda #<_ColorsDoublePlanet
809+ ldx #>_ColorsDoublePlanet
810+ jsr _ColorsFadeInit
811+
812+ jsr _UnpackFont
813+
814+ lda #<_Message_GerryAnderson
815+ ldx #>_Message_GerryAnderson
816+ jmp _DrawTextAndFadeInAndOut
817+
818+
819+_DrawTextAndFadeInAndOut
820+ jsr _DrawTextAsm
821+qsdqsd
822+ ;jmp qsdqsd
823+ jsr _ColorsFadeDo ; Blue Ink
824+ jsr _WaitTenFrames
825+ jsr _ColorsFadeDo ; Cyan Ink
826+ jsr _WaitTenFrames
827+ jsr _ColorsFadeDo ; White Ink
828+ ldx #3
829+ jsr _WaitSecond
830+ jsr _ColorsFadeDo ; Yellow Ink
831+ jsr _WaitTenFrames
832+ jsr _ColorsFadeDo ; Red Ink
833+ jsr _WaitTenFrames
834+ jsr _ColorsFadeDo ; Blue Ink
835+ jsr _WaitTenFrames
836+ jsr _ColorsFadeDo ; Black Ink
837+ jmp _BlackScreen
838+
839+_FadeInOrOut
840+ jsr _ColorsFadeDo ; Blue Ink
841+ jsr _WaitTenFrames
842+ jsr _ColorsFadeDo ; Cyan Ink
843+ jsr _WaitTenFrames
844+ jsr _ColorsFadeDo ; White Ink
845+ rts
846+
847+_SequenceTwilighte
848+ lda #1
849+ jsr _ShowPictureBlueGalaxies
850+
851+ lda #<_ColorsTwilighte
852+ ldx #>_ColorsTwilighte
853+ jsr _ColorsFadeInit
854+
855+ jsr _UnpackFont
856+
857+ lda #<_Message_Music
858+ ldx #>_Message_Music
859+ jsr _DrawTextAsm
860+
861+ lda #<_Message_Twilighte
862+ ldx #>_Message_Twilighte
863+ jmp _DrawTextAndFadeInAndOut
864+
865+
866+_SequenceEndMessage
867+ jsr _BlackScreen
868+
869+ jsr _UnpackFont
870+
871+ lda #<_Message_Title
872+ ldx #>_Message_Title
873+ jsr _DrawTextAsm
874+
875+ ldx #1
876+ jsr _WaitSecond
877+
878+ lda #<_Message_Exclusive
879+ ldx #>_Message_Exclusive
880+ jsr _DrawTextAsm
881+
882+ ldx #1
883+ jsr _WaitSecond
884+
885+ lda #<_Message_Website
886+ ldx #>_Message_Website
887+ jsr _DrawTextAsm
888+
889+ ldx #5
890+ jmp _WaitSecond
891+
892+
893+_RectangleThisEpisode .byt <_BufferUnpack,>_BufferUnpack,<$a000+(40*81)+3,>$a000+(40*81)+3,33,37
894+_RectangleSeptember .byt <_BufferUnpack+(40*37),>_BufferUnpack+(40*37),<$a000+(40*81)+3,>$a000+(40*81)+3,33,44
895+_Rectangle13th .byt <_BufferUnpack+(40*81),>_BufferUnpack+(40*81),<$a000+(40*65)+6,>$a000+(40*65)+6,28,70
896+
897+_Rectangle1999_1 .byt <_BufferUnpack+(40*81),>_BufferUnpack+(40*81),<$a000+(40*65)+3,>$a000+(40*65)+3,6,70
898+_Rectangle1999_2 .byt <_BufferUnpack+(40*81)+29,>_BufferUnpack+(40*81)+29,<$a000+(40*65)+9,>$a000+(40*65)+9,9,70
899+_Rectangle1999_3 .byt <_BufferUnpack+(40*81)+29,>_BufferUnpack+(40*81)+29,<$a000+(40*65)+18,>$a000+(40*65)+18,9,70
900+_Rectangle1999_4 .byt <_BufferUnpack+(40*81)+29,>_BufferUnpack+(40*81)+29,<$a000+(40*65)+27,>$a000+(40*65)+27,9,70
901+
902+_RectangleMoonBase .byt <_BufferUnpack+(40*89)+1,>_BufferUnpack+(40*89)+1,<$a000+(40*89)+1,>$a000+(40*89)+1,39,111
903+
904+_RectangleMoonBaseLogo .byt <_BufferUnpack,>_BufferUnpack,<$a000+(40*10)+12,>$a000+(40*10)+12,16,53
905+
906+_SequenceThisEpisode
907+ jsr _BlackScreen
908+ lda #<_LabelPictureEpisode
909+ ldx #>_LabelPictureEpisode
910+ jsr _FileUnpackToBuffer
911+ jsr _SetInkBlack
912+
913+ lda #<_RectangleThisEpisode
914+ ldx #>_RectangleThisEpisode
915+ jsr _CopyRectangle
916+
917+ jsr _SetInkYellow
918+
919+ ldx #1
920+ jsr _WaitSecond
921+
922+ jmp _SetInkBlack
923+
924+
925+_Sequence13September1999
926+ jsr _BlackScreen
927+
928+ lda #<_LabelPictureEpisode
929+ ldx #>_LabelPictureEpisode
930+ jsr _FileUnpackToBuffer
931+
932+ jsr _SetInkBlack
933+ lda #<_RectangleSeptember
934+ ldx #>_RectangleSeptember
935+ jsr _CopyRectangle
936+ jsr _SetInkYellow
937+
938+ ldx #1
939+ jsr _WaitSecond
940+
941+ jsr _SetInkBlack
942+ jsr _BlackScreen
943+ jsr _SetInkBlack
944+ lda #<_Rectangle13th
945+ ldx #>_Rectangle13th
946+ jsr _CopyRectangle
947+ jsr _SetInkYellow
948+
949+ ldx #1
950+ jsr _WaitSecond
951+
952+ jsr _SetInkBlack
953+ jsr _BlackScreen
954+ jsr _SetInkBlack
955+ lda #<_Rectangle1999_1
956+ ldx #>_Rectangle1999_1
957+ jsr _CopyRectangle
958+ lda #<_Rectangle1999_2
959+ ldx #>_Rectangle1999_2
960+ jsr _CopyRectangle
961+ lda #<_Rectangle1999_3
962+ ldx #>_Rectangle1999_3
963+ jsr _CopyRectangle
964+ lda #<_Rectangle1999_4
965+ ldx #>_Rectangle1999_4
966+ jsr _CopyRectangle
967+ jsr _SetInkYellow
968+
969+ ldx #1
970+ jsr _WaitSecond
971+
972+ jmp _SetInkBlack
973+
974+
975+_SequenceQuotes
976+ jsr _BlackScreen
977+ jsr _UnpackFont
978+
979+ ; Force all ink back
980+ lda #<_ColorInkBlack
981+ ldx #>_ColorInkBlack
982+ jsr _SetPaperColor
983+
984+ ; Display all the texts
985+ lda #<_Message_Quote1
986+ ldx #>_Message_Quote1
987+ jsr _DrawTextAsm
988+
989+ lda #<_Message_Quote2
990+ ldx #>_Message_Quote2
991+ jsr _DrawTextAsm
992+
993+ lda #<_Message_Quote3
994+ ldx #>_Message_Quote3
995+ jsr _DrawTextAsm
996+
997+ lda #<_Message_Quote4
998+ ldx #>_Message_Quote4
999+ jsr _DrawTextAsm
1000+
1001+ ; Fade in all the texts one by one
1002+ lda #<_ColorsQuote1
1003+ ldx #>_ColorsQuote1
1004+ jsr _ColorsFadeInit
1005+ jsr _FadeInOrOut
1006+
1007+ ldx #3
1008+ jsr _WaitSecond
1009+
1010+ lda #<_ColorsQuote2
1011+ ldx #>_ColorsQuote2
1012+ jsr _ColorsFadeInit
1013+ jsr _FadeInOrOut
1014+
1015+ ldx #3
1016+ jsr _WaitSecond
1017+
1018+ lda #<_ColorsQuote3
1019+ ldx #>_ColorsQuote3
1020+ jsr _ColorsFadeInit
1021+ jsr _FadeInOrOut
1022+
1023+ ldx #5
1024+ jsr _WaitSecond
1025+
1026+ lda #<_ColorsQuote4
1027+ ldx #>_ColorsQuote4
1028+ jsr _ColorsFadeInit
1029+ jsr _FadeInOrOut
1030+
1031+ ldx #2+3
1032+ jsr _WaitSecond
1033+
1034+ lda #<_ColorsQuoteAll
1035+ ldx #>_ColorsQuoteAll
1036+ jsr _ColorsFadeInit
1037+ jsr _FadeInOrOut
1038+
1039+ jmp _BlackScreen
1040+
1041+
1042+_SequenceBarbaraBain
1043+ lda #<_LabelPictureBarbaraBain
1044+ ldx #>_LabelPictureBarbaraBain
1045+ jsr _FileUnpackToBuffer
1046+
1047+ jsr _FlipToScreen
1048+
1049+ jsr SetDefaultRGB
1050+
1051+ lda #<_ColorsBarbaraBain
1052+ ldx #>_ColorsBarbaraBain
1053+ jsr _ColorsFadeInit
1054+
1055+ jsr _UnpackFont
1056+
1057+ lda #<_Message_StarringBarbaraBain
1058+ ldx #>_Message_StarringBarbaraBain
1059+ jmp _DrawTextAndFadeInAndOut
1060+
1061+
1062+
1063+/*
1064+void MoonExplodes()
1065+{
1066+ BoomColorBase=0;
1067+
1068+ // Glow
1069+ while (BoomColorBase<40)
1070+ {
1071+ memcpy(BoomColorMinus16+10+BoomColorBase,GlowColor,6);
1072+ DrawNuclearBoom();
1073+ BoomColorBase++;
1074+ }
1075+
1076+ // Deglow
1077+ while (BoomColorBase>0)
1078+ {
1079+ BoomColorBase--;
1080+ memcpy(BoomColorMinus16+10+BoomColorBase,GlowColor,6);
1081+ DrawNuclearBoom();
1082+ }
1083+}
1084+extern unsigned char GlowColor[6];
1085+extern unsigned char BoomColorMinus16[37+16];
1086+
1087+*/
1088+
1089+; x=table offset
1090+_MoonExplodeUpdateGlow
1091+ lda _GlowColor+0
1092+ sta _BoomColorMinus16+10,x
1093+ lda _GlowColor+1
1094+ sta _BoomColorMinus16+11,x
1095+ lda _GlowColor+2
1096+ sta _BoomColorMinus16+12,x
1097+ lda _GlowColor+3
1098+ sta _BoomColorMinus16+13,x
1099+ lda _GlowColor+4
1100+ sta _BoomColorMinus16+14,x
1101+ lda _GlowColor+5
1102+ sta _BoomColorMinus16+15,x
1103+
1104+ jsr _DrawNuclearBoom
1105+ rts
1106+
1107+_MoonExplodeGlow
1108+.(
1109+loop
1110+ ldx _BoomColorBase
1111+ cpx #40
1112+ beq exit
1113+ jsr _MoonExplodeUpdateGlow
1114+ inc _BoomColorBase
1115+ jmp loop
1116+exit
1117+ rts
1118+.)
1119+
1120+_MoonExplodeDeGlow
1121+.(
1122+loop
1123+ ldx _BoomColorBase
1124+ beq exit
1125+
1126+ dex
1127+ stx _BoomColorBase
1128+ jsr _MoonExplodeUpdateGlow
1129+ jmp loop
1130+exit
1131+ rts
1132+.)
1133+
1134+
1135+_SequenceMoonExplodes
1136+ jsr _BlackScreen
1137+
1138+ lda #<_LabelPictureLogo
1139+ ldx #>_LabelPictureLogo
1140+ jsr _FileUnpackToBuffer
1141+
1142+ lda #<_RectangleMoonBase
1143+ ldx #>_RectangleMoonBase
1144+ jsr _CopyRectangle
1145+
1146+ jsr _GenerateSquareTables
1147+
1148+ jsr _CreateHalfDisc
1149+ jsr _MirrorTheDisc
1150+ jsr _FilterTheDisc1
1151+ jsr _FilterTheDisc2
1152+
1153+ lda #0
1154+ sta _BoomColorBase
1155+ jsr _MoonExplodeGlow
1156+ jsr _MoonExplodeDeGlow
1157+
1158+ ;jsr _MoonExplodes
1159+ jsr _MoonScrollsDown
1160+ rts
1161+
1162+
1163+_SequenceEmergency
1164+ jsr _BlackScreen
1165+
1166+ lda #<_LabelPictureMisc
1167+ ldx #>_LabelPictureMisc
1168+ jsr _FileUnpackToBuffer
1169+
1170+ lda #<_RectangleMoonBaseLogo
1171+ ldx #>_RectangleMoonBaseLogo
1172+ jsr _CopyRectangle
1173+
1174+ lda #<_ColorPaperDarkBlue
1175+ ldx #>_ColorPaperDarkBlue
1176+ jsr _SetPaperColor
1177+
1178+ lda #<_ColorInkCyan
1179+ ldx #>_ColorInkCyan
1180+ jsr _SetInkColor
1181+
1182+ jsr _UnpackFont
1183+
1184+ lda #<_Message_EmergencyRedAlert
1185+ ldx #>_Message_EmergencyRedAlert
1186+
1187+ jsr _DrawTextAsm
1188+
1189+ lda #<_ColorInkCyan
1190+ ldx #>_ColorInkCyan
1191+ jsr _SetInkColor
1192+
1193+ ldx #1
1194+ jsr _WaitSecond
1195+
1196+ lda #<_ColorInkOrange
1197+ ldx #>_ColorInkOrange
1198+ jsr _SetInkColor
1199+
1200+ ldx #1
1201+ jsr _WaitSecond
1202+
1203+ lda #<_ColorInkCyan
1204+ ldx #>_ColorInkCyan
1205+ jsr _SetInkColor
1206+
1207+ ldx #1
1208+ jsr _WaitSecond
1209+
1210+ lda #<_ColorInkOrange
1211+ ldx #>_ColorInkOrange
1212+ jsr _SetInkColor
1213+
1214+ ldx #1
1215+ jsr _WaitSecond
1216+
1217+ jsr _BlackScreen
1218+ ;ldx #15
1219+ ;jsr _WaitSecond
1220+ rts
1221+
1222+
1223+
\ No newline at end of file
--- public/oric/games/Space 1999/Sources/trailer/sound.s (nonexistent)
+++ public/oric/games/Space 1999/Sources/trailer/sound.s (revision 365)
@@ -0,0 +1,1890 @@
1+
2+; Space1999 Music & SFX (All Code and Data)
3+
4+; Sound routines & data come after the game frame (frame.s), as specified in
5+; osdk_config.bat. It is automatically added to the .bss section in the correct
6+; addresses.
7+; This file is also #included when compiling overlay data and generating the
8+; game disk.
9+
10+;System Defines
11+#define sys_IRQJump $0244
12+#define sys_IRQVectorLo $0245
13+#define sys_IRQVectorHi $0246
14+;Music Defines
15+#define pcr_Disabled $DD
16+#define pcr_Register $FF
17+#define pcr_Value $FD
18+
19+#define via_portb $0300
20+#define via_t1cl $0304
21+#define via_pcr $030C
22+#define via_porta $030F
23+;Effect Defines
24+#define NoteC 0
25+#define NoteD 2
26+#define NoteE 4
27+#define NoteF 5
28+#define NoteG 7
29+#define NoteA 9
30+#define NoteB 11
31+
32+#define hEffectD 0
33+#define hEffectE 4
34+#define hEffectF 8
35+#define hEffectG 12
36+#define hEffectH 16
37+#define hEffectI 20
38+#define hEffectJ 24
39+#define hEffectK 28
40+#define hEffectL 32
41+#define hEffectM 36
42+#define hEffectN 40
43+#define hEffectO 44
44+#define hEffectP 48
45+#define hEffectQ 52
46+#define hEffectR 56
47+#define hEffectS 60
48+#define hEffectT 64
49+#define hEffectU 68
50+#define hEffectV 72
51+
52+#define EG20 1
53+#define EG09 2
54+#define EG02 3
55+;Missing DEC/INC Period and Noise
56+#define efx_End 0
57+#define efx_ToneOn 1
58+#define efx_ToneOff 2
59+#define efx_NoiseOn 3
60+#define efx_NoiseOff 4
61+#define efx_EnvelopeOn 5
62+#define efx_EnvelopeOff 6
63+#define efx_SetAbsoluteMode 7
64+#define efx_IncPitch 8
65+#define efx_DecPitch 40
66+#define efx_IncNote 72
67+#define efx_DecNote 104
68+#define efx_SetNoiseRandom 136
69+#define efx_IncVolume 137
70+#define efx_DecVolume 138
71+#define efx_SkipZeroVolume 139
72+#define efx_SkipZeroCount 140
73+#define efx_Volume 141
74+#define efx_SetEnvTriangle 157
75+#define efx_SetEnvSawtooth 158
76+#define efx_FilterFrequency 159
77+#define efx_LoopRow 163
78+#define efx_SetCounter 185
79+#define efx_Pause 205
80+#define efx_SkipZeroPitch 255
81+
82+
83+ .zero
84+;*=$00
85+;Music ZP Starts here..
86+irq_source .dsb 2
87+MusicTempoCount .dsb 1 ;Effect Tempo fixed at 100hz
88+PatternNotePeriod .dsb 3
89+irqTemp02 .dsb 1
90+irqTemp03 .dsb 1
91+irqTemp04 .dsb 1
92+;Effect ZP starts here..
93+EffectSource .dsb 2
94+EffectTemp01 .dsb 1
95+EffectTemp02 .dsb 1
96+
97+irq_A .byt 0
98+irq_X .byt 0
99+irq_Y .byt 0
100+_FrameCounter .byt 0
101+_TimerCounter .byt 40 ;Slows key read to 25Hz
102+
103+
104+.text
105+
106+irqsav .dsb 2
107+
108+
109+
110+_PlayMainTune
111+ lda #%10000000
112+ jmp PlayAudio
113+
114+_StopMusic
115+ lda #0
116+ jmp PlayAudio
117+
118+
119+_restore_irq
120+ sei
121+ lda irqsav
122+ ;sta $0245
123+ sta $fffe
124+ lda irqsav+1
125+ ;sta $0246
126+ sta $ffff
127+ cli
128+ rts
129+
130+_init_irq_routine
131+ ;Since we are starting from when the standard irq has already been
132+ ;setup, we need not worry about ensuring one irq event and/or right
133+ ;timer period, only redirecting irq vector to our own irq handler.
134+ sei
135+ ;lda $0245
136+ lda $fffe
137+ sta irqsav
138+ lda #<irq_routine
139+ ;sta $0245 ;When we disable rom, we should change this to $fffe
140+ sta $fffe
141+ ;lda $0246
142+ lda $ffff
143+ sta irqsav+1
144+ lda #>irq_routine
145+ ;sta $0246 ;When we disable rom, we should change this to $ffff
146+ sta $ffff
147+
148+ ;Turn off music and sfx
149+ lda #128
150+ sta MusicStatus
151+ ;sta EffectNumber
152+ ;sta EffectNumber+1
153+ ;sta EffectNumber+2
154+
155+ cli
156+ rts
157+
158+;The IRQ routine will run (Like Oric) at 100Hz.
159+irq_routine
160+ sei
161+ ;Preserve registers
162+ sta irq_A
163+ stx irq_X
164+ sty irq_Y
165+
166+ ;Protect against Decimal mode
167+ cld
168+
169+ ;Clear IRQ event
170+ lda via_t1cl
171+
172+ ;Process Music
173+ jsr ProcMusic
174+
175+ ;Process timer event
176+ dec _TimerCounter
177+
178+ ;Restore Registers
179+ lda irq_A
180+ ldx irq_X
181+ ldy irq_Y
182+
183+ ;End of IRQ
184+ cli
185+ rti
186+
187+diskcntrl .byt $86
188+
189+_switch_eprom
190+ lda $0314
191+ and #%01111101
192+ sta $0314
193+ rts
194+
195+_switch_ovl
196+ php
197+ pha
198+ sei
199+ lda diskcntrl
200+ eor #2
201+ sta diskcntrl
202+ sta $0314
203+ pla
204+ plp
205+ rts
206+
207+
208+/*
209+_reboot_oric
210+.(
211+ lda $0314
212+ and #%01111101
213+ sta $0314
214+
215+ ldx #0
216+ txs
217+
218+ jmp $eb7e
219+
220+.)
221+*/
222+
223+
224+; X=Number of seconds
225+_WaitSecond
226+.(
227+loop
228+ lda #100
229+ sta _TimerCounter
230+wait
231+ lda _TimerCounter
232+ bne wait
233+ dex
234+ bne loop
235+ rts
236+.)
237+
238+
239+_WaitTenFrames
240+ ldx #10
241+ jmp _WaitFrames
242+_WaitOneFrame
243+ ldx #1
244+_WaitFrames ; X=Number of frames
245+.(
246+ stx _TimerCounter
247+wait
248+ lda _TimerCounter
249+ bne wait
250+ rts
251+.)
252+
253+
254+
255+
256+;>>>> Call here
257+;Load Accumulator with the following Bits before calling PlayAudio
258+;Bit 0-1 Forms value 0-3
259+; 0 Assign Music to Track specified in Data
260+; 1 Assign Effect specified in Data to Channel A
261+; 2 Assign Effect specified in Data to Channel B
262+; 3 Assign Effect specified in Data to Channel C
263+;Bit 2-6 Forms value 0-31
264+; 0-31 Data
265+;Bit 7-7 Forms value 0-1
266+; 0 Stop Effect on specified Channel or Track
267+; 1 Start Effect on specified Channel or Track
268+PlayAudio
269+ sta paTemp01
270+ and #03
271+ beq ControlMusic
272+
273+#ifdef 0
274+ tax
275+ lda paTemp01
276+ lsr
277+ lsr
278+ cmp #32
279+ and #31
280+ bcc StopEffect
281+StartEffect
282+ ;
283+ tay
284+ lda Channel_SFX_NoteHeaders,y
285+ dex
286+ sta EffectNote,x
287+ sty EffectTemp02
288+ jsr CalcAndStorePitch
289+ ldy EffectTemp02
290+ lda Channel_SFX_EffectAndEGHeaders,y ;0-1 EG / 2-6 Effect
291+ lsr
292+ lsr
293+ sta EffectNumber,x
294+ lda #00
295+ sta EffectIndex,x
296+ sta FilterIndex,x
297+ ;Disable Sample and Ornaments on this channel
298+ lda #128
299+ sta SampleProperty,x
300+ sta OrnamentProperty,x
301+
302+ lda Channel_SFX_EffectAndEGHeaders,y
303+ and #03
304+.(
305+ beq skip1 ;No EG Setting
306+ tay
307+ lda EGValue-1,y
308+ sta AY_EGPeriodLo
309+skip1 rts
310+.)
311+StopEffect
312+ lda #128
313+ sta EffectNumber-1,x
314+ lda #00
315+ sta AY_Volume-1,x
316+ rts
317+#endif
318+ControlMusic
319+ ;Data holds index
320+ lda paTemp01
321+ lsr
322+ lsr
323+ and #31
324+ tax
325+ lda paTemp01
326+.(
327+ bpl StopMusic
328+ sei
329+ sta TrackLoop ;Default Loop Off
330+ ldy EventStart,x
331+ sty EventIndex
332+ lda TrackProperty,x ;B7==Loop B0-4==Music Tempo
333+ bpl skip1
334+ sty TrackLoop
335+skip1
336+ and #63
337+ STA MusicTempoCount
338+ sta MusicTempoReference
339+ lda EventEnd,x
340+ sta EndEvent
341+ lda TrackChannels,x
342+ sta TracksChannelsUsed
343+
344+ ;Enable all channels
345+ lda #%01111000
346+ sta AY_Status
347+
348+ ;And start music
349+ lda #00
350+ sta MusicStatus
351+ jsr ProcEvents
352+ ldx #2
353+loop1
354+ jsr ProcPattern
355+ dex
356+ bpl loop1
357+ cli
358+ rts
359+
360+StopMusic
361+.)
362+ lda #128
363+ sta MusicStatus
364+ ;Silence channels that the music used
365+ ldx #02
366+.(
367+loop1
368+ lda #128
369+ sta SampleProperty,X
370+ sta OrnamentProperty,X
371+ lsr TracksChannelsUsed
372+ bcc skip1
373+ lda #00
374+ sta AY_Volume,x
375+skip1 dex
376+ bpl loop1
377+.)
378+ rts
379+
380+;*********** Music Routines start here ******************
381+
382+MaximumVolume
383+ .byt 0 ;0(Loud)-15(Mute)
384+
385+ProcMusic
386+ dec MusicTempoCount
387+.(
388+ bne skip4 ;28DA
389+ lda MusicTempoReference
390+ sta MusicTempoCount
391+ lda MusicStatus
392+ bmi SendAY ;28F7
393+skip1
394+ ldx #2 ;Process Delays
395+loop2 ;Add Pattern Rest Check
396+ lda PatternRest,x
397+ bmi skip2
398+ dec PatternNotePeriod,x
399+ bne skip2 ;28C7
400+ jsr ProcPattern
401+ lda MusicStatus
402+ bne skip3 ;28CA
403+skip2 dex
404+ bpl loop2 ;28BB
405+
406+skip3
407+ lda MusicStatus
408+ lsr
409+ bcc skip4 ;28DA
410+ asl
411+ sta MusicStatus
412+ jsr ProcEvents ;ProcEvents
413+ jmp skip1
414+skip4
415+ ldx #$02
416+loop3
417+ lda SampleProperty,X
418+ bmi skip5 ;28EC
419+ jsr ProcSample ;ProcSample
420+skip5
421+ lda OrnamentProperty,X
422+ bmi skip6 ;28F4
423+ jsr ProcOrnament ;Process Ornaments
424+skip6
425+ dex
426+ bpl loop3 ;28E4
427+.)
428+
429+
430+ControlMaximumVolume
431+ ldx #02
432+.(
433+loop1 lda ReferenceBank+8,x
434+ cmp RegisterBank+8,x
435+ beq skip2
436+ lda AY_Volume,x
437+ sec
438+ sbc MaximumVolume
439+ bcs skip1
440+ lda #00
441+skip1 sta AY_Volume,x
442+skip2 dex
443+ bpl loop1
444+.)
445+
446+;Expand SendAY
447+; 1)include EG
448+; 2)Pitch Registers are indexed
449+; 3)Reference Bank avoids sending same value twice
450+SendAY ldy #$0D
451+.(
452+loop1
453+ ldx RegisterPointer,y
454+ lda RegisterBank,x
455+ cmp ReferenceBank,x
456+ beq skip1
457+ sta ReferenceBank,x
458+ sty via_porta
459+ ldx #pcr_Register
460+ stx via_pcr
461+ ldx #pcr_Disabled
462+ stx via_pcr
463+ sta via_porta
464+ lda #pcr_Value
465+ sta via_pcr
466+ stx via_pcr
467+skip1
468+ dey
469+ bpl loop1
470+.)
471+
472+ rts
473+
474+ProcPattern
475+ LDA RuntimePatternBaseLo,X
476+ STA irq_source
477+ LDA RuntimePatternBaseHi,X
478+ STA irq_source+1
479+ LDY RuntimePatternIndex,X
480+ LDA (irq_source),Y
481+ PHP
482+ AND #127
483+ CMP #126
484+
485+ BCS mskip1 ; 2968
486+ ADC RuntimePatternNoteOffset,X ;Note Offset
487+ STA RuntimeNote,X
488+ LDA #0
489+ STA SampleIndex,x
490+ STA OrnamentIndex,x
491+ INY
492+ LDA (irq_source),Y
493+ LSR
494+ LSR
495+ LSR
496+ LSR
497+ STA OrnamentProperty,X ;Ornament Number
498+ LDA (irq_source),Y
499+ AND #$0F
500+ PLP
501+ BPL mskip2 ;295B
502+ STA AY_Volume,X
503+ LDA #$80
504+mskip2 STA SampleProperty,X
505+ LDA #$01
506+Routine2960
507+ STA PatternNotePeriod,X
508+ INY
509+Routine2963
510+ TYA
511+ STA RuntimePatternIndex,X
512+ RTS
513+mskip1
514+ BNE mskip3 ; 2971
515+ PLP
516+ INY
517+ LDA (irq_source),Y
518+ JMP Routine2960
519+mskip3
520+
521+ PLP
522+ LDA #$01
523+ STA PatternNotePeriod,X
524+ LDA MusicStatus
525+ ORA #$01
526+ STA MusicStatus
527+ JMP Routine2963
528+
529+ProcOrnament ;Ornament
530+ ;A is Ornament Number
531+ tay
532+ lda OrnamentAddressTableLo,y
533+ sta irq_source
534+ lda OrnamentAddressTableHi,y
535+ sta irq_source+1
536+mloop10 LDY OrnamentIndex,x
537+ LDA (irq_source),Y
538+ BEQ Routine29C7
539+ cmp #03 ;$03 is flag to loop to start
540+ bne mskip10
541+ lda #00
542+ sta OrnamentIndex,X
543+ jmp mloop10
544+mskip10 LSR
545+ BCS Routine29D7
546+ LSR
547+ BCS Routine29AA
548+ ;Note?
549+ ADC RuntimeNote,X
550+ JMP Routine29B1
551+Routine29AA
552+ STA irqTemp02
553+ LDA RuntimeNote,X
554+ SBC irqTemp02
555+Routine29B1
556+ JSR Routine2AE2
557+ ;Resultant pitch in A(Lo) and irq_source(Hi)
558+ sta AY_PitchLo,x
559+ lda irq_source
560+ sta AY_PitchHi,x
561+Routine29B9
562+ INY
563+ TYA
564+ STA OrnamentIndex,X
565+ RTS
566+Routine29C7
567+ CPY #$00
568+ BNE Routine29D1
569+ LDA RuntimeNote,X
570+ JSR Routine29B1
571+Routine29D1
572+ LDA #$80
573+ STA OrnamentProperty,X
574+ RTS
575+Routine29D7 ;Pitch
576+ LSR
577+ PHP
578+ STA irqTemp04
579+ LDA RuntimeNote,X
580+ JSR Routine2AE2
581+ PLP
582+ BCS Routine29F0
583+ ADC irqTemp04
584+ sta AY_PitchLo,x
585+ LDA irq_source
586+ ADC #$00
587+ sta AY_PitchHi,x
588+ JMP Routine29B9
589+Routine29F0
590+ SBC irqTemp04
591+ sta AY_PitchLo,x
592+ LDA irq_source
593+ SBC #$00
594+ sta AY_PitchHi,x
595+ JMP Routine29B9
596+
597+ProcSample ;Sample (A==SampleNum?)
598+ tay
599+ lda SampleAddressTableLo,y
600+ sta irq_source
601+ lda SampleAddressTableHi,y
602+ sta irq_source+1
603+ LDY SampleIndex,X
604+ LDA (irq_source),Y
605+ BEQ Routine2A55
606+ PHA
607+ AND #$0F
608+ STA AY_Volume,X
609+ PLA
610+ LSR
611+ LSR
612+ LSR
613+ AND #$1E
614+ STA AY_Noise
615+ BEQ Routine2A46
616+ JSR Routine2A5B
617+ EOR #$FF
618+ AND AY_Status
619+ JMP Routine2A4C
620+Routine2A46
621+ JSR Routine2A5B
622+ ORA AY_Status
623+Routine2A4C
624+ STA AY_Status
625+ INY
626+ TYA
627+ STA SampleIndex,X
628+ RTS
629+Routine2A55
630+ LDA #$80
631+ STA SampleProperty,X
632+ RTS
633+Routine2A5B
634+ LDA #$04
635+ STX irqTemp02
636+Routine2A5F
637+ ASL
638+ DEX
639+ BPL Routine2A5F
640+ LDX irqTemp02
641+ RTS
642+
643+ProcEvents
644+ LDX #$02
645+ LDA #$00
646+Routine2A6A
647+ STA RuntimePatternIndex,X
648+ DEX
649+ BPL Routine2A6A
650+; DEC EventRowRepeats
651+; BMI Routine2A76
652+; RTS
653+Routine2A76
654+ LDX EventIndex
655+ LDA Event_A_Pats,X
656+ sta PatternRest
657+ AND #$1F
658+ TAY
659+ LDA Table33A4,Y
660+ STA RuntimePatternBaseLo
661+ LDA Table33AC,Y
662+ STA RuntimePatternBaseHi
663+ LDA Event_A_NOFS,X
664+ AND #$7F
665+ STA RuntimePatternNoteOffset
666+
667+ LDA Event_B_Pats,X
668+ sta PatternRest+1
669+ AND #$1F
670+ TAY
671+ LDA Table33B4,Y
672+ STA RuntimePatternBaseLo+1
673+ LDA Table33BC,Y
674+ STA RuntimePatternBaseHi+1
675+ LDA Event_B_NOFS,X
676+ AND #$7F
677+ STA RuntimePatternNoteOffset+1
678+
679+ LDA Event_C_Pats,X
680+ sta PatternRest+2
681+ AND #$1F
682+ TAY
683+ LDA Table33C4,Y
684+ STA RuntimePatternBaseLo+2
685+ LDA Table33CC,Y
686+ STA RuntimePatternBaseHi+2
687+ LDA Event_C_NOFS,X
688+ AND #$7F
689+ STA RuntimePatternNoteOffset+2
690+ INX
691+ CPX EndEvent ;#$0B
692+ BCC Routine2ADE
693+ ;Handle Looping
694+ lda TrackLoop
695+ nop
696+ bmi mskip99
697+ sta EventIndex
698+ rts
699+
700+mskip99 LDA MusicStatus
701+ ORA #$80
702+ STA MusicStatus
703+Routine2ADE
704+ STX EventIndex
705+ RTS
706+Routine2AE2
707+ STX irqTemp02
708+ LDX #$FF
709+ SEC
710+ SBC #$40
711+ BCC Routine2B0B
712+Routine2AEB
713+ INX
714+ SBC #$0C
715+ BCS Routine2AEB
716+ STX irqTemp03
717+ ADC #$0C
718+ TAX
719+ LDA BasePitchHi,X
720+ STA irq_source
721+ LDA BasePitchLo,X
722+ LDX irqTemp03
723+ BEQ Routine2B07
724+Routine2B01
725+ LSR irq_source
726+ ROR
727+ DEX
728+ BNE Routine2B01
729+Routine2B07
730+ LDX irqTemp02
731+ CLC
732+ RTS
733+Routine2B0B
734+ LDA #$00
735+ STA irq_source
736+ LDX irqTemp02
737+ RTS
738+
739+;******************* Effect Code Starts here ************************
740+#ifdef 0
741+ProcEffect
742+ ldx #02
743+.(
744+loop3 ldy EffectNumber,x
745+ bmi skip2
746+ lda PauseDelay,x
747+ beq skip3
748+ dec PauseDelay,x
749+ jmp skip2
750+
751+skip3 lda EffectBaseAddressLo,y
752+ sta EffectSource
753+ lda EffectBaseAddressHi,y
754+ sta EffectSource+1
755+loop2 ldy EffectIndex,x
756+ lda (EffectSource),y
757+ ldy #24
758+loop1 cmp EffectCodeThreshhold,y
759+ bcs skip1
760+ dey
761+ bpl loop1
762+skip1 sbc EffectCodeThreshhold,y
763+ pha
764+ lda EffectCodeVectorLo,y
765+ sta vector1+1
766+ lda EffectCodeVectorHi,y
767+ sta vector1+2
768+ pla
769+ clc
770+vector1 jsr $dead
771+ inc EffectIndex,x
772+ bcs skip2
773+ jmp loop2
774+skip2 dex
775+ bpl loop3
776+.)
777+ ;Now Process Effect Pitch
778+ ldx #02
779+.(
780+loop1 ldy FilterIndex,x
781+ beq skip3
782+ lda EffectPitchLo,x
783+ and FilterMask-1,y
784+ sta AY_PitchLo,x
785+ lda #00
786+ sta AY_PitchHi,x
787+ jmp skip1
788+ ;Store Pitch
789+skip3 lda EffectPitchLo,x
790+ sta AY_PitchLo,x
791+ lda EffectPitchHi,x
792+ sta AY_PitchHi,x
793+skip1 dex
794+ bpl loop1
795+.)
796+ rts
797+
798+efxc_End ;00 000(1)
799+ lda #128
800+ sta EffectNumber,x
801+ sec ;Wait indefinately
802+ rts
803+efxc_ToneOn ;01 001(1)
804+ lda AY_Status
805+ and ToneMask,x
806+ sta AY_Status
807+ rts
808+efxc_ToneOff ;02 002(1)
809+ lda AY_Status
810+ ora ToneBit,x
811+ sta AY_Status
812+ rts
813+efxc_NoiseOn ;03 003(1)
814+ lda AY_Status
815+ and NoiseMask,x
816+ sta AY_Status
817+ rts
818+efxc_NoiseOff ;04 004(1)
819+ lda AY_Status
820+ ora NoiseBit,x
821+ sta AY_Status
822+ rts
823+efxc_EnvelopeOn ;05 005(1)
824+ lda AY_Volume,x
825+ ora #16
826+ sta AY_Volume,x
827+ rts
828+efxc_EnvelopeOff ;06 006(1)
829+ lda AY_Volume,x
830+ and #15
831+ sta AY_Volume,x
832+ rts
833+efxc_SetAbsoluteMode ;07 007(1)
834+ lda #01
835+ sta AbsoluteMode,x
836+ rts
837+efxc_SetNoiseRandom
838+ jsr getrand2
839+ and #31
840+ sta AY_Noise
841+ rts
842+efxc_IncVolume ;13 137(1)
843+ inc AY_Volume,x
844+ rts
845+efxc_DecVolume ;14 138(1)
846+ dec AY_Volume,x
847+ rts
848+efxc_Volume ;17 141(16)
849+ sta AY_Volume,x
850+ rts
851+efxc_SetEnvTriangle ;18 157(1)
852+ lda #10
853+ sta AY_EGCycle
854+ rts
855+efxc_SetEnvSawtooth ;19 158(1)
856+ lda #12
857+ sta AY_EGCycle
858+ rts
859+efxc_SetCounter ;22 185(20)
860+ sta EffectCounter,x
861+ rts
862+efxc_Pause ;23 205(50)
863+ sta PauseDelay,x
864+ sec ;Wait on Pause
865+ rts
866+efxc_IncPitch ;08 008(32)
867+ sta PitchOffset
868+ ;Inc Pitch Relative
869+ lda EffectPitchLo,x
870+ clc
871+ adc PitchOffset
872+ sta TempPitchLo
873+ lda EffectPitchHi,x
874+ adc #00
875+ and #15
876+ sta TempPitchHi
877+ jmp efxc_PitchSort
878+
879+
880+efxc_DecPitch ;09 040(32)
881+ sta PitchOffset
882+ ;Inc Pitch Relative
883+ lda EffectPitchLo,x
884+ sec
885+ sbc PitchOffset
886+ sta TempPitchLo
887+ lda EffectPitchHi,x
888+ sbc #00
889+ and #15
890+ sta TempPitchHi
891+efxc_PitchSort
892+ ;Support Relative & Absolute Modes
893+ ldy AbsoluteMode,x
894+.(
895+ beq skip1
896+ lda TempPitchLo
897+ sta EffectPitchLo,x
898+ lda TempPitchHi
899+ sta EffectPitchHi,x
900+
901+skip1
902+.)
903+ clc
904+ rts
905+
906+
907+efxc_IncNote ;10 072(32)
908+ sta NoteOffset
909+ ;Inc Note Relative
910+ lda EffectNote,x
911+ clc
912+ adc NoteOffset
913+ ;Support Relative & Absolute Modes
914+ ldy AbsoluteMode,x
915+.(
916+ beq skip1
917+ sta EffectNote,x
918+skip1 jmp CalcAndStorePitch ;Store also to EffectPitchLo and Hi
919+.)
920+
921+efxc_DecNote ;11 104(32)
922+ sta NoteOffset
923+ ;Dec Note Relative
924+ lda EffectNote,x
925+ sec
926+ sbc NoteOffset
927+ ;Support Relative & Absolute Modes
928+ ldy AbsoluteMode,x
929+.(
930+ beq skip1
931+ sta EffectNote,x
932+skip1 jmp CalcAndStorePitch
933+.)
934+
935+efxc_SkipZeroPitch
936+ ldy #00
937+ lda AY_PitchLo,x
938+ jmp SkipZeroCountRent
939+efxc_SkipZeroVolume ;15 139(1)
940+ lda AY_Volume,x
941+ ldy #00
942+ and #15
943+ jmp SkipZeroCountRent
944+efxc_SkipZeroCount ;16 140(1)
945+ ldy #00
946+ lda EffectCounter,x
947+SkipZeroCountRent
948+.(
949+ bne skip1
950+ ldy #01
951+skip1 tya
952+.)
953+ sta SkipLoopFlag,x
954+ rts
955+efxc_LoopRow ;21 163(22)
956+ sta EffectTemp01
957+ ;Count counter
958+ lda EffectCounter,x
959+.(
960+ beq skip2
961+ dec EffectCounter,x
962+skip2 lda SkipLoopFlag,x
963+ bne skip1
964+ lda EffectIndex,x
965+ sec
966+ sbc EffectTemp01
967+ sta EffectIndex,x
968+ dec EffectIndex,x
969+ ;On a loop, disable any transient sample/ornament flags
970+ lda #128
971+ sta SampleProperty,x
972+ sta OrnamentProperty,x
973+ clc
974+skip1 lda #00
975+ sta SkipLoopFlag,x
976+ rts
977+.)
978+
979+efxc_FilterFrequency ;20 159(4)
980+ ;Need to check original code (possibly latest)
981+ sta FilterIndex,x
982+ rts
983+
984+random2 .word $3611
985+temprand .byt $00
986+getrand2
987+ lda random2+1
988+ sta temprand
989+ lda random2
990+ asl
991+ rol temprand
992+ asl
993+ rol temprand
994+
995+ clc
996+ adc random2
997+ pha
998+ lda temprand
999+ adc random2+1
1000+ sta random2+1
1001+ pla
1002+ adc #$11
1003+ sta random2
1004+ lda random2+1
1005+ adc #$36
1006+ sta random2+1
1007+ rts
1008+
1009+CalcAndStorePitch ;Store also to EffectPitchLo and Hi
1010+ ;Note in "A" - Use Routine2AEB (Sonix routine)
1011+ ldy #255
1012+.(
1013+loop1 iny
1014+ sbc #$0C
1015+ bcs loop1
1016+ sty irqTemp03
1017+ adc #$0C
1018+ tay
1019+ lda BasePitchHi,y
1020+ sta irq_source
1021+ lda BasePitchLo,y
1022+ ldy irqTemp03
1023+ beq skip1
1024+loop2 lsr irq_source
1025+ ror
1026+ dey
1027+ bne loop2
1028+skip1 ;A==Low irq_source==High
1029+.)
1030+ sta EffectPitchLo,x
1031+ lda irq_source
1032+ sta EffectPitchHi,x
1033+ rts
1034+
1035+#endif
1036+
1037+;**** Generic Routine Tables and Variables go here *****
1038+paTemp01 .byt 0
1039+EventStart
1040+ .byt 0 ;Title Tune (Start Event 0) (ABC)
1041+ .byt 10 ;Reggae Track (AB)
1042+ .byt 11 ;Repeating Drum Pattern (A)
1043+ .byt 12 ;Pool Music (AB)
1044+ .byt 13 ;Hifi Music (AB)
1045+EventEnd
1046+ .byt 10 ;Title Tune (End on Event 10)
1047+ .byt 11
1048+ .byt 12
1049+ .byt 13
1050+ .byt 14
1051+TrackProperty
1052+ .byt 128+13 ;Title Tune (Loop and tempo 13)
1053+ .byt 128+16
1054+ .byt 128+14
1055+ .byt 128+30
1056+ .byt 128+12
1057+TrackChannels
1058+ .byt 1+2+4
1059+ .byt 2+4
1060+ .byt 4
1061+ .byt 2+4
1062+ .byt 2+4
1063+TracksChannelsUsed
1064+ .byt 0
1065+
1066+;************** Music Data Starts Here *****************
1067+
1068+PatternRest
1069+ .byt 0,0,0
1070+Event_A_Pats ;Event A Patterns
1071+ ; 00 01 02 03 04 05 06 07 08 09 10 11 12 13
1072+ .byt $00,$01,$02,$03,$04,$05,$06,$03,$04,$07,$04,$04,$06,$03
1073+Event_A_NOFS ;Event A Note Offsets
1074+ .byt $40,$34,$34,$34,$34,$34,$34,$34,$34,$34,$34,$34,$34,$34
1075+Event_B_Pats ;Event B Patterns
1076+ .byt $00,$01,$02,$03,$04,$05,$06,$03,$04,$07,$03,$80,$04,$04 ;$80 is pattern rest
1077+Event_B_NOFS ;Event B Note Offsets
1078+ .byt $40,$34,$34,$34,$34,$34,$34,$34,$34,$34,$34,$34,$34,$34
1079+Event_C_Pats ;Event C Patterns
1080+ .byt $00,$01,$02,$03,$04,$05,$06,$03,$04,$07,$80,$80,$80,$80
1081+Event_C_NOFS ;Event C Note Offsets
1082+ .byt $40,$40,$34,$34,$34,$34,$34,$34,$34,$34,$34,$34,$34,$34
1083+
1084+;Pattern Memory
1085+Pattern2B60
1086+ .byt $39,$0,$FE,$3,$3F,$0,$FE,$3,$3E,$0,$FE,$7,$BE,$0,$FE,$3,$38,$0
1087+ .byt $FE,$1,$3A,$0,$BA,$0,$3C,$0,$FE,$9,$BC,$0,$FE,$1,$37,$0,$FE,$B
1088+ .byt $3C,$0,$FE,$2,$BC,$0,$3C,$0,$FE,$1,$BC,$0,$FE,$4,$F8,$0,$FE,$4,$FF
1089+Pattern2B97
1090+ .byt $30,$0,$FE,$1,$B0,$0,$FE,$1,$30,$0,$FE,$1,$B0,$0,$FE,$1,$2E,$0
1091+ .byt $FE,$1,$AE,$0,$FE,$1,$2E,$0,$FE,$1,$AE,$0,$FE,$1,$2D,$0,$FE,$1
1092+ .byt $AD,$0,$FE,$1,$2D,$0,$FE,$1,$AD,$0,$FE,$1,$2C,$0,$FE,$1,$AC,$0
1093+ .byt $FE,$1,$2C,$0,$FE,$1,$AC,$0,$FE,$1,$2B,$0,$FE,$C,$AB,$0,$FE,$5
1094+ .byt $37,$0,$43,$0,$37,$0,$43,$0,$37,$0,$43,$0,$37,$0,$43,$0,$37,$0
1095+ .byt $43,$0,$37,$0,$43,$0,$37,$0,$FF
1096+Pattern2BFA
1097+ .byt $FE,$3,$29,$11,$29,$11,$A9,$0,$29,$11,$FE,$1,$29,$11,$A9,$0,$FE,$9
1098+ .byt $29,$11,$29,$11,$A9,$0,$29,$11,$FE,$1,$29,$11,$FE,$1,$A9,$0,$FE,$9
1099+ .byt $29,$11,$A9,$0,$FE,$2,$29,$11,$A9,$0,$FE,$16,$FF
1100+Pattern2C2B
1101+ .byt $41,$22,$C1,$0,$79,$3,$30,$14,$3C,$14,$FE,$1,$30,$14,$B0,$0,$30
1102+ .byt $14,$B0,$0,$79,$3,$30,$14,$3C,$14,$FE,$1,$30,$14,$B0,$0,$30,$14
1103+ .byt $B0,$0,$79,$3,$30,$14,$3C,$14,$BC,$0,$30,$14,$B0,$0,$30,$14,$B0
1104+ .byt $0,$30,$14,$B0,$0,$41,$22,$C1,$0,$30,$14,$30,$14,$41,$22,$C1,$0
1105+ .byt $79,$3,$30,$14,$3C,$14,$FE,$1,$30,$14,$B0,$0,$30,$14,$B0,$0,$79
1106+ .byt $3,$30,$14,$3C,$14,$FE,$1,$30,$14,$B0,$0,$41,$22,$C1,$0,$78,$3
1107+ .byt $F8,$0,$78,$2,$F8,$0,$78,$3,$30,$14,$78,$2,$F8,$0,$FE,$2,$48,$0
1108+ .byt $4B,$0,$4F,$0,$C3,$0,$FF
1109+Pattern2CAA
1110+ .byt $41,$22,$C1,$0,$79,$3,$30,$14,$3C,$14,$FE,$1,$30,$14,$B0,$0,$30
1111+ .byt $14,$B0,$0,$79,$3,$30,$14,$3C,$14,$FE,$1,$30,$14,$B0,$0,$30,$14
1112+ .byt $B0,$0,$79,$3,$30,$14,$3C,$14,$BC,$0,$30,$14,$B0,$0,$30,$14,$B0
1113+ .byt $0,$30,$14,$B0,$0,$41,$22,$C1,$0,$30,$14,$30,$14,$41,$22,$C1,$0
1114+ .byt $79,$3,$30,$14,$3C,$14,$FE,$1,$30,$14,$B0,$0,$30,$14,$B0,$0,$79
1115+ .byt $3,$30,$14,$3C,$14,$FE,$1,$30,$14,$B0,$0,$30,$14,$B0,$0,$79,$3
1116+ .byt $30,$14,$3C,$14,$BC,$0,$30,$14,$B0,$0,$30,$14,$B0,$0,$30,$14,$B0
1117+ .byt $0,$41,$22,$C1,$0,$30,$14,$B0,$0,$FF
1118+Pattern2D2B
1119+ .byt $2B,$11,$FE,$F,$2B,$11,$FE,$F,$41,$22,$C1,$0,$79,$3,$30,$14,$3C
1120+ .byt $14,$FE,$1,$30,$14,$B0,$0,$30,$14,$B0,$0,$79,$3,$30,$14,$3C,$14
1121+ .byt $FE,$1,$30,$14,$B0,$0,$30,$14,$B0,$0,$79,$3,$30,$14,$3C,$14,$BC
1122+ .byt $0,$30,$14,$B0,$0,$30,$14,$B0,$0,$30,$14,$B0,$0,$41,$22,$C1,$0
1123+ .byt $30,$14,$B0,$0,$FF
1124+Pattern2D74
1125+ .byt $2E,$11,$FE,$17,$2B,$11,$FE,$1,$2B,$11,$FE,$1,$2B,$11,$FE,$1,$2B
1126+ .byt $11,$FE,$1,$2B,$11,$FE,$3,$BA,$A,$FE,$2,$BA,$0,$BE,$A,$FE,$1,$2B
1127+ .byt $11,$FE,$1,$2B,$11,$FE,$1,$2B,$11,$FE,$1,$2B,$11,$FE,$3,$BC,$A,$FE
1128+ .byt $2,$C0,$0,$C0,$A,$FE,$1,$2B,$11,$FE,$1,$2B,$11,$FE,$1,$2B,$11,$FE
1129+ .byt $1,$FF
1130+Pattern2DBD
1131+ .byt $F8,$0,$FE,$23,$2B,$11,$FE,$1,$2B,$11,$FE,$1,$2B,$11,$FE,$B,$2B
1132+ .byt $11,$FE,$1,$2B,$11,$FE,$1,$2B,$11,$FE,$3,$2B,$11,$35,$0,$39,$0
1133+ .byt $3C,$0,$FF
1134+Pattern8A
1135+Pattern8B
1136+Pattern8C
1137+ .byt $F8,$0,$FE,63
1138+ .byt $FF
1139+
1140+Pattern2DE2
1141+ .byt $23,$0,$FE,$1,$A3,$0,$FE,$1,$23,$0,$FE,$1,$A3,$0,$FE,$1,$22,$0
1142+ .byt $FE,$1,$A2,$0,$FE,$1,$22,$0,$FE,$1,$A2,$0,$FE,$1,$27,$0,$FE,$1
1143+ .byt $A7,$0,$FE,$1,$27,$0,$FE,$1,$A7,$0,$FE,$1,$25,$0,$FE,$1,$A5,$0
1144+ .byt $FE,$1,$25,$0,$FE,$1,$A5,$0,$24,$0,$FE,$2,$A4,$0,$FE,$1,$24,$0
1145+ .byt $A4,$0,$FE,$1,$24,$0,$27,$0,$FE,$1,$A7,$0,$FE,$1,$25,$0,$FE,$1
1146+ .byt $A5,$0,$FE,$1,$24,$0,$FE,$1,$A4,$0,$FE,$1,$24,$0,$FE,$1,$A4,$0
1147+ .byt $FE,$4,$F8,$0,$FE,$4,$FF
1148+Pattern2E55
1149+ .byt $3F,$0,$FE,$A,$3E,$0,$FE,$3,$41,$0,$41,$0,$FE,$9,$C1,$0,$3F,$0
1150+ .byt $3E,$0,$FE,$1,$3C,$0,$FE,$1,$3E,$0,$FE,$F,$BE,$0,$FE,$2,$43,$0
1151+ .byt $FE,$9,$C3,$0,$FE,$2,$FF
1152+Pattern2E80
1153+ .byt $FE,$3,$41,$0,$41,$0,$43,$0,$FE,$1,$40,$0,$FE,$8,$C0,$0,$FE,$2
1154+ .byt $40,$0,$3F,$0,$BF,$0,$3E,$0,$BE,$0,$3D,$0,$FE,$7,$BD,$0,$FE,$2
1155+ .byt $3D,$0,$3C,$0,$FE,$1,$3B,$0,$FE,$1,$3C,$0,$FE,$8,$BC,$0,$FE,$2
1156+ .byt $3B,$0,$FE,$3,$3C,$0,$BC,$0,$FE,$1,$48,$0,$3C,$0,$FE,$1,$3E,$0
1157+ .byt $FE,$1,$FF
1158+Pattern2ECB
1159+ .byt $24,$0,$A4,$0,$FE,$1,$22,$0,$1F,$0,$FE,$1,$22,$0,$A2,$0,$24,$0
1160+ .byt $A4,$0,$22,$0,$FE,$1,$1F,$0,$FE,$1,$22,$0,$A2,$0,$20,$0,$FE,$1
1161+ .byt $A0,$0,$FE,$1,$27,$0,$A7,$0,$FE,$1,$2C,$0,$AC,$0,$2C,$0,$AC,$0
1162+ .byt $2C,$0,$27,$0,$A7,$0,$FE,$2,$24,$0,$A4,$0,$FE,$1,$22,$0,$1F,$0
1163+ .byt $FE,$1,$22,$0,$A2,$0,$24,$0,$A4,$0,$22,$0,$FE,$1,$1F,$0,$FE,$1
1164+ .byt $22,$0,$A2,$0,$20,$0,$FE,$1,$A0,$0,$FE,$1,$1F,$0,$FE,$1,$9F,$0
1165+ .byt $FE,$1,$24,$0,$FE,$1,$A4,$0,$FE,$1,$3C,$35,$FE,$3,$FF
1166+Pattern2F46
1167+ .byt $24,$0,$A4,$0,$FE,$1,$22,$0,$1F,$0,$FE,$1,$22,$0,$A2,$0,$24,$0
1168+ .byt $A4,$0,$22,$0,$FE,$1,$1F,$0,$FE,$1,$22,$0,$A2,$0,$20,$0,$FE,$1
1169+ .byt $A0,$0,$FE,$1,$27,$0,$A7,$0,$FE,$1,$2C,$0,$AC,$0,$2C,$0,$AC,$0
1170+ .byt $2C,$0,$27,$0,$A7,$0,$FE,$2,$24,$0,$A4,$0,$FE,$1,$22,$0,$1F,$0
1171+ .byt $FE,$1,$22,$0,$A2,$0,$24,$0,$A4,$0,$22,$0,$FE,$1,$1F,$0,$FE,$1
1172+ .byt $22,$0,$A2,$0,$24,$0,$A4,$0,$FE,$1,$22,$0,$1F,$0,$FE,$1,$22,$0
1173+ .byt $A2,$0,$24,$0,$A4,$0,$22,$0,$FE,$1,$1F,$0,$FE,$1,$22,$0,$A2,$0,$FF
1174+Pattern2FC5
1175+ .byt $4A,$0,$FE,$3,$4F,$0,$FE,$9,$CF,$0,$FE,$9,$56,$0,$51,$0,$4D,$0
1176+ .byt $4A,$0,$47,$0,$43,$0,$3B,$0,$35,$0,$24,$0,$A4,$0,$FE,$1,$22,$0
1177+ .byt $1F,$0,$FE,$1,$22,$0,$A2,$0,$24,$0,$A4,$0,$22,$0,$FE,$1,$1F,$0
1178+ .byt $FE,$1,$22,$0,$A2,$0,$24,$0,$A4,$0,$FE,$1,$22,$0,$1F,$0,$FE,$1
1179+ .byt $22,$0,$A2,$0,$24,$0,$A4,$0,$22,$0,$FE,$1,$1F,$0,$FE,$1,$22,$0
1180+ .byt $A2,$0,$FF
1181+Pattern3022
1182+ .byt $4B,$0,$FE,$1B,$4A,$0,$FE,$3,$4F,$0,$FE,$F,$4C,$0,$FE,$F,$FF
1183+Pattern3033
1184+ .byt $A9,$11,$FE,$1,$A9,$12,$FE,$1,$A9,$13,$FE,$1,$A9,$14,$FE,$1
1185+ .byt $A9,$15,$FE,$1,$A9,$16,$FE,$1,$A9,$17,$FE,$1,$A9,$18,$FE,$1
1186+ .byt $A9,$19,$FE,$1,$A9,$1A,$FE,$1,$A9,$1B,$FE,$1,$A9,$1C,$FE,$1
1187+ .byt $A9,$1D,$FE,$1,$29,$11,$FE,$1,$29,$11,$29,$11,$29,$11,$29,$11
1188+ .byt $3E,$0,$FE,$1B,$33,$0,$34,$0,$3B,$0,$3E,$0,$FF
1189+
1190+Pattern3080
1191+ .byt $39,$0,$FE,$9,$38,$0,$FE,$1,$37,$0,$B7,$0,$35,$0,$FE,$1,$37,$0
1192+ .byt $FE,$8,$B7,$0,$FE,$1,$37,$0,$35,$0,$FE,$1,$33,$0,$FE,$1,$30,$0
1193+ .byt $FE,$5,$B0,$0,$FE,$5,$37,$0,$FE,$3,$3C,$0,$FE,$2,$BC,$0,$3C,$0
1194+ .byt $FE,$6,$F8,$0,$FE,$4,$FF
1195+Pattern30BD
1196+ .byt $4B,$0,$FE,$2,$46,$0,$4A,$0,$4B,$0,$4D,$0,$CD,$0,$4F,$0,$FE,$5
1197+ .byt $CF,$0,$FE,$2,$43,$0,$FE,$1,$45,$0,$FE,$1,$46,$0,$FE,$1,$48,$0
1198+ .byt $FE,$6,$C8,$0,$FE,$4,$3B,$0,$BB,$0,$3B,$0,$BB,$0,$3C,$0,$BC,$0
1199+ .byt $3C,$0,$FE,$1,$BC,$0,$FE,$1,$3C,$0,$3C,$0,$3C,$0,$3B,$0,$BB,$0
1200+ .byt $FE,$5,$37,$0,$3A,$0,$3B,$0,$3C,$0,$3E,$0,$40,$0,$41,$0,$44,$0
1201+ .byt $50,$0,$FF
1202+Pattern311A
1203+ .byt $55,$0,$FE,$B,$54,$0,$FE,$3,$4E,$0,$FE,$B,$4F,$0,$FE,$3,$52,$0
1204+ .byt $FE,$3,$2E,$0,$FE,$1,$AE,$0,$FE,$1,$2C,$0,$FE,$1,$AC,$0,$FE,$1
1205+ .byt $50,$0,$FE,$3,$47,$0,$FE,$2,$2F,$0,$2F,$0,$FE,$2,$48,$0,$30,$0
1206+ .byt $FE,$1,$B0,$0,$FE,$1,$48,$0,$C8,$0,$4A,$0,$FE,$1,$FF
1207+Pattern315F
1208+ .byt $39,$0,$FE,$A,$38,$0,$37,$0,$FE,$1,$35,$0,$FE,$1,$37,$0,$FE,$8
1209+ .byt $B7,$0,$FE,$1,$37,$0,$35,$0,$FE,$1,$33,$0,$FE,$1,$3C,$0,$FE,$F
1210+ .byt $BC,$0,$FE,$F,$FF
1211+Pattern3188
1212+ .byt $37,$0,$FE,$F,$38,$0,$FE,$B,$37,$0,$FE,$3,$3C,$0,$FE,$D,$BC,$0
1213+ .byt $FE,$1,$3A,$0,$FE,$F,$FF
1214+Pattern31A1
1215+ .byt $46,$0,$FE,$F,$50,$0,$4D,$0,$4A,$0,$47,$0,$4D,$0,$4A,$0,$47,$0
1216+ .byt $44,$0,$4A,$0,$47,$0,$44,$0,$41,$0,$47,$0,$44,$0,$41,$0,$3E,$0
1217+ .byt $48,$4,$FE,$1,$3C,$4,$BC,$0,$48,$4,$C8,$0,$FE,$2,$48,$4,$C8,$0
1218+ .byt $3C,$4,$BC,$0,$48,$4,$C8,$0,$FE,$2,$48,$4,$C8,$0,$3C,$4,$BC,$0
1219+ .byt $48,$4,$C8,$0,$FE,$2,$48,$4,$FE,$1,$3C,$4,$BC,$0,$48,$4,$C8,$0
1220+ .byt $FE,$2,$FF
1221+Pattern31FE
1222+ .byt $2F,$0,$FE,$7,$2E,$0,$FE,$7,$2D,$0,$FE,$7,$2C,$0,$FE,$7,$2B,$0
1223+ .byt $FE,$F,$30,$0,$FE,$F,$FF
1224+Pattern3217
1225+ .byt $F8,$0,$A9,$11,$FE,$1,$A9,$12,$FE,$1,$A9,$13,$FE,$1,$A9,$14,$FE
1226+ .byt $1,$A9,$15,$FE,$1,$A9,$16,$FE,$1,$A9,$17,$FE,$1,$A9,$18,$FE,$1
1227+ .byt $A9,$19,$FE,$1,$A9,$1A,$FE,$1,$A9,$1B,$FE,$1,$A9,$1C,$FE,$1,$A9
1228+ .byt $1D,$FE,$1,$29,$11,$FE,$1,$29,$11,$29,$11,$29,$11,$32,$0,$FE,$F
1229+ .byt $31,$0,$FE,$7,$30,$0,$FE,$7,$FF
1230+
1231+OrnamentAddressTableLo
1232+ .byt <Ornament0
1233+ .byt <Ornament1
1234+ .byt <Ornament2
1235+ .byt <Ornament3
1236+OrnamentAddressTableHi
1237+ .byt >Ornament0
1238+ .byt >Ornament1
1239+ .byt >Ornament2
1240+ .byt >Ornament3
1241+
1242+OrnamentData
1243+Ornament0 ;Repeat
1244+ .byt $01,$05,$01,$07,$03 ;$03 is flag to loop to start
1245+Ornament1
1246+ .byt $01,$0E,$16,$22,$32,$3E,$4A,$62,$6E,$76,$82,$8E,$00
1247+Ornament2
1248+ .byt $01,$0E,$16,$22,$32,$3E,$4A,$62,$6E,$76,$82,$8E,$FE,$00
1249+Ornament3
1250+ .byt $01,$01,$04,$04,$0C,$0C,$14,$14,$20,$20,$30,$30,$30,$3C,$3C,$3C ;3
1251+ .byt $44,$44,$44,$50,$50,$50,$60,$60,$60,$6C,$6C,$6C,$74,$74,$74,$00
1252+
1253+SampleAddressTableLo
1254+ .byt <Sample0
1255+ .byt <Sample1
1256+ .byt <Sample2
1257+ .byt <Sample3
1258+ .byt <Sample4
1259+ .byt <Sample5
1260+SampleAddressTableHi
1261+ .byt >Sample0
1262+ .byt >Sample1
1263+ .byt >Sample2
1264+ .byt >Sample3
1265+ .byt >Sample4
1266+ .byt >Sample5
1267+
1268+SampleData
1269+Sample0
1270+ .byt $1E,$0D,$00
1271+Sample1
1272+ .byt $0B,$0C,$0B,$0A,$0A,$09,$09,$08,$08,$07,$07,$06,$06,$05,$05,$04 ;1
1273+ .byt $04,$04,$00
1274+Sample2
1275+ .byt $1F,$2E,$1E,$2D,$1D,$2C,$1C,$2B,$1B,$2A,$1A,$29,$19,$28,$18,$27 ;2
1276+ .byt $17,$26,$16,$25,$15,$24,$14,$23,$13,$22,$12,$21,$11,$10,$00
1277+Sample3
1278+ .byt $0F,$17,$14,$01,$10,$00
1279+Sample4
1280+ .byt $0F,$0E,$0D,$0C,$0B,$09,$07,$05,$03,$01,$10,$00
1281+Sample5
1282+ .byt $0F,$0F,$0E,$0E,$0D,$0D,$0C,$0C,$0B,$0B,$0A,$0A,$09,$09,$08,$08 ;5
1283+ .byt $07,$07,$06,$06,$05,$05,$04,$04,$03,$03,$02,$02,$01,$01,$10,$00
1284+
1285+Table33A4 ;Pattern Address Table A Lo
1286+ .byt <Pattern2DBD
1287+ .byt <Pattern2D74
1288+ .byt <Pattern2D2B
1289+ .byt <Pattern2CAA
1290+ .byt <Pattern2C2B
1291+ .byt <Pattern2BFA
1292+ .byt <Pattern2B97
1293+ .byt <Pattern2B60
1294+Table33AC ;Pattern Address Table A Hi
1295+ .byt >Pattern2DBD
1296+ .byt >Pattern2D74
1297+ .byt >Pattern2D2B
1298+ .byt >Pattern2CAA
1299+ .byt >Pattern2C2B
1300+ .byt >Pattern2BFA
1301+ .byt >Pattern2B97
1302+ .byt >Pattern2B60
1303+Table33B4 ;Pattern Address Table B Lo
1304+ .byt <Pattern3033
1305+ .byt <Pattern3022
1306+ .byt <Pattern2FC5
1307+ .byt <Pattern2F46
1308+ .byt <Pattern2ECB
1309+ .byt <Pattern2E80
1310+ .byt <Pattern2E55
1311+ .byt <Pattern2DE2
1312+Table33BC ;Pattern Address Table B Hi
1313+ .byt >Pattern3033
1314+ .byt >Pattern3022
1315+ .byt >Pattern2FC5
1316+ .byt >Pattern2F46
1317+ .byt >Pattern2ECB
1318+ .byt >Pattern2E80
1319+ .byt >Pattern2E55
1320+ .byt >Pattern2DE2
1321+Table33C4 ;Pattern Address Table C Lo
1322+ .byt <Pattern3217
1323+ .byt <Pattern31FE
1324+ .byt <Pattern31A1
1325+ .byt <Pattern3188
1326+ .byt <Pattern315F
1327+ .byt <Pattern311A
1328+ .byt <Pattern30BD
1329+ .byt <Pattern3080
1330+Table33CC ;Pattern Address Table C Hi
1331+ .byt >Pattern3217
1332+ .byt >Pattern31FE
1333+ .byt >Pattern31A1
1334+ .byt >Pattern3188
1335+ .byt >Pattern315F
1336+ .byt >Pattern311A
1337+ .byt >Pattern30BD
1338+ .byt >Pattern3080
1339+
1340+RegisterBank
1341+AY_PitchLo
1342+ .byt 0
1343+ .byt 0
1344+ .byt 0
1345+AY_PitchHi
1346+ .byt 0
1347+ .byt 0
1348+ .byt 0
1349+AY_Noise
1350+ .byt 0
1351+AY_Status
1352+ .byt $78
1353+AY_Volume
1354+ .byt 0
1355+ .byt 0
1356+ .byt 0
1357+AY_EGPeriodLo .byt 0
1358+AY_EGPeriodHi .byt 0
1359+AY_EGCycle .byt 0
1360+RegisterPointer
1361+ .byt 0,3
1362+ .byt 1,4
1363+ .byt 2,5
1364+ .byt 6
1365+ .byt 7
1366+ .byt 8,9,10
1367+ .byt 11,12
1368+ .byt 13
1369+ReferenceBank
1370+ .byt 0,0,0,0,0,0
1371+ .byt 0,0
1372+ .byt 0,0,0
1373+ .byt 0,0,0
1374+
1375+BasePitchLo ;Base Note Pitches Lo
1376+ .byt $EE,$16,$4C
1377+ .byt $8E,$D8,$2E
1378+ .byt $8E,$F6,$66
1379+ .byt $E0,$60,$E8
1380+BasePitchHi ;Base Note Pitches Hi
1381+ .byt $0E,$0E,$0D
1382+ .byt $0C,$0B,$0B
1383+ .byt $0A,$09,$09
1384+ .byt $08,$08,$07
1385+EventIndex .byt 0
1386+EndEvent .byt 0
1387+TrackLoop .byt 0
1388+MusicTempoReference .byt 0
1389+MusicStatus .byt 0
1390+
1391+SampleProperty
1392+ .byt 128,128,128
1393+SampleIndex
1394+ .byt 0,0,0
1395+OrnamentProperty
1396+ .byt 128,128,128
1397+OrnamentIndex
1398+ .byt 0,0,0
1399+RuntimePatternBaseLo
1400+ .byt 0,0,0
1401+RuntimePatternBaseHi
1402+ .byt 0,0,0
1403+RuntimePatternIndex
1404+ .byt 0,0,0
1405+RuntimePatternNoteOffset
1406+ .byt 0,0,0
1407+RuntimeNote
1408+ .byt 0,0,0
1409+EndOfMusic
1410+
1411+;************************ Effect Data starts here **********************
1412+#ifdef 0
1413+
1414+Channel_SFX_NoteHeaders
1415+ .byt NoteG+12*7 ;A 00
1416+ .byt NoteC+12*1 ; 01
1417+ .byt NoteC+12*2 ; 02
1418+ .byt NoteC+12*6 ; 03
1419+ .byt NoteC+12*3 ; 04
1420+ .byt NoteF+12*9 ; 05
1421+ .byt NoteC+12*1 ; 06
1422+ .byt NoteD+12*2 ; 07
1423+ .byt NoteG+12*3 ; 08
1424+
1425+ .byt NoteC+12*6 ;B 09
1426+ .byt NoteF+12*6 ; 10
1427+ .byt NoteC+12*3 ; 11
1428+ .byt NoteC+12*4 ; 12
1429+ .byt NoteC+12*4 ; 13
1430+ .byt NoteF+12*7 ; 14
1431+ .byt NoteG+12*3 ; 15
1432+ .byt NoteG+12*7 ; 16
1433+
1434+ .byt NoteC+12*5 ;C 17
1435+ .byt NoteC+12*0 ; 18
1436+ .byt NoteC+12*5 ; 19
1437+ .byt NoteG+12*7 ; 20
1438+ .byt NoteG+12*7 ; 21
1439+ .byt NoteG+12*3 ; 22
1440+
1441+Channel_SFX_EffectAndEGHeaders
1442+ .byt hEffectV ;A 00 Switch
1443+ .byt hEffectU ; 01 Door Opening/Closing
1444+ .byt hEffectT ; 02 Pick up
1445+ .byt hEffectS ; 03 Drop
1446+ .byt hEffectR ; 04 Step #1 (Keonig)
1447+ .byt hEffectR ; 05 Step #2 (Carter)
1448+ .byt hEffectH+EG20 ; 06 Lift Start
1449+ .byt hEffectG+EG20 ; 07 Lift End
1450+ .byt hEffectE+EG09 ; 08 Alarm #1 (Power Down)
1451+
1452+ .byt hEffectQ ;B 09 Effect #1 (InfoPost)
1453+ .byt hEffectP ; 10 New Msg through Commlink
1454+ .byt hEffectO ; 11 Effect #2 (InfoPost)
1455+ .byt hEffectN ; 12 Computer Room #1
1456+ .byt hEffectM ; 13 Computer Room #2
1457+ .byt hEffectP ; 14 Beep for Info Messages in Text Area
1458+ .byt hEffectF ; 15 Robot Shuffle
1459+ .byt hEffectD+EG20 ; 16 Alarm #2
1460+
1461+ .byt hEffectL ;C 17 Dying
1462+ .byt hEffectK+EG20 ; 18 Contact with Enemy #2
1463+ .byt hEffectK+EG02 ; 19 Contact with Enemy #1(Primary)
1464+ .byt hEffectJ ; 20 Alarm #3 (Life Support Circuit Open)
1465+ .byt hEffectI ; 21 Alarm #3 End
1466+
1467+;Nice effect of mixing Effect 0F on A whilst playing Track 02 on A
1468+;Effects(19)
1469+
1470+EffectBaseAddressLo
1471+ .byt <EffectD
1472+ .byt <EffectE
1473+ .byt <EffectF
1474+ .byt <EffectG
1475+ .byt <EffectH
1476+ .byt <EffectI
1477+ .byt <EffectJ
1478+ .byt <EffectK
1479+ .byt <EffectL
1480+ .byt <EffectM
1481+ .byt <EffectN
1482+ .byt <EffectO
1483+ .byt <EffectP
1484+ .byt <EffectQ
1485+ .byt <EffectR
1486+ .byt <EffectS
1487+ .byt <EffectT
1488+ .byt <EffectU
1489+ .byt <EffectV
1490+EffectBaseAddressHi
1491+ .byt >EffectD
1492+ .byt >EffectE
1493+ .byt >EffectF
1494+ .byt >EffectG
1495+ .byt >EffectH
1496+ .byt >EffectI
1497+ .byt >EffectJ
1498+ .byt >EffectK
1499+ .byt >EffectL
1500+ .byt >EffectM
1501+ .byt >EffectN
1502+ .byt >EffectO
1503+ .byt >EffectP
1504+ .byt >EffectQ
1505+ .byt >EffectR
1506+ .byt >EffectS
1507+ .byt >EffectT
1508+ .byt >EffectU
1509+ .byt >EffectV
1510+
1511+EffectD ;16
1512+ .byt efx_ToneOn
1513+ .byt efx_NoiseOff
1514+ .byt efx_EnvelopeOff
1515+ .byt efx_Volume+6
1516+ .byt efx_Pause+27
1517+ .byt efx_EnvelopeOn
1518+ .byt efx_Pause+18
1519+ .byt efx_EnvelopeOff
1520+ .byt efx_Pause+7
1521+ .byt efx_EnvelopeOn
1522+ .byt efx_Pause+9
1523+ .byt efx_EnvelopeOff
1524+ .byt efx_Pause+36
1525+ .byt efx_EnvelopeOn
1526+ .byt efx_Pause+18
1527+ .byt efx_LoopRow+13 ;Row 2
1528+EffectE ;16
1529+ .byt efx_ToneOn
1530+ .byt efx_EnvelopeOn
1531+ .byt efx_NoiseOff
1532+ .byt efx_SetAbsoluteMode
1533+ .byt efx_IncPitch+1
1534+ .byt efx_Volume+0
1535+ .byt efx_Pause+3
1536+ .byt efx_DecPitch+2
1537+ .byt efx_IncVolume
1538+ .byt efx_SkipZeroVolume
1539+ .byt efx_LoopRow+4 ;To row 6
1540+ .byt efx_Volume+12
1541+ .byt efx_Pause+9
1542+ .byt efx_IncPitch+31
1543+ .byt efx_Pause+18
1544+ .byt efx_LoopRow+11 ;To row 4
1545+EffectF ;16
1546+ .byt efx_ToneOff
1547+ .byt efx_EnvelopeOff
1548+ .byt efx_NoiseOn
1549+ .byt efx_SetCounter+6
1550+ .byt efx_Volume+0
1551+ .byt efx_IncVolume
1552+ .byt efx_Pause+1
1553+ .byt efx_SkipZeroCount
1554+ .byt efx_LoopRow+3
1555+ .byt efx_DecVolume
1556+ .byt efx_Pause+1
1557+ .byt efx_SkipZeroVolume
1558+ .byt efx_LoopRow+3
1559+ .byt efx_End
1560+EffectG ;19
1561+ .byt efx_ToneOn
1562+ .byt efx_NoiseOff
1563+ .byt efx_EnvelopeOn
1564+ .byt efx_SetEnvTriangle
1565+ .byt efx_SetAbsoluteMode
1566+ .byt efx_SetCounter+8
1567+ .byt efx_Pause+9
1568+ .byt efx_DecNote+2
1569+ .byt efx_SkipZeroCount
1570+ .byt efx_LoopRow+3 ;6
1571+ .byt efx_EnvelopeOff
1572+ .byt efx_Pause+18
1573+ .byt efx_Volume+13
1574+ .byt efx_IncNote+31
1575+ .byt efx_IncNote+24
1576+ .byt efx_Pause+4
1577+ .byt efx_DecVolume
1578+ .byt efx_SkipZeroVolume
1579+ .byt efx_LoopRow+3 ;?16
1580+ .byt efx_End
1581+EffectH ;10
1582+ .byt efx_ToneOn
1583+ .byt efx_NoiseOff
1584+ .byt efx_EnvelopeOn
1585+ .byt efx_SetEnvTriangle
1586+ .byt efx_SetAbsoluteMode
1587+ .byt efx_SetCounter+8
1588+ .byt efx_Pause+4
1589+ .byt efx_IncNote+2
1590+ .byt efx_SkipZeroCount
1591+ .byt efx_LoopRow+3 ;6
1592+ .byt efx_End
1593+EffectI ;11
1594+ .byt efx_ToneOn
1595+ .byt efx_NoiseOff
1596+ .byt efx_EnvelopeOff
1597+ .byt efx_Volume+15
1598+ .byt efx_Pause+4
1599+ .byt efx_Volume+0
1600+ .byt efx_Pause+7
1601+ .byt efx_Volume+9
1602+ .byt efx_Pause+5
1603+ .byt efx_Volume+0
1604+ .byt efx_End
1605+EffectJ ;8
1606+ .byt efx_ToneOn
1607+ .byt efx_NoiseOff
1608+ .byt efx_EnvelopeOff
1609+ .byt efx_Volume+15
1610+ .byt efx_Pause+4
1611+ .byt efx_Volume+0
1612+ .byt efx_Pause+7
1613+ .byt efx_LoopRow+4 ;3
1614+EffectK ;19
1615+ .byt efx_ToneOn
1616+ .byt efx_NoiseOff
1617+ .byt efx_EnvelopeOn
1618+ .byt efx_SetAbsoluteMode
1619+ .byt efx_SetCounter+8
1620+ .byt efx_SetEnvTriangle
1621+ .byt efx_IncNote+5
1622+ .byt efx_Pause+1
1623+ .byt efx_SetEnvSawtooth
1624+ .byt efx_IncNote+9
1625+ .byt efx_Pause+1
1626+ .byt efx_SkipZeroCount
1627+ .byt efx_LoopRow+7
1628+ .byt efx_EnvelopeOff
1629+ .byt efx_End
1630+EffectL ;16 Decreasing pitch and volume
1631+ .byt efx_ToneOn
1632+ .byt efx_NoiseOff
1633+ .byt efx_EnvelopeOff
1634+ .byt efx_Volume+15
1635+ .byt efx_SetAbsoluteMode
1636+ .byt efx_SetCounter+15
1637+ .byt efx_Pause+2
1638+ .byt efx_IncPitch+1
1639+ .byt efx_SkipZeroCount
1640+ .byt efx_LoopRow+3 ;6
1641+ .byt efx_DecPitch+7
1642+ .byt efx_DecVolume
1643+ .byt efx_SkipZeroVolume
1644+ .byt efx_LoopRow+8
1645+ .byt efx_End
1646+EffectM ;9
1647+ .byt efx_ToneOn
1648+ .byt efx_NoiseOff
1649+ .byt efx_EnvelopeOff
1650+ .byt efx_Volume+7
1651+ .byt efx_SetAbsoluteMode
1652+ .byt efx_FilterFrequency+2
1653+ .byt efx_Pause+3
1654+ .byt efx_DecNote+26
1655+ .byt efx_LoopRow+2 ;6
1656+EffectN ;9
1657+ .byt efx_ToneOn
1658+ .byt efx_NoiseOff
1659+ .byt efx_EnvelopeOff
1660+ .byt efx_Volume+7
1661+ .byt efx_SetAbsoluteMode
1662+ .byt efx_FilterFrequency+2
1663+ .byt efx_Pause+1
1664+ .byt efx_DecNote+27
1665+ .byt efx_LoopRow+2 ;+6
1666+EffectO ;11
1667+ .byt efx_ToneOn
1668+ .byt efx_NoiseOn
1669+ .byt efx_EnvelopeOff
1670+ .byt efx_Volume+15
1671+ .byt efx_Pause+1
1672+ .byt efx_NoiseOff
1673+ .byt efx_DecVolume
1674+ .byt efx_Pause+3
1675+ .byt efx_SkipZeroVolume
1676+ .byt efx_LoopRow+3 ;6
1677+ .byt efx_End
1678+EffectP ;11
1679+ .byt efx_ToneOn
1680+ .byt efx_NoiseOff
1681+ .byt efx_EnvelopeOff
1682+ .byt efx_SetCounter+3
1683+ .byt efx_Volume+15
1684+ .byt efx_Pause+9
1685+ .byt efx_Volume+0
1686+ .byt efx_Pause+9
1687+ .byt efx_SkipZeroCount
1688+ .byt efx_LoopRow+5 ;4
1689+ .byt efx_End
1690+EffectQ ;9
1691+ .byt efx_ToneOn
1692+ .byt efx_NoiseOff
1693+ .byt efx_EnvelopeOff
1694+ .byt efx_Volume+15
1695+ .byt efx_Pause+6
1696+ .byt efx_DecNote+9
1697+ .byt efx_Pause+9
1698+ .byt efx_Volume+0
1699+ .byt efx_End
1700+EffectR ;8
1701+ .byt efx_NoiseOn
1702+ .byt efx_ToneOn
1703+ .byt efx_EnvelopeOff
1704+ .byt efx_Volume+12
1705+ .byt efx_SetNoiseRandom
1706+ .byt efx_Pause+0
1707+ .byt efx_Volume+0
1708+ .byt efx_End
1709+EffectS ;13
1710+ .byt efx_NoiseOff
1711+ .byt efx_ToneOn
1712+ .byt efx_EnvelopeOff
1713+ .byt efx_Volume+10
1714+ .byt efx_SetCounter+4
1715+ .byt efx_SetAbsoluteMode
1716+ .byt efx_DecNote+10
1717+ .byt efx_Pause+3
1718+ .byt efx_SkipZeroCount
1719+ .byt efx_LoopRow+3 ;6
1720+ .byt efx_Pause+1
1721+ .byt efx_Volume+0
1722+ .byt efx_End
1723+EffectT ;13
1724+ .byt efx_NoiseOff
1725+ .byt efx_ToneOn
1726+ .byt efx_EnvelopeOff
1727+ .byt efx_Volume+10
1728+ .byt efx_SetCounter+4
1729+ .byt efx_SetAbsoluteMode
1730+ .byt efx_IncNote+10
1731+ .byt efx_Pause+3
1732+ .byt efx_SkipZeroCount
1733+ .byt efx_LoopRow+3 ;6
1734+ .byt efx_Pause+1
1735+ .byt efx_Volume+0
1736+ .byt efx_End
1737+EffectU ;14
1738+ .byt efx_NoiseOn
1739+ .byt efx_ToneOff
1740+ .byt efx_EnvelopeOff
1741+ .byt efx_Volume+0
1742+ .byt efx_SetCounter+8
1743+ .byt efx_Pause+2
1744+ .byt efx_IncVolume
1745+ .byt efx_SkipZeroCount
1746+ .byt efx_LoopRow+3 ;5
1747+ .byt efx_Volume+0
1748+ .byt efx_End
1749+EffectV ;15
1750+ .byt efx_NoiseOff
1751+ .byt efx_EnvelopeOff
1752+ .byt efx_ToneOn
1753+ .byt efx_Volume+15
1754+ .byt efx_Pause+1
1755+ .byt efx_Volume+12
1756+ .byt efx_Pause+1
1757+ .byt efx_Volume+9
1758+ .byt efx_Pause+1
1759+ .byt efx_Volume+6
1760+ .byt efx_Pause+1
1761+ .byt efx_Volume+3
1762+ .byt efx_Pause+1
1763+ .byt efx_Volume+0
1764+ .byt efx_End
1765+;All Effects == 243 Bytes
1766+
1767+ToneMask
1768+ .byt %11111110,%11111101,%11111011
1769+ToneBit
1770+ .byt %00000001,%00000010,%00000100
1771+NoiseMask
1772+ .byt %11110111,%11101111,%11011111
1773+NoiseBit
1774+ .byt %00001000,%00010000,%00100000
1775+AbsoluteMode
1776+ .byt 0,0,0
1777+EffectCounter
1778+ .byt 0,0,0
1779+PauseDelay
1780+ .byt 0,0,0
1781+EffectPitchLo
1782+ .byt 0,0,0
1783+EffectPitchHi
1784+ .byt 0,0,0
1785+EffectNote
1786+ .byt 0,0,0
1787+EffectIndex
1788+ .byt 0,0,0
1789+EffectNumber
1790+ .byt 128,128,128
1791+SkipLoopFlag
1792+ .byt 0,0,0
1793+PitchOffset
1794+NoteOffset .byt 0
1795+TempPitchLo .byt 0
1796+TempPitchHi .byt 0
1797+EGValue
1798+ .byt 20,9,2
1799+EffectCodeThreshhold
1800+ .byt 000 ;00
1801+ .byt 001 ;01
1802+ .byt 002 ;02
1803+ .byt 003 ;03
1804+ .byt 004 ;04
1805+ .byt 005 ;05
1806+ .byt 006 ;06
1807+ .byt 007 ;07
1808+ .byt 008 ;08
1809+ .byt 040 ;09
1810+ .byt 072 ;10
1811+ .byt 104 ;11
1812+ .byt 136 ;12
1813+ .byt 137 ;13
1814+ .byt 138 ;14
1815+ .byt 139 ;15
1816+ .byt 140 ;16
1817+ .byt 141 ;17
1818+ .byt 157 ;18
1819+ .byt 158 ;19
1820+ .byt 159 ;20
1821+ .byt 163 ;21
1822+ .byt 185 ;22
1823+ .byt 205 ;23
1824+ .byt 255 ;24
1825+EffectCodeVectorLo
1826+ .byt <efxc_End
1827+ .byt <efxc_ToneOn
1828+ .byt <efxc_ToneOff
1829+ .byt <efxc_NoiseOn
1830+ .byt <efxc_NoiseOff
1831+ .byt <efxc_EnvelopeOn
1832+ .byt <efxc_EnvelopeOff
1833+ .byt <efxc_SetAbsoluteMode
1834+ .byt <efxc_IncPitch
1835+ .byt <efxc_DecPitch
1836+ .byt <efxc_IncNote
1837+ .byt <efxc_DecNote
1838+ .byt <efxc_SetNoiseRandom
1839+ .byt <efxc_IncVolume
1840+ .byt <efxc_DecVolume
1841+ .byt <efxc_SkipZeroVolume
1842+ .byt <efxc_SkipZeroCount
1843+ .byt <efxc_Volume
1844+ .byt <efxc_SetEnvTriangle
1845+ .byt <efxc_SetEnvSawtooth
1846+ .byt <efxc_FilterFrequency
1847+ .byt <efxc_LoopRow
1848+ .byt <efxc_SetCounter
1849+ .byt <efxc_Pause
1850+ .byt <efxc_SkipZeroPitch
1851+EffectCodeVectorHi
1852+ .byt >efxc_End
1853+ .byt >efxc_ToneOn
1854+ .byt >efxc_ToneOff
1855+ .byt >efxc_NoiseOn
1856+ .byt >efxc_NoiseOff
1857+ .byt >efxc_EnvelopeOn
1858+ .byt >efxc_EnvelopeOff
1859+ .byt >efxc_SetAbsoluteMode
1860+ .byt >efxc_IncPitch
1861+ .byt >efxc_DecPitch
1862+ .byt >efxc_IncNote
1863+ .byt >efxc_DecNote
1864+ .byt >efxc_SetNoiseRandom
1865+ .byt >efxc_IncVolume
1866+ .byt >efxc_DecVolume
1867+ .byt >efxc_SkipZeroVolume
1868+ .byt >efxc_SkipZeroCount
1869+ .byt >efxc_Volume
1870+ .byt >efxc_SetEnvTriangle
1871+ .byt >efxc_SetEnvSawtooth
1872+ .byt >efxc_FilterFrequency
1873+ .byt >efxc_LoopRow
1874+ .byt >efxc_SetCounter
1875+ .byt >efxc_Pause
1876+ .byt >efxc_SkipZeroPitch
1877+FilterIndex
1878+ .byt 0,0,0
1879+FilterMask
1880+ .byt 7 ;1
1881+ .byt 15 ;2
1882+ .byt 31 ;3
1883+ .byt 127 ;4
1884+EndOfAll
1885+
1886+
1887+
1888+#endif
1889+
1890+
--- public/oric/games/Space 1999/Sources/trailer/tables.s (nonexistent)
+++ public/oric/games/Space 1999/Sources/trailer/tables.s (revision 365)
@@ -0,0 +1,933 @@
1+// ============================================================================
2+//
3+// Tables.s
4+//
5+// ============================================================================
6+//
7+// This file contains all the bss tables used through the demo.
8+//
9+// ============================================================================
10+
11+ .zero
12+
13+ptr_dst
14+ptr_dst_low .dsb 1
15+ptr_dst_high .dsb 1
16+
17+squared_value .dsb 2
18+nOddValue .dsb 1
19+yy .dsb 1
20+
21+y .dsb 1
22+x .dsb 1
23+nSquareRoot .dsb 1
24+
25+x0 .dsb 1
26+x1 .dsb 1
27+x2 .dsb 1
28+x3 .dsb 1
29+
30+ .text
31+
32+_TablesInit
33+ //jmp _TablesInit
34+.(
35+ ;sei
36+
37+ //
38+ // Clear the BSS section
39+ //
40+ .(
41+ lda #0
42+
43+ ldx #<_BssStart_
44+ stx ptr_dst_low
45+ ldx #>_BssStart_
46+ stx ptr_dst_high
47+
48+ ldx #((_BssEnd_-_BssStart_)+1)/256
49+loop_outer
50+ tay
51+loop_inner
52+ sta (ptr_dst),y
53+ dey
54+ bne loop_inner
55+ inc ptr_dst_high
56+ dex
57+ bne loop_outer
58+ .)
59+
60+
61+ //
62+ // Generate multiple of 6 data table
63+ //
64+.(
65+ lda #0
66+ sta tmp0+0 // cur mul
67+ sta tmp0+1 // cur div
68+ sta tmp0+2 // cur mod
69+
70+ ldx #0
71+loop
72+ lda tmp0+0
73+ clc
74+ sta _TableMul6,x
75+ adc #6
76+ sta tmp0+0
77+
78+ lda tmp0+1
79+ sta _TableDiv6,x
80+
81+ lda tmp0+2
82+ sta _TableMod6,x
83+
84+ ldy tmp0+2
85+ iny
86+ cpy #6
87+ bne skip_mod
88+ ldy #0
89+ inc tmp0+1
90+skip_mod
91+ sty tmp0+2
92+
93+ inx
94+ bne loop
95+.)
96+
97+
98+ .(
99+ lda #0
100+ sta tmp0
101+
102+ ldx #0
103+loop_div
104+ ;
105+ ; Store Div6
106+ ;
107+ lda _DIV6
108+ ldy tmp0
109+
110+ ;
111+ ; Store Mod6
112+ ;
113+ ldy _MOD6
114+ lda _LeftPattern,y
115+ ldy tmp0
116+ ora #64
117+ sta _Mod6Left,y
118+
119+ ldy _MOD6
120+ lda _RightPattern,y
121+ ldy tmp0
122+ ora #64
123+ sta _Mod6Right,y
124+
125+
126+ ;
127+ ; Update Div/Mod
128+ ;
129+ inc _MOD6
130+ lda _MOD6
131+ cmp #6
132+ bne no_update
133+ lda #0
134+ sta _MOD6
135+ inc _DIV6
136+no_update
137+
138+ ;
139+ ; Inc Y
140+ ;
141+ inc tmp0
142+ ldy tmp0
143+ bne loop_div
144+ .)
145+
146+ jsr _Tables_InitialiseScreenAddrTable
147+ jsr _PrepareCosTable
148+
149+ rts
150+.)
151+
152+
153+
154+//
155+// Generate screen pointer adresses
156+//
157+_Tables_InitialiseScreenAddrTable
158+.(
159+ lda #<$a000
160+ sta tmp0+0
161+ lda #>$a000
162+ sta tmp0+1
163+
164+ ldx #0
165+loop
166+ lda tmp0+0
167+ sta _HiresAddrLow,x
168+ lda tmp0+1
169+ sta _HiresAddrHigh,x
170+
171+ clc
172+ lda tmp0+0
173+ adc #40
174+ sta tmp0+0
175+ bcc skip
176+ inc tmp0+1
177+skip
178+
179+ inx
180+ cpx #200
181+ bne loop
182+ rts
183+.)
184+
185+
186+/*
187+
188+Distance=SQR(DX^2 + DY^2)
189+
190+90*90=
191+
192+Let's say we have a 2x2 resolution, maximum values for a 240x200 screens become
193+120x100 from the center, which divided by two means a max squared distance of 60*60+50*50=3600+2500=6100 entries
194+SQR(6100)=78
195+
196+http://en.wikipedia.org/wiki/Square_number
197+// The nth square number can be calculated from the previous two by adding the (n - 1)th square to itself,
198+// subtracting the (n - 2)th square number, and adding 2 (n2 = 2(n - 1)2 - (n - 2)2 + 2).
199+// For example, 2×52 - 42 + 2 = 2×25 - 16 + 2 = 50 - 16 + 2 = 36 = 62.
200+
201+// So for example, 52 = 25 = 1 + 3 + 5 + 7 + 9.
202+
203+
204+If the explosion is in the top half of the screen, that's 40x89 bytes = 3560 bytes.
205+But considering we compute only one line on two, it's only 40x44 bytes= 1760 bytes
206+But considering we compute only one half on two, it's only 20x50 bytes= 1000 bytes
207+
208+6100+1760=7860 bytes, which fits perfectly in the 8000 bytes depacking buffer :D
209+
210+If for fast lookup we add the square table, we also have to store 60*2 additional values (to store from 0*0 to 60*60=3600)
211+
212+
213+void GenerateSquareTables()
214+{
215+ unsigned char nOddValue=1;
216+ unsigned char nTemp;
217+ unsigned int squared_value=0;
218+ unsigned char n=1;
219+ unsigned char* ptr_root_table;
220+
221+ SquareRootTable[0]=0;
222+
223+ SquareTableLow[0] =0;
224+ SquareTableHigh[0]=0;
225+
226+ ptr_root_table=SquareRootTable+1;
227+
228+ do
229+ {
230+ squared_value+=nOddValue;
231+ nOddValue+=2;
232+
233+ if (n<60)
234+ {
235+ SquareTableLow[n] =squared_value&255;
236+ SquareTableHigh[n]=(squared_value>>8);
237+ }
238+
239+ nTemp=nOddValue;
240+ while (nTemp)
241+ {
242+ *ptr_root_table++=n;
243+ nTemp--;
244+ }
245+
246+ n++;
247+ }
248+ while (n!=77); // 77*77
249+}
250+
251+extern unsigned char SquareRootTable[6100];
252+extern unsigned int SquareTable[60];
253+
254+_SquareRootTable = _BufferUnpack // 6100 bytes long
255+_SquareTable = _SquareRootTable+6100 // 60*2=120 bytes long
256+*/
257+
258+
259+_GenerateSquareTables
260+ ;jmp _GenerateSquareTables
261+.(
262+ ; Initialise the first entries
263+ lda #0
264+ sta _SquareRootTable
265+ sta _SquareTableLow
266+ sta _SquareTableHigh
267+ sta squared_value+0
268+ sta squared_value+1
269+
270+ lda #<_SquareRootTable+1
271+ sta __patch_root_table+1
272+ lda #>_SquareRootTable+1
273+ sta __patch_root_table+2
274+
275+ ldx #1 ; n=1
276+ stx nOddValue
277+
278+loop_start
279+ ; squared_value+=nOddValue;
280+ .(
281+ clc
282+ lda squared_value+0
283+ adc nOddValue+0
284+ sta squared_value+0
285+ bcc skip
286+ inc squared_value+1
287+skip
288+ .)
289+
290+ ; if (n<60)
291+ ; {
292+ ; SquareTableLow[n] =squared_value&255;
293+ ; SquareTableHigh[n]=(squared_value>>8);
294+ ; }
295+ .(
296+ cpx #60
297+ bcs skip
298+
299+ lda squared_value+0
300+ sta _SquareTableLow,x
301+
302+ lda squared_value+1
303+ sta _SquareTableHigh,x
304+skip
305+ .)
306+
307+ ; nTemp=nOddValue;
308+ ; while (nTemp)
309+ ; {
310+ ; *ptr_root_table++=n;
311+ ; nTemp--;
312+ ; }
313+ ldy nOddValue
314+inner_loop
315+__patch_root_table
316+ stx $1234
317+ .(
318+ inc __patch_root_table+1
319+ bne skip
320+ inc __patch_root_table+2
321+skip
322+ .)
323+ dey
324+ bne inner_loop
325+
326+ ; nOddValue+=2;
327+ inc nOddValue
328+ inc nOddValue
329+
330+ inx ; n++;
331+
332+loop_test
333+ cpx #82 ; while (n!=77); // 77*77
334+ bne loop_start
335+
336+ rts
337+.)
338+
339+
340+/*
341+void CreateHalfDisc()
342+{
343+ unsigned char x,y;
344+ unsigned char* ptr_part_buffer;
345+ unsigned char* ptr_screen;
346+ unsigned int nSquareDistance;
347+ unsigned char nSquareRoot;
348+ unsigned char xx,yy;
349+
350+ ptr_part_buffer=DiscPartTable;
351+ yy=58;
352+ for (y=0;y<60;y++)
353+ {
354+ xx=0;
355+ for (x=0;x<20;x++)
356+ {
357+ nSquareDistance =((unsigned int)SquareTableHigh[xx]<<8)|SquareTableLow[xx];
358+ nSquareDistance+=((unsigned int)SquareTableHigh[yy]<<8)|SquareTableLow[yy];
359+ nSquareRoot=SquareRootTable[nSquareDistance];
360+ ptr_part_buffer[x]=nSquareRoot;
361+ xx+=3;
362+ }
363+ yy--;
364+
365+ ptr_part_buffer+=20;
366+ }
367+}
368+*/
369+
370+// Part one, generate the right part
371+_CreateHalfDisc
372+.(
373+ lda #<_DiscPartTable
374+ sta tmp0+0
375+
376+ lda #>_DiscPartTable
377+ sta tmp0+1
378+
379+ ldy #58
380+loop_y
381+ sty yy
382+
383+ ; nSquareDistance+=((unsigned int)SquareTableHigh[yy]<<8)|SquareTableLow[yy];
384+
385+ clc
386+ lda #<_SquareRootTable
387+ adc _SquareTableLow,y
388+ sta tmp1+0
389+ lda #>_SquareRootTable
390+ adc _SquareTableHigh,y
391+ sta tmp1+1
392+
393+ ldy #0
394+ ldx #0
395+loop_x
396+ ; nSquareDistance+=((unsigned int)SquareTableHigh[xx]<<8)|SquareTableLow[xx];
397+ ; ptr_part_buffer[x]=SquareRootTable[nSquareDistance];
398+ clc
399+ lda _SquareTableLow,x
400+ adc tmp1+0
401+ sta __patch+1
402+ lda _SquareTableHigh,x
403+ adc tmp1+1
404+ sta __patch+2
405+
406+__patch
407+ lda $1234
408+
409+ sta (tmp0),y
410+
411+ inx
412+ inx
413+ ;inx // 3x inx gives a circle, 2x inx gives a flatish elipsoid
414+
415+ iny
416+ cpy #20
417+ bne loop_x
418+
419+ ; ptr_part_buffer+=20;
420+ clc
421+ lda tmp0+0
422+ adc #20
423+ sta tmp0+0
424+ bcc skip
425+ inc tmp0+1
426+skip
427+
428+ ldy yy
429+ dey
430+ bne loop_y
431+
432+ rts
433+.)
434+
435+
436+
437+/*
438+void MirrorTheDisc()
439+{
440+ unsigned char* ptr_part_buffer;
441+ unsigned char* ptr_full_buffer;
442+ unsigned char x,y;
443+ unsigned char nSquareRoot;
444+
445+ ptr_part_buffer=DiscPartTable;
446+ ptr_full_buffer=DiscFullTable;
447+ for (y=0;y<60;y++)
448+ {
449+ for (x=0;x<20;x++)
450+ {
451+ nSquareRoot=*ptr_part_buffer++;
452+ nSquareRoot>>=1;
453+
454+ ptr_full_buffer[20+x]=nSquareRoot;
455+ ptr_full_buffer[20-x]=nSquareRoot;
456+
457+ ptr_full_buffer[20+x+40]=nSquareRoot+1;
458+ ptr_full_buffer[20-x+40]=nSquareRoot+1;
459+ }
460+ ptr_full_buffer+=80;
461+ }
462+}
463+*/
464+
465+
466+// Part two, generate the complete palette
467+// This part erase the content of SquareTable and SquareRootTable
468+_MirrorTheDisc
469+.(
470+ ; ptr_part_buffer=DiscPartTable;
471+ ; ptr_full_buffer=DiscFullTable;
472+ lda #<_DiscPartTable
473+ sta tmp0+0
474+ lda #>_DiscPartTable
475+ sta tmp0+1
476+
477+ lda #<_DiscFullTable
478+ sta tmp1+0
479+ lda #>_DiscFullTable
480+ sta tmp1+1
481+
482+ lda #60
483+ sta y
484+loop_y
485+
486+ lda #20
487+ sta x0
488+ sta x1
489+ lda #20+40
490+ sta x2
491+ sta x3
492+
493+ ldy #0
494+loop_x
495+ ; nSquareRoot=*ptr_part_buffer++;
496+ ; nSquareRoot>>=1;
497+ sty x
498+ lda (tmp0),y
499+ lsr
500+ sta nSquareRoot
501+
502+ ; ptr_full_buffer[20+x]=nSquareRoot;
503+ ; ptr_full_buffer[20-x]=nSquareRoot;
504+ ldy x0
505+ dec x0
506+ sta (tmp1),y
507+ ldy x1
508+ inc x1
509+ sta (tmp1),y
510+
511+ inc nSquareRoot
512+ lda nSquareRoot
513+
514+ ; ptr_full_buffer[20+x+40]=nSquareRoot+1;
515+ ; ptr_full_buffer[20-x+40]=nSquareRoot+1;
516+ ldy x2
517+ dec x2
518+ sta (tmp1),y
519+ ldy x3
520+ inc x3
521+ sta (tmp1),y
522+
523+ ldy x
524+ iny
525+ cpy #20
526+ bne loop_x
527+
528+ ; ptr_part_buffer+=40;
529+ .(
530+ clc
531+ lda tmp0+0
532+ adc #20
533+ sta tmp0+0
534+ bcc skip
535+ inc tmp0+1
536+skip
537+ .)
538+
539+ ; ptr_full_buffer+=80;
540+ .(
541+ clc
542+ lda tmp1+0
543+ adc #80
544+ sta tmp1+0
545+ bcc skip
546+ inc tmp1+1
547+skip
548+ .)
549+
550+ dec y
551+ bne loop_y
552+ rts
553+.)
554+
555+
556+/*
557+ unsigned char x,y;
558+ unsigned char* ptr_full_buffer;
559+ unsigned char* ptr_screen;
560+ unsigned char xx,yy;
561+
562+ // Pass 1, generate the green area
563+ ptr_full_buffer=DiscFullTable+40;
564+ ptr_screen=(unsigned char*)0xa000+40;
565+ for (y=1;y<120;y++)
566+ {
567+ ptr_full_buffer[0]=0;
568+ for (x=1;x<40;x++)
569+ {
570+ if (ptr_full_buffer[x-40]>=254)
571+ {
572+ // If some graphics detected higher in the column, force as graphics
573+ ptr_full_buffer[x]=255;
574+ }
575+ else
576+ {
577+ if (ptr_screen[x]!=64)
578+ {
579+ // There is graphics here
580+ ptr_full_buffer[x]=255;
581+ }
582+ else
583+ if (ptr_screen[x+40]!=64)
584+ {
585+ // Graphics lower
586+ ptr_full_buffer[x]=254;
587+ }
588+ }
589+ }
590+ ptr_full_buffer+=40;
591+ ptr_screen+=40;
592+ }
593+*/
594+
595+// Pass 1, generate the green area
596+_FilterTheDisc1
597+.(
598+ ;ptr_screen=(unsigned char*)0xa000+40;
599+ ;ptr_full_buffer=DiscFullTable+40;
600+ lda #<$a000
601+ sta tmp0+0
602+ lda #>$a000
603+ sta tmp0+1
604+
605+ lda #<_DiscFullTable
606+ sta tmp1+0
607+ lda #>_DiscFullTable
608+ sta tmp1+1
609+
610+ lda #119
611+ sta y
612+loop_y
613+ ; ptr_full_buffer[0]=0;
614+ ldy #0
615+ sta (tmp1),y
616+
617+ lda #0+39
618+ sta x0
619+
620+ lda #40+39
621+ sta x1
622+
623+ lda #80+39
624+ sta x2
625+loop_x
626+
627+ ldy x0
628+ lda (tmp1),y
629+
630+ cmp #254
631+ bcc test_for_graphics
632+
633+ ; if (ptr_full_buffer[x]>=254)
634+ ; {
635+ ; // If some graphics detected higher in the column, force as graphics
636+ ; ptr_full_buffer[x+40]=255;
637+ ; }
638+propagate_masking
639+ lda #255
640+ bne do_change
641+
642+ ; else
643+ ; {
644+ ; if (ptr_screen[x+40]!=64)
645+ ; {
646+ ; // There is graphics here
647+ ; ptr_full_buffer[x+40]=255;
648+ ; }
649+ ; else
650+ ; if (ptr_screen[x+80]!=64)
651+ ; {
652+ ; // Graphics lower
653+ ; ptr_full_buffer[x+40]=254;
654+ ; }
655+ ; }
656+test_for_graphics
657+ ldy x1
658+ lda (tmp0),y
659+ cmp #64
660+ bne graphics_here
661+
662+ ldy x2
663+ lda (tmp0),y
664+ cmp #64
665+ beq end_test
666+
667+graphics_lower
668+ lda #254
669+ bne do_change
670+
671+graphics_here
672+ lda #255
673+ bne do_change
674+
675+do_change
676+ ; ptr_full_buffer[x+40]=???;
677+ ldy x1
678+ sta (tmp1),y
679+
680+end_test
681+
682+ dec x1
683+ dec x2
684+ dec x0
685+ bne loop_x
686+
687+ ; ptr_screen+=40;
688+ .(
689+ clc
690+ lda tmp0+0
691+ adc #40
692+ sta tmp0+0
693+ bcc skip
694+ inc tmp0+1
695+skip
696+ .)
697+
698+ ; ptr_full_buffer+=40;
699+ .(
700+ clc
701+ lda tmp1+0
702+ adc #40
703+ sta tmp1+0
704+ bcc skip
705+ inc tmp1+1
706+skip
707+ .)
708+
709+ dec y
710+ bne loop_y
711+
712+ rts
713+.)
714+
715+
716+/*
717+void PrepareCosTable()
718+{
719+ unsigned int value;
720+ unsigned char angle;
721+
722+ angle=0;
723+ do
724+ {
725+ value=CosTable[angle];
726+ value=(value*6)/256;
727+ CosTable[angle]=(unsigned char)value;
728+ angle++;
729+ }
730+ while (angle);
731+}
732+*/
733+
734+_PrepareCosTable
735+ ;jmp _PrepareCosTable
736+.(
737+ ldx #0
738+loop
739+ clc
740+ lda _CosTable,x
741+ adc _CosTable,x
742+ sta reg0+0 ; x2
743+ lda #0
744+ adc #0 ; Just to get the carry
745+ sta reg0+1
746+
747+ clc
748+ lda reg0+0
749+ adc reg0+0
750+ sta reg1+0 ; x4
751+ lda reg0+1
752+ adc reg0+1
753+ sta reg1+1 ; x4
754+
755+ clc
756+ lda reg0+0
757+ adc reg1+0
758+ sta reg1+0 ; x6
759+ lda reg0+1
760+ adc reg1+1
761+ sta reg1+1 ; x6
762+
763+ lda reg1+1
764+ sta _CosTable,x
765+ inx
766+ bne loop
767+ rts
768+.)
769+
770+
771+
772+/*
773+ // pass two, other stuff
774+ ptr_full_buffer=DiscFullTable+40;
775+ for (y=1;y<120;y++)
776+ {
777+ for (x=1;x<39;x++)
778+ {
779+ if (ptr_full_buffer[x]<254)
780+ {
781+ // Empty area, we scan around
782+ if (ptr_full_buffer[x-1]==255)
783+ {
784+ ptr_full_buffer[x]=254;
785+ }
786+ else
787+ if (ptr_full_buffer[x+1]==255)
788+ {
789+ ptr_full_buffer[x]=254;
790+ }
791+ }
792+ }
793+ ptr_full_buffer+=40;
794+ ptr_screen+=40;
795+ }
796+*/
797+
798+_FilterTheDisc2
799+.(
800+ ;ptr_full_buffer=DiscFullTable+40;
801+ lda #<_DiscFullTable
802+ sta tmp0+0
803+ lda #>_DiscFullTable
804+ sta tmp0+1
805+
806+ lda #120
807+ sta y
808+loop_y
809+ ; ptr_full_buffer[0]=0;
810+ ldy #0
811+ sta (tmp1),y
812+
813+ lda #37
814+ sta x0
815+
816+ lda #38
817+ sta x1
818+
819+ lda #39
820+ sta x2
821+
822+loop_x
823+ ; if (ptr_full_buffer[x]<254)
824+ ; {
825+ ; }
826+ ldy x1
827+ lda (tmp0),y
828+ cmp #254
829+ bcs end_test
830+
831+ ; // Empty area, we scan around
832+ ; if (ptr_full_buffer[x-1]==255)
833+ ; {
834+ ; ptr_full_buffer[x]=254;
835+ ; }
836+ ; else
837+ ; if (ptr_full_buffer[x+1]==255)
838+ ; {
839+ ; ptr_full_buffer[x]=254;
840+ ; }
841+ ldy x0
842+ lda (tmp0),y
843+ cmp #255
844+ beq fill
845+
846+ ldy x2
847+ lda (tmp0),y
848+ cmp #255
849+ bne end_test
850+
851+fill
852+ lda #254
853+ ldy x1
854+ sta (tmp0),y
855+
856+end_test
857+
858+ dec x1
859+ dec x2
860+ dec x0
861+ bne loop_x
862+
863+ ; ptr_full_buffer+=40;
864+ .(
865+ clc
866+ lda tmp0+0
867+ adc #40
868+ sta tmp0+0
869+ bcc skip
870+ inc tmp0+1
871+skip
872+ .)
873+
874+ dec y
875+ bne loop_y
876+
877+
878+ rts
879+.)
880+
881+
882+
883+ .bss
884+
885+*=$C000
886+
887+// .dsb 256-(*&255)
888+
889+_BssStart_
890+
891+// Used by:
892+// - Polyfiller
893+// - Lines
894+// - Mandelbrot
895+_TableMul6 .dsb 256
896+_TableDiv6 .dsb 256
897+_TableMod6 .dsb 256
898+
899+// Used by:
900+// - Polyfiller
901+_Mod6Left .dsb 256
902+_Mod6Right .dsb 256
903+_MinX .dsb 256
904+_MaxX .dsb 256
905+
906+_BufferAddrLow
907+_HiresAddrLow .dsb 176
908+_TextAddrLow .dsb 80
909+_BufferAddrHigh
910+_HiresAddrHigh .dsb 176
911+_TextAddrHigh .dsb 80
912+
913+_BufferUnpack .dsb 8000
914+
915+_LabelPicture1 = _BufferUnpack+2010*1
916+_LabelPicture2 = _BufferUnpack+2010*2
917+_LabelPicture3 = _BufferUnpack+2010*3
918+_LabelPicture4 = _BufferUnpack+2010*4
919+_LabelPicture5 = _BufferUnpack+2010*5
920+
921+_SquareRootTable = _BufferUnpack // 6680 bytes long
922+_SquareTableLow = _SquareRootTable+6680 // 60 bytes long
923+_SquareTableHigh = _SquareTableLow+60 // 60 bytes long
924+_DiscPartTable = _SquareTableHigh+60 // 20*60=1200 bytes long
925+
926+_DiscFullTable = _BufferUnpack // 40*100=4000
927+
928+_BssEnd_
929+
930+ .text
931+
932+
933+
--- public/oric/games/Space 1999/Sources/trailer/text.s (nonexistent)
+++ public/oric/games/Space 1999/Sources/trailer/text.s (revision 365)
@@ -0,0 +1,928 @@
1+
2+;
3+; This file should contain everything related to the display of text/sprites from a bitmap
4+;
5+
6+; Our picture file contains a number of different fonts
7+; 6x12 lower case
8+; 8x9 upper case
9+; 11x19 lower case
10+; 18x18 Upper case
11+; each font contains letters from a-z, A-Z, numbers, and some punctation (9 signs)
12+; Total is 26+26+10+9=71 characters per font, 142 characters in total on the page
13+
14+; For each character we need
15+; x0
16+; y0
17+; width
18+; height
19+; base line
20+; -> 5 bytes per character, x136=680 bytes
21+
22+; a b c d e f g h i j k l m n o p q r s t u v w x y z
23+;_FontCharX0 .byt 0,7,14,20,27,34,39,46,53,57
24+;_FontCharY0 .byt 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
25+;_FontCharWidth .byt 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6
26+;_FontCharHeight .byt 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9
27+;_FontCharBase .byt 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8
28+
29+; Should probably be exported automatically by PictConv with a dedicated format to extract rectangles.
30+
31+
32+ .zero
33+
34+_CAR .dsb 1
35+
36+src_x .dsb 1
37+src_y .dsb 1
38+dst_x .dsb 1
39+dst_y .dsb 1
40+w .dsb 1
41+h .dsb 1
42+
43+
44+ .text
45+
46+
47+_FontInit
48+.(
49+ ; Set the default base charset
50+ lda #0
51+ sta _FontCharOffset
52+
53+ ldx #0
54+loop_clear
55+ sta _FontIndex,x
56+ inx
57+ bne loop_clear
58+
59+loop_init
60+ ldy _FontChars,x
61+ beq exit
62+ txa
63+ sta _FontIndex,y
64+ inx
65+ jmp loop_init
66+exit
67+ rts
68+.)
69+
70+
71+; First, black paper attribute (16)
72+; Then replace by neutral (64) value
73+_BlackScreen
74+.(
75+ lda #16
76+ sta __patch_color+1
77+ jsr FillScreen
78+ lda #64
79+ sta __patch_color+1
80+ jsr FillScreen
81+ rts
82+
83+FillScreen
84+__patch_color
85+ lda #16
86+
87+ ldy #40
88+loop_x
89+ sta $a000-1+40*0,y
90+ sta $a000-1+40*1,y
91+ sta $a000-1+40*2,y
92+ sta $a000-1+40*3,y
93+ sta $a000-1+40*4,y
94+ sta $a000-1+40*5,y
95+ sta $a000-1+40*6,y
96+ sta $a000-1+40*7,y
97+ sta $a000-1+40*8,y
98+ sta $a000-1+40*9,y
99+
100+ sta $a000-1+40*10,y
101+ sta $a000-1+40*11,y
102+ sta $a000-1+40*12,y
103+ sta $a000-1+40*13,y
104+ sta $a000-1+40*14,y
105+ sta $a000-1+40*15,y
106+ sta $a000-1+40*16,y
107+ sta $a000-1+40*17,y
108+ sta $a000-1+40*18,y
109+ sta $a000-1+40*19,y
110+
111+ sta $a000-1+40*20,y
112+ sta $a000-1+40*21,y
113+ sta $a000-1+40*22,y
114+ sta $a000-1+40*23,y
115+ sta $a000-1+40*24,y
116+ sta $a000-1+40*25,y
117+ sta $a000-1+40*26,y
118+ sta $a000-1+40*27,y
119+ sta $a000-1+40*28,y
120+ sta $a000-1+40*29,y
121+
122+ sta $a000-1+40*30,y
123+ sta $a000-1+40*31,y
124+ sta $a000-1+40*32,y
125+ sta $a000-1+40*33,y
126+ sta $a000-1+40*34,y
127+ sta $a000-1+40*35,y
128+ sta $a000-1+40*36,y
129+ sta $a000-1+40*37,y
130+ sta $a000-1+40*38,y
131+ sta $a000-1+40*39,y
132+
133+ sta $a000-1+40*40,y
134+ sta $a000-1+40*41,y
135+ sta $a000-1+40*42,y
136+ sta $a000-1+40*43,y
137+ sta $a000-1+40*44,y
138+ sta $a000-1+40*45,y
139+ sta $a000-1+40*46,y
140+ sta $a000-1+40*47,y
141+ sta $a000-1+40*48,y
142+ sta $a000-1+40*49,y
143+
144+ sta $a000-1+40*50,y
145+ sta $a000-1+40*51,y
146+ sta $a000-1+40*52,y
147+ sta $a000-1+40*53,y
148+ sta $a000-1+40*54,y
149+ sta $a000-1+40*55,y
150+ sta $a000-1+40*56,y
151+ sta $a000-1+40*57,y
152+ sta $a000-1+40*58,y
153+ sta $a000-1+40*59,y
154+
155+ sta $a000-1+40*60,y
156+ sta $a000-1+40*61,y
157+ sta $a000-1+40*62,y
158+ sta $a000-1+40*63,y
159+ sta $a000-1+40*64,y
160+ sta $a000-1+40*65,y
161+ sta $a000-1+40*66,y
162+ sta $a000-1+40*67,y
163+ sta $a000-1+40*68,y
164+ sta $a000-1+40*69,y
165+
166+ sta $a000-1+40*70,y
167+ sta $a000-1+40*71,y
168+ sta $a000-1+40*72,y
169+ sta $a000-1+40*73,y
170+ sta $a000-1+40*74,y
171+ sta $a000-1+40*75,y
172+ sta $a000-1+40*76,y
173+ sta $a000-1+40*77,y
174+ sta $a000-1+40*78,y
175+ sta $a000-1+40*79,y
176+
177+ sta $a000-1+40*80,y
178+ sta $a000-1+40*81,y
179+ sta $a000-1+40*82,y
180+ sta $a000-1+40*83,y
181+ sta $a000-1+40*84,y
182+ sta $a000-1+40*85,y
183+ sta $a000-1+40*86,y
184+ sta $a000-1+40*87,y
185+ sta $a000-1+40*88,y
186+ sta $a000-1+40*89,y
187+
188+ sta $a000-1+40*90,y
189+ sta $a000-1+40*91,y
190+ sta $a000-1+40*92,y
191+ sta $a000-1+40*93,y
192+ sta $a000-1+40*94,y
193+ sta $a000-1+40*95,y
194+ sta $a000-1+40*96,y
195+ sta $a000-1+40*97,y
196+ sta $a000-1+40*98,y
197+ sta $a000-1+40*99,y
198+
199+ sta $a000-1+40*100,y
200+ sta $a000-1+40*101,y
201+ sta $a000-1+40*102,y
202+ sta $a000-1+40*103,y
203+ sta $a000-1+40*104,y
204+ sta $a000-1+40*105,y
205+ sta $a000-1+40*106,y
206+ sta $a000-1+40*107,y
207+ sta $a000-1+40*108,y
208+ sta $a000-1+40*109,y
209+
210+ sta $a000-1+40*110,y
211+ sta $a000-1+40*111,y
212+ sta $a000-1+40*112,y
213+ sta $a000-1+40*113,y
214+ sta $a000-1+40*114,y
215+ sta $a000-1+40*115,y
216+ sta $a000-1+40*116,y
217+ sta $a000-1+40*117,y
218+ sta $a000-1+40*118,y
219+ sta $a000-1+40*119,y
220+
221+ sta $a000-1+40*120,y
222+ sta $a000-1+40*121,y
223+ sta $a000-1+40*122,y
224+ sta $a000-1+40*123,y
225+ sta $a000-1+40*124,y
226+ sta $a000-1+40*125,y
227+ sta $a000-1+40*126,y
228+ sta $a000-1+40*127,y
229+ sta $a000-1+40*128,y
230+ sta $a000-1+40*129,y
231+
232+ sta $a000-1+40*130,y
233+ sta $a000-1+40*131,y
234+ sta $a000-1+40*132,y
235+ sta $a000-1+40*133,y
236+ sta $a000-1+40*134,y
237+ sta $a000-1+40*135,y
238+ sta $a000-1+40*136,y
239+ sta $a000-1+40*137,y
240+ sta $a000-1+40*138,y
241+ sta $a000-1+40*139,y
242+
243+ sta $a000-1+40*140,y
244+ sta $a000-1+40*141,y
245+ sta $a000-1+40*142,y
246+ sta $a000-1+40*143,y
247+ sta $a000-1+40*144,y
248+ sta $a000-1+40*145,y
249+ sta $a000-1+40*146,y
250+ sta $a000-1+40*147,y
251+ sta $a000-1+40*148,y
252+ sta $a000-1+40*149,y
253+
254+ sta $a000-1+40*150,y
255+ sta $a000-1+40*151,y
256+ sta $a000-1+40*152,y
257+ sta $a000-1+40*153,y
258+ sta $a000-1+40*154,y
259+ sta $a000-1+40*155,y
260+ sta $a000-1+40*156,y
261+ sta $a000-1+40*157,y
262+ sta $a000-1+40*158,y
263+ sta $a000-1+40*159,y
264+
265+ sta $a000-1+40*160,y
266+ sta $a000-1+40*161,y
267+ sta $a000-1+40*162,y
268+ sta $a000-1+40*163,y
269+ sta $a000-1+40*164,y
270+ sta $a000-1+40*165,y
271+ sta $a000-1+40*166,y
272+ sta $a000-1+40*167,y
273+ sta $a000-1+40*168,y
274+ sta $a000-1+40*169,y
275+
276+ sta $a000-1+40*170,y
277+ sta $a000-1+40*171,y
278+ sta $a000-1+40*172,y
279+ sta $a000-1+40*173,y
280+ sta $a000-1+40*174,y
281+ sta $a000-1+40*175,y
282+ sta $a000-1+40*176,y
283+ sta $a000-1+40*177,y
284+ sta $a000-1+40*178,y
285+ sta $a000-1+40*179,y
286+
287+ sta $a000-1+40*180,y
288+ sta $a000-1+40*181,y
289+ sta $a000-1+40*182,y
290+ sta $a000-1+40*183,y
291+ sta $a000-1+40*184,y
292+ sta $a000-1+40*185,y
293+ sta $a000-1+40*186,y
294+ sta $a000-1+40*187,y
295+ sta $a000-1+40*188,y
296+ sta $a000-1+40*189,y
297+
298+ sta $a000-1+40*190,y
299+ sta $a000-1+40*191,y
300+ sta $a000-1+40*192,y
301+ sta $a000-1+40*193,y
302+ sta $a000-1+40*194,y
303+ sta $a000-1+40*195,y
304+ sta $a000-1+40*196,y
305+ sta $a000-1+40*197,y
306+ sta $a000-1+40*198,y
307+ sta $a000-1+40*199,y
308+
309+ dey
310+ beq end
311+
312+ jmp loop_x
313+end
314+ rts
315+.)
316+
317+
318+_BlackScreenSlow
319+.(
320+ lda #16
321+ sta __patch_color+1
322+ jsr FillScreen
323+ lda #64
324+ sta __patch_color+1
325+ jsr FillScreen
326+ rts
327+
328+FillScreen
329+ ldy #40
330+loop_x
331+ lda #<$a000-1
332+ sta tmp0+0
333+ lda #>$a000-1
334+ sta tmp0+1
335+
336+ ldx #200
337+loop_y
338+__patch_color
339+ lda #16
340+ sta (tmp0),y
341+
342+ clc
343+ lda tmp0+0
344+ adc #40
345+ sta tmp0+0
346+ lda tmp0+1
347+ adc #0
348+ sta tmp0+1
349+
350+ dex
351+ bne loop_y
352+
353+ dey
354+ bne loop_x
355+ rts
356+.)
357+
358+/*
359+void DrawCar()
360+{
361+ unsigned char *psrc_line;
362+ unsigned char *pdst_line;
363+ unsigned char src_x,src_y;
364+ unsigned char w,h;
365+ unsigned char x,y;
366+
367+ CAR+=FontCharOffset;
368+
369+ psrc_line=BufferUnpack;
370+ pdst_line=(unsigned char*)0xa000;
371+
372+ src_x=FontTableX0[CAR];
373+ src_y=FontTableY0[CAR];
374+ w =FontTableWidth[CAR];
375+ h =FontTableHeight[CAR];
376+
377+ psrc_line+=src_y*40;
378+ pdst_line+=Y*40;
379+
380+ for (y=0;y<=h;y++)
381+ {
382+ for (x=0;x<=w;x++)
383+ {
384+ unsigned char *psrc=psrc_line+TableDiv6[src_x+x];
385+ unsigned char *pdst=pdst_line+TableDiv6[X+x];
386+
387+ if ((*psrc)&TableBit6Reverse[src_x+x])
388+ {
389+ // Draw pixel
390+ (*pdst)|=TableBit6Reverse[X+x];
391+ }
392+ else
393+ {
394+ // Erase pixel
395+ (*pdst)&=~TableBit6Reverse[X+x];
396+ }
397+ }
398+ psrc_line+=40;
399+ pdst_line+=40;
400+ }
401+ X+=w+1;
402+}
403+*/
404+
405+; X,Y,CAR
406+_DrawCar
407+.(
408+ ; CAR+=FontCharOffset;
409+ clc
410+ lda _FontCharOffset
411+ adc _CAR
412+ sta _CAR
413+
414+ ; src_x=FontTableX0[CAR];
415+ ; src_y=FontTableY0[CAR];
416+ ; w =FontTableWidth[CAR];
417+ ; h =FontTableHeight[CAR];
418+ ldx _CAR
419+ lda _FontTableX0,x
420+ sta src_x
421+ lda _FontTableY0,x
422+ sta src_y
423+ lda _FontTableWidth,x
424+ sta w
425+ lda _FontTableHeight,x
426+ sta h
427+
428+
429+ ; psrc_line=BufferUnpack+src_y*40; -> tmp4
430+ ldy src_y
431+ clc
432+ lda _HiresAddrLow,y
433+ adc #<_BufferUnpack-$a000
434+ sta tmp4
435+ lda _HiresAddrHigh,y
436+ adc #>_BufferUnpack-$a000
437+ sta tmp4+1
438+
439+
440+ ; pdst_line=(unsigned char*)0xa000+Y*40; -> tmp5
441+ ldy _Y
442+ lda _HiresAddrLow,y
443+ sta tmp5
444+ lda _HiresAddrHigh,y
445+ sta tmp5+1
446+
447+ lda #0
448+ sta y
449+loop_y
450+ lda tmp4+0
451+ sta tmp2+0
452+ lda tmp4+1
453+ sta tmp2+1
454+
455+ lda tmp5+0
456+ sta tmp3+0
457+ lda tmp5+1
458+ sta tmp3+1
459+
460+ ldx _CAR
461+ lda _FontTableX0,x
462+ sta src_x
463+
464+ ldx _X
465+ stx dst_x
466+
467+ lda #0
468+ sta x
469+loop_x
470+ ; unsigned char *psrc=psrc_line+TableDiv6[src_x+x];
471+ ; unsigned char *pdst=pdst_line+TableDiv6[X+x];
472+ ;
473+ ; if ((*psrc)&TableBit6Reverse[src_x+x])
474+ ; {
475+ ; // Draw pixel
476+ ; (*pdst)|=TableBit6Reverse[X+x];
477+ ; }
478+ ; else
479+ ; {
480+ ; // Erase pixel
481+ ; (*pdst)&=~TableBit6Reverse[X+x];
482+ ; }
483+ ldx src_x
484+ lda _TableDiv6,x
485+ tay
486+ lda (tmp4),y
487+ and _TableBit6Reverse,x
488+ beq erase_pixel
489+draw_pixel
490+
491+ ldx dst_x
492+ lda _TableDiv6,x
493+ tay
494+ lda (tmp5),y
495+ ora _TableBit6Reverse,x
496+ sta (tmp5),y
497+
498+ jmp end_pixel
499+
500+erase_pixel
501+
502+ ;ldx dst_x
503+ ;lda _TableDiv6,x
504+ ;tay
505+ ;lda (tmp5),y
506+ ;ora _TableBit6Reverse,x
507+ ;sta (tmp5),y
508+
509+ jmp end_pixel
510+
511+end_pixel
512+
513+ inc src_x
514+ inc dst_x
515+
516+ ldx x
517+ inx
518+ stx x
519+ cpx w
520+ bne loop_x
521+
522+ ; psrc_line+=40;
523+ ; pdst_line+=40;
524+
525+ clc
526+ lda tmp4+0
527+ adc #40
528+ sta tmp4+0
529+ lda tmp4+1
530+ adc #0
531+ sta tmp4+1
532+
533+ clc
534+ lda tmp5+0
535+ adc #40
536+ sta tmp5+0
537+ lda tmp5+1
538+ adc #0
539+ sta tmp5+1
540+
541+ ldy y
542+ iny
543+ sty y
544+ cpy h
545+ bne loop_y
546+
547+ ; X+=w+1;
548+
549+ sec
550+ lda _X
551+ adc w
552+ sta _X
553+
554+ rts
555+.)
556+
557+
558+
559+/*
560+void DrawText(char *text)
561+{
562+ unsigned char car,x,y;
563+ unsigned char base_x;
564+ unsigned char base_y;
565+
566+ base_x=*text++;
567+ base_y=*text++;
568+
569+ x=base_x;
570+ y=base_y;
571+ while (car=*text++)
572+ {
573+ if (car==' ')
574+ {
575+ x+=FontTableWidth[0];
576+ }
577+ else
578+ if (car==10)
579+ {
580+ x=base_x;
581+ y+=*text++;
582+ }
583+ else
584+ if (car==1)
585+ {
586+ FontCharOffset=*text++;
587+ }
588+ else
589+ {
590+ X=x;
591+ Y=y;
592+ CAR=FontIndex[car];
593+ DrawCar();
594+ x=X;
595+ }
596+ }
597+}
598+*/
599+
600+base_x .byt 0
601+base_y .byt 0
602+
603+; A+X = text adress
604+_DrawTextAsm
605+.(
606+ sta tmp0+0
607+ stx tmp0+1
608+
609+ ldy #0
610+ lda (tmp0),y
611+ sta base_x
612+ sta _X
613+ iny
614+
615+ lda (tmp0),y
616+ sta base_y
617+ sta _Y
618+ iny
619+
620+loop_car
621+ lda (tmp0),y
622+ beq exit
623+ iny
624+ cmp #32
625+ beq space
626+ cmp #10
627+ beq new_line
628+ cmp #4
629+ beq copy_attributes
630+ cmp #3
631+ beq offset_y
632+ cmp #2
633+ beq offset_x
634+ cmp #1
635+ beq change_base
636+
637+drawcar
638+ tax
639+ lda _FontIndex,x
640+ sta _CAR
641+ sty tmp1
642+ jsr _DrawCar ; X,Y,CAR
643+ ldy tmp1
644+ jmp loop_car
645+
646+offset_x
647+ clc
648+ lda _X
649+ adc (tmp0),y
650+ sta _X
651+ iny
652+ jmp loop_car
653+
654+space
655+ clc
656+ lda _X
657+ adc _FontTableWidth
658+ sta _X
659+ jmp loop_car
660+
661+new_line
662+ lda base_x
663+ sta _X
664+offset_y
665+ clc
666+ lda _Y
667+ adc (tmp0),y
668+ sta _Y
669+ iny
670+ jmp loop_car
671+
672+change_base
673+ lda (tmp0),y
674+ iny
675+ sta _FontCharOffset
676+ jmp loop_car
677+
678+exit
679+
680+ rts
681+
682+copy_attributes
683+ ;jmp copy_attributes
684+.(
685+ sty tmp1
686+
687+ clc
688+ lda _X
689+ adc #5
690+ tax
691+ lda _TableDiv6,x
692+ sta __patch_x2+1
693+
694+ lda (tmp0),y
695+ tax
696+
697+ ldy _Y
698+ lda _HiresAddrLow,y
699+ sta tmp2+0
700+ lda _HiresAddrHigh,y
701+ sta tmp2+1
702+loop
703+ ldy #0
704+ lda (tmp2),y
705+__patch_x2
706+ ldy #1
707+ sta (tmp2),y
708+
709+ clc
710+ lda tmp2+0
711+ adc #40
712+ sta tmp2+0
713+ lda tmp2+1
714+ adc #0
715+ sta tmp2+1
716+
717+ dex
718+ bne loop
719+
720+ ldy tmp1
721+ iny
722+ jmp loop_car
723+.)
724+
725+.)
726+
727+
728+
729+
730+
731+_FontChars
732+ .byt "abcdefghijklmnopqrstuvwxyz"
733+ .byt "0123456789"
734+ .byt ".,",59,58,"!?/'-"
735+ .byt "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
736+ .byt 0
737+
738+_FontCharOffset
739+ .byt 0
740+
741+_FontIndex
742+ .dsb 256
743+
744+
745+; Special codes:
746+; - 0=end of text
747+; - 1=select base character (followed by character index)
748+; - 2=offset X (followed by signed pixel offset)
749+; - 3=offset Y (followed by signed pixel offset)
750+; - 4=copy column zero attributes to next column (followed by number of lines to copy)
751+; - 10=carriage return (followed by number of scanlines to skip)
752+;
753+#define DONE 0
754+#define FONT 1
755+#define MOVX 2
756+#define MOVY 3
757+
758+_Message_StarringMartinLandau
759+ .byt 50,72
760+ .byt 1,0,"starring",10,15,1,71,"Martin",10,21,"Landau"
761+ .byt DONE
762+
763+_Message_StarringBarbaraBain
764+ .byt 160,51
765+ .byt 1,0,"starring",10,13,1,71,"Barbara",10,20,"Bain"
766+ .byt DONE
767+
768+_Message_StarringBarryMorse
769+ .byt 152,17
770+ .byt 1,0,"also starring",10,15,1,71,"Barry",10,21,"Morse"
771+ .byt DONE
772+
773+_Message_SylviaAnderson
774+ .byt 72,117
775+ .byt 1,0,"producer",10,15,1,71,"Sylvia",10,21,"Anderson"
776+ .byt DONE
777+
778+_Message_GerryAnderson
779+ .byt 126,27
780+ .byt 1,0,"executive producer",10,15,1,71," Gerry",10,21," Anderson"
781+ .byt DONE
782+
783+_Message_Music
784+ .byt 12,80
785+ .byt 1,0,"original theme",10,15
786+ .byt 1,71,"Barry",10,21
787+ .byt "Gray"
788+ .byt DONE
789+
790+_Message_Chema
791+ .byt 120,10
792+ .byt 1,0,"designer/programmer",10,15
793+ .byt 1,71," Jose Maria",10,21
794+ .byt 1,0," 'Chema'",10,11
795+ .byt 1,71," Enguita"
796+ .byt DONE
797+
798+_Message_Twilighte
799+ .byt 110,130
800+ .byt 1,0,"adaptation",10,15
801+ .byt 1,71,"Jonathan",10,21
802+ .byt 1,0,"'Twilighte'",10,11
803+ .byt 1,71,"Bristow"
804+ .byt DONE
805+
806+_Message_Dbug
807+ .byt 126,20
808+ .byt 1,0,"intro",10,15
809+ .byt 1,71," Mickael",10,22
810+ .byt 1,0," 'Dbug'",10,13
811+ .byt 1,71," Pointier"
812+ .byt DONE
813+
814+_Message_ProducedBy
815+ .byt 90,40
816+ .byt 1,0,"produced by"
817+ .byt DONE
818+
819+_Message_Title
820+ .byt 20,60
821+ .byt 1,71,"'OUT OF MEMORY'"
822+ .byt DONE
823+
824+_Message_Exclusive
825+ .byt 20,82
826+ .byt 1,0,"An exclusive Space:1999 episode for",10,13
827+ .byt 1,0," your Oric Microdisc system.",10,15
828+ .byt DONE
829+
830+_Message_Website
831+ .byt 30,120
832+ .byt 1,0," Download it today on:",10,13
833+ .byt 1,0,"http",58,"/","/","space1999.defence-force.org",0
834+
835+_Message_Quote1
836+ .byt 6,0
837+ .byt 1,0,"'Cult 1970s sci-fi plus obscure 1980s 8-bit",10,13
838+ .byt 1,0,"computer",58," something beautifully obscure.'",10,13
839+ .byt 1,0," Malevolent"
840+ .byt DONE
841+
842+_Message_Quote2
843+ .byt 6,50
844+ .byt 1,0,"'For modern gaming, check out Space",10,13
845+ .byt 1,0,"1999, a very nifty isometric adventure.'",10,13
846+ .byt 1,0," Retrogamer"
847+ .byt DONE
848+
849+_Message_Quote3
850+ .byt 6,100
851+ .byt 1,0,"'If only games like this were out for the",10,13
852+ .byt 1,0,"machine in the 80s. I might not have",10,13
853+ .byt 1,0,"been quite so gutted when I got one of ",10,13
854+ .byt 1,0,"these for Christmas.' Caffeinekid"
855+ .byt DONE
856+
857+_Message_Quote4
858+ .byt 6,170
859+ .byt 1,0,"'Ay, caramba!'",10,13
860+ .byt 1,0," Bart Simpson"
861+ .byt DONE
862+
863+
864+_Message_Rating
865+ .byt 12,20
866+ .byt 1,0,"THE FOLLOWING",1,71,MOVY,256-6,"PREVIEW",MOVY,6,1,0,"HAS BEEN",10,14
867+ .byt 1,0,"APPROVED FOR",10,16
868+ .byt 1,71," ALL AUDIENCES",10,28
869+ .byt 1,0," BY THE MOVING PIXELS ASSOCIATION",10,30
870+ .byt 1,0,"THE FILM ADVERTISED HAS BEEN RATED",10,20
871+ .byt DONE
872+
873+_Message_Rating_Bottom
874+ .byt 12,123
875+ .byt 1,71,MOVX,2,"G",1,0,MOVX,40,MOVY,3,"GENERAL AUDIENCES",10,22-3
876+ .byt 1,0,MOVX,3,"Some Material May Be Slow Or Ugly",10,15
877+ .byt 1,0,MOVX,3,"Isometric 3D does not require glasses"
878+ .byt DONE
879+
880+_Message_EmergencyRedAlert
881+ .byt 55,80
882+ .byt 1,71
883+ .byt "EMERGENCY",10,40
884+ .byt MOVX,45,"RED",10,25
885+ .byt MOVX,35,"ALERT",10,30
886+ .byt DONE
887+
888+
889+_FontTableX0
890+ .byt 1,8,15,21,28,35,40,47,54,56,60,67,69,79,86,93
891+ .byt 100,107,111,116,120,126,134,146,153,160,167,172,176,181,186,191
892+ .byt 196,201,206,211,1,3,6,9,11,13,18,22,26,31,39,45
893+ .byt 53,60,66,71,80,87,89,94,100,105,115,122,131,137,146,152
894+ .byt 158,164,171,179,189,197,205,1,13,25,37,49,61,68,80,91
895+ .byt 95,101,112,116,134,145,157,169,181,187,195,202,213,223,1,13
896+ .byt 25,35,48,56,69,82,96,109,121,134,147,159,163,168,173,177
897+ .byt 181,192,201,209,1,18,30,49,64,74,83,103,115,119,128,141
898+ .byt 149,1,15,35,46,66,78,90,100,112,128,150,166,180
899+_FontTableY0
900+ .byt 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
901+ .byt 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
902+ .byt 2,2,2,2,15,15,15,15,15,15,15,15,15,15,15,15
903+ .byt 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15
904+ .byt 15,15,15,15,15,15,15,32,32,32,32,32,32,32,32,32
905+ .byt 32,32,32,32,32,32,32,32,32,32,32,32,32,32,51,51
906+ .byt 51,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55
907+ .byt 55,55,55,55,76,76,76,76,76,76,76,76,76,76,76,76
908+ .byt 76,95,95,95,95,95,95,95,95,95,95,95,95,95
909+_FontTableWidth
910+ .byt 6,6,5,6,6,4,6,6,1,3,6,1,9,6,6,6
911+ .byt 6,3,4,3,5,7,11,6,6,6,4,3,4,4,4,4
912+ .byt 4,4,4,4,1,2,2,1,1,4,3,3,4,7,5,7
913+ .byt 6,5,4,8,6,1,4,5,4,9,6,8,5,8,5,5
914+ .byt 5,6,7,9,7,7,6,11,11,11,11,11,6,11,10,3
915+ .byt 5,10,3,17,10,11,11,11,5,7,6,10,9,15,11,11
916+ .byt 9,12,7,12,12,13,12,11,12,12,11,3,4,4,3,3
917+ .byt 10,8,7,7,16,11,18,14,9,8,19,11,3,8,12,7
918+ .byt 21,13,19,10,19,11,11,9,11,15,21,15,13,10
919+_FontTableHeight
920+ .byt 9,9,9,9,9,9,12,9,9,12,9,9,9,9,9,12
921+ .byt 12,9,9,9,9,9,9,9,12,9,9,9,9,9,9,9
922+ .byt 9,9,9,9,9,10,10,9,9,9,9,9,9,9,9,9
923+ .byt 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9
924+ .byt 9,9,9,9,9,9,9,18,18,18,18,18,18,22,18,18
925+ .byt 22,18,18,18,18,18,22,22,18,18,18,18,18,18,18,22
926+ .byt 18,18,18,18,18,18,18,18,18,18,18,18,20,20,18,18
927+ .byt 18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18
928+ .byt 18,18,18,18,18,18,18,18,18,18,18,18,18,18
Show on old repository browser