• R/O
  • SSH
  • HTTPS

oricsdk: Commit


Commit MetaInfo

Revision1504 (tree)
Time2019-03-16 03:46:54
Authordbug

Log Message

QuantumFxTurboUltra: CEO competition version source code (with assets and scripts)

Change Summary

Incremental Difference

--- users/dbug/games/Road/Main.c (revision 1503)
+++ users/dbug/games/Road/Main.c (revision 1504)
@@ -1,7 +1,7 @@
11 // --------------------------------------
2-// Racing
2+// Quantum Fx Turbo Ultra
33 // --------------------------------------
4-// (c) 2002 Mickael Pointier.
4+// (c) 2002-2018 Mickael Pointier.
55 // This code is provided as-is.
66 // I do not assume any responsability
77 // concerning the fact this is a bug-free
@@ -20,23 +20,31 @@
2020 // Note: This text was typed with a Win32
2121 // editor. So perhaps the text will not be
2222 // displayed correctly with other OS.
23+// --------------------------------------
24+// Release Notes:
25+// V1.0 - Dec 16 2018
26+// - First version sent to CEO
27+//
28+// V1.1
29+// - Added the version number on the attract mode page
30+// - Fixed some issues with the road curvature
31+// - Enabled audio on race start when filling energy
32+// - Added some basic scoring system
33+//
2334
35+
36+
2437 #include "lib.h"
2538 #include "profile.h"
2639
40+extern void Tables_InitialiseScreenAddrTable();
2741
2842 extern void TurnLeftSimple();
2943 extern void TurnRightSimple();
44+extern void ScrollColors();
3045
3146 void VSync();
3247
33-extern unsigned int VSyncCounter1;
34-extern unsigned int VSyncCounter2;
35-
36-void VSyncGetCounter();
37-
38-void IrqOff();
39-
4048 void Temporize();
4149
4250 void ReadKeyboard();
@@ -56,7 +64,24 @@
5664
5765 void RoadErase();
5866
67+void DrawGameLogo();
68+void AnimateGameLogoRasters();
5969
70+void EraseDrawRoadSign();
71+void DrawRoadSign();
72+void ClearRoadArea();
73+void DisplayEnergySpeed();
74+
75+
76+void DrawText();
77+void EraseEvenLines();
78+void System_Initialize();
79+
80+void HandleGamePlay();
81+
82+void PsgStopSound();
83+
84+
6085 extern unsigned char picture_font_1[];
6186
6287 extern unsigned char CosTable[];
@@ -63,26 +88,66 @@
6388 extern unsigned char LeftTable[];
6489
6590
66-int RoadMiddleTable[128];
67-int RoadOffsetTable[128];
91+//extern int RoadMiddleTable[128];
92+extern char RoadMiddleTableLow[];
93+extern char RoadMiddleTableHigh[];
6894
69-char RoadWidthTable[128];
95+//extern int RoadOffsetTable[128];
96+extern char RoadOffsetTableLow[];
97+extern char RoadOffsetTableHigh[];
7098
99+extern char RoadWidthTable[];
100+
71101 extern unsigned char Rasters[];
102+extern unsigned char AttractModeSequence;
72103
73104
105+extern unsigned char* TrackDataPtr;
106+extern unsigned char TrackData[];
74107
108+extern unsigned char RoadSignLow;
109+extern unsigned char RoadSignHigh;
75110
111+extern int Position;
76112
77-// =================== color cycle test
113+extern char Raster1[];
78114
79-char Raster1[32]= { 3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1 };
115+extern unsigned char DivTable[];
80116
81-int DivTable[256];
82117
83118
119+extern UpdatePsgRegisters();
84120
121+extern unsigned int PsgfreqA; // 0 1
122+extern unsigned int PsgfreqB; // 2 3
123+extern unsigned int PsgfreqC; // 4 5
124+extern unsigned char PsgfreqNoise; // 6
125+extern unsigned char Psgmixer; // 7
126+extern unsigned char PsgvolumeA; // 8
127+extern unsigned char PsgvolumeB; // 9
128+extern unsigned char PsgvolumeC; // 10
129+extern unsigned int PsgfreqShape; // 11 12
130+extern unsigned char PsgenvShape; // 13
85131
132+extern unsigned char PlayerEnergy;
133+extern unsigned char PlayerSpeed;
134+
135+
136+void PressSpaceToStart()
137+{
138+ memset((char*)0xbb80+25*40,32,40*3);
139+ sprintf((char*)0xbb80+26*40+1,"\16\7ACTIVATE QUANTUM ACTIVATOR TO START");
140+ sprintf((char*)0xbb80+27*40+1,"\16\6ACTIVATE QUANTUM ACTIVATOR TO START");
141+}
142+
143+
144+void EraseSpaceToStart()
145+{
146+ memset((char*)0xbb80+25*40,32,40*3);
147+}
148+
149+
150+
86151 void CreateDivTable()
87152 {
88153 int y;
@@ -92,19 +157,16 @@
92157 //
93158 // Fill div table
94159 //
95- DivTable[y]=4096/(y+16);
160+ DivTable[y]=(4096/(y+16))>>2;
96161 }
97162 }
98163
99164
100165
101-int Position=0;
102166
103-
104-
105-void ScrollColors()
167+void ScrollColorsC()
106168 {
107- int f;
169+ unsigned char f;
108170 int y;
109171 char *adr;
110172 int position;
@@ -112,12 +174,13 @@
112174 PROFILE_ENTER(ROUTINE_SCROLL_COLORS);
113175
114176 position=Position;
115- Position+=2;
177+ //Position+=2;
178+ Position+=1;
116179 adr=((char*)0xa000)+40*72;
117180
118181 for (y=0;y<128;y++)
119182 {
120- f=(DivTable[y]+position)>>3;
183+ f=(DivTable[y]+position);
121184
122185 if (y&1)
123186 {
@@ -153,66 +216,238 @@
153216 void CreateTable()
154217 {
155218 int y;
219+ int offset;
156220
157221 for (y=0;y<128;y++)
158222 {
159- //LeftTable[y] =20;
160- //MiddleTable[y] =120-(100*y)/128;
223+ RoadMiddleTableLow[y] =0;
224+ RoadMiddleTableHigh[y] =0;
161225
162- RoadMiddleTable[y] =0;
163226 RoadWidthTable[y] =-(100*y)/128;
164227
165- RoadOffsetTable[y] =((int)LeftTable[y]-(120+(int)RoadWidthTable[y]))*2; // *256/128
228+ offset=((int)LeftTable[y]-(120+(int)RoadWidthTable[y]))*2; // *256/128
229+ RoadOffsetTableLow[y] =offset&255;
230+ RoadOffsetTableHigh[y] =(offset>>8)&255;
166231 }
167232 }
168233
169234
235+extern unsigned char gKey;
236+extern unsigned char PlayerPodX;
237+extern unsigned char BackgroundPosition;
170238
239+void RoadDrawLoopASM();
240+void DrawBackground();
241+void DrawPlayerPod();
242+void AttractModeTextDisplay();
243+void EraseEvenLines();
171244
245+void PlayerPodMoveLeft();
246+void PlayerPodMoveRight();
172247
248+void DrawTriangularRoadArea();
173249
174-void RoadDraw()
250+
251+void FillUpEnergy();
252+
253+
254+void EraseTopOfScreen()
175255 {
176- unsigned int dx;
177- int x,y;
256+ int y;
257+ for (y=0;y<65;y++)
258+ {
259+ memset(0xa000+y*40+2,64,38);
260+ }
261+}
178262
263+
264+void StartGame()
265+{
266+ TrackDataPtr=TrackData;
267+ PlayerPodX=100;
268+
269+ AttractModeSequence=0;
270+ EraseEvenLines();
271+ EraseSpaceToStart();
272+ EraseTopOfScreen();
273+
274+ ClearRoadArea();
275+ CreateTable();
276+ DisplayEnergySpeed();
277+
278+ DrawTriangularRoadArea();
279+ RoadDrawLoopASM();
280+ DrawPlayerPod();
281+ EraseSpaceToStart();
282+ DisplayScore();
283+
284+ FillUpEnergy();
285+}
286+
287+
288+void StartAttractMode()
289+{
290+ PlayerEnergy=255;
291+ AttractModeSequence=1;
292+ PsgStopSound();
293+
294+ EraseEvenLines();
295+ EraseTopOfScreen();
296+
297+ ClearRoadArea();
298+ CreateTable();
299+
300+ DrawRasters();
301+
302+ DrawGameLogo();
303+
304+ DrawTriangularRoadArea();
305+ RoadDrawLoopASM();
306+
307+ PressSpaceToStart();
308+
309+ TrackDataPtr=TrackData;
310+}
311+
312+void GameOver()
313+{
314+ PsgExplode();
315+
316+ //PsgStopSound();
317+
318+ memset((char*)0xbb80+25*40,32,40*3);
319+ sprintf((char*)0xbb80+26*40+9,"\16\3QUANTUM POD DENERGIZED");
320+ sprintf((char*)0xbb80+27*40+9,"\16\1QUANTUM POD DENERGIZED");
321+
322+ KeyboardFlush();
323+ while (gKey==0)
324+ {
325+
326+ }
327+
328+ PsgStopSound();
329+ StartAttractMode();
330+}
331+
332+
333+char RoadDraw()
334+{
335+ char shouldRestart=0;
336+
179337 PROFILE_ENTER(ROUTINE_DRAW_ROAD);
180338 ScrollColors();
339+ //ScrollColorsC();
181340
182341 PROFILE_ENTER(ROUTINE_DRAW_LOOP);
183- for (y=0;y<128;y++)
342+ RoadDrawLoopASM();
343+
344+
345+ PROFILE_LEAVE(ROUTINE_DRAW_LOOP);
346+
347+
348+ DrawBackground();
349+
350+ if (AttractModeSequence)
184351 {
185- x=RoadMiddleTable[y]/256;
352+ // Attract mode
353+ if (gKey)
354+ {
355+ // Quit attract mode
356+ StartGame();
357+ shouldRestart=1;
358+ }
359+ else
360+ {
361+ AnimateGameLogoRasters();
362+ AttractModeTextDisplay();
363+ }
364+ }
365+ else
366+ {
367+ DrawPlayerPod();
186368
187- /*
188- curset(120+x+RoadWidthTable[y],72+y,1);
189- curset(120+x-RoadWidthTable[y],72+y,1);
190- */
369+ // Game mode
370+ if (gKey & 1)
371+ {
372+ PlayerPodMoveLeft();
373+ PlayerPodMoveLeft();
374+ if (gKey & 16)
375+ {
376+ // Turbo boost
377+ PlayerPodMoveLeft();
378+ PlayerPodMoveLeft();
379+ DecreaseEnergy();
380+ }
381+ }
382+ else
383+ if (gKey & 2)
384+ {
385+ PlayerPodMoveRight();
386+ PlayerPodMoveRight();
387+ if (gKey & 16)
388+ {
389+ // Turbo boost
390+ PlayerPodMoveRight();
391+ PlayerPodMoveRight();
392+ DecreaseEnergy();
393+ }
394+ }
395+ else
396+ if (gKey & 16)
397+ {
398+ // Pointless use of the turbo boost, just uses energy for nothing
399+ DecreaseEnergy();
400+ }
191401
192- if (y&1)
402+ IncrementScore();
403+ }
404+
405+ // Centrifugal check
406+ {
407+ // RoadMiddleTableHigh[1] => position on the far corner of the road
408+ char centrifugal=RoadMiddleTableHigh[1];
409+ if (centrifugal<0)
193410 {
194- curset(120+x+RoadWidthTable[y]-10,72+y,0);
195- draw(10,0,0);
196- draw(-RoadWidthTable[y]*2,0,1);
197- draw(10,0,0);
411+ if (centrifugal<-10)
412+ {
413+ BackgroundPosition--;
414+ PlayerPodMoveRight();
415+ }
416+ if (centrifugal<-20)
417+ {
418+ BackgroundPosition--;
419+ PlayerPodMoveRight();
420+ }
421+ if (centrifugal<-60)
422+ {
423+ BackgroundPosition--;
424+ PlayerPodMoveRight();
425+ }
198426 }
427+ else
428+ {
429+ if (centrifugal>10)
430+ {
431+ BackgroundPosition++;
432+ PlayerPodMoveLeft();
433+ }
434+ if (centrifugal>20)
435+ {
436+ BackgroundPosition++;
437+ PlayerPodMoveLeft();
438+ }
439+ if (centrifugal>60)
440+ {
441+ BackgroundPosition++;
442+ PlayerPodMoveLeft();
443+ }
444+ }
445+ }
199446
200- /*
201- curset(12,72+y,0);
202- dx=239-12;
203- draw(120+x+RoadWidthTable[y]-12,0,0);
204- draw(-RoadWidthTable[y]*2,0,1);
205- draw(10,0,0);
206- */
207- /*
208- dx-=120+x+RoadWidthTable[y]-12;
209- draw(RoadWidthTable[y]*2,0,1);
210- dx-=RoadWidthTable[y]*2;
211- draw(dx,0,0);
212- */
213- }
214- PROFILE_LEAVE(ROUTINE_DRAW_LOOP);
447+
215448 PROFILE_LEAVE(ROUTINE_DRAW_ROAD);
449+
450+ return shouldRestart;
216451 }
217452
218453
@@ -223,12 +458,6 @@
223458 while (count--)
224459 {
225460 TurnLeftSimple();
226- /*
227- for (y=0;y<128;y++)
228- {
229- RoadMiddleTable[y]+=RoadOffsetTable[y];
230- }
231- */
232461 }
233462 PROFILE_LEAVE(ROUTINE_TURN_LOOP);
234463 }
@@ -241,12 +470,6 @@
241470 while (count--)
242471 {
243472 TurnRightSimple();
244- /*
245- for (y=0;y<128;y++)
246- {
247- RoadMiddleTable[y]-=RoadOffsetTable[y];
248- }
249- */
250473 }
251474 PROFILE_LEAVE(ROUTINE_TURN_LOOP);
252475 }
@@ -255,65 +478,93 @@
255478
256479 void RacingTest()
257480 {
258- unsigned char a0,a1,a2,a3;
259- unsigned char mode;
260- unsigned char key;
261- int x,y;
481+ StartAttractMode();
262482
263- CreateTable();
483+ TrackDataPtr=TrackData;
264484
265- DrawRasters();
266-
267485 while (1)
268486 {
269- for (x=0;x<128;x++)
487+ unsigned char counter=*TrackDataPtr++;
488+ if (!counter)
270489 {
271- ProfilerNextFrame();
272- PROFILE_ENTER(ROUTINE_MAIN_LOOP);
273- //RoadErase();
274- RoadDraw();
275- TurnLeft(1);
276- PROFILE_LEAVE(ROUTINE_MAIN_LOOP);
277- ProfilerDisplay();
490+ TrackDataPtr=TrackData;
278491 }
279- for (x=0;x<256;x++)
492+ else
280493 {
281- ProfilerNextFrame();
282- PROFILE_ENTER(ROUTINE_MAIN_LOOP);
283- //RoadErase();
284- RoadDraw();
285- TurnRight(1);
286- PROFILE_LEAVE(ROUTINE_MAIN_LOOP);
287- ProfilerDisplay();
494+ if (counter==1)
495+ {
496+ // Road sign
497+ RoadSignLow=*TrackDataPtr++;
498+ RoadSignHigh=*TrackDataPtr++;
499+ if (!AttractModeSequence)
500+ {
501+ DrawRoadSign();
502+ }
503+ }
504+ else
505+ {
506+ char direction=(char)*TrackDataPtr++;
507+ //sprintf((char*)0xbb80+27*40,"Counter:%d Directiom:%d ",counter,direction);
508+ while (counter--)
509+ {
510+ /*
511+ if (!AttractModeSequence)
512+ {
513+ sprintf((char*)0xbb80+25*40,"Energy:%d Speed:%d ",PlayerEnergy,PlayerSpeed);
514+ }
515+ */
516+ if (RoadDraw())
517+ {
518+ // Restart
519+ break;
520+ }
521+ if (direction)
522+ {
523+ if (direction<0)
524+ {
525+ TurnLeft(-direction);
526+ }
527+ else
528+ {
529+ TurnRight(direction);
530+ }
531+ }
532+ HandleGamePlay();
533+ if (PlayerEnergy==0)
534+ {
535+ // Player is out of energy
536+ GameOver();
537+ }
538+ }
539+ }
288540 }
289- for (x=0;x<128;x++)
290- {
291- ProfilerNextFrame();
292- PROFILE_ENTER(ROUTINE_MAIN_LOOP);
293- //RoadErase();
294- RoadDraw();
295- TurnLeft(1);
296- PROFILE_LEAVE(ROUTINE_MAIN_LOOP);
297- ProfilerDisplay();
298- }
299541 }
300542 }
301543
302544
303545
304-
305-
306546 void main()
307547 {
548+ paper(0);
549+
308550 ProfilerInitialize();
309551 hires();
552+ ink(0);
310553
311- //
312- // Create the carpet while displaying
313- // a cool message.
314- //
554+ InitializeAlternateCharset();
555+
556+ Tables_InitialiseScreenAddrTable();
315557 CreateDivTable();
316558
559+ ClearRoadArea();
560+ CreateTable();
561+
562+ DrawTriangularRoadArea();
563+
564+ System_Initialize();
565+
566+ //GameOver();
567+
317568 RacingTest();
318569 ProfilerTerminate();
319570 }
@@ -330,7 +581,106 @@
330581 3x01 006F5E TurnLoop
331582 4x01 1A8F2F DrawLoop
332583 5x00 000000 Asm
584+-----------------------------
585+Frame:0001 Time=1B456A
586+0x01 1B44FE MainLoop
587+1x01 1B2E5A DrawRoad
588+2x01 00ABD7 ScrollColors
589+3x01 0012CC TurnLoop <- simple assembler version for TurnLeft and TurnRight
590+4x01 1A7F8D DrawLoop
591+-----------------------------
592+Frame:0001 Time=1B4451 <- Removed "Main Loop"
593+0x01 1B2D5A DrawRoad
594+1x01 00ABD7 ScrollColors
595+2x01 001254 TurnLoop
596+3x01 1A7F8D DrawLoop
597+------------------------------------------------------
598+Frame:0001 Time=18F1B6 <- The tables are now 8 bit instead of 16
599+0x01 18DAD1 DrawRoad
600+1x01 0001F7 ScrollColors
601+2x01 001242 TurnLoop
602+3x01 18D8C1 DrawLoop
603+------------------------------------------------------
604+Frame:0001 Time=004B65 (19301) <- ScrollColors in assembler as well as main draw loop
605+0x01 0036EC DrawRoad
606+1x01 000671 ScrollColors
607+2x01 001242 TurnLoop
608+3x01 003062 DrawLoop
609+------------------------------------------------------
610+Frame:0001 Time=004AE5 (19173) <- Inlined the color computation
611+0x01 00366C DrawRoad
612+1x01 0004F1 ScrollColors
613+2x01 001242 TurnLoop
614+3x01 003062 DrawLoop
615+------------------------------------------------------
616+Frame:0001 Time=0031E5 (12773) <- Inlined the entire road computation
617+0x01 001D6C DrawRoad
618+1x01 0004F1 ScrollColors
619+2x01 001242 TurnLoop
620+3x01 001762 DrawLoop
621+------------------------------------------------------
622+Frame:0001 Time=0026E4 (9956) <- Inlined left and right turn
623+0x01 001D6C DrawRoad
624+1x01 0004F1 ScrollColors
625+2x01 000741 TurnLoop
626+3x01 001762 DrawLoop
627+------------------------------------------------------
628+Frame:0001 Time=002264 (8804) <- Added the ora #64 at the table generation time
629+0x01 0018EC DrawRoad
630+1x01 0004F1 ScrollColors
631+2x01 000741 TurnLoop
632+3x01 0012E2 DrawLoop
633+------------------------------------------------------
634+Frame:0001 Time=002215 (8725) <- "Position" is now a zero page variable
635+0x01 00189D DrawRoad
636+1x01 0004A2 ScrollColors
637+2x01 000741 TurnLoop
638+3x01 0012E2 DrawLoop
333639
640+
641+
642+
643+Paralax effect:
644+---------------
645+Need 6 times preshifted graphics and brute force copy
646+
647+Screen is 40 bytes large, makes it 128 bytes large with duplicated 64 bytes
648+64 bytes is 384 pixels
649+
650+Using a position pixel counter on one byte we can address 256 pixels
651+256 pixels is 42.6 bytes
652+512 pixels is 85.3 bytes
653+
654+86 bytes * 6 shifts = 516 bytes
655+
656+
657+Fake title:
658+-----------
659+F-Zero
660+Wipeout
661+Quantum Redshift
662+Rush
663+Riders
664+Cyber
665+Drome
666+Purple Saturn Day
667+
668+"Quantum FX Turbo Ultra" -> Zuber Future € by Qbotype Fonts
669+
670+Fonts:
671+- Ethnocentric
672+- Fingerpop
673+- Good Times
674+- HarvestItal Regular
675+- Nasalization
676+- PhrasticMedium Regular
677+
678+
679+ENERGY
680+
681+SPEED
682+
683+
334684 */
335685
336686
--- users/dbug/games/Road/energy_speed.s (nonexistent)
+++ users/dbug/games/Road/energy_speed.s (revision 1504)
@@ -0,0 +1,26 @@
1+_EnergySpeed
2+ .byt $5f,$7f,$7c,$78,$40,$4e,$79,$7e,$4e,$7b,$7f,$4e,$7b,$41,$6e,$79
3+ .byt $40,$6e,$7a,$60,$6e,$7b,$50,$6e,$7b,$68,$6e,$7b,$74,$6e,$7b,$7b
4+ .byt $6e,$78,$40,$4e,$7b,$4b,$6e,$7b,$6d,$6e,$7b,$5e,$6e,$7b,$4b,$4e
5+ .byt $7b,$41,$6e,$7b,$40,$6e,$7b,$40,$6e,$7b,$60,$6e,$79,$7f,$4e,$78
6+ .byt $40,$4e,$7b,$4b,$6e,$7b,$6d,$6e,$7b,$5e,$6e,$7b,$4b,$4e,$7b,$41
7+ .byt $6e,$7b,$40,$6e,$7b,$40,$6e,$7b,$60,$6e,$79,$7f,$4e,$78,$40,$4e
8+ .byt $7b,$4b,$6e,$7b,$6d,$6e,$7b,$5e,$6e,$7b,$4b,$4e,$7b,$41,$6e,$7b
9+ .byt $40,$6e,$7b,$40,$6e,$7b,$60,$6e,$79,$7f,$4e,$78,$40,$4e,$79,$7e
10+ .byt $4e,$7b,$43,$4e,$7b,$41,$4e,$7b,$41,$4e,$7b,$41,$4e,$7b,$42,$6e
11+ .byt $7b,$45,$6e,$7b,$4b,$6e,$7b,$77,$6e,$78,$40,$4e,$7b,$6f,$4e,$7b
12+ .byt $5f,$6e,$7a,$71,$6e,$79,$60,$6e,$7b,$40,$6e,$7b,$40,$6e,$7b,$40
13+ .byt $6e,$7b,$64,$6e,$79,$7b,$6e,$78,$40,$4e,$78,$40,$4e,$5f,$7f,$7c
14+ .byt $4f,$7f,$7e,$5c,$40,$47,$5c,$7f,$67,$5d,$41,$77,$5d,$40,$77,$5d
15+ .byt $40,$77,$5d,$60,$77,$5c,$74,$77,$5d,$5e,$77,$5d,$6d,$77,$5d,$74
16+ .byt $77,$5c,$40,$47,$5d,$7f,$67,$5d,$41,$77,$5d,$40,$77,$5d,$60,$77
17+ .byt $5c,$71,$67,$5d,$58,$77,$5d,$6c,$77,$5d,$76,$77,$5d,$7b,$77,$5c
18+ .byt $40,$47,$5c,$7f,$67,$5d,$41,$77,$5d,$40,$77,$5d,$40,$77,$5d,$60
19+ .byt $77,$5c,$74,$77,$5d,$5e,$77,$5d,$6d,$77,$5d,$74,$77,$5c,$40,$47
20+ .byt $5d,$7f,$77,$5d,$40,$77,$5d,$40,$77,$5d,$60,$77,$5c,$70,$77,$5d
21+ .byt $58,$77,$5d,$6c,$77,$5d,$77,$77,$5d,$7b,$67,$5c,$40,$47,$5c,$7f
22+ .byt $67,$5d,$40,$77,$5d,$40,$77,$5d,$40,$77,$5d,$40,$77,$5d,$41,$67
23+ .byt $5d,$63,$57,$5d,$7e,$77,$5c,$7d,$77,$5c,$40,$47,$5c,$43,$77,$5c
24+ .byt $45,$77,$5d,$7a,$77,$5d,$41,$57,$5d,$40,$67,$5d,$40,$57,$5d,$40
25+ .byt $57,$5d,$7c,$57,$5c,$43,$77,$5c,$40,$47,$5c,$40,$47,$4f,$7f,$7e
26+
--- users/dbug/games/Road/font_6x6.s (nonexistent)
+++ users/dbug/games/Road/font_6x6.s (revision 1504)
@@ -0,0 +1,38 @@
1+_Font_6x6
2+ .byt $40,$40,$40,$40,$40,$40,$4c,$4c,$4c,$4c,$40,$4c,$76,$76,$64,$40
3+ .byt $40,$40,$54,$7e,$54,$7e,$54,$40,$5e,$68,$5c,$4a,$7c,$48,$72,$74
4+ .byt $48,$56,$66,$40,$50,$68,$68,$5a,$64,$5a,$58,$58,$50,$40,$40,$40
5+ .byt $4c,$58,$58,$58,$4c,$40,$4c,$46,$46,$46,$4c,$40,$48,$6a,$5c,$5c
6+ .byt $6a,$48,$48,$48,$7e,$48,$48,$40,$40,$40,$40,$4c,$4c,$48,$40,$40
7+ .byt $40,$5c,$40,$40,$40,$40,$40,$4c,$4c,$40,$46,$4c,$58,$70,$60,$40
8+ .byt $5c,$62,$6a,$6a,$62,$5c,$44,$4c,$44,$44,$44,$40,$7c,$42,$5c,$60
9+ .byt $7e,$40,$5c,$42,$4c,$42,$5c,$40,$4c,$54,$64,$7e,$44,$40,$7c,$60
10+ .byt $7c,$42,$7c,$40,$5c,$60,$7c,$62,$5c,$40,$5c,$42,$42,$42,$42,$40
11+ .byt $5c,$62,$5c,$62,$5c,$40,$5c,$62,$5e,$42,$5c,$40,$4c,$4c,$40,$4c
12+ .byt $4c,$40,$40,$4c,$40,$4c,$44,$48,$44,$48,$50,$50,$48,$44,$40,$7e
13+ .byt $40,$7e,$40,$40,$50,$48,$44,$44,$48,$50,$5c,$62,$44,$48,$40,$48
14+ .byt $5c,$62,$6a,$6c,$60,$5e,$58,$44,$72,$7e,$72,$72,$78,$44,$72,$7c
15+ .byt $72,$7c,$5e,$40,$70,$70,$70,$5e,$78,$44,$72,$72,$72,$7c,$7e,$40
16+ .byt $78,$70,$70,$7e,$7e,$40,$78,$70,$70,$70,$5e,$40,$70,$76,$72,$5e
17+ .byt $72,$42,$7e,$72,$72,$72,$5e,$40,$4c,$4c,$4c,$5e,$46,$40,$46,$46
18+ .byt $66,$5e,$72,$42,$7c,$74,$72,$72,$70,$40,$70,$70,$70,$7e,$72,$4e
19+ .byt $72,$72,$72,$72,$72,$42,$72,$76,$72,$72,$5c,$42,$72,$72,$72,$5c
20+ .byt $7c,$42,$72,$70,$70,$70,$5c,$42,$72,$72,$74,$5a,$7c,$42,$72,$78
21+ .byt $74,$72,$7e,$42,$70,$42,$72,$7e,$7c,$40,$58,$58,$58,$58,$72,$42
22+ .byt $72,$72,$72,$5c,$72,$42,$72,$72,$74,$78,$72,$42,$72,$72,$7e,$72
23+ .byt $72,$42,$54,$54,$72,$72,$72,$42,$72,$48,$48,$48,$7e,$40,$46,$58
24+ .byt $70,$7e,$5e,$50,$50,$50,$50,$5e,$40,$60,$50,$44,$42,$40,$7c,$44
25+ .byt $44,$44,$44,$7c,$48,$54,$6a,$48,$48,$48,$4e,$50,$50,$7c,$50,$7e
26+ .byt $5e,$61,$6d,$69,$6d,$61,$40,$40,$5e,$7e,$72,$7e,$70,$70,$7e,$72
27+ .byt $72,$7e,$40,$40,$7e,$70,$70,$7e,$42,$42,$7e,$72,$72,$7e,$40,$40
28+ .byt $7e,$7e,$70,$7c,$7e,$70,$70,$70,$70,$70,$40,$40,$7e,$72,$7e,$42
29+ .byt $70,$70,$7c,$72,$72,$72,$40,$58,$40,$58,$58,$58,$40,$4c,$40,$4c
30+ .byt $4c,$6c,$70,$70,$72,$78,$74,$72,$58,$58,$58,$58,$58,$58,$40,$40
31+ .byt $72,$72,$72,$72,$40,$40,$7c,$72,$72,$72,$40,$40,$7e,$72,$72,$7e
32+ .byt $40,$40,$7e,$72,$7e,$70,$40,$40,$7e,$72,$7e,$42,$40,$40,$7e,$70
33+ .byt $70,$70,$40,$40,$7e,$7e,$42,$7e,$70,$70,$7c,$70,$70,$7c,$40,$40
34+ .byt $72,$72,$72,$5e,$40,$40,$72,$72,$74,$78,$40,$40,$72,$72,$7e,$72
35+ .byt $40,$40,$72,$48,$5c,$72,$40,$40,$72,$72,$7e,$42,$40,$40,$7e,$4c
36+ .byt $58,$7e,$4e,$58,$58,$58,$58,$4e,$48,$48,$48,$48,$48,$48,$78,$4c
37+ .byt $4c,$4c,$4c,$78,$40,$40,$40,$40,$40,$40,$6a,$55,$6a,$6a,$55,$6a
38+
--- users/dbug/games/Road/font_6x8_futura_full.s (nonexistent)
+++ users/dbug/games/Road/font_6x8_futura_full.s (revision 1504)
@@ -0,0 +1,50 @@
1+_Font_6x8_FuturaFull
2+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$4c,$4c,$4c,$4c,$4c,$40,$4c,$40
3+ .byt $54,$54,$54,$40,$40,$40,$40,$40,$54,$54,$7e,$54,$7e,$54,$54,$40
4+ .byt $48,$5e,$68,$5c,$4a,$7c,$48,$40,$70,$72,$44,$48,$50,$66,$46,$40
5+ .byt $50,$68,$68,$50,$6a,$64,$5a,$40,$48,$48,$48,$40,$40,$40,$40,$40
6+ .byt $4c,$50,$70,$70,$70,$50,$4c,$40,$58,$44,$46,$46,$46,$44,$58,$40
7+ .byt $48,$6a,$5c,$48,$5c,$6a,$48,$40,$40,$48,$48,$7e,$48,$48,$40,$40
8+ .byt $40,$40,$40,$40,$40,$4c,$4c,$58,$40,$40,$40,$7e,$40,$40,$40,$40
9+ .byt $40,$40,$40,$40,$40,$4c,$40,$40,$40,$42,$44,$48,$50,$60,$40,$40
10+ .byt $5c,$62,$62,$40,$62,$62,$5c,$40,$40,$42,$42,$40,$42,$42,$40,$40
11+ .byt $5c,$42,$42,$5c,$60,$60,$5c,$40,$5c,$42,$42,$5c,$42,$42,$5c,$40
12+ .byt $40,$62,$62,$5c,$42,$42,$40,$40,$5c,$60,$60,$5c,$42,$42,$5c,$40
13+ .byt $5c,$60,$60,$5c,$62,$62,$5c,$40,$5c,$42,$42,$40,$42,$42,$40,$40
14+ .byt $5c,$62,$62,$5c,$62,$62,$5c,$40,$5c,$62,$62,$5c,$42,$42,$5c,$40
15+ .byt $40,$40,$4c,$40,$40,$4c,$40,$40,$40,$40,$4c,$40,$40,$4c,$4c,$58
16+ .byt $44,$48,$50,$60,$50,$48,$44,$40,$40,$40,$7e,$40,$7e,$40,$40,$40
17+ .byt $50,$48,$44,$42,$44,$48,$50,$40,$5c,$62,$44,$48,$48,$40,$48,$40
18+ .byt $5c,$62,$6a,$6e,$6c,$60,$5e,$40,$78,$44,$72,$72,$7e,$72,$72,$40
19+ .byt $78,$44,$72,$7c,$72,$72,$7c,$40,$7e,$40,$70,$70,$70,$70,$7e,$40
20+ .byt $78,$44,$72,$72,$72,$72,$7c,$40,$7e,$40,$70,$7c,$70,$70,$7e,$40
21+ .byt $7e,$40,$70,$7c,$70,$70,$70,$40,$7e,$40,$70,$70,$76,$72,$5e,$40
22+ .byt $72,$42,$72,$7e,$72,$72,$72,$40,$5e,$40,$4c,$4c,$4c,$4c,$5e,$40
23+ .byt $46,$40,$46,$46,$46,$66,$5e,$40,$72,$42,$74,$78,$74,$72,$72,$40
24+ .byt $70,$40,$70,$70,$70,$70,$7e,$40,$72,$4e,$72,$72,$72,$72,$72,$40
25+ .byt $72,$42,$72,$7a,$76,$72,$72,$40,$5c,$42,$72,$72,$72,$72,$5c,$40
26+ .byt $7c,$42,$72,$7c,$70,$70,$70,$40,$5c,$42,$72,$72,$72,$74,$5a,$40
27+ .byt $7c,$42,$72,$7c,$78,$74,$72,$40,$7e,$42,$70,$7e,$42,$72,$7e,$40
28+ .byt $7c,$40,$58,$58,$58,$58,$58,$40,$72,$42,$72,$72,$72,$72,$5c,$40
29+ .byt $72,$42,$72,$72,$72,$74,$78,$40,$72,$42,$72,$72,$72,$7e,$72,$40
30+ .byt $72,$42,$54,$48,$54,$72,$72,$40,$72,$42,$72,$54,$48,$48,$48,$40
31+ .byt $7e,$40,$46,$4c,$58,$70,$7e,$40,$5e,$50,$50,$50,$50,$50,$5e,$40
32+ .byt $40,$60,$50,$48,$44,$42,$40,$40,$7c,$44,$44,$44,$44,$44,$7c,$40
33+ .byt $48,$54,$6a,$48,$48,$48,$48,$40,$4e,$50,$50,$50,$7c,$50,$7e,$40
34+ .byt $5e,$61,$6d,$69,$69,$6d,$61,$5e,$40,$40,$5e,$42,$7e,$72,$7e,$40
35+ .byt $70,$70,$7e,$72,$72,$72,$7e,$40,$40,$40,$7e,$70,$70,$70,$7e,$40
36+ .byt $42,$42,$7e,$72,$72,$72,$7e,$40,$40,$40,$7e,$72,$7e,$70,$7c,$40
37+ .byt $7e,$70,$70,$7c,$70,$70,$70,$40,$40,$40,$7e,$72,$72,$7e,$42,$5e
38+ .byt $70,$70,$7c,$72,$72,$72,$72,$40,$40,$58,$40,$58,$58,$58,$58,$40
39+ .byt $40,$4c,$40,$4c,$4c,$4c,$6c,$5c,$70,$70,$72,$74,$78,$74,$72,$40
40+ .byt $58,$58,$58,$58,$58,$58,$58,$40,$40,$40,$72,$7e,$72,$72,$72,$40
41+ .byt $40,$40,$7c,$72,$72,$72,$72,$40,$40,$40,$7e,$72,$72,$72,$7e,$40
42+ .byt $40,$40,$7e,$72,$72,$7e,$70,$70,$40,$40,$7e,$72,$72,$7e,$42,$42
43+ .byt $40,$40,$7e,$70,$70,$70,$70,$40,$40,$40,$7e,$70,$7e,$42,$7e,$40
44+ .byt $70,$70,$7c,$70,$70,$70,$7c,$40,$40,$40,$72,$72,$72,$72,$5e,$40
45+ .byt $40,$40,$72,$72,$72,$74,$78,$40,$40,$40,$72,$72,$72,$7e,$72,$40
46+ .byt $40,$40,$72,$5c,$48,$5c,$72,$40,$40,$40,$72,$72,$72,$7e,$42,$5e
47+ .byt $40,$40,$7e,$46,$4c,$58,$7e,$40,$4e,$58,$58,$70,$58,$58,$4e,$40
48+ .byt $48,$48,$48,$48,$48,$48,$48,$48,$78,$4c,$4c,$46,$4c,$4c,$78,$40
49+ .byt $40,$40,$40,$48,$40,$40,$40,$40,$6a,$55,$6a,$55,$6a,$55,$6a,$55
50+
--- users/dbug/games/Road/game_logo.s (nonexistent)
+++ users/dbug/games/Road/game_logo.s (revision 1504)
@@ -0,0 +1,81 @@
1+_GameLogo
2+ .byt $40,$41,$7f,$7f,$63,$7f,$5f,$7c,$5f,$7f,$78,$4f,$7c,$5f,$5f,$7f
3+ .byt $7f,$6f,$7d,$7f,$71,$7c,$5f,$60,$40,$4f,$7d,$7f,$5f,$7c,$5f,$60
4+ .byt $40,$40,$43,$7f,$7f,$73,$7e,$7f,$7c,$7f,$7f,$7c,$5f,$7e,$7f,$5f
5+ .byt $7f,$7f,$6f,$7b,$7f,$73,$7e,$7f,$70,$40,$5f,$7e,$7f,$5f,$7e,$7f
6+ .byt $60,$40,$40,$47,$7f,$7f,$7b,$7d,$7f,$7d,$7f,$7f,$7e,$7f,$7f,$7f
7+ .byt $5f,$7f,$7f,$6f,$77,$7f,$77,$7f,$7f,$78,$40,$7f,$7f,$5f,$5f,$7f
8+ .byt $5f,$60,$40,$40,$46,$40,$41,$7b,$7b,$40,$5d,$60,$40,$5e,$70,$47
9+ .byt $47,$50,$40,$43,$6f,$6c,$41,$76,$47,$41,$78,$40,$70,$47,$6f,$50
10+ .byt $47,$6f,$60,$40,$40,$44,$40,$40,$7b,$76,$40,$5d,$40,$40,$4e,$60
11+ .byt $42,$47,$50,$40,$43,$6f,$58,$41,$74,$42,$40,$78,$40,$60,$43,$77
12+ .byt $50,$43,$77,$60,$40,$40,$44,$40,$40,$7b,$6c,$40,$5d,$40,$40,$4e
13+ .byt $60,$40,$46,$50,$40,$43,$6e,$70,$41,$74,$40,$40,$78,$40,$60,$41
14+ .byt $7a,$50,$41,$7b,$60,$40,$40,$44,$40,$40,$7b,$58,$40,$5d,$40,$40
15+ .byt $4e,$60,$40,$4d,$50,$40,$43,$4d,$60,$41,$74,$40,$40,$78,$40,$60
16+ .byt $40,$7c,$50,$40,$7d,$40,$40,$40,$44,$40,$40,$7a,$70,$40,$5d,$40
17+ .byt $40,$4e,$60,$40,$5b,$48,$40,$46,$4b,$40,$41,$74,$40,$40,$78,$40
18+ .byt $60,$40,$5e,$48,$40,$5e,$40,$40,$40,$44,$40,$40,$71,$60,$40,$5d
19+ .byt $40,$40,$4c,$60,$40,$77,$44,$40,$4c,$46,$40,$41,$74,$40,$40,$78
20+ .byt $40,$60,$40,$4f,$44,$40,$4f,$40,$40,$40,$44,$40,$41,$63,$40,$40
21+ .byt $5d,$40,$40,$5a,$60,$41,$6f,$44,$40,$5a,$4c,$40,$41,$74,$40,$40
22+ .byt $78,$40,$60,$40,$47,$44,$40,$47,$40,$40,$40,$44,$40,$43,$52,$40
23+ .byt $40,$5d,$40,$40,$76,$60,$43,$5f,$44,$40,$76,$48,$40,$41,$74,$40
24+ .byt $40,$78,$40,$60,$40,$46,$48,$40,$43,$60,$40,$40,$44,$40,$46,$7a
25+ .byt $40,$40,$5d,$40,$41,$6e,$60,$46,$7f,$44,$41,$6e,$48,$40,$41,$74
26+ .byt $40,$40,$70,$40,$60,$40,$4c,$50,$40,$43,$60,$40,$40,$44,$40,$4d
27+ .byt $7a,$40,$40,$5d,$40,$43,$5e,$60,$4d,$7f,$44,$43,$5e,$48,$40,$41
28+ .byt $74,$40,$41,$68,$40,$60,$40,$5c,$50,$40,$43,$60,$40,$40,$44,$40
29+ .byt $5b,$7a,$40,$40,$5d,$40,$46,$7e,$60,$5b,$7f,$44,$46,$7e,$48,$40
30+ .byt $41,$74,$40,$43,$58,$40,$60,$40,$5c,$50,$40,$43,$60,$40,$40,$44
31+ .byt $40,$77,$7a,$40,$40,$5d,$40,$4d,$7e,$60,$77,$7f,$44,$4d,$7e,$48
32+ .byt $40,$41,$74,$40,$46,$78,$40,$60,$40,$5c,$50,$40,$43,$60,$40,$40
33+ .byt $44,$41,$6f,$7a,$40,$40,$5d,$40,$5b,$7e,$61,$6f,$7f,$44,$5b,$7e
34+ .byt $48,$40,$41,$74,$48,$4d,$78,$40,$60,$40,$5c,$50,$46,$43,$60,$40
35+ .byt $40,$42,$43,$5f,$71,$40,$40,$79,$40,$73,$7e,$63,$5f,$7f,$44,$77
36+ .byt $7e,$44,$40,$43,$64,$54,$5b,$78,$40,$60,$40,$5c,$50,$49,$43,$60
37+ .byt $40,$40,$41,$7e,$7f,$60,$7f,$7f,$71,$7f,$63,$7e,$7e,$7f,$7f,$47
38+ .byt $6f,$7e,$43,$7f,$7f,$47,$63,$71,$78,$40,$7f,$7f,$7c,$5f,$70,$7f
39+ .byt $60,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
40+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
41+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
42+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
43+ .byt $40,$40,$40,$40,$7f,$7f,$7f,$5f,$7b,$7f,$6f,$7f,$7f,$47,$7f,$7f
44+ .byt $60,$7f,$7e,$70,$40,$5f,$7b,$7f,$6f,$7f,$7f,$63,$7f,$7f,$7d,$7f
45+ .byt $7f,$78,$4f,$7f,$7c,$7f,$7f,$7f,$5f,$77,$7f,$6f,$7f,$7f,$67,$7f
46+ .byt $7f,$71,$7f,$7d,$78,$40,$5f,$77,$7f,$6f,$7f,$7f,$63,$7f,$7f,$7d
47+ .byt $7f,$7f,$7c,$5f,$7f,$7e,$7f,$7f,$7f,$5f,$6f,$7f,$6f,$7f,$7f,$77
48+ .byt $7f,$7f,$7b,$7f,$7b,$7c,$40,$5f,$6f,$7f,$6f,$7f,$7f,$63,$7f,$7f
49+ .byt $7d,$7f,$7f,$7e,$7f,$7f,$7f,$60,$40,$47,$5f,$58,$43,$68,$40,$43
50+ .byt $74,$40,$41,$7b,$7f,$74,$7c,$40,$5f,$58,$43,$68,$40,$41,$62,$40
51+ .byt $40,$5d,$40,$40,$5e,$70,$40,$4f,$60,$40,$47,$5e,$70,$43,$68,$40
52+ .byt $41,$74,$40,$40,$7b,$7f,$68,$5c,$40,$5e,$70,$43,$68,$40,$41,$62
53+ .byt $40,$40,$5d,$40,$40,$4e,$60,$40,$47,$60,$40,$47,$5d,$60,$43,$68
54+ .byt $40,$41,$74,$40,$40,$7b,$7f,$50,$5c,$40,$5d,$60,$43,$68,$40,$41
55+ .byt $62,$40,$40,$5d,$40,$40,$4e,$60,$40,$47,$60,$40,$46,$5b,$40,$43
56+ .byt $68,$40,$41,$74,$40,$40,$7b,$7e,$60,$5c,$40,$5b,$40,$43,$68,$40
57+ .byt $41,$62,$40,$40,$59,$40,$40,$4e,$60,$40,$47,$50,$40,$4c,$56,$40
58+ .byt $43,$68,$40,$41,$74,$40,$40,$7b,$7d,$40,$5c,$40,$56,$40,$43,$68
59+ .byt $40,$41,$61,$40,$40,$71,$40,$40,$4e,$60,$40,$47,$48,$40,$58,$4c
60+ .byt $40,$43,$68,$40,$41,$64,$40,$40,$73,$7a,$40,$5c,$40,$4c,$40,$43
61+ .byt $68,$40,$41,$60,$60,$41,$61,$40,$40,$4c,$60,$40,$46,$48,$40,$74
62+ .byt $58,$40,$43,$68,$40,$43,$44,$40,$41,$63,$74,$40,$5c,$40,$58,$40
63+ .byt $43,$68,$40,$43,$50,$60,$43,$51,$40,$40,$58,$60,$40,$4d,$48,$41
64+ .byt $6c,$50,$40,$43,$68,$40,$46,$64,$40,$43,$53,$68,$40,$5c,$40,$50
65+ .byt $40,$43,$68,$40,$46,$70,$60,$46,$71,$40,$40,$74,$60,$40,$5b,$48
66+ .byt $43,$5c,$50,$40,$43,$68,$40,$4d,$74,$40,$46,$7b,$50,$40,$5c,$40
67+ .byt $50,$40,$43,$68,$40,$4d,$70,$60,$4d,$71,$40,$41,$6e,$60,$40,$77
68+ .byt $48,$46,$7c,$50,$40,$43,$68,$40,$5b,$74,$40,$4d,$7a,$60,$40,$5c
69+ .byt $40,$50,$40,$43,$68,$40,$5b,$70,$60,$5b,$71,$40,$43,$5e,$60,$41
70+ .byt $6f,$48,$4d,$7c,$50,$40,$43,$68,$40,$77,$74,$40,$5b,$79,$40,$40
71+ .byt $5c,$40,$50,$40,$43,$68,$40,$77,$70,$60,$77,$71,$40,$46,$7e,$60
72+ .byt $43,$5f,$48,$5b,$7c,$50,$40,$43,$68,$41,$6f,$74,$40,$77,$7a,$40
73+ .byt $40,$5c,$40,$50,$40,$43,$68,$41,$6f,$70,$61,$6f,$71,$40,$4d,$7e
74+ .byt $60,$46,$7f,$48,$77,$7c,$50,$40,$43,$68,$43,$5f,$74,$41,$6f,$7a
75+ .byt $40,$40,$5c,$40,$50,$40,$43,$68,$43,$5f,$70,$63,$5f,$71,$40,$5b
76+ .byt $7e,$60,$4d,$7f,$49,$6f,$7c,$48,$40,$47,$48,$46,$7f,$74,$43,$5f
77+ .byt $71,$40,$40,$78,$40,$48,$40,$47,$44,$46,$7f,$70,$66,$7f,$71,$40
78+ .byt $77,$7e,$60,$59,$7f,$4f,$5f,$7c,$47,$7f,$7e,$4f,$7c,$5f,$77,$7e
79+ .byt $7f,$60,$7f,$7f,$70,$40,$47,$7f,$7e,$43,$7d,$7f,$70,$7d,$7f,$71
80+ .byt $7f,$63,$7e,$7f,$71,$7f
81+
--- users/dbug/games/Road/highscores_characters.s (nonexistent)
+++ users/dbug/games/Road/highscores_characters.s (revision 1504)
@@ -0,0 +1,50 @@
1+_HighScoreCharacters
2+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
3+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
4+ .byt $43,$78,$40,$43,$47,$70,$4f,$7f,$40,$42,$40,$7e,$40,$46,$5f,$7f
5+ .byt $47,$70,$43,$78,$47,$70,$43,$78,$41,$7c,$40,$7e,$41,$7f,$70,$40
6+ .byt $4f,$66,$40,$4f,$4f,$6c,$5f,$7f,$40,$46,$41,$7f,$40,$4f,$5f,$7f
7+ .byt $4f,$4c,$4f,$64,$59,$7c,$4c,$7e,$47,$73,$43,$79,$63,$78,$40,$40
8+ .byt $4f,$41,$40,$7f,$5f,$42,$5f,$7e,$40,$4e,$41,$7f,$40,$4f,$5f,$7f
9+ .byt $5e,$42,$5f,$42,$50,$7e,$58,$5f,$47,$60,$63,$70,$53,$78,$40,$40
10+ .byt $5f,$41,$41,$7f,$5f,$42,$5f,$7e,$40,$4e,$43,$7f,$40,$4f,$5f,$7e
11+ .byt $5e,$41,$5f,$41,$60,$7e,$58,$5f,$4f,$60,$67,$70,$53,$78,$40,$40
12+ .byt $5f,$41,$43,$7f,$5f,$42,$4f,$7c,$40,$5e,$43,$7e,$40,$5f,$4f,$7e
13+ .byt $5e,$41,$5f,$41,$60,$7e,$58,$5f,$4f,$60,$67,$70,$53,$78,$40,$40
14+ .byt $5f,$41,$47,$5f,$5f,$42,$40,$5c,$40,$5e,$47,$40,$40,$5f,$40,$4c
15+ .byt $5f,$41,$4f,$41,$60,$5e,$58,$5f,$4f,$60,$67,$70,$53,$78,$40,$78
16+ .byt $5f,$41,$40,$5f,$5f,$46,$40,$48,$40,$7e,$46,$40,$40,$7f,$40,$4c
17+ .byt $5f,$42,$4f,$61,$70,$5e,$58,$5f,$4f,$60,$67,$70,$53,$78,$41,$7c
18+ .byt $5f,$41,$40,$5f,$5f,$44,$40,$48,$40,$7e,$4e,$40,$40,$7e,$40,$48
19+ .byt $4f,$64,$47,$62,$7c,$5e,$58,$5f,$4f,$60,$67,$70,$53,$78,$41,$7c
20+ .byt $5f,$41,$40,$5f,$5e,$4c,$40,$50,$41,$7e,$4f,$60,$41,$7e,$40,$58
21+ .byt $4f,$64,$47,$72,$7f,$40,$58,$5f,$4f,$60,$67,$70,$53,$78,$41,$7c
22+ .byt $5f,$41,$40,$5f,$40,$48,$40,$70,$41,$7e,$5f,$70,$41,$7c,$40,$50
23+ .byt $47,$78,$43,$74,$7f,$70,$58,$4e,$4f,$60,$67,$70,$53,$78,$40,$78
24+ .byt $5f,$41,$40,$5f,$40,$58,$40,$7c,$43,$7e,$5f,$7c,$43,$7c,$40,$60
25+ .byt $47,$78,$43,$7c,$5f,$78,$58,$40,$4f,$60,$67,$70,$63,$78,$40,$40
26+ .byt $5f,$41,$40,$5f,$40,$50,$41,$7e,$47,$7e,$47,$7e,$43,$78,$40,$60
27+ .byt $47,$70,$41,$78,$4f,$7c,$58,$40,$4f,$60,$67,$7f,$63,$7f,$78,$40
28+ .byt $5f,$41,$40,$5f,$40,$60,$41,$7f,$44,$7e,$41,$7e,$47,$78,$41,$40
29+ .byt $47,$78,$41,$70,$47,$7e,$58,$4e,$4f,$60,$67,$70,$73,$78,$40,$40
30+ .byt $5f,$41,$40,$5f,$40,$60,$40,$7f,$4c,$7e,$40,$7f,$45,$78,$41,$40
31+ .byt $4d,$78,$40,$70,$43,$7e,$58,$5f,$4f,$60,$67,$70,$5b,$78,$40,$40
32+ .byt $5f,$41,$40,$5f,$41,$40,$40,$5f,$48,$7e,$40,$4f,$4d,$7c,$42,$40
33+ .byt $49,$7c,$40,$60,$48,$7e,$58,$5f,$4f,$60,$67,$70,$5b,$78,$40,$40
34+ .byt $5f,$41,$40,$5f,$41,$40,$40,$47,$58,$7e,$40,$47,$48,$7e,$42,$40
35+ .byt $58,$7c,$41,$60,$7c,$4e,$58,$5f,$4f,$60,$67,$70,$5b,$78,$40,$40
36+ .byt $5f,$41,$40,$5f,$43,$40,$44,$43,$5f,$7f,$4e,$43,$50,$7e,$44,$40
37+ .byt $50,$7e,$41,$40,$7c,$46,$58,$5f,$4f,$60,$67,$70,$5b,$78,$40,$78
38+ .byt $5f,$41,$40,$5f,$43,$7f,$5f,$41,$40,$7e,$5e,$41,$50,$5f,$4c,$40
39+ .byt $50,$5f,$42,$40,$7e,$42,$58,$5f,$4f,$60,$67,$70,$5b,$78,$41,$7c
40+ .byt $5f,$41,$40,$5f,$47,$7f,$5f,$41,$40,$7e,$5f,$41,$50,$5f,$48,$40
41+ .byt $50,$5f,$42,$40,$7e,$42,$58,$5f,$4f,$60,$67,$70,$5b,$78,$41,$7c
42+ .byt $5f,$41,$40,$5f,$4f,$7f,$4f,$41,$40,$7e,$4f,$41,$50,$5f,$50,$40
43+ .byt $50,$5f,$44,$40,$7e,$42,$48,$5f,$4f,$60,$67,$70,$5b,$78,$41,$7c
44+ .byt $4f,$62,$40,$5f,$4f,$7f,$4f,$62,$40,$7e,$4f,$62,$48,$7e,$50,$40
45+ .byt $48,$7e,$4c,$40,$7e,$44,$44,$7e,$47,$71,$47,$70,$5b,$7c,$40,$78
46+ .byt $43,$7c,$40,$4e,$4f,$7f,$43,$7c,$40,$5c,$43,$7c,$47,$7c,$50,$40
47+ .byt $47,$7c,$48,$40,$4f,$78,$43,$78,$41,$7e,$43,$60,$59,$7f,$7c,$40
48+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
49+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
50+
--- users/dbug/games/Road/osdk_build.bat (revision 1503)
+++ users/dbug/games/Road/osdk_build.bat (revision 1504)
@@ -18,6 +18,12 @@
1818 :: Launch the compilation of files
1919 ::
2020 CALL %OSDK%\bin\make.bat %OSDKFILE%
21+
22+ECHO Building DSK file
23+%OSDK%\bin\tap2dsk -iCLS:FONT6X8.BIN,A#B500:OSDK build\%OSDKNAME%.TAP build\font6x8.tap build\%OSDKNAME%.dsk
24+%OSDK%\bin\old2mfm build\%OSDKNAME%.dsk
25+
26+
2127 GOTO End
2228
2329
--- users/dbug/games/Road/osdk_config.bat (revision 1503)
+++ users/dbug/games/Road/osdk_config.bat (revision 1504)
@@ -4,8 +4,7 @@
44 :: Set the build paremeters
55 ::
66 SET OSDKADDR=$600
7-SET OSDKNAME=RACING
7+SET OSDKNAME=QuantumFx
88 SET OSDKFILE=main profile vbl keyboard resol font table costable road
9+SET OSDKDISK=%OSDKNAME%.dsk
910
10-
11-
--- users/dbug/games/Road/osdk_makedata.bat (nonexistent)
+++ users/dbug/games/Road/osdk_makedata.bat (revision 1504)
@@ -0,0 +1,45 @@
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+:: Convert pictures
11+::
12+::%OSDK%\bin\pictconv -u1 -m0 -f0 -o4_ScrollingBackground pics\ScrollingBackground.png scrolling_background.s
13+::%OSDK%\bin\pictconv -u1 -m0 -f0 -o4_ScrollingBackgroundIngame pics\ScrollingBackground_futura.png scrolling_background_ingame.s
14+
15+%OSDK%\bin\pictconv -u1 -m0 -f0 -o4_ScrollingBackground pics\ScrollingBackground_futura.png scrolling_background.s
16+
17+%OSDK%\bin\pictconv -u1 -m0 -f0 -o4_GameLogo pics\GameLogo.png game_logo.s
18+%OSDK%\bin\pictconv -u1 -m0 -f0 -o4_Font_6x8_FuturaFull pics\font_6x8_futura_full.png font_6x8_futura_full.s
19+%OSDK%\bin\pictconv -u1 -m0 -f0 -o4_Font_6x6 pics\font_6x6.png font_6x6.s
20+%OSDK%\bin\pictconv -u1 -m0 -f0 -o4_PlayerPod pics\PlayerPod.png player_pod.s
21+%OSDK%\bin\pictconv -u1 -m0 -f0 -o4_RoadSigns pics\road_signs.png road_signs.s
22+
23+%OSDK%\bin\pictconv -u1 -m0 -f0 -o4_HighScoreCharacters pics\highscores.png highscores_characters.s
24+
25+
26+%OSDK%\bin\pictconv -u1 -m0 -f0 -o4_EnergySpeed pics\energy_speed.png energy_speed.s
27+
28+%OSDK%\bin\pictconv -u1 -m0 -f0 -o1 pics\font_6x8_QuantumFx.png build\font6x8.tap
29+
30+
31+GOTO End
32+
33+
34+::
35+:: Outputs an error message
36+::
37+:ErCfg
38+ECHO == ERROR ==
39+ECHO The Oric SDK was not configured properly
40+ECHO You should have a OSDK environment variable setted to the location of the SDK
41+IF "%OSDKBRIEF%"=="" PAUSE
42+GOTO End
43+
44+
45+:End
--- users/dbug/games/Road/player_pod.s (nonexistent)
+++ users/dbug/games/Road/player_pod.s (revision 1504)
@@ -0,0 +1,58 @@
1+_PlayerPod
2+ .byt $40,$40,$40,$5f,$7f,$60,$40,$40,$40,$40,$40,$4f,$7f,$70,$40,$40
3+ .byt $40,$40,$40,$47,$7f,$78,$40,$40,$40,$40,$40,$43,$7f,$7c,$40,$40
4+ .byt $40,$40,$40,$41,$7f,$7e,$40,$40,$40,$40,$40,$40,$7f,$7f,$40,$40
5+ .byt $40,$40,$40,$4f,$7f,$7f,$7f,$40,$40,$40,$40,$47,$7f,$7f,$7f,$60
6+ .byt $40,$40,$40,$43,$7f,$7f,$7f,$70,$40,$40,$40,$41,$7f,$7f,$7f,$78
7+ .byt $40,$40,$40,$40,$7f,$7f,$7f,$7c,$40,$40,$40,$40,$5f,$7f,$7f,$7e
8+ .byt $40,$40,$40,$43,$7f,$7f,$7f,$7f,$78,$40,$40,$41,$7f,$7f,$7f,$7f
9+ .byt $7c,$40,$40,$40,$7f,$7f,$7f,$7f,$7e,$40,$40,$40,$5f,$7f,$7f,$7f
10+ .byt $7f,$40,$40,$40,$4f,$7f,$7f,$7f,$7f,$60,$40,$40,$47,$7f,$7f,$7f
11+ .byt $7f,$70,$40,$40,$4f,$7f,$7f,$7f,$7f,$7e,$40,$40,$47,$7f,$7f,$7f
12+ .byt $7f,$7f,$40,$40,$43,$7f,$7f,$7f,$7f,$7f,$60,$40,$41,$7f,$7f,$7f
13+ .byt $7f,$7f,$70,$40,$40,$7f,$7f,$7f,$7f,$7f,$78,$40,$40,$5f,$7f,$7f
14+ .byt $7f,$7f,$7c,$40,$40,$5f,$7f,$7f,$7f,$7f,$7f,$60,$40,$4f,$7f,$7f
15+ .byt $7f,$7f,$7f,$70,$40,$47,$7f,$7f,$7f,$7f,$7f,$78,$40,$43,$7f,$7f
16+ .byt $7f,$7f,$7f,$7c,$40,$41,$7f,$7f,$7f,$7f,$7f,$7e,$40,$40,$7f,$7f
17+ .byt $7f,$7f,$7f,$7f,$40,$40,$7f,$7f,$7f,$7f,$7f,$7f,$70,$40,$5f,$7f
18+ .byt $7f,$7f,$7f,$7f,$78,$40,$4f,$7f,$7f,$7f,$7f,$7f,$7c,$40,$47,$7f
19+ .byt $7f,$7f,$7f,$7f,$7e,$40,$43,$7f,$7f,$7f,$7f,$7f,$7f,$40,$41,$7f
20+ .byt $7f,$7f,$7f,$7f,$7f,$60,$40,$7f,$7f,$7f,$7f,$7f,$7f,$70,$40,$5f
21+ .byt $7f,$7f,$7f,$7f,$7f,$78,$40,$4f,$7f,$7f,$7f,$7f,$7f,$7c,$40,$47
22+ .byt $7f,$7f,$7f,$7f,$7f,$7e,$40,$43,$7f,$7f,$7f,$7f,$7f,$7f,$40,$41
23+ .byt $7f,$7f,$7f,$7f,$7f,$7f,$60,$40,$7f,$7f,$7f,$7f,$7f,$7f,$70,$40
24+ .byt $5f,$7f,$7f,$7f,$7f,$7f,$78,$40,$4f,$7f,$7f,$7f,$7f,$7f,$7c,$40
25+ .byt $47,$7f,$7f,$7f,$7f,$7f,$7e,$40,$43,$7f,$7f,$7f,$7f,$7f,$7f,$40
26+ .byt $41,$7f,$7f,$7f,$7f,$7f,$7f,$60,$40,$7f,$7f,$7f,$7f,$7f,$7f,$70
27+ .byt $40,$5f,$7f,$7f,$7f,$7f,$7f,$78,$40,$4f,$7f,$7f,$7f,$7f,$7f,$7c
28+ .byt $40,$47,$7f,$7f,$7f,$7f,$7f,$7e,$40,$43,$7f,$7f,$7f,$7f,$7f,$7f
29+ .byt $40,$41,$7f,$7f,$7f,$7f,$7f,$7f,$60,$40,$5f,$7f,$7f,$7f,$7f,$7f
30+ .byt $60,$40,$4f,$7f,$7f,$7f,$7f,$7f,$70,$40,$47,$7f,$7f,$7f,$7f,$7f
31+ .byt $78,$40,$43,$7f,$7f,$7f,$7f,$7f,$7c,$40,$41,$7f,$7f,$7f,$7f,$7f
32+ .byt $7e,$40,$40,$7f,$7f,$7f,$7f,$7f,$7f,$40,$40,$6f,$7f,$7f,$7f,$7f
33+ .byt $7f,$50,$40,$57,$7f,$7f,$7f,$7f,$7f,$68,$40,$4b,$7f,$7f,$7f,$7f
34+ .byt $7f,$74,$40,$45,$7f,$7f,$7f,$7f,$7f,$7a,$40,$42,$7f,$7f,$7f,$7f
35+ .byt $7f,$7d,$40,$41,$5f,$7f,$7f,$7f,$7f,$7e,$60,$40,$63,$7f,$7f,$7f
36+ .byt $7f,$7c,$50,$40,$51,$7f,$7f,$7f,$7f,$7e,$48,$40,$48,$7f,$7f,$7f
37+ .byt $7f,$7f,$44,$40,$44,$5f,$7f,$7f,$7f,$7f,$62,$40,$42,$4f,$7f,$7f
38+ .byt $7f,$7f,$71,$40,$41,$47,$7f,$7f,$7f,$7f,$78,$60,$40,$60,$7f,$7f
39+ .byt $7f,$7f,$70,$50,$40,$50,$5f,$7f,$7f,$7f,$78,$48,$40,$48,$4f,$7f
40+ .byt $7f,$7f,$7c,$44,$40,$44,$47,$7f,$7f,$7f,$7e,$42,$40,$42,$43,$7f
41+ .byt $7f,$7f,$7f,$41,$40,$41,$41,$7f,$7f,$7f,$7f,$60,$60,$40,$50,$41
42+ .byt $7f,$7f,$78,$40,$60,$40,$48,$40,$7f,$7f,$7c,$40,$50,$40,$44,$40
43+ .byt $5f,$7f,$7e,$40,$48,$40,$42,$40,$4f,$7f,$7f,$40,$44,$40,$41,$40
44+ .byt $47,$7f,$7f,$60,$42,$40,$40,$60,$43,$7f,$7f,$70,$41,$40,$40,$4c
45+ .byt $40,$40,$40,$40,$43,$40,$40,$46,$40,$40,$40,$40,$41,$60,$40,$43
46+ .byt $40,$40,$40,$40,$40,$70,$40,$41,$60,$40,$40,$40,$40,$58,$40,$40
47+ .byt $70,$40,$40,$40,$40,$4c,$40,$40,$58,$40,$40,$40,$40,$46,$40,$40
48+ .byt $43,$40,$40,$40,$40,$4c,$40,$40,$41,$60,$40,$40,$40,$46,$40,$40
49+ .byt $40,$70,$40,$40,$40,$43,$40,$40,$40,$58,$40,$40,$40,$41,$60,$40
50+ .byt $40,$4c,$40,$40,$40,$40,$70,$40,$40,$46,$40,$40,$40,$40,$58,$40
51+ .byt $40,$40,$7e,$40,$40,$47,$70,$40,$40,$40,$5f,$40,$40,$43,$78,$40
52+ .byt $40,$40,$4f,$60,$40,$41,$7c,$40,$40,$40,$47,$70,$40,$40,$7e,$40
53+ .byt $40,$40,$43,$78,$40,$40,$5f,$40,$40,$40,$41,$7c,$40,$40,$4f,$60
54+ .byt $40,$40,$40,$41,$7f,$7f,$78,$40,$40,$40,$40,$40,$7f,$7f,$7c,$40
55+ .byt $40,$40,$40,$40,$5f,$7f,$7e,$40,$40,$40,$40,$40,$4f,$7f,$7f,$40
56+ .byt $40,$40,$40,$40,$47,$7f,$7f,$60,$40,$40,$40,$40,$43,$7f,$7f,$70
57+ .byt $40,$40
58+
--- users/dbug/games/Road/profile.h (revision 1503)
+++ users/dbug/games/Road/profile.h (revision 1504)
@@ -1,7 +1,7 @@
11 //
22 // User settings
33 //
4-#define PROFILER_ENABLE // Comment out to disable profiling
4+//#define PROFILER_ENABLE // Comment out to disable profiling
55 #define PROFILER_USE_PRINTER // Comment out to disable the usage of printer
66 #define PROFILER_USE_NAMES // Comment out to disable the usage of function names
77
@@ -16,21 +16,17 @@
1616 // List of routines (need an enum !)
1717 // Should have incrementing numbers, finishing by PROFILER_ROUTINE_COUNT as the number of routines to profile
1818 //
19-#define ROUTINE_MAIN_LOOP 0
20-#define ROUTINE_DRAW_ROAD 1
21-#define ROUTINE_SCROLL_COLORS 2
22-#define ROUTINE_TURN_LOOP 3
23-#define ROUTINE_DRAW_LOOP 4
24-//#define ROUTINE_UNUSED 5
25-#define PROFILER_ROUTINE_COUNT 5
19+#define ROUTINE_DRAW_ROAD 0
20+#define ROUTINE_SCROLL_COLORS 1
21+#define ROUTINE_TURN_LOOP 2
22+#define ROUTINE_DRAW_LOOP 3
23+#define PROFILER_ROUTINE_COUNT 4
2624
2725
28-FUNCTIONNAME(ROUTINE_MAIN_LOOP,"MainLoop")
2926 FUNCTIONNAME(ROUTINE_DRAW_ROAD,"DrawRoad")
3027 FUNCTIONNAME(ROUTINE_SCROLL_COLORS,"ScrollColors")
3128 FUNCTIONNAME(ROUTINE_TURN_LOOP,"TurnLoop")
3229 FUNCTIONNAME(ROUTINE_DRAW_LOOP,"DrawLoop")
33-//FUNCTIONNAME(ROUTINE_UNUSED,"---")
3430 FUNCTIONNAME(PROFILER_ROUTINE_COUNT,0) // End marker
3531
3632
--- users/dbug/games/Road/road.s (revision 1503)
+++ users/dbug/games/Road/road.s (revision 1504)
@@ -2,46 +2,2110 @@
22 #include "profile.h"
33
44
5-// int RoadMiddleTable[128];
6-// int RoadOffsetTable[128];
5+#define ENABLE_ENERGY_FILL_UP
76
8-_TurnLeftSimple
7+
8+
9+#define SCREN_ROAD_START $a000+72*40+1
10+#define ROADSIGN_SCREEN_POSITION $a000+40*16+17
11+#define PLAYER_POD_SCREEN_POSITION $a000+180*40
12+#define ROAD_SCREEN_POSITION ($a000+72*40)
13+
14+
15+
16+ .zero
17+
18+save_x .dsb 1
19+save_y .dsb 1
20+_Position .dsb 2
21+_BackgroundPosition .dsb 1
22+_GameLogoRaster1 .dsb 1
23+_RandomCounter .dsb 1
24+
25+
26+;_VSyncCounter1 .dsb 2
27+;_VSyncCounter2 .dsb 2
28+
29+_gKey .dsb 1
30+
31+;_System_IrqCounter .dsb 1
32+;_SystemEffectTrigger .dsb 1 // $13 ;
33+
34+;_System_VblCallBack .dsb 2
35+_VblCounter .dsb 1
36+
37+_SystemFrameCounter
38+_SystemFrameCounter_low .dsb 1
39+_SystemFrameCounter_high .dsb 1
40+
41+ .text
42+
43+_RoadSignLow .byt 1
44+_RoadSignHigh .byt 1
45+
46+_PlayerPodX .byt 100
47+_PlayerEnergy .byt 0
48+_PlayerSpeed .byt 0
49+
50+_AttractModeSequence .byt 1 ; 0=in game 1=display welcome 2=display scores
51+_AttractModeCounter .byt 0
52+
53+
54+_Score ;.byt 0,0,0,0,0,0,0,0,0 ; Up to 999.999.999
55+ .byt $21,$43,$65,$87,$09
56+
57+
58+
59+
60+_IncrementScore
61+ ;jmp _IncrementScore
962 .(
63+ php
64+
65+ sei
66+
67+ sed
68+ clc
69+ lda _Score+0
70+ adc #1
71+ sta _Score+0
72+
73+ lda _Score+1
74+ adc #0
75+ sta _Score+1
76+
77+ lda _Score+2
78+ adc #0
79+ sta _Score+2
80+
81+ lda _Score+3
82+ adc #0
83+ sta _Score+3
84+
85+ lda _Score+4
86+ adc #0
87+ sta _Score+4
88+
89+
90+ plp
91+
92+ jsr _UpdateScreenScore
93+
94+ rts
95+.)
96+
97+; Each number is made of 6 characters (practical)
98+; 0 is at ID 32
99+_UpdateScreenScore
100+ ;jmp _UpdateScreenScore
101+.(
102+ lda #<$bb80+25*40+34
103+ sta tmp1+0
104+ lda #>$bb80+25*40+34
105+ sta tmp1+1
106+
107+ ; ------------------ First digit ------------------
108+ lda _Score+0
109+ and #$0F
110+ jsr _DisplaySingleDigit
111+
112+ .(
113+ sec
114+ lda tmp1+0
115+ sbc #2
116+ sta tmp1+0
117+ lda tmp1+1
118+ sbc #0
119+ sta tmp1+1
120+ .)
121+
122+ ; ------------------ Second digit ------------------
123+ lda _Score+0
124+ lsr
125+ lsr
126+ lsr
127+ lsr
128+ jsr _DisplaySingleDigit
129+
130+ .(
131+ sec
132+ lda tmp1+0
133+ sbc #2
134+ sta tmp1+0
135+ lda tmp1+1
136+ sbc #0
137+ sta tmp1+1
138+ .)
139+
140+ ; ------------------ Third digit ------------------
141+ lda _Score+1
142+ and #$0F
143+ jsr _DisplaySingleDigit
144+
145+ .(
146+ sec
147+ lda tmp1+0
148+ sbc #3
149+ sta tmp1+0
150+ lda tmp1+1
151+ sbc #0
152+ sta tmp1+1
153+ .)
154+
155+ ; ------------------ Fourth digit ------------------
156+ lda _Score+1
157+ lsr
158+ lsr
159+ lsr
160+ lsr
161+ jsr _DisplaySingleDigit
162+
163+ .(
164+ sec
165+ lda tmp1+0
166+ sbc #2
167+ sta tmp1+0
168+ lda tmp1+1
169+ sbc #0
170+ sta tmp1+1
171+ .)
172+
173+ ; ------------------ Fifth digit ------------------
174+ lda _Score+2
175+ and #$0F
176+ jsr _DisplaySingleDigit
177+
178+ .(
179+ sec
180+ lda tmp1+0
181+ sbc #2
182+ sta tmp1+0
183+ lda tmp1+1
184+ sbc #0
185+ sta tmp1+1
186+ .)
187+
188+ ; ------------------ Sixth digit ------------------
189+ lda _Score+2
190+ lsr
191+ lsr
192+ lsr
193+ lsr
194+ jsr _DisplaySingleDigit
195+
196+ .(
197+ sec
198+ lda tmp1+0
199+ sbc #3
200+ sta tmp1+0
201+ lda tmp1+1
202+ sbc #0
203+ sta tmp1+1
204+ .)
205+
206+ ; ------------------ Seventh digit ------------------
207+ lda _Score+3
208+ and #$0F
209+ jsr _DisplaySingleDigit
210+
211+ .(
212+ sec
213+ lda tmp1+0
214+ sbc #2
215+ sta tmp1+0
216+ lda tmp1+1
217+ sbc #0
218+ sta tmp1+1
219+ .)
220+
221+ ; ------------------ Eight digit ------------------
222+ lda _Score+3
223+ lsr
224+ lsr
225+ lsr
226+ lsr
227+ jsr _DisplaySingleDigit
228+
229+ .(
230+ sec
231+ lda tmp1+0
232+ sbc #2
233+ sta tmp1+0
234+ lda tmp1+1
235+ sbc #0
236+ sta tmp1+1
237+ .)
238+
239+ ; ------------------ Ninth digit ------------------
240+ lda _Score+4
241+ and #$0F
242+ jsr _DisplaySingleDigit
243+ /*
244+ .(
245+ sec
246+ lda tmp1+0
247+ sbc #2
248+ sta tmp1+0
249+ lda tmp1+1
250+ sbc #0
251+ sta tmp1+1
252+ .)
253+ */
254+
255+ rts
256+.)
257+
258+
259+_DisplaySingleDigit
260+.(
261+ tax
262+ clc
263+ lda _TableMul6,x
264+
265+ adc #32
10266 ldy #0
267+ sta (tmp1),y ; Top left
268+
269+ ldy #40
270+ adc #1
271+ sta (tmp1),y ; Center left
272+
273+ ldy #80
274+ adc #1
275+ sta (tmp1),y ; Bottom left
276+
277+ ldy #1
278+ adc #1
279+ sta (tmp1),y ; Top right
280+
281+ ldy #41
282+ adc #1
283+ sta (tmp1),y ; Center right
284+
285+ ldy #81
286+ adc #1
287+ sta (tmp1),y ; Bottom right
288+
289+ rts
290+.)
291+
292+
293+_DisplayScore
294+.(
295+ lda #9 ; ALT charset
296+ sta $bb80+25*40+2
297+ sta $bb80+26*40+2
298+ sta $bb80+27*40+2
299+
300+ ; Score colors
301+ lda #7
302+ sta $bb80+25*40+1
303+ lda #3
304+ sta $bb80+26*40+1
305+ lda #1
306+ sta $bb80+27*40+1
307+
308+ ; Numbers colors
309+ lda #7
310+ sta $bb80+25*40+15
311+ sta $bb80+25*40+22
312+ sta $bb80+25*40+29
313+
314+ lda #6
315+ sta $bb80+26*40+15
316+ sta $bb80+26*40+22
317+ sta $bb80+26*40+29
318+
319+ lda #2
320+ sta $bb80+27*40+15
321+ sta $bb80+27*40+22
322+ sta $bb80+27*40+29
323+
324+ ; Hide the crap on the right
325+ lda #0
326+ sta $bb80+25*40+36
327+ sta $bb80+26*40+36
328+ sta $bb80+27*40+36
329+
330+ ; Write text
331+ .(
332+ ldx #0
333+ clc
334+ lda #32+60
335+loop_x
336+ sta $bb80+25*40+3,x
337+ adc #1
338+ sta $bb80+26*40+3,x
339+ adc #1
340+ sta $bb80+27*40+3,x
341+ adc #1
342+ inx
343+ cpx #12
344+ bne loop_x
345+ .)
346+
347+ ; Write zeroes
348+ .(
349+ ldx #0
350+ clc
351+ lda #32
352+loop_x
353+ sta $bb80+25*40+16,x
354+ sta $bb80+25*40+18,x
355+ sta $bb80+25*40+20,x
356+ ;
357+ sta $bb80+25*40+23,x
358+ sta $bb80+25*40+25,x
359+ sta $bb80+25*40+27,x
360+ ;
361+ sta $bb80+25*40+30,x
362+ sta $bb80+25*40+32,x
363+ sta $bb80+25*40+34,x
364+
365+ adc #1
366+
367+ sta $bb80+26*40+16,x
368+ sta $bb80+26*40+18,x
369+ sta $bb80+26*40+20,x
370+ ;
371+ sta $bb80+26*40+23,x
372+ sta $bb80+26*40+25,x
373+ sta $bb80+26*40+27,x
374+ ;
375+ sta $bb80+26*40+30,x
376+ sta $bb80+26*40+32,x
377+ sta $bb80+26*40+34,x
378+
379+ adc #1
380+
381+ sta $bb80+27*40+16,x
382+ sta $bb80+27*40+18,x
383+ sta $bb80+27*40+20,x
384+ ;
385+ sta $bb80+27*40+23,x
386+ sta $bb80+27*40+25,x
387+ sta $bb80+27*40+27,x
388+ ;
389+ sta $bb80+27*40+30,x
390+ sta $bb80+27*40+32,x
391+ sta $bb80+27*40+34,x
392+
393+ adc #1
394+ inx
395+ cpx #2
396+ bne loop_x
397+ .)
398+
399+ lda #0
400+ sta _Score+0
401+ sta _Score+1
402+ sta _Score+2
403+ sta _Score+3
404+ sta _Score+4
405+
406+ rts
407+.)
408+
409+_InitializeAlternateCharset
410+.(
411+#if 0
412+ lda #9 ; ALT charset
413+ sta $bb80+25*40+2
414+ sta $bb80+26*40+2
415+ sta $bb80+27*40+2
416+
417+ ; Write text
418+ .(
419+ ldx #0
420+ clc
421+ lda #32
422+loop_x
423+ sta $bb80+25*40+3,x
424+ adc #1
425+ sta $bb80+26*40+3,x
426+ adc #1
427+ sta $bb80+27*40+3,x
428+ adc #1
429+ inx
430+ cpx #32
431+ bne loop_x
432+ .)
433+#endif
434+ ;jsr _Breakpoint
435+
436+ ; Initialize charset
437+ .(
438+ lda #<_HighScoreCharacterStart
439+ sta tmp0+0
440+ lda #>_HighScoreCharacterStart
441+ sta tmp0+1
442+
443+ lda #<$9C00+32*8 ; 9c00 for ALT / 9800 for STD
444+ sta tmp1+0
445+ lda #>$9C00+32*8
446+ sta tmp1+1
447+
448+ lda #32
449+ sta tmp2
450+loop_x
451+ ldx #3*8
452+loop_y
453+ ldy #0
454+ lda (tmp0),y
455+ sta (tmp1),y
456+
457+ clc
458+ lda tmp0+0
459+ adc #32
460+ sta tmp0+0
461+ lda tmp0+1
462+ adc #0
463+ sta tmp0+1
464+
465+ clc
466+ lda tmp1+0
467+ adc #1
468+ sta tmp1+0
469+ lda tmp1+1
470+ adc #0
471+ sta tmp1+1
472+
473+ dex
474+ bne loop_y
475+
476+ sec
477+ lda tmp0+0
478+ sbc #<32*24-1
479+ sta tmp0+0
480+ lda tmp0+1
481+ sbc #>32*24-1
482+ sta tmp0+1
483+
484+ dec tmp2
485+ bne loop_x
486+
487+ .)
488+
489+
490+ ;jsr _Breakpoint
491+ rts
492+.)
493+
494+
495+_HandleGamePlay
496+ ;jmp _HandleGamePlay
497+.(
498+ lda _AttractModeSequence
499+ beq play_mode
500+ rts ; Attract mode
501+
502+play_mode
503+ lda _PlayerPodX
504+
505+ ; Are we out of the track
506+ cmp #175
507+ bcs out_of_tracks
508+ cmp #30
509+ bcc out_of_tracks
510+
511+ ; Are we in the wider area of the track
512+ cmp #115
513+ bcs on_the_track
514+ cmp #95
515+ bcc on_the_track
516+ bcs center_of_track
517+
518+out_of_tracks
519+ ;jsr _Breakpoint
520+
521+ ; Make noise
522+ lda #128
523+ sta _PsgfreqNoise
524+ lda #10
525+ sta _PsgvolumeC
526+
527+ ;
528+ lda _Psgmixer
529+ and #%11011111
530+ sta _Psgmixer
531+
532+ jsr _DecreaseEnergy
533+ jsr _DecreaseEnergy
534+
535+ rts
536+
537+center_of_track
538+ jsr _IncreaseEnergy
539+on_the_track
540+ ; Stop noise
541+ lda _Psgmixer
542+ ora #%00100000
543+ sta _Psgmixer
544+
545+ lda #0
546+ sta _PsgvolumeC
547+
548+ rts
549+.)
550+
551+
552+_IncreaseEnergy
553+.(
554+ ldx _PlayerEnergy
555+ cpx #255
556+ beq maximum
557+ inx
558+ stx _PlayerEnergy
559+ jsr _UpdateEnergyBar
560+maximum
561+ rts
562+.)
563+
564+_DecreaseEnergy
565+.(
566+ ldx _PlayerEnergy
567+ beq zero
568+ dex
569+ stx _PlayerEnergy
570+ jsr _UpdateEnergyBar
571+zero
572+ rts
573+.)
574+
575+
576+_UpdateEnergyBar
577+.(
578+ ; _HiresAddrLow
579+ ; _HiresAddrHigh
580+
581+ lda _PlayerEnergy // 0-255
582+ lsr // 0-127
583+ lsr // 0-63
584+ sta tmp0
585+
586+ sec
587+ lda #63
588+ sbc tmp0
589+ tax
590+
591+ lda _HiresAddrLow,x
592+ sta tmp1+0
593+ lda _HiresAddrHigh,x
594+ sta tmp1+1
595+
596+ lda #0
597+ ldy #34
598+ sta (tmp1),y
599+
600+ ldy #34+40
601+ lda #3
602+ sta (tmp1),y
603+
604+ ldy #34+80
605+ lda #2
606+ sta (tmp1),y
607+
608+ rts
609+.)
610+
611+
612+
613+_PlayerPodMoveLeft
614+.(
615+ ldx _PlayerPodX
616+ cpx #12
617+ beq skip
618+ dex
619+ stx _PlayerPodX
620+skip
621+ rts
622+.)
623+
624+
625+_PlayerPodMoveRight
626+.(
627+ ldx _PlayerPodX
628+ cpx #190
629+ beq skip
630+ inx
631+ stx _PlayerPodX
632+skip
633+ rts
634+.)
635+
636+
637+
638+
639+_FillUpEnergy
640+.(
641+
642+ clc
643+ lda #<$a000+40*64+1
644+ sta tmp1+0
645+ adc #33
646+ sta tmp2+0
647+ lda #>$a000+40*64+1
648+ sta tmp1+1
649+ adc #0
650+ sta tmp2+1
651+
652+#ifdef ENABLE_ENERGY_FILL_UP
653+ lda #<400
654+ sta _PsgfreqA+0
655+ lda #>400
656+ sta _PsgfreqA+1
657+
658+ lda #10
659+ sta _PsgvolumeA
660+
661+ lda #8+16+32+64+128
662+ sta _Psgmixer
663+#endif
664+
665+ ldx #64
11666 loop
667+#ifdef ENABLE_ENERGY_FILL_UP
668+ jsr _VSync
669+ jsr _VSync
670+#endif
671+
672+ sec
673+ lda _PsgfreqA+0
674+ sbc #2
675+ sta _PsgfreqA+0
676+ lda _PsgfreqA+1
677+ sbc #0
678+ sta _PsgfreqA+1
679+
680+ ldy #0
681+ lda #1
682+ sta (tmp1),y
683+ lda #2
684+ sta (tmp2),y
685+
686+
687+ sec
688+ lda tmp1+0
689+ sbc #40
690+ sta tmp1+0
691+ lda tmp1+1
692+ sbc #0
693+ sta tmp1+1
694+
695+ sec
696+ lda tmp2+0
697+ sbc #40
698+ sta tmp2+0
699+ lda tmp2+1
700+ sbc #0
701+ sta tmp2+1
702+
703+ dex
704+ bne loop
705+
706+ lda #0
707+ sta _PsgvolumeA
708+
709+ lda #255
710+ sta _PlayerEnergy
711+
712+ lda #0
713+ sta _PlayerSpeed
714+
715+ rts
716+.)
717+
718+; Each display is 18x64 (3x64 bytes=192)
719+_DisplayEnergySpeed
720+.(
12721 clc
13- lda _RoadMiddleTable,y
14- adc _RoadOffsetTable,y
15- sta _RoadMiddleTable,y
722+ lda #<$a000+40*1+2
723+ sta tmp1+0
724+ adc #33
725+ sta tmp2+0
726+ lda #>$a000+40*1+2
727+ sta tmp1+1
728+ adc #0
729+ sta tmp2+1
730+
731+ ldx #0
732+loop_y
733+ ldy #0
734+loop_x
735+ lda _EnergySpeedStart,x
736+ sta (tmp1),y
737+ lda _EnergySpeedStart+3*64,x
738+ sta (tmp2),y
739+ inx
16740 iny
17- lda _RoadMiddleTable,y
18- adc _RoadOffsetTable,y
19- sta _RoadMiddleTable,y
741+ cpy #3
742+ bne loop_x
743+
744+ clc
745+ lda tmp1+0
746+ adc #40
747+ sta tmp1+0
748+ bcc skip
749+ inc tmp1+1
750+skip
751+
752+ clc
753+ lda tmp2+0
754+ adc #40
755+ sta tmp2+0
756+ bcc skip2
757+ inc tmp2+1
758+skip2
759+
760+ cpx #3*64
761+ bne loop_y
762+
763+ rts
764+.)
765+
766+
767+
768+_ClearRoadArea
769+.(
770+ lda #<ROAD_SCREEN_POSITION+1
771+ sta tmp1+0
772+ lda #>ROAD_SCREEN_POSITION+1
773+ sta tmp1+1
774+
775+ ldx #127
776+loop_y
777+
778+ lda #64
779+ ldy #38
780+loop_x
781+ sta (tmp1),y
782+ dey
783+ bne loop_x
784+
785+ clc
786+ lda tmp1+0
787+ adc #40
788+ sta tmp1+0
789+ bcc skip
790+ inc tmp1+1
791+skip
792+
793+ dex
794+ bne loop_y
795+
796+ rts
797+.)
798+
799+
800+_DrawTriangularRoadArea
801+.(
802+ lda #<ROAD_SCREEN_POSITION+40+1
803+ sta tmp1+0
804+ lda #>ROAD_SCREEN_POSITION+40+1
805+ sta tmp1+1
806+
807+ ldx #0
808+loop_y
809+ lda _TableDiv6,x
810+ beq skip_line
811+ sta tmp0 ; counter
812+
813+ lsr ; /2
814+ sta tmp0+1 ; counter
815+
816+ sec
817+ lda #20
818+ sbc tmp0+1
819+ tay
820+
821+ lda #64+1+2+4+8+16+32
822+loop_x
823+ sta (tmp1),y
20824 iny
21- bne loop
825+ dec tmp0
826+ bne loop_x
827+skip_line
828+
829+ clc
830+ lda tmp1+0
831+ adc #80
832+ sta tmp1+0
833+ bcc skip
834+ inc tmp1+1
835+skip
836+
837+ inx
838+ inx
839+ inx
840+ cpx #190
841+ bcc loop_y
842+
843+
844+loop
845+ ;jmp loop
22846 rts
23847 .)
24848
25-_TurnRightSimple
849+
850+
851+
852+
853+
854+
855+_EraseDrawRoadSign
26856 .(
857+ ldx #0
858+loop_y
27859 ldy #0
860+ lda #64
861+ sta (tmp1),y
862+ iny
863+loop_x
864+ lda #64
865+
866+ inx
867+ sta (tmp1),y
868+ iny
869+ cpy #6
870+ bne loop_x
871+
872+ lda #64
873+ sta (tmp1),y
874+ iny
875+
876+ clc
877+ lda tmp1+0
878+ adc #40
879+ sta tmp1+0
880+ bcc skip
881+ inc tmp1+1
882+skip
883+
884+ cpx #5*29
885+ bne loop_y
886+
887+ rts
888+.)
889+
890+
891+_DrawRoadSign
892+.(
893+ lda #<ROADSIGN_SCREEN_POSITION
894+ sta tmp1+0
895+ lda #>ROADSIGN_SCREEN_POSITION
896+ sta tmp1+1
897+
898+ lda _RoadSignLow
899+ sta loop_x+1
900+ lda _RoadSignHigh
901+ sta loop_x+2
902+ beq _EraseDrawRoadSign
903+
904+ ldx #0
905+loop_y
906+ ldy #0
907+ lda #%000011+64
908+ sta (tmp1),y
909+ iny
910+loop_x
911+ lda $1234,x
912+ ora #64
913+ eor #128
914+
915+ inx
916+ sta (tmp1),y
917+ iny
918+ cpy #6
919+ bne loop_x
920+
921+ lda #%110000+64
922+ sta (tmp1),y
923+ iny
924+
925+
926+ clc
927+ lda tmp1+0
928+ adc #40
929+ sta tmp1+0
930+ bcc skip
931+ inc tmp1+1
932+skip
933+
934+ cpx #5*29
935+ bne loop_y
936+
937+ rts
938+.)
939+
940+
941+
942+
943+
944+
945+; Player pod is 48x18=8 bytes wide
946+; 8*18=144 bytes per sprite -> 864 bytes total
947+_DrawPlayerPod
948+.(
949+ ldx _PlayerPodX
950+ lda _TableDiv6,x
951+ tay
952+ lda _TableMod6,x
953+ asl ; x2
954+ asl ; x4
955+ asl ; x8
956+ tax
957+
958+ ;ldy _PlayerPodX
959+
960+ ;ldx #0
961+ ;ldy #20
962+
963+ lda #9
964+ sta tmp0
965+loop_x
966+ lda _PlayerPodStart+49*0,x
967+ sta PLAYER_POD_SCREEN_POSITION+40*0,y
968+ lda _PlayerPodStart+49*1,x
969+ ;sta PLAYER_POD_SCREEN_POSITION+40*1,y
970+ lda _PlayerPodStart+49*2,x
971+ sta PLAYER_POD_SCREEN_POSITION+40*2,y
972+ lda _PlayerPodStart+49*3,x
973+ ;sta PLAYER_POD_SCREEN_POSITION+40*3,y
974+ lda _PlayerPodStart+49*4,x
975+ sta PLAYER_POD_SCREEN_POSITION+40*4,y
976+ lda _PlayerPodStart+49*5,x
977+ ;sta PLAYER_POD_SCREEN_POSITION+40*5,y
978+ lda _PlayerPodStart+49*6,x
979+ sta PLAYER_POD_SCREEN_POSITION+40*6,y
980+ lda _PlayerPodStart+49*7,x
981+ ;sta PLAYER_POD_SCREEN_POSITION+40*7,y
982+ lda _PlayerPodStart+49*8,x
983+ sta PLAYER_POD_SCREEN_POSITION+40*8,y
984+ lda _PlayerPodStart+49*9,x
985+ ;sta PLAYER_POD_SCREEN_POSITION+40*9,y
986+
987+ lda _PlayerPodStart+49*10,x
988+ sta PLAYER_POD_SCREEN_POSITION+40*10,y
989+ lda _PlayerPodStart+49*11,x
990+ ;sta PLAYER_POD_SCREEN_POSITION+40*11,y
991+ lda _PlayerPodStart+49*12,x
992+ sta PLAYER_POD_SCREEN_POSITION+40*12,y
993+ lda _PlayerPodStart+49*13,x
994+ ;sta PLAYER_POD_SCREEN_POSITION+40*13,y
995+ lda _PlayerPodStart+49*14,x
996+ sta PLAYER_POD_SCREEN_POSITION+40*14,y
997+ lda _PlayerPodStart+49*15,x
998+ ;sta PLAYER_POD_SCREEN_POSITION+40*15,y
999+ lda _PlayerPodStart+49*16,x
1000+ sta PLAYER_POD_SCREEN_POSITION+40*16,y
1001+ lda _PlayerPodStart+49*17,x
1002+
1003+ inx
1004+ iny
1005+
1006+ dec tmp0
1007+ bne loop_x
1008+
1009+ rts
1010+.)
1011+
1012+
1013+
1014+
1015+_AttractModeTextDisplay
1016+.(
1017+ lda _AttractModeSequence
1018+ bne update
1019+ rts
1020+
1021+update
1022+ dec _AttractModeCounter
1023+ beq next
1024+ rts
1025+
1026+next
1027+ ;jmp display_howtoplay ; ---- test
1028+
1029+ cmp #4
1030+ beq display_howtoplay
1031+ cmp #3
1032+ beq display_story
1033+ cmp #2
1034+ beq display_scores
1035+ bne display_welcome
1036+
1037+display_welcome
1038+ jsr _EraseEvenLines
1039+ jsr _DisplayWelcomeText
1040+ lda #255
1041+ sta _AttractModeCounter
1042+ lda #2
1043+ sta _AttractModeSequence
1044+ rts
1045+
1046+display_scores
1047+ jsr _EraseEvenLines
1048+ jsr _DisplayScoresText
1049+ lda #255
1050+ sta _AttractModeCounter
1051+ lda #3
1052+ sta _AttractModeSequence
1053+ rts
1054+
1055+display_story
1056+ jsr _EraseEvenLines
1057+ jsr _DisplayStoryText
1058+ lda #255
1059+ sta _AttractModeCounter
1060+ lda #4
1061+ sta _AttractModeSequence
1062+ rts
1063+
1064+display_howtoplay
1065+ jsr _EraseEvenLines
1066+ jsr _DisplayHowToPlayText
1067+ lda #255
1068+ sta _AttractModeCounter
1069+ lda #1
1070+ sta _AttractModeSequence
1071+ rts
1072+
1073+.)
1074+
1075+
1076+_EraseEvenLines
1077+.(
1078+ lda #<ROAD_SCREEN_POSITION
1079+ sta tmp1+0
1080+ lda #>ROAD_SCREEN_POSITION
1081+ sta tmp1+1
1082+
1083+ ldx #64
1084+loop_y
1085+
1086+ ldy #39
1087+ lda #64 ; +1+4+16
1088+loop_x
1089+ sta (tmp1),y
1090+ dey
1091+ bpl loop_x
1092+
1093+ clc
1094+ lda tmp1+0
1095+ adc #80
1096+ sta tmp1+0
1097+ bcc skip
1098+ inc tmp1+1
1099+skip
1100+
1101+ dex
1102+ bne loop_y
1103+
1104+ rts
1105+.)
1106+
1107+
1108+
1109+
1110+#define PRINT_TEXT(x,y,message) \
1111+:.( \
1112+ :lda #<$a000+x+40*y \
1113+ :sta tmp1+0 \
1114+ :lda #>$a000+x+40*y \
1115+ :sta tmp1+1 \
1116+ :lda #<message_data \
1117+ :sta __TextFetch+1 \
1118+ :lda #>message_data \
1119+ :sta __TextFetch+2 \
1120+ :jmp continue \
1121+:message_data \
1122+ :.byt message \
1123+ :.byt 0 \
1124+:continue \
1125+ :jsr _HiresDoublePrintOut \
1126+:.)
1127+
1128+
1129+
1130+; Going to use the font in $9800
1131+_DisplayWelcomeText
1132+ PRINT_TEXT(16,80,"WELCOME TO")
1133+ PRINT_TEXT(11,100,"QUANTUM FX TURBO ULTRA")
1134+ PRINT_TEXT(19,120,"V1.1")
1135+ PRINT_TEXT(7,140,"THE ULTIMATE ORIC RACING GAME")
1136+ PRINT_TEXT(2,160,"FOR THE CEO NEW YEAR 2019 COMPETITION")
1137+ PRINT_TEXT(10,180,"(C) 2018 DEFENCE FORCE")
1138+ rts
1139+
1140+_DisplayScoresText
1141+ PRINT_TEXT(17,80,"HALL OF FAME")
1142+ PRINT_TEXT(10,100,"#1 Woupite")
1143+ PRINT_TEXT(10,120,"#2 Floushate")
1144+ PRINT_TEXT(10,140,"#3 Rushronic")
1145+ PRINT_TEXT(10,160,"#4 QubaiRace")
1146+ PRINT_TEXT(10,180,"#5 Z-Fero")
1147+ rts
1148+
1149+_DisplayStoryText
1150+ PRINT_TEXT(13,80,"THE STORY SO FAR")
1151+ PRINT_TEXT(3,100,"THE YEAR IS 3142 OR SOMETHING, AND")
1152+ PRINT_TEXT(4,120,"HUMANS ARE NOW LIVING IN VIRTUAL")
1153+ PRINT_TEXT(3,140,"WORLDS DESIGNED TO ENTERTAIN THEM.")
1154+ PRINT_TEXT(4,160,"QUANTUM RACING HAS BECOME ONE OF")
1155+ PRINT_TEXT(5,180,"THE FAVORITE SPORTS ALL AROUND.")
1156+ rts
1157+
1158+_DisplayHowToPlayText
1159+ PRINT_TEXT(14,80,"HOW TO PLAY")
1160+ PRINT_TEXT(3,100,"USE YOUR VIRTUAL INTERFACE TO STEER")
1161+ PRINT_TEXT(3,120,"LEFT AND RIGHT AS WELL AS ACCELERATE")
1162+ PRINT_TEXT(3,140,"AND BREAK.")
1163+ PRINT_TEXT(3,160,"FIGHT THE CENTRIFUGAL FORCE AND STAY")
1164+ PRINT_TEXT(3,180,"IN THE CENTER TO COLLECT ENERGY.")
1165+ rts
1166+
1167+
1168+
1169+_HiresDoublePrintOut
1170+ //jmp _HiresDoublePrintOut
1171+.(
1172+ /*
1173+ lda #<$a000+20+40*100
1174+ sta tmp1+0
1175+ lda #>$a000+20+40*100
1176+ sta tmp1+1
1177+ */
1178+
1179+ ldx #0
281180 loop
1181++__TextFetch
1182+ lda $1234,x
1183+ beq exit
1184+ inx
1185+ stx save_x
1186+
1187+ ; a*1
1188+ sta tmp0+0
1189+ lda #0
1190+ sta tmp0+1
1191+
1192+ asl tmp0+0
1193+ rol tmp0+1 ; x2
1194+
1195+ asl tmp0+0
1196+ rol tmp0+1 ; x4
1197+
1198+ asl tmp0+0
1199+ rol tmp0+1 ; x8
1200+
1201+ clc
1202+ lda tmp0+0
1203+ adc #<$9800
1204+ sta tmp0+0
1205+ lda tmp0+1
1206+ adc #>$9800
1207+ sta tmp0+1
1208+
1209+ ldy #7
1210+loop_fetch
1211+ lda (tmp0),y
1212+ pha
1213+ dey
1214+ bpl loop_fetch
1215+
1216+ ldy #0
1217+ ldx #0
1218+loop_write
1219+ pla
1220+ ora #64
1221+ sta (tmp1),y
1222+
1223+ clc
1224+ lda tmp1+0
1225+ adc #80
1226+ sta tmp1+0
1227+ bcc skip
1228+ inc tmp1+1
1229+skip
1230+
1231+ inx
1232+ cpx #8
1233+ bne loop_write
1234+
291235 sec
30- lda _RoadMiddleTable,y
31- sbc _RoadOffsetTable,y
32- sta _RoadMiddleTable,y
33- iny
34- lda _RoadMiddleTable,y
35- sbc _RoadOffsetTable,y
36- sta _RoadMiddleTable,y
37- iny
1236+ lda tmp1+0
1237+ sbc #<640-1
1238+ sta tmp1+0
1239+ lda tmp1+1
1240+ sbc #>640-1
1241+ sta tmp1+1
1242+
1243+ ldx save_x
1244+
1245+
381246 bne loop
1247+
1248+exit
391249 rts
401250 .)
411251
421252
43-#define SCREN_ROAD_START $a000+72*40+1
441253
1254+_GameLogoRasterTable
1255+ .byt 7
1256+ .byt 7
1257+ .byt 6
1258+ .byt 7
1259+ .byt 6
1260+ .byt 6
1261+ .byt 2
1262+ .byt 6
1263+ .byt 2
1264+ .byt 2
1265+ .byt 5
1266+ .byt 2
1267+ .byt 5
1268+ .byt 5
1269+ .byt 2
1270+ .byt 5
1271+ .byt 2
1272+ .byt 2
1273+ .byt 6
1274+ .byt 2
1275+ .byt 6
1276+ .byt 6
1277+ .byt 7
1278+ .byt 6
1279+ .byt 6
1280+ .byt 7
1281+ .byt 7
1282+ .byt 6
1283+ .byt 7
1284+ .byt 7
1285+ .byt 7
1286+ .byt 7
1287+ .byt 7
1288+ .byt 7
1289+ .byt 3
1290+ .byt 7
1291+ .byt 7
1292+ .byt 3
1293+ .byt 7
1294+ .byt 3
1295+ .byt 3
1296+ .byt 7
1297+ .byt 7
1298+ .byt 3
1299+ .byt 3
1300+ .byt 3
1301+ .byt 3
1302+ .byt 7
1303+ .byt 3
1304+ .byt 3
1305+ .byt 7
1306+ .byt 3
1307+ .byt 7
1308+ .byt 7
1309+ .byt 7
1310+ .byt 7
1311+ .byt 7
1312+ .byt 7
1313+ .byt 7
1314+ .byt 7
1315+ .byt 7
1316+ .byt 7
1317+ .byt 7
1318+ .byt 7
1319+
1320+_GameLogoRasterTable2
1321+ .byt 1
1322+ .byt 1
1323+ .byt 3
1324+ .byt 1
1325+ .byt 3
1326+ .byt 3
1327+ .byt 2
1328+ .byt 3
1329+ .byt 2
1330+ .byt 2
1331+ .byt 5
1332+ .byt 2
1333+ .byt 5
1334+ .byt 5
1335+ .byt 2
1336+ .byt 5
1337+ .byt 2
1338+ .byt 2
1339+ .byt 3
1340+ .byt 2
1341+ .byt 3
1342+ .byt 3
1343+ .byt 1
1344+ .byt 3
1345+ .byt 3
1346+ .byt 1
1347+ .byt 1
1348+ .byt 3
1349+ .byt 1
1350+ .byt 1
1351+ .byt 1
1352+ .byt 1
1353+ .byt 1
1354+ .byt 1
1355+ .byt 3
1356+ .byt 1
1357+ .byt 1
1358+ .byt 3
1359+ .byt 1
1360+ .byt 3
1361+ .byt 3
1362+ .byt 1
1363+ .byt 1
1364+ .byt 3
1365+ .byt 3
1366+ .byt 3
1367+ .byt 3
1368+ .byt 1
1369+ .byt 3
1370+ .byt 3
1371+ .byt 1
1372+ .byt 3
1373+ .byt 1
1374+ .byt 1
1375+ .byt 1
1376+ .byt 1
1377+ .byt 1
1378+ .byt 1
1379+ .byt 1
1380+ .byt 1
1381+ .byt 1
1382+ .byt 1
1383+ .byt 1
1384+ .byt 1
1385+
1386+_AnimateGameLogoRasters
1387+.(
1388+ lda _GameLogoRaster1
1389+ clc
1390+ adc #1
1391+ and #31
1392+ sta _GameLogoRaster1
1393+ tax
1394+
1395+ lda #<$a000+3+40*5
1396+ sta tmp0+0
1397+ lda #>$a000+3+40*5
1398+ sta tmp0+1
1399+
1400+ lda #<$a000+2+40*(19+5)
1401+ sta tmp1+0
1402+ lda #>$a000+2+40*(19+5)
1403+ sta tmp1+1
1404+
1405+ lda #19
1406+ sta _RandomCounter
1407+loop_y
1408+ lda _GameLogoRasterTable,x
1409+ ldy #0
1410+ sta (tmp0),y
1411+ lda _GameLogoRasterTable2,x
1412+ ldy #25
1413+ sta (tmp0),y
1414+
1415+ lda _GameLogoRasterTable2,x
1416+ ldy #0
1417+ sta (tmp1),y
1418+ lda _GameLogoRasterTable,x
1419+ ldy #18
1420+ sta (tmp1),y
1421+
1422+ inx
1423+
1424+ clc
1425+ lda tmp0+0
1426+ adc #40
1427+ sta tmp0+0
1428+ lda tmp0+1
1429+ adc #0
1430+ sta tmp0+1
1431+
1432+ clc
1433+ lda tmp1+0
1434+ adc #40
1435+ sta tmp1+0
1436+ lda tmp1+1
1437+ adc #0
1438+ sta tmp1+1
1439+
1440+ dec _RandomCounter
1441+ bne loop_y
1442+ rts
1443+.)
1444+
1445+
1446+; 198x38 (33 bytes)
1447+_DrawGameLogo
1448+.(
1449+ lda #<_GameLogoStart-1
1450+ sta tmp0+0
1451+ lda #>_GameLogoStart-1
1452+ sta tmp0+1
1453+
1454+ lda #<$a000+3+40*5
1455+ sta tmp1+0
1456+ lda #>$a000+3+40*5
1457+ sta tmp1+1
1458+
1459+ ldx #38
1460+loop_y
1461+ ldy #33
1462+loop_x
1463+ lda (tmp0),y
1464+ sta (tmp1),y
1465+ dey
1466+ bne loop_x
1467+
1468+ clc
1469+ lda tmp0+0
1470+ adc #33
1471+ sta tmp0+0
1472+ lda tmp0+1
1473+ adc #0
1474+ sta tmp0+1
1475+
1476+ clc
1477+ lda tmp1+0
1478+ adc #40
1479+ sta tmp1+0
1480+ lda tmp1+1
1481+ adc #0
1482+ sta tmp1+1
1483+
1484+ dex
1485+ bne loop_y
1486+
1487+ rts
1488+.)
1489+
1490+; _ScrollingBackground
1491+; Picture is 512x30
1492+;
1493+; 2580 bytes / 6 = 430 bytes per shifted image
1494+; Each image is 5 lines of 86 bytes
1495+
1496+
1497+.(
1498+go_4
1499+ ldy #38
1500+loop_4
1501+ lda _ScrollingBackground+430*4+86*0,x
1502+ sta $a000+1+40*67+40*0,y
1503+ lda _ScrollingBackground+430*4+86*1,x
1504+ sta $a000+1+40*67+40*1,y
1505+ lda _ScrollingBackground+430*4+86*2,x
1506+ sta $a000+1+40*67+40*2,y
1507+ lda _ScrollingBackground+430*4+86*3,x
1508+ sta $a000+1+40*67+40*3,y
1509+ lda _ScrollingBackground+430*4+86*4,x
1510+ sta $a000+1+40*67+40*4,y
1511+
1512+ dex
1513+ dey
1514+ bne loop_4
1515+ rts
1516+
1517+go_5
1518+ ldy #38
1519+loop_5
1520+ lda _ScrollingBackground+430*5+86*0,x
1521+ sta $a000+1+40*67+40*0,y
1522+ lda _ScrollingBackground+430*5+86*1,x
1523+ sta $a000+1+40*67+40*1,y
1524+ lda _ScrollingBackground+430*5+86*2,x
1525+ sta $a000+1+40*67+40*2,y
1526+ lda _ScrollingBackground+430*5+86*3,x
1527+ sta $a000+1+40*67+40*3,y
1528+ lda _ScrollingBackground+430*5+86*4,x
1529+ sta $a000+1+40*67+40*4,y
1530+
1531+ dex
1532+ dey
1533+ bne loop_5
1534+ rts
1535+
1536++_DrawBackground
1537+ ldy _BackgroundPosition
1538+ lda _TableDiv6,y
1539+ clc
1540+ adc #39
1541+ tax
1542+
1543+ lda _TableMod6,y
1544+ tay
1545+ beq go_5
1546+ dey
1547+ beq go_4
1548+ dey
1549+ beq go_3
1550+ dey
1551+ beq go_2
1552+ dey
1553+ beq go_1
1554+ bne go_0
1555+
1556+
1557+go_0
1558+ ldy #38
1559+loop_0
1560+ lda _ScrollingBackground+430*0+86*0,x
1561+ sta $a000+1+40*67+40*0,y
1562+ lda _ScrollingBackground+430*0+86*1,x
1563+ sta $a000+1+40*67+40*1,y
1564+ lda _ScrollingBackground+430*0+86*2,x
1565+ sta $a000+1+40*67+40*2,y
1566+ lda _ScrollingBackground+430*0+86*3,x
1567+ sta $a000+1+40*67+40*3,y
1568+ lda _ScrollingBackground+430*0+86*4,x
1569+ sta $a000+1+40*67+40*4,y
1570+
1571+ dex
1572+ dey
1573+ bne loop_0
1574+ rts
1575+
1576+go_1
1577+ ldy #38
1578+loop_1
1579+ lda _ScrollingBackground+430*1+86*0,x
1580+ sta $a000+1+40*67+40*0,y
1581+ lda _ScrollingBackground+430*1+86*1,x
1582+ sta $a000+1+40*67+40*1,y
1583+ lda _ScrollingBackground+430*1+86*2,x
1584+ sta $a000+1+40*67+40*2,y
1585+ lda _ScrollingBackground+430*1+86*3,x
1586+ sta $a000+1+40*67+40*3,y
1587+ lda _ScrollingBackground+430*1+86*4,x
1588+ sta $a000+1+40*67+40*4,y
1589+
1590+ dex
1591+ dey
1592+ bne loop_1
1593+ rts
1594+
1595+go_2
1596+ ldy #38
1597+loop_2
1598+ lda _ScrollingBackground+430*2+86*0,x
1599+ sta $a000+1+40*67+40*0,y
1600+ lda _ScrollingBackground+430*2+86*1,x
1601+ sta $a000+1+40*67+40*1,y
1602+ lda _ScrollingBackground+430*2+86*2,x
1603+ sta $a000+1+40*67+40*2,y
1604+ lda _ScrollingBackground+430*2+86*3,x
1605+ sta $a000+1+40*67+40*3,y
1606+ lda _ScrollingBackground+430*2+86*4,x
1607+ sta $a000+1+40*67+40*4,y
1608+
1609+ dex
1610+ dey
1611+ bne loop_2
1612+ rts
1613+
1614+go_3
1615+ ldy #38
1616+loop_3
1617+ lda _ScrollingBackground+430*3+86*0,x
1618+ sta $a000+1+40*67+40*0,y
1619+ lda _ScrollingBackground+430*3+86*1,x
1620+ sta $a000+1+40*67+40*1,y
1621+ lda _ScrollingBackground+430*3+86*2,x
1622+ sta $a000+1+40*67+40*2,y
1623+ lda _ScrollingBackground+430*3+86*3,x
1624+ sta $a000+1+40*67+40*3,y
1625+ lda _ScrollingBackground+430*3+86*4,x
1626+ sta $a000+1+40*67+40*4,y
1627+
1628+ dex
1629+ dey
1630+ bne loop_3
1631+ rts
1632+.)
1633+
1634+
1635+
1636+
1637+
1638+; for (y=0;y<128;y++)
1639+; {
1640+; if (y&1)
1641+; {
1642+; x=RoadMiddleTableHigh[y];
1643+; curset(120+x+RoadWidthTable[y]-10,72+y,0);
1644+; draw(10,0,0);
1645+; draw(-RoadWidthTable[y]*2,0,1);
1646+; draw(10,0,0);
1647+; }
1648+; }
1649+;
1650+; RoadWidthTable[y] =-(100*y)/128;
1651+
1652+#define ROAD(position) :clc \
1653+ :lda _RoadMiddleTableHigh+position \
1654+ :adc #120-(100*position)/128 \
1655+ :tay \
1656+ :lda _Mod6Left,y \
1657+ :ldx _TableDiv6,y \
1658+ :sta $a000+0+40*72+40*position+1,x \
1659+ :lda #64 \
1660+ :sta $a000+0+40*72+40*position+0,x \
1661+ :lda #64+63 \
1662+ :sta $a000+0+40*72+40*position+2,x \
1663+ :clc \
1664+ :lda _RoadMiddleTableHigh+position \
1665+ :adc #120+(100*position)/128 \
1666+ :tay \
1667+ :lda _Mod6Right,y \
1668+ :ldx _TableDiv6,y \
1669+ :sta $a000+0+40*72+40*position+1,x \
1670+ :lda #64+63 \
1671+ :sta $a000+0+40*72+40*position+0,x \
1672+ :lda #64 \
1673+ :sta $a000+0+40*72+40*position+2,x
1674+
1675+
1676+_RoadDrawLoopASM
1677+.(
1678+ lda #<ROAD_SCREEN_POSITION
1679+ sta tmp1+0
1680+ lda #>ROAD_SCREEN_POSITION
1681+ sta tmp1+1
1682+
1683+ ;ROAD(1)
1684+ ROAD(3)
1685+ ROAD(5)
1686+ ROAD(7)
1687+ ROAD(9)
1688+ ROAD(11)
1689+ ROAD(13)
1690+ ROAD(15)
1691+ ROAD(17)
1692+ ROAD(19)
1693+ ROAD(21)
1694+ ROAD(23)
1695+ ROAD(25)
1696+ ROAD(27)
1697+ ROAD(29)
1698+ ROAD(31)
1699+ ROAD(33)
1700+ ROAD(35)
1701+ ROAD(37)
1702+ ROAD(39)
1703+ ROAD(41)
1704+ ROAD(43)
1705+ ROAD(45)
1706+ ROAD(47)
1707+ ROAD(49)
1708+ ROAD(51)
1709+ ROAD(53)
1710+ ROAD(55)
1711+ ROAD(57)
1712+ ROAD(59)
1713+ ROAD(61)
1714+ ROAD(63)
1715+ ROAD(65)
1716+ ROAD(67)
1717+ ROAD(69)
1718+ ROAD(71)
1719+ ROAD(73)
1720+ ROAD(75)
1721+ ROAD(77)
1722+ ROAD(79)
1723+ ROAD(81)
1724+ ROAD(83)
1725+ ROAD(85)
1726+ ROAD(87)
1727+ ROAD(89)
1728+ ROAD(91)
1729+ ROAD(93)
1730+ ROAD(95)
1731+ ROAD(97)
1732+ ROAD(99)
1733+ ROAD(101)
1734+ ROAD(103)
1735+ ROAD(105)
1736+ ROAD(107)
1737+ ROAD(109)
1738+ ROAD(111)
1739+ ROAD(113)
1740+ ROAD(115)
1741+ ROAD(117)
1742+ ROAD(119)
1743+ ROAD(121)
1744+ ROAD(123)
1745+ ROAD(125)
1746+ ROAD(127)
1747+
1748+ rts
1749+.)
1750+
1751+
1752+/*
1753+_Raster1 ; 256 bytes
1754+ .byt 3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1 ; 32
1755+ .byt 3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1 ; 32
1756+ .byt 3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1 ; 32
1757+ .byt 3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1 ; 32
1758+ .byt 3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1 ; 32
1759+ .byt 3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1 ; 32
1760+ .byt 3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1 ; 32
1761+ .byt 3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1 ; 32
1762+*/
1763+
1764+_Raster1 ; 256 bytes
1765+ .byt 7,7,7,7,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1 ; 32
1766+ .byt 3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1 ; 32
1767+ .byt 3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1 ; 32
1768+ .byt 0,0,0,0,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1 ; 32
1769+ .byt 3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1 ; 32
1770+ .byt 4,4,4,4,6,6,6,6,4,4,4,4,6,6,6,6,4,4,4,4,6,6,6,6,4,4,4,4,6,6,6,6 ; 32
1771+ .byt 3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1 ; 32
1772+ ;.byt 3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1 ; 32
1773+ .byt 7,0,7,0,7,0,7,0,7,0,7,0,7,0,7,0,7,0,7,0,7,0,7,0,7,0,7,0,7,0,7,0 ; 32
1774+
1775+
1776+_GroundRaster
1777+ ;.byt 16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2
1778+ .byt 16+7,16+7,16+6,16+7,16+6,16+6,16+7,16+6,16+6,16+2,16+6,16+6,16+2,16+6,16+2,16+2
1779+ .byt 16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2
1780+ .byt 16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2
1781+ .byt 16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2
1782+
1783+ .byt 16+3,16+2,16+2,16+2,16+3,16+3,16+2,16+2,16+3,16+3,16+3,16+2,16+3,16+3,16+3,16+3
1784+ .byt 16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3
1785+ .byt 16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3
1786+ .byt 16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3,16+3
1787+
1788+ .byt 16+1,16+3,16+3,16+3,16+1,16+1,16+3,16+3,16+1,16+1,16+3,16+1,16+1,16+1,16+3,16+1
1789+ .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
1790+ .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
1791+ .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
1792+
1793+ .byt 16+0,16+1,16+1,16+1,16+0,16+0,16+1,16+1,16+0,16+1,16+1,16+1,16+0,16+1,16+0,16+0
1794+ .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
1795+ .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
1796+ .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
1797+
1798+ .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
1799+
1800+ .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
1801+ .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
1802+ .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
1803+ .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
1804+
1805+ .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
1806+ .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
1807+ .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
1808+ .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
1809+
1810+ .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
1811+ .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
1812+ .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
1813+ .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
1814+
1815+ ; ---------------
1816+ .byt 16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2
1817+ .byt 16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2
1818+ .byt 16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2
1819+ .byt 16+1,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2
1820+ .byt 16+4,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2
1821+ .byt 16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2
1822+ .byt 16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2
1823+ .byt 16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2,16+2
1824+
1825+
1826+
1827+; DivTable[y]=(4096/(y+16))>>2;
1828+;
1829+; if (y&1)
1830+; {
1831+; f=(DivTable[y]+position);
1832+; adr[1]=Raster1[f&31];
1833+; }
1834+#define RASTER(position) :clc \
1835+ :lda #(4096/(position+16)>>2) \
1836+ :adc _Position \
1837+ :tax \
1838+ :lda _Raster1,x \
1839+ :sta $a000+1+40*72+40*position \
1840+ :lda _GroundRaster+position/2,y \
1841+ :sta $a000+0+40*72+40*position \
1842+
1843+_ScrollColors
1844+.(
1845+ PROFILE_ENTER(ROUTINE_SCROLL_COLORS);
1846+
1847+ inc _Position
1848+
1849+ sec
1850+ lda #255
1851+ sbc _PlayerEnergy
1852+ tay
1853+
1854+ ; Colorize the
1855+ lda _GroundRaster,y
1856+ and #7 ; Remove the paper flag
1857+ sta $a000+1+40*67
1858+ sta $a000+1+40*68
1859+ sta $a000+1+40*69
1860+ sta $a000+1+40*70
1861+ sta $a000+1+40*71
1862+
1863+ RASTER(1)
1864+ RASTER(3)
1865+ RASTER(5)
1866+ RASTER(7)
1867+ RASTER(9)
1868+ RASTER(11)
1869+ RASTER(13)
1870+ RASTER(15)
1871+ RASTER(17)
1872+ RASTER(19)
1873+ RASTER(21)
1874+ RASTER(23)
1875+ RASTER(25)
1876+ RASTER(27)
1877+ RASTER(29)
1878+ RASTER(31)
1879+ RASTER(33)
1880+ RASTER(35)
1881+ RASTER(37)
1882+ RASTER(39)
1883+ RASTER(41)
1884+ RASTER(43)
1885+ RASTER(45)
1886+ RASTER(47)
1887+ RASTER(49)
1888+ RASTER(51)
1889+ RASTER(53)
1890+ RASTER(55)
1891+ RASTER(57)
1892+ RASTER(59)
1893+ RASTER(61)
1894+ RASTER(63)
1895+ RASTER(65)
1896+ RASTER(67)
1897+ RASTER(69)
1898+ RASTER(71)
1899+ RASTER(73)
1900+ RASTER(75)
1901+ RASTER(77)
1902+ RASTER(79)
1903+ RASTER(81)
1904+ RASTER(83)
1905+ RASTER(85)
1906+ RASTER(87)
1907+ RASTER(89)
1908+ RASTER(91)
1909+ RASTER(93)
1910+ RASTER(95)
1911+ RASTER(97)
1912+ RASTER(99)
1913+ RASTER(101)
1914+ RASTER(103)
1915+ RASTER(105)
1916+ RASTER(107)
1917+ RASTER(109)
1918+ RASTER(111)
1919+ RASTER(113)
1920+ RASTER(115)
1921+ RASTER(117)
1922+ RASTER(119)
1923+ RASTER(121)
1924+ RASTER(123)
1925+ RASTER(125)
1926+ RASTER(127)
1927+
1928+ PROFILE_LEAVE(ROUTINE_SCROLL_COLORS);
1929+ rts
1930+.)
1931+
1932+
1933+; RoadWidthTable[y] =-(100*y)/128;
1934+; offset=((int)LeftTable[y]-(120+(int)RoadWidthTable[y]))*2; // *256/128
1935+; RoadOffsetTableLow[y] =offset&255;
1936+; RoadOffsetTableHigh[y] =(offset>>8)&255;
1937+
1938+
1939+; RoadWidthTable[y] =-(100*position)/128;
1940+; offset=((int)LeftTable[y]-(120+-(100*position)/128))*2; // *256/128
1941+; RoadOffsetTableLow[y] =offset&255;
1942+; RoadOffsetTableHigh[y] =(offset>>8)&255;
1943+
1944+
1945+#define TURN_LEFT(position) :clc \
1946+ :lda _RoadMiddleTableLow+position \
1947+ :adc _RoadOffsetTableLow+position \
1948+ :sta _RoadMiddleTableLow+position \
1949+ :lda _RoadMiddleTableHigh+position \
1950+ :adc _RoadOffsetTableHigh+position \
1951+ :sta _RoadMiddleTableHigh+position
1952+
1953+#define TURN_RIGHT(position) :sec \
1954+ :lda _RoadMiddleTableLow+position \
1955+ :sbc _RoadOffsetTableLow+position \
1956+ :sta _RoadMiddleTableLow+position \
1957+ :lda _RoadMiddleTableHigh+position \
1958+ :sbc _RoadOffsetTableHigh+position \
1959+ :sta _RoadMiddleTableHigh+position
1960+
1961+_TurnLeftSimple
1962+.(
1963+ ;dec _BackgroundPosition
1964+ ;jsr _PlayerPodMoveRight
1965+
1966+ TURN_LEFT(1)
1967+ TURN_LEFT(3)
1968+ TURN_LEFT(5)
1969+ TURN_LEFT(7)
1970+ TURN_LEFT(9)
1971+ TURN_LEFT(11)
1972+ TURN_LEFT(13)
1973+ TURN_LEFT(15)
1974+ TURN_LEFT(17)
1975+ TURN_LEFT(19)
1976+ TURN_LEFT(21)
1977+ TURN_LEFT(23)
1978+ TURN_LEFT(25)
1979+ TURN_LEFT(27)
1980+ TURN_LEFT(29)
1981+ TURN_LEFT(31)
1982+ TURN_LEFT(33)
1983+ TURN_LEFT(35)
1984+ TURN_LEFT(37)
1985+ TURN_LEFT(39)
1986+ TURN_LEFT(41)
1987+ TURN_LEFT(43)
1988+ TURN_LEFT(45)
1989+ TURN_LEFT(47)
1990+ TURN_LEFT(49)
1991+ TURN_LEFT(51)
1992+ TURN_LEFT(53)
1993+ TURN_LEFT(55)
1994+ TURN_LEFT(57)
1995+ TURN_LEFT(59)
1996+ TURN_LEFT(61)
1997+ TURN_LEFT(63)
1998+ TURN_LEFT(65)
1999+ TURN_LEFT(67)
2000+ TURN_LEFT(69)
2001+ TURN_LEFT(71)
2002+ TURN_LEFT(73)
2003+ TURN_LEFT(75)
2004+ TURN_LEFT(77)
2005+ TURN_LEFT(79)
2006+ TURN_LEFT(81)
2007+ TURN_LEFT(83)
2008+ TURN_LEFT(85)
2009+ TURN_LEFT(87)
2010+ TURN_LEFT(89)
2011+ TURN_LEFT(91)
2012+ TURN_LEFT(93)
2013+ TURN_LEFT(95)
2014+ TURN_LEFT(97)
2015+ TURN_LEFT(99)
2016+ TURN_LEFT(101)
2017+ TURN_LEFT(103)
2018+ TURN_LEFT(105)
2019+ TURN_LEFT(107)
2020+ TURN_LEFT(109)
2021+ TURN_LEFT(111)
2022+ TURN_LEFT(113)
2023+ TURN_LEFT(115)
2024+ TURN_LEFT(117)
2025+ TURN_LEFT(119)
2026+ TURN_LEFT(121)
2027+ TURN_LEFT(123)
2028+ TURN_LEFT(125)
2029+ TURN_LEFT(127)
2030+ rts
2031+.)
2032+
2033+
2034+_TurnRightSimple
2035+.(
2036+ ;inc _BackgroundPosition
2037+ ;jsr _PlayerPodMoveLeft
2038+
2039+ TURN_RIGHT(1)
2040+ TURN_RIGHT(3)
2041+ TURN_RIGHT(5)
2042+ TURN_RIGHT(7)
2043+ TURN_RIGHT(9)
2044+ TURN_RIGHT(11)
2045+ TURN_RIGHT(13)
2046+ TURN_RIGHT(15)
2047+ TURN_RIGHT(17)
2048+ TURN_RIGHT(19)
2049+ TURN_RIGHT(21)
2050+ TURN_RIGHT(23)
2051+ TURN_RIGHT(25)
2052+ TURN_RIGHT(27)
2053+ TURN_RIGHT(29)
2054+ TURN_RIGHT(31)
2055+ TURN_RIGHT(33)
2056+ TURN_RIGHT(35)
2057+ TURN_RIGHT(37)
2058+ TURN_RIGHT(39)
2059+ TURN_RIGHT(41)
2060+ TURN_RIGHT(43)
2061+ TURN_RIGHT(45)
2062+ TURN_RIGHT(47)
2063+ TURN_RIGHT(49)
2064+ TURN_RIGHT(51)
2065+ TURN_RIGHT(53)
2066+ TURN_RIGHT(55)
2067+ TURN_RIGHT(57)
2068+ TURN_RIGHT(59)
2069+ TURN_RIGHT(61)
2070+ TURN_RIGHT(63)
2071+ TURN_RIGHT(65)
2072+ TURN_RIGHT(67)
2073+ TURN_RIGHT(69)
2074+ TURN_RIGHT(71)
2075+ TURN_RIGHT(73)
2076+ TURN_RIGHT(75)
2077+ TURN_RIGHT(77)
2078+ TURN_RIGHT(79)
2079+ TURN_RIGHT(81)
2080+ TURN_RIGHT(83)
2081+ TURN_RIGHT(85)
2082+ TURN_RIGHT(87)
2083+ TURN_RIGHT(89)
2084+ TURN_RIGHT(91)
2085+ TURN_RIGHT(93)
2086+ TURN_RIGHT(95)
2087+ TURN_RIGHT(97)
2088+ TURN_RIGHT(99)
2089+ TURN_RIGHT(101)
2090+ TURN_RIGHT(103)
2091+ TURN_RIGHT(105)
2092+ TURN_RIGHT(107)
2093+ TURN_RIGHT(109)
2094+ TURN_RIGHT(111)
2095+ TURN_RIGHT(113)
2096+ TURN_RIGHT(115)
2097+ TURN_RIGHT(117)
2098+ TURN_RIGHT(119)
2099+ TURN_RIGHT(121)
2100+ TURN_RIGHT(123)
2101+ TURN_RIGHT(125)
2102+ TURN_RIGHT(127)
2103+ rts
2104+.)
2105+
2106+
2107+
2108+
452109 ; That code should erase the 128 bottom lines
462110 ;
472111 ;
--- users/dbug/games/Road/road_signs.s (nonexistent)
+++ users/dbug/games/Road/road_signs.s (revision 1504)
@@ -0,0 +1,48 @@
1+_RoadSigns
2+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
3+ .byt $40,$44,$40,$40,$40,$40,$4e,$40,$40,$40,$40,$5f,$40,$40,$40,$40
4+ .byt $7b,$60,$40,$40,$41,$71,$70,$40,$40,$43,$64,$78,$40,$40,$47,$4e
5+ .byt $5c,$40,$40,$4e,$5b,$4e,$40,$40,$5c,$71,$67,$40,$40,$79,$64,$73
6+ .byt $60,$41,$73,$4e,$59,$70,$47,$64,$51,$44,$7c,$4f,$40,$40,$40,$5e
7+ .byt $4f,$40,$40,$40,$5e,$46,$40,$40,$40,$4c,$40,$40,$40,$40,$40,$40
8+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
9+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
10+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
11+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$4c,$40,$40,$40,$40,$5e,$40,$40
12+ .byt $40,$40,$5e,$40,$40,$40,$40,$7c,$40,$40,$40,$41,$60,$40,$40,$40
13+ .byt $43,$40,$40,$40,$40,$46,$40,$40,$40,$40,$4c,$40,$40,$40,$40,$58
14+ .byt $40,$40,$40,$40,$70,$40,$40,$40,$41,$7e,$40,$40,$40,$40,$47,$78
15+ .byt $40,$40,$40,$40,$5f,$60,$40,$40,$40,$41,$7e,$40,$40,$40,$40,$47
16+ .byt $70,$40,$40,$40,$41,$60,$40,$40,$40,$43,$40,$40,$40,$40,$46,$40
17+ .byt $40,$40,$40,$4c,$40,$40,$40,$40,$58,$40,$40,$40,$40,$70,$40,$40
18+ .byt $40,$41,$60,$40,$40,$40,$43,$40,$40,$40,$40,$4e,$40,$40,$40,$40
19+ .byt $5e,$40,$40,$40,$40,$5e,$40,$40,$40,$40,$4c,$40,$40,$40,$40,$40
20+ .byt $40,$40,$40,$40,$40,$40,$40,$4d,$7f,$7f,$7f,$6c,$40,$40,$40,$40
21+ .byt $40,$43,$5f,$7f,$7e,$70,$40,$40,$40,$40,$40,$40,$57,$7f,$7a,$40
22+ .byt $41,$40,$40,$40,$60,$40,$4e,$40,$5c,$40,$45,$5e,$40,$5e,$68,$45
23+ .byt $5e,$40,$5e,$68,$44,$5a,$40,$56,$48,$45,$5e,$40,$5e,$68,$45,$40
24+ .byt $40,$40,$68,$45,$50,$40,$42,$68,$45,$50,$40,$42,$68,$45,$50,$40
25+ .byt $42,$68,$45,$50,$40,$42,$68,$45,$50,$40,$42,$68,$45,$50,$40,$42
26+ .byt $68,$45,$50,$40,$42,$68,$45,$40,$7f,$40,$68,$44,$43,$52,$70,$48
27+ .byt $44,$46,$52,$58,$48,$44,$4a,$52,$54,$48,$40,$52,$52,$52,$40,$40
28+ .byt $52,$52,$52,$40,$40,$5f,$7f,$7e,$40,$40,$40,$40,$40,$40,$40,$40
29+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$4c,$40,$40,$40,$40,$5e
30+ .byt $40,$40,$40,$40,$5e,$40,$40,$40,$40,$7c,$40,$40,$40,$41,$70,$40
31+ .byt $40,$40,$43,$60,$40,$40,$40,$47,$40,$40,$40,$40,$4e,$50,$40,$40
32+ .byt $40,$5c,$60,$40,$40,$40,$79,$60,$40,$40,$41,$73,$40,$40,$40,$43
33+ .byt $66,$50,$40,$40,$47,$4c,$60,$40,$40,$4e,$59,$60,$40,$40,$47,$4c
34+ .byt $60,$40,$40,$43,$66,$50,$40,$40,$41,$73,$40,$40,$40,$40,$79,$60
35+ .byt $40,$40,$40,$5c,$60,$40,$40,$40,$4e,$50,$40,$40,$40,$47,$40,$40
36+ .byt $40,$40,$43,$60,$40,$40,$40,$41,$70,$40,$40,$40,$40,$7c,$40,$40
37+ .byt $40,$40,$5e,$40,$40,$40,$40,$5e,$40,$40,$40,$40,$4c,$40,$40,$40
38+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$4c,$40,$40,$40,$40
39+ .byt $5e,$40,$40,$40,$40,$5e,$40,$40,$40,$40,$4f,$40,$40,$40,$40,$43
40+ .byt $60,$40,$40,$40,$41,$70,$40,$40,$40,$40,$78,$40,$40,$40,$42,$5c
41+ .byt $40,$40,$40,$41,$4e,$40,$40,$40,$41,$67,$40,$40,$40,$40,$73,$60
42+ .byt $40,$40,$42,$59,$70,$40,$40,$41,$4c,$78,$40,$40,$41,$66,$5c,$40
43+ .byt $40,$41,$4c,$78,$40,$40,$42,$59,$70,$40,$40,$40,$73,$60,$40,$40
44+ .byt $41,$67,$40,$40,$40,$41,$4e,$40,$40,$40,$42,$5c,$40,$40,$40,$40
45+ .byt $78,$40,$40,$40,$41,$70,$40,$40,$40,$43,$60,$40,$40,$40,$4f,$40
46+ .byt $40,$40,$40,$5e,$40,$40,$40,$40,$5e,$40,$40,$40,$40,$4c,$40,$40
47+ .byt $40,$40,$40,$40,$40
48+
--- users/dbug/games/Road/scrolling_background.s (nonexistent)
+++ users/dbug/games/Road/scrolling_background.s (revision 1504)
@@ -0,0 +1,164 @@
1+_ScrollingBackground
2+ .byt $40,$47,$7f,$7e,$40,$40,$41,$40,$40,$43,$7d,$78,$40,$41,$7f,$7f
3+ .byt $7f,$7c,$40,$40,$50,$40,$40,$40,$40,$44,$40,$40,$40,$40,$41,$7e
4+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$5f,$7f,$78,$40
5+ .byt $40,$44,$40,$40,$4f,$77,$60,$40,$47,$7f,$7f,$7f,$70,$40,$41,$40
6+ .byt $40,$40,$40,$40,$50,$40,$40,$40,$40,$47,$78,$40,$40,$40,$40,$40
7+ .byt $40,$40,$40,$40,$40,$40,$40,$78,$6b,$7f,$60,$40,$47,$70,$40,$47
8+ .byt $43,$44,$40,$42,$40,$40,$40,$42,$40,$41,$54,$40,$40,$40,$60,$4e
9+ .byt $47,$7f,$70,$4f,$41,$56,$43,$43,$42,$40,$40,$40,$40,$40,$40,$40
10+ .byt $40,$43,$62,$6f,$7e,$40,$40,$5f,$40,$40,$5c,$4c,$50,$40,$48,$40
11+ .byt $40,$40,$48,$40,$45,$50,$40,$40,$42,$40,$78,$5f,$7f,$40,$7c,$45
12+ .byt $58,$4c,$4c,$48,$40,$40,$40,$40,$40,$40,$40,$40,$43,$45,$7f,$7f
13+ .byt $7f,$40,$43,$60,$40,$46,$46,$52,$40,$44,$7f,$7f,$7f,$7f,$40,$45
14+ .byt $55,$40,$41,$41,$70,$5f,$41,$41,$47,$4f,$41,$7e,$46,$46,$41,$40
15+ .byt $40,$40,$40,$41,$7f,$70,$40,$4c,$57,$7f,$7f,$7c,$40,$4e,$40,$40
16+ .byt $58,$59,$48,$40,$53,$7f,$7f,$7f,$7c,$40,$55,$54,$40,$44,$47,$41
17+ .byt $7c,$44,$44,$5c,$7c,$47,$78,$58,$58,$44,$40,$40,$40,$40,$47,$7f
18+ .byt $40,$40,$5c,$6f,$7f,$7f,$7f,$7f,$41,$4a,$6a,$66,$4e,$48,$40,$49
19+ .byt $7f,$7f,$7f,$7f,$60,$45,$55,$50,$43,$63,$78,$7f,$67,$7f,$77,$4f
20+ .byt $59,$5e,$4c,$4c,$50,$60,$4f,$78,$40,$4f,$7f,$7e,$41,$72,$7f,$7f
21+ .byt $7f,$7f,$7c,$44,$6a,$6a,$58,$78,$60,$40,$67,$7f,$7f,$7f,$7e,$40
22+ .byt $55,$55,$40,$4e,$4f,$63,$7e,$5f,$7f,$5c,$7d,$65,$78,$70,$71,$42
23+ .byt $40,$7f,$60,$40,$7f,$7f,$78,$40,$63,$7f,$7f,$7f,$7f,$7f,$7d,$55
24+ .byt $55,$56,$5c,$47,$7e,$5f,$7f,$7f,$7f,$7f,$75,$55,$55,$55,$57,$77
25+ .byt $7d,$7f,$71,$41,$47,$4f,$59,$7e,$58,$58,$48,$51,$7f,$7f,$63,$7f
26+ .byt $7f,$7f,$62,$4f,$7f,$7f,$7f,$7f,$7f,$75,$55,$55,$59,$70,$5f,$79
27+ .byt $7f,$7f,$7f,$7f,$7f,$55,$55,$55,$55,$5f,$5f,$77,$7f,$44,$44,$5c
28+ .byt $7d,$67,$79,$61,$60,$61,$47,$7f,$7e,$4f,$7f,$7f,$7e,$40,$40,$41
29+ .byt $7f,$7f,$60,$40,$40,$50,$40,$40,$7f,$5e,$40,$40,$5f,$7f,$7f,$7f
30+ .byt $40,$40,$44,$40,$40,$40,$40,$41,$40,$40,$40,$40,$40,$5f,$60,$40
31+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$47,$7f,$7e,$40,$40,$41
32+ .byt $40,$40,$43,$7d,$78,$40,$41,$7f,$7f,$7f,$7c,$40,$40,$50,$40,$40
33+ .byt $40,$40,$44,$40,$40,$40,$40,$41,$7e,$40,$40,$40,$40,$40,$40,$40
34+ .byt $40,$40,$40,$40,$40,$4e,$4a,$7f,$78,$40,$41,$7c,$40,$41,$70,$71
35+ .byt $40,$40,$60,$40,$40,$40,$60,$40,$55,$40,$40,$40,$48,$43,$61,$7f
36+ .byt $7c,$43,$70,$55,$60,$70,$70,$60,$40,$40,$40,$40,$40,$40,$40,$40
37+ .byt $78,$6b,$7f,$60,$40,$47,$70,$40,$47,$43,$44,$40,$42,$40,$40,$40
38+ .byt $42,$40,$41,$54,$40,$40,$40,$60,$4e,$47,$7f,$70,$4f,$41,$56,$43
39+ .byt $43,$42,$40,$40,$40,$40,$40,$40,$40,$40,$40,$71,$5f,$7f,$7f,$70
40+ .byt $40,$78,$40,$41,$61,$64,$60,$41,$4f,$7f,$7f,$7f,$70,$41,$55,$50
41+ .byt $40,$50,$5c,$47,$70,$50,$51,$73,$70,$5f,$61,$61,$60,$50,$40,$40
42+ .byt $40,$40,$5f,$7c,$40,$43,$45,$7f,$7f,$7f,$40,$43,$60,$40,$46,$46
43+ .byt $52,$40,$44,$7f,$7f,$7f,$7f,$40,$45,$55,$40,$41,$41,$70,$5f,$41
44+ .byt $41,$47,$4f,$41,$7e,$46,$46,$41,$40,$40,$40,$40,$41,$7f,$70,$40
45+ .byt $47,$4b,$7f,$7f,$7f,$7f,$70,$52,$6a,$69,$63,$62,$40,$42,$5f,$7f
46+ .byt $7f,$7f,$78,$41,$55,$54,$40,$78,$7e,$4f,$79,$7f,$7d,$73,$76,$57
47+ .byt $63,$43,$44,$48,$43,$7e,$40,$43,$7f,$7f,$60,$5c,$6f,$7f,$7f,$7f
48+ .byt $7f,$41,$4a,$6a,$66,$4e,$48,$40,$49,$7f,$7f,$7f,$7f,$60,$45,$55
49+ .byt $50,$43,$63,$78,$7f,$67,$7f,$77,$4f,$59,$5e,$4c,$4c,$50,$60,$4f
50+ .byt $78,$40,$4f,$7f,$7e,$40,$58,$7f,$7f,$7f,$7f,$7f,$7f,$55,$55,$55
51+ .byt $67,$41,$7f,$67,$7f,$7f,$7f,$7f,$7d,$55,$55,$55,$55,$7d,$7f,$5f
52+ .byt $7c,$50,$51,$73,$76,$5f,$66,$46,$42,$44,$5f,$7f,$78,$7f,$7f,$7f
53+ .byt $79,$63,$7f,$7f,$7f,$7f,$7f,$7d,$55,$55,$56,$5c,$47,$7e,$5f,$7f
54+ .byt $7f,$7f,$7f,$75,$55,$55,$55,$57,$77,$7d,$7f,$71,$41,$47,$4f,$59
55+ .byt $7e,$58,$58,$48,$51,$7f,$7f,$63,$7f,$7f,$7f,$60,$40,$40,$7f,$7f
56+ .byt $70,$40,$40,$48,$40,$40,$5f,$6f,$40,$40,$4f,$7f,$7f,$7f,$60,$40
57+ .byt $42,$40,$40,$40,$40,$40,$60,$40,$40,$40,$40,$4f,$70,$40,$40,$40
58+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$43,$7f,$7f,$40,$40,$40,$60,$40
59+ .byt $41,$7e,$7c,$40,$40,$7f,$7f,$7f,$7e,$40,$40,$48,$40,$40,$40,$40
60+ .byt $42,$40,$40,$40,$40,$40,$7f,$40,$40,$40,$40,$40,$40,$40,$40,$40
61+ .byt $40,$40,$40,$47,$45,$5f,$7c,$40,$40,$7e,$40,$40,$78,$58,$60,$40
62+ .byt $50,$40,$40,$40,$50,$40,$4a,$60,$40,$40,$44,$41,$70,$7f,$7e,$41
63+ .byt $78,$4a,$70,$58,$58,$50,$40,$40,$40,$40,$40,$40,$40,$40,$5c,$55
64+ .byt $7f,$70,$40,$43,$78,$40,$43,$61,$62,$40,$41,$40,$40,$40,$41,$40
65+ .byt $40,$6a,$40,$40,$40,$50,$47,$43,$7f,$78,$47,$60,$6b,$41,$61,$61
66+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$58,$6f,$7f,$7f,$78,$40,$5c
67+ .byt $40,$40,$70,$72,$50,$40,$67,$7f,$7f,$7f,$78,$40,$6a,$68,$40,$48
68+ .byt $4e,$43,$78,$48,$48,$79,$78,$4f,$70,$70,$70,$48,$40,$40,$40,$40
69+ .byt $4f,$7e,$40,$41,$62,$7f,$7f,$7f,$60,$41,$70,$40,$43,$43,$49,$40
70+ .byt $42,$5f,$7f,$7f,$7f,$60,$42,$6a,$60,$40,$60,$78,$4f,$60,$60,$63
71+ .byt $67,$60,$7f,$43,$43,$40,$60,$40,$40,$40,$40,$7f,$78,$40,$43,$65
72+ .byt $7f,$7f,$7f,$7f,$78,$49,$55,$54,$71,$71,$40,$41,$4f,$7f,$7f,$7f
73+ .byt $7c,$40,$6a,$6a,$40,$5c,$5f,$47,$7c,$7f,$7e,$79,$7b,$4b,$71,$61
74+ .byt $62,$44,$41,$7f,$40,$41,$7f,$7f,$70,$4e,$57,$7f,$7f,$7f,$7f,$60
75+ .byt $65,$55,$53,$47,$44,$40,$44,$7f,$7f,$7f,$7f,$70,$42,$6a,$68,$41
76+ .byt $71,$7c,$5f,$73,$7f,$7b,$67,$6c,$6f,$46,$46,$48,$50,$47,$7c,$40
77+ .byt $47,$7f,$7f,$40,$4c,$5f,$7f,$7f,$7f,$7f,$7f,$6a,$6a,$6a,$73,$60
78+ .byt $7f,$73,$7f,$7f,$7f,$7f,$7e,$6a,$6a,$6a,$6a,$7e,$7f,$6f,$7e,$48
79+ .byt $48,$79,$7b,$4f,$73,$43,$41,$42,$4f,$7f,$7c,$5f,$7f,$7f,$7c,$71
80+ .byt $7f,$7f,$7f,$7f,$7f,$7e,$6a,$6a,$6b,$4e,$43,$7f,$4f,$7f,$7f,$7f
81+ .byt $7f,$7a,$6a,$6a,$6a,$6b,$7b,$7e,$7f,$78,$60,$63,$67,$6c,$7f,$4c
82+ .byt $4c,$44,$48,$7f,$7f,$71,$7f,$7f,$7f,$70,$40,$40,$5f,$7f,$78,$40
83+ .byt $40,$44,$40,$40,$4f,$77,$60,$40,$47,$7f,$7f,$7f,$70,$40,$41,$40
84+ .byt $40,$40,$40,$40,$50,$40,$40,$40,$40,$47,$78,$40,$40,$40,$40,$40
85+ .byt $40,$40,$40,$40,$40,$40,$41,$7f,$7f,$60,$40,$40,$50,$40,$40,$7f
86+ .byt $5e,$40,$40,$5f,$7f,$7f,$7f,$40,$40,$44,$40,$40,$40,$40,$41,$40
87+ .byt $40,$40,$40,$40,$5f,$60,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
88+ .byt $40,$43,$62,$6f,$7e,$40,$40,$5f,$40,$40,$5c,$4c,$50,$40,$48,$40
89+ .byt $40,$40,$48,$40,$45,$50,$40,$40,$42,$40,$78,$5f,$7f,$40,$7c,$45
90+ .byt $58,$4c,$4c,$48,$40,$40,$40,$40,$40,$40,$40,$40,$4e,$4a,$7f,$78
91+ .byt $40,$41,$7c,$40,$41,$70,$71,$40,$40,$60,$40,$40,$40,$60,$40,$55
92+ .byt $40,$40,$40,$48,$43,$61,$7f,$7c,$43,$70,$55,$60,$70,$70,$60,$40
93+ .byt $40,$40,$40,$40,$40,$40,$40,$4c,$57,$7f,$7f,$7c,$40,$4e,$40,$40
94+ .byt $58,$59,$48,$40,$53,$7f,$7f,$7f,$7c,$40,$55,$54,$40,$44,$47,$41
95+ .byt $7c,$44,$44,$5c,$7c,$47,$78,$58,$58,$44,$40,$40,$40,$40,$47,$7f
96+ .byt $40,$40,$71,$5f,$7f,$7f,$70,$40,$78,$40,$41,$61,$64,$60,$41,$4f
97+ .byt $7f,$7f,$7f,$70,$41,$55,$50,$40,$50,$5c,$47,$70,$50,$51,$73,$70
98+ .byt $5f,$61,$61,$60,$50,$40,$40,$40,$40,$5f,$7c,$40,$41,$72,$7f,$7f
99+ .byt $7f,$7f,$7c,$44,$6a,$6a,$58,$78,$60,$40,$67,$7f,$7f,$7f,$7e,$40
100+ .byt $55,$55,$40,$4e,$4f,$63,$7e,$5f,$7f,$5c,$7d,$65,$78,$70,$71,$42
101+ .byt $40,$7f,$60,$40,$7f,$7f,$78,$47,$4b,$7f,$7f,$7f,$7f,$70,$52,$6a
102+ .byt $69,$63,$62,$40,$42,$5f,$7f,$7f,$7f,$78,$41,$55,$54,$40,$78,$7e
103+ .byt $4f,$79,$7f,$7d,$73,$76,$57,$63,$43,$44,$48,$43,$7e,$40,$43,$7f
104+ .byt $7f,$60,$66,$4f,$7f,$7f,$7f,$7f,$7f,$75,$55,$55,$59,$70,$5f,$79
105+ .byt $7f,$7f,$7f,$7f,$7f,$55,$55,$55,$55,$5f,$5f,$77,$7f,$44,$44,$5c
106+ .byt $7d,$67,$79,$61,$60,$61,$47,$7f,$7e,$4f,$7f,$7f,$7e,$58,$7f,$7f
107+ .byt $7f,$7f,$7f,$7f,$55,$55,$55,$67,$41,$7f,$67,$7f,$7f,$7f,$7f,$7d
108+ .byt $55,$55,$55,$55,$7d,$7f,$5f,$7c,$50,$51,$73,$76,$5f,$66,$46,$42
109+ .byt $44,$5f,$7f,$78,$7f,$7f,$7f,$70,$40,$40,$4f,$7f,$7c,$40,$40,$42
110+ .byt $40,$40,$47,$7b,$70,$40,$43,$7f,$7f,$7f,$78,$40,$40,$60,$40,$40
111+ .byt $40,$40,$48,$40,$40,$40,$40,$43,$7c,$40,$40,$40,$40,$40,$40,$40
112+ .byt $40,$40,$40,$40,$40,$7f,$7f,$70,$40,$40,$48,$40,$40,$5f,$6f,$40
113+ .byt $40,$4f,$7f,$7f,$7f,$60,$40,$42,$40,$40,$40,$40,$40,$60,$40,$40
114+ .byt $40,$40,$4f,$70,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$41
115+ .byt $71,$57,$7f,$40,$40,$4f,$60,$40,$4e,$46,$48,$40,$44,$40,$40,$40
116+ .byt $44,$40,$42,$68,$40,$40,$41,$40,$5c,$4f,$7f,$60,$5e,$42,$6c,$46
117+ .byt $46,$44,$40,$40,$40,$40,$40,$40,$40,$40,$47,$45,$5f,$7c,$40,$40
118+ .byt $7e,$40,$40,$78,$58,$60,$40,$50,$40,$40,$40,$50,$40,$4a,$60,$40
119+ .byt $40,$44,$41,$70,$7f,$7e,$41,$78,$4a,$70,$58,$58,$50,$40,$40,$40
120+ .byt $40,$40,$40,$40,$40,$46,$4b,$7f,$7f,$7e,$40,$47,$40,$40,$4c,$4c
121+ .byt $64,$40,$49,$7f,$7f,$7f,$7e,$40,$4a,$6a,$40,$42,$43,$60,$7e,$42
122+ .byt $42,$4e,$5e,$43,$7c,$4c,$4c,$42,$40,$40,$40,$40,$43,$7f,$60,$40
123+ .byt $58,$6f,$7f,$7f,$78,$40,$5c,$40,$40,$70,$72,$50,$40,$67,$7f,$7f
124+ .byt $7f,$78,$40,$6a,$68,$40,$48,$4e,$43,$78,$48,$48,$79,$78,$4f,$70
125+ .byt $70,$70,$48,$40,$40,$40,$40,$4f,$7e,$40,$40,$79,$5f,$7f,$7f,$7f
126+ .byt $7e,$42,$55,$55,$4c,$5c,$50,$40,$53,$7f,$7f,$7f,$7f,$40,$4a,$6a
127+ .byt $60,$47,$47,$71,$7f,$4f,$7f,$6e,$5e,$72,$7c,$58,$58,$61,$40,$5f
128+ .byt $70,$40,$5f,$7f,$7c,$43,$65,$7f,$7f,$7f,$7f,$78,$49,$55,$54,$71
129+ .byt $71,$40,$41,$4f,$7f,$7f,$7f,$7c,$40,$6a,$6a,$40,$5c,$5f,$47,$7c
130+ .byt $7f,$7e,$79,$7b,$4b,$71,$61,$62,$44,$41,$7f,$40,$41,$7f,$7f,$70
131+ .byt $73,$47,$7f,$7f,$7f,$7f,$7f,$7a,$6a,$6a,$6c,$78,$4f,$7c,$7f,$7f
132+ .byt $7f,$7f,$7f,$6a,$6a,$6a,$6a,$6f,$6f,$7b,$7f,$62,$42,$4e,$5e,$73
133+ .byt $7c,$70,$70,$50,$63,$7f,$7f,$47,$7f,$7f,$7f,$4c,$5f,$7f,$7f,$7f
134+ .byt $7f,$7f,$6a,$6a,$6a,$73,$60,$7f,$73,$7f,$7f,$7f,$7f,$7e,$6a,$6a
135+ .byt $6a,$6a,$7e,$7f,$6f,$7e,$48,$48,$79,$7b,$4f,$73,$43,$41,$42,$4f
136+ .byt $7f,$7c,$5f,$7f,$7f,$70,$40,$40,$47,$7f,$7e,$40,$40,$41,$40,$40
137+ .byt $43,$7d,$78,$40,$41,$7f,$7f,$7f,$7c,$40,$40,$50,$40,$40,$40,$40
138+ .byt $44,$40,$40,$40,$40,$41,$7e,$40,$40,$40,$40,$40,$40,$40,$40,$40
139+ .byt $40,$40,$40,$5f,$7f,$78,$40,$40,$44,$40,$40,$4f,$77,$60,$40,$47
140+ .byt $7f,$7f,$7f,$70,$40,$41,$40,$40,$40,$40,$40,$50,$40,$40,$40,$40
141+ .byt $47,$78,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$78,$6b
142+ .byt $7f,$60,$40,$47,$70,$40,$47,$43,$44,$40,$42,$40,$40,$40,$42,$40
143+ .byt $41,$54,$40,$40,$40,$60,$4e,$47,$7f,$70,$4f,$41,$56,$43,$43,$42
144+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$43,$62,$6f,$7e,$40,$40,$5f,$40
145+ .byt $40,$5c,$4c,$50,$40,$48,$40,$40,$40,$48,$40,$45,$50,$40,$40,$42
146+ .byt $40,$78,$5f,$7f,$40,$7c,$45,$58,$4c,$4c,$48,$40,$40,$40,$40,$40
147+ .byt $40,$40,$40,$43,$45,$7f,$7f,$7f,$40,$43,$60,$40,$46,$46,$52,$40
148+ .byt $44,$7f,$7f,$7f,$7f,$40,$45,$55,$40,$41,$41,$70,$5f,$41,$41,$47
149+ .byt $4f,$41,$7e,$46,$46,$41,$40,$40,$40,$40,$41,$7f,$70,$40,$4c,$57
150+ .byt $7f,$7f,$7c,$40,$4e,$40,$40,$58,$59,$48,$40,$53,$7f,$7f,$7f,$7c
151+ .byt $40,$55,$54,$40,$44,$47,$41,$7c,$44,$44,$5c,$7c,$47,$78,$58,$58
152+ .byt $44,$40,$40,$40,$40,$47,$7f,$40,$60,$5c,$6f,$7f,$7f,$7f,$7f,$41
153+ .byt $4a,$6a,$66,$4e,$48,$40,$49,$7f,$7f,$7f,$7f,$60,$45,$55,$50,$43
154+ .byt $63,$78,$7f,$67,$7f,$77,$4f,$59,$5e,$4c,$4c,$50,$60,$4f,$78,$40
155+ .byt $4f,$7f,$7e,$41,$72,$7f,$7f,$7f,$7f,$7c,$44,$6a,$6a,$58,$78,$60
156+ .byt $40,$67,$7f,$7f,$7f,$7e,$40,$55,$55,$40,$4e,$4f,$63,$7e,$5f,$7f
157+ .byt $5c,$7d,$65,$78,$70,$71,$42,$40,$7f,$60,$40,$7f,$7f,$70,$79,$63
158+ .byt $7f,$7f,$7f,$7f,$7f,$7d,$55,$55,$56,$5c,$47,$7e,$5f,$7f,$7f,$7f
159+ .byt $7f,$75,$55,$55,$55,$57,$77,$7d,$7f,$71,$41,$47,$4f,$59,$7e,$58
160+ .byt $58,$48,$51,$7f,$7f,$63,$7f,$7f,$7f,$66,$4f,$7f,$7f,$7f,$7f,$7f
161+ .byt $75,$55,$55,$59,$70,$5f,$79,$7f,$7f,$7f,$7f,$7f,$55,$55,$55,$55
162+ .byt $5f,$5f,$77,$7f,$44,$44,$5c,$7d,$67,$79,$61,$60,$61,$47,$7f,$7e
163+ .byt $4f,$7f,$7f,$70
164+
--- users/dbug/games/Road/scrolling_background_ingame.s (nonexistent)
+++ users/dbug/games/Road/scrolling_background_ingame.s (revision 1504)
@@ -0,0 +1,164 @@
1+_ScrollingBackgroundIngame
2+ .byt $40,$47,$7f,$7e,$40,$40,$41,$40,$40,$43,$7d,$78,$40,$41,$7f,$7f
3+ .byt $7f,$7c,$40,$40,$50,$40,$40,$40,$40,$44,$40,$40,$40,$40,$41,$7e
4+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$5f,$7f,$78,$40
5+ .byt $40,$44,$40,$40,$4f,$77,$60,$40,$47,$7f,$7f,$7f,$70,$40,$41,$40
6+ .byt $40,$40,$40,$40,$50,$40,$40,$40,$40,$47,$78,$40,$40,$40,$40,$40
7+ .byt $40,$40,$40,$40,$40,$40,$40,$78,$6b,$7f,$60,$40,$47,$70,$40,$47
8+ .byt $43,$44,$40,$42,$40,$40,$40,$42,$40,$41,$54,$40,$40,$40,$60,$4e
9+ .byt $47,$7f,$70,$4f,$41,$56,$43,$43,$42,$40,$40,$40,$40,$40,$40,$40
10+ .byt $40,$43,$62,$6f,$7e,$40,$40,$5f,$40,$40,$5c,$4c,$50,$40,$48,$40
11+ .byt $40,$40,$48,$40,$45,$50,$40,$40,$42,$40,$78,$5f,$7f,$40,$7c,$45
12+ .byt $58,$4c,$4c,$48,$40,$40,$40,$40,$40,$40,$40,$40,$43,$45,$7f,$7f
13+ .byt $7f,$40,$43,$60,$40,$46,$46,$52,$40,$44,$7f,$7f,$7f,$7f,$40,$45
14+ .byt $55,$40,$41,$41,$70,$5f,$41,$41,$47,$4f,$41,$7e,$46,$46,$41,$40
15+ .byt $40,$40,$40,$41,$7f,$70,$40,$4c,$57,$7f,$7f,$7c,$40,$4e,$40,$40
16+ .byt $58,$59,$48,$40,$53,$7f,$7f,$7f,$7c,$40,$55,$54,$40,$44,$47,$41
17+ .byt $7c,$44,$44,$5c,$7c,$47,$78,$58,$58,$44,$40,$40,$40,$40,$47,$7f
18+ .byt $40,$40,$5c,$6f,$7f,$7f,$7f,$7f,$41,$4a,$6a,$66,$4e,$48,$40,$49
19+ .byt $7f,$7f,$7f,$7f,$60,$45,$55,$50,$43,$63,$78,$7f,$67,$7f,$77,$4f
20+ .byt $59,$5e,$4c,$4c,$50,$60,$4f,$78,$40,$4f,$7f,$7e,$41,$72,$7f,$7f
21+ .byt $7f,$7f,$7c,$44,$6a,$6a,$58,$78,$60,$40,$67,$7f,$7f,$7f,$7e,$40
22+ .byt $55,$55,$40,$4e,$4f,$63,$7e,$5f,$7f,$5c,$7d,$65,$78,$70,$71,$42
23+ .byt $40,$7f,$60,$40,$7f,$7f,$78,$40,$63,$7f,$7f,$7f,$7f,$7f,$7d,$55
24+ .byt $55,$56,$5c,$47,$7e,$5f,$7f,$7f,$7f,$7f,$75,$55,$55,$55,$57,$77
25+ .byt $7d,$7f,$71,$41,$47,$4f,$59,$7e,$58,$58,$48,$51,$7f,$7f,$63,$7f
26+ .byt $7f,$7f,$62,$4f,$7f,$7f,$7f,$7f,$7f,$75,$55,$55,$59,$70,$5f,$79
27+ .byt $7f,$7f,$7f,$7f,$7f,$55,$55,$55,$55,$5f,$5f,$77,$7f,$44,$44,$5c
28+ .byt $7d,$67,$79,$61,$60,$61,$47,$7f,$7e,$4f,$7f,$7f,$7e,$40,$40,$41
29+ .byt $7f,$7f,$60,$40,$40,$50,$40,$40,$7f,$5e,$40,$40,$5f,$7f,$7f,$7f
30+ .byt $40,$40,$44,$40,$40,$40,$40,$41,$40,$40,$40,$40,$40,$5f,$60,$40
31+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$47,$7f,$7e,$40,$40,$41
32+ .byt $40,$40,$43,$7d,$78,$40,$41,$7f,$7f,$7f,$7c,$40,$40,$50,$40,$40
33+ .byt $40,$40,$44,$40,$40,$40,$40,$41,$7e,$40,$40,$40,$40,$40,$40,$40
34+ .byt $40,$40,$40,$40,$40,$4e,$4a,$7f,$78,$40,$41,$7c,$40,$41,$70,$71
35+ .byt $40,$40,$60,$40,$40,$40,$60,$40,$55,$40,$40,$40,$48,$43,$61,$7f
36+ .byt $7c,$43,$70,$55,$60,$70,$70,$60,$40,$40,$40,$40,$40,$40,$40,$40
37+ .byt $78,$6b,$7f,$60,$40,$47,$70,$40,$47,$43,$44,$40,$42,$40,$40,$40
38+ .byt $42,$40,$41,$54,$40,$40,$40,$60,$4e,$47,$7f,$70,$4f,$41,$56,$43
39+ .byt $43,$42,$40,$40,$40,$40,$40,$40,$40,$40,$40,$71,$5f,$7f,$7f,$70
40+ .byt $40,$78,$40,$41,$61,$64,$60,$41,$4f,$7f,$7f,$7f,$70,$41,$55,$50
41+ .byt $40,$50,$5c,$47,$70,$50,$51,$73,$70,$5f,$61,$61,$60,$50,$40,$40
42+ .byt $40,$40,$5f,$7c,$40,$43,$45,$7f,$7f,$7f,$40,$43,$60,$40,$46,$46
43+ .byt $52,$40,$44,$7f,$7f,$7f,$7f,$40,$45,$55,$40,$41,$41,$70,$5f,$41
44+ .byt $41,$47,$4f,$41,$7e,$46,$46,$41,$40,$40,$40,$40,$41,$7f,$70,$40
45+ .byt $47,$4b,$7f,$7f,$7f,$7f,$70,$52,$6a,$69,$63,$62,$40,$42,$5f,$7f
46+ .byt $7f,$7f,$78,$41,$55,$54,$40,$78,$7e,$4f,$79,$7f,$7d,$73,$76,$57
47+ .byt $63,$43,$44,$48,$43,$7e,$40,$43,$7f,$7f,$60,$5c,$6f,$7f,$7f,$7f
48+ .byt $7f,$41,$4a,$6a,$66,$4e,$48,$40,$49,$7f,$7f,$7f,$7f,$60,$45,$55
49+ .byt $50,$43,$63,$78,$7f,$67,$7f,$77,$4f,$59,$5e,$4c,$4c,$50,$60,$4f
50+ .byt $78,$40,$4f,$7f,$7e,$40,$58,$7f,$7f,$7f,$7f,$7f,$7f,$55,$55,$55
51+ .byt $67,$41,$7f,$67,$7f,$7f,$7f,$7f,$7d,$55,$55,$55,$55,$7d,$7f,$5f
52+ .byt $7c,$50,$51,$73,$76,$5f,$66,$46,$42,$44,$5f,$7f,$78,$7f,$7f,$7f
53+ .byt $79,$63,$7f,$7f,$7f,$7f,$7f,$7d,$55,$55,$56,$5c,$47,$7e,$5f,$7f
54+ .byt $7f,$7f,$7f,$75,$55,$55,$55,$57,$77,$7d,$7f,$71,$41,$47,$4f,$59
55+ .byt $7e,$58,$58,$48,$51,$7f,$7f,$63,$7f,$7f,$7f,$60,$40,$40,$7f,$7f
56+ .byt $70,$40,$40,$48,$40,$40,$5f,$6f,$40,$40,$4f,$7f,$7f,$7f,$60,$40
57+ .byt $42,$40,$40,$40,$40,$40,$60,$40,$40,$40,$40,$4f,$70,$40,$40,$40
58+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$43,$7f,$7f,$40,$40,$40,$60,$40
59+ .byt $41,$7e,$7c,$40,$40,$7f,$7f,$7f,$7e,$40,$40,$48,$40,$40,$40,$40
60+ .byt $42,$40,$40,$40,$40,$40,$7f,$40,$40,$40,$40,$40,$40,$40,$40,$40
61+ .byt $40,$40,$40,$47,$45,$5f,$7c,$40,$40,$7e,$40,$40,$78,$58,$60,$40
62+ .byt $50,$40,$40,$40,$50,$40,$4a,$60,$40,$40,$44,$41,$70,$7f,$7e,$41
63+ .byt $78,$4a,$70,$58,$58,$50,$40,$40,$40,$40,$40,$40,$40,$40,$5c,$55
64+ .byt $7f,$70,$40,$43,$78,$40,$43,$61,$62,$40,$41,$40,$40,$40,$41,$40
65+ .byt $40,$6a,$40,$40,$40,$50,$47,$43,$7f,$78,$47,$60,$6b,$41,$61,$61
66+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$58,$6f,$7f,$7f,$78,$40,$5c
67+ .byt $40,$40,$70,$72,$50,$40,$67,$7f,$7f,$7f,$78,$40,$6a,$68,$40,$48
68+ .byt $4e,$43,$78,$48,$48,$79,$78,$4f,$70,$70,$70,$48,$40,$40,$40,$40
69+ .byt $4f,$7e,$40,$41,$62,$7f,$7f,$7f,$60,$41,$70,$40,$43,$43,$49,$40
70+ .byt $42,$5f,$7f,$7f,$7f,$60,$42,$6a,$60,$40,$60,$78,$4f,$60,$60,$63
71+ .byt $67,$60,$7f,$43,$43,$40,$60,$40,$40,$40,$40,$7f,$78,$40,$43,$65
72+ .byt $7f,$7f,$7f,$7f,$78,$49,$55,$54,$71,$71,$40,$41,$4f,$7f,$7f,$7f
73+ .byt $7c,$40,$6a,$6a,$40,$5c,$5f,$47,$7c,$7f,$7e,$79,$7b,$4b,$71,$61
74+ .byt $62,$44,$41,$7f,$40,$41,$7f,$7f,$70,$4e,$57,$7f,$7f,$7f,$7f,$60
75+ .byt $65,$55,$53,$47,$44,$40,$44,$7f,$7f,$7f,$7f,$70,$42,$6a,$68,$41
76+ .byt $71,$7c,$5f,$73,$7f,$7b,$67,$6c,$6f,$46,$46,$48,$50,$47,$7c,$40
77+ .byt $47,$7f,$7f,$40,$4c,$5f,$7f,$7f,$7f,$7f,$7f,$6a,$6a,$6a,$73,$60
78+ .byt $7f,$73,$7f,$7f,$7f,$7f,$7e,$6a,$6a,$6a,$6a,$7e,$7f,$6f,$7e,$48
79+ .byt $48,$79,$7b,$4f,$73,$43,$41,$42,$4f,$7f,$7c,$5f,$7f,$7f,$7c,$71
80+ .byt $7f,$7f,$7f,$7f,$7f,$7e,$6a,$6a,$6b,$4e,$43,$7f,$4f,$7f,$7f,$7f
81+ .byt $7f,$7a,$6a,$6a,$6a,$6b,$7b,$7e,$7f,$78,$60,$63,$67,$6c,$7f,$4c
82+ .byt $4c,$44,$48,$7f,$7f,$71,$7f,$7f,$7f,$70,$40,$40,$5f,$7f,$78,$40
83+ .byt $40,$44,$40,$40,$4f,$77,$60,$40,$47,$7f,$7f,$7f,$70,$40,$41,$40
84+ .byt $40,$40,$40,$40,$50,$40,$40,$40,$40,$47,$78,$40,$40,$40,$40,$40
85+ .byt $40,$40,$40,$40,$40,$40,$41,$7f,$7f,$60,$40,$40,$50,$40,$40,$7f
86+ .byt $5e,$40,$40,$5f,$7f,$7f,$7f,$40,$40,$44,$40,$40,$40,$40,$41,$40
87+ .byt $40,$40,$40,$40,$5f,$60,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
88+ .byt $40,$43,$62,$6f,$7e,$40,$40,$5f,$40,$40,$5c,$4c,$50,$40,$48,$40
89+ .byt $40,$40,$48,$40,$45,$50,$40,$40,$42,$40,$78,$5f,$7f,$40,$7c,$45
90+ .byt $58,$4c,$4c,$48,$40,$40,$40,$40,$40,$40,$40,$40,$4e,$4a,$7f,$78
91+ .byt $40,$41,$7c,$40,$41,$70,$71,$40,$40,$60,$40,$40,$40,$60,$40,$55
92+ .byt $40,$40,$40,$48,$43,$61,$7f,$7c,$43,$70,$55,$60,$70,$70,$60,$40
93+ .byt $40,$40,$40,$40,$40,$40,$40,$4c,$57,$7f,$7f,$7c,$40,$4e,$40,$40
94+ .byt $58,$59,$48,$40,$53,$7f,$7f,$7f,$7c,$40,$55,$54,$40,$44,$47,$41
95+ .byt $7c,$44,$44,$5c,$7c,$47,$78,$58,$58,$44,$40,$40,$40,$40,$47,$7f
96+ .byt $40,$40,$71,$5f,$7f,$7f,$70,$40,$78,$40,$41,$61,$64,$60,$41,$4f
97+ .byt $7f,$7f,$7f,$70,$41,$55,$50,$40,$50,$5c,$47,$70,$50,$51,$73,$70
98+ .byt $5f,$61,$61,$60,$50,$40,$40,$40,$40,$5f,$7c,$40,$41,$72,$7f,$7f
99+ .byt $7f,$7f,$7c,$44,$6a,$6a,$58,$78,$60,$40,$67,$7f,$7f,$7f,$7e,$40
100+ .byt $55,$55,$40,$4e,$4f,$63,$7e,$5f,$7f,$5c,$7d,$65,$78,$70,$71,$42
101+ .byt $40,$7f,$60,$40,$7f,$7f,$78,$47,$4b,$7f,$7f,$7f,$7f,$70,$52,$6a
102+ .byt $69,$63,$62,$40,$42,$5f,$7f,$7f,$7f,$78,$41,$55,$54,$40,$78,$7e
103+ .byt $4f,$79,$7f,$7d,$73,$76,$57,$63,$43,$44,$48,$43,$7e,$40,$43,$7f
104+ .byt $7f,$60,$66,$4f,$7f,$7f,$7f,$7f,$7f,$75,$55,$55,$59,$70,$5f,$79
105+ .byt $7f,$7f,$7f,$7f,$7f,$55,$55,$55,$55,$5f,$5f,$77,$7f,$44,$44,$5c
106+ .byt $7d,$67,$79,$61,$60,$61,$47,$7f,$7e,$4f,$7f,$7f,$7e,$58,$7f,$7f
107+ .byt $7f,$7f,$7f,$7f,$55,$55,$55,$67,$41,$7f,$67,$7f,$7f,$7f,$7f,$7d
108+ .byt $55,$55,$55,$55,$7d,$7f,$5f,$7c,$50,$51,$73,$76,$5f,$66,$46,$42
109+ .byt $44,$5f,$7f,$78,$7f,$7f,$7f,$70,$40,$40,$4f,$7f,$7c,$40,$40,$42
110+ .byt $40,$40,$47,$7b,$70,$40,$43,$7f,$7f,$7f,$78,$40,$40,$60,$40,$40
111+ .byt $40,$40,$48,$40,$40,$40,$40,$43,$7c,$40,$40,$40,$40,$40,$40,$40
112+ .byt $40,$40,$40,$40,$40,$7f,$7f,$70,$40,$40,$48,$40,$40,$5f,$6f,$40
113+ .byt $40,$4f,$7f,$7f,$7f,$60,$40,$42,$40,$40,$40,$40,$40,$60,$40,$40
114+ .byt $40,$40,$4f,$70,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$41
115+ .byt $71,$57,$7f,$40,$40,$4f,$60,$40,$4e,$46,$48,$40,$44,$40,$40,$40
116+ .byt $44,$40,$42,$68,$40,$40,$41,$40,$5c,$4f,$7f,$60,$5e,$42,$6c,$46
117+ .byt $46,$44,$40,$40,$40,$40,$40,$40,$40,$40,$47,$45,$5f,$7c,$40,$40
118+ .byt $7e,$40,$40,$78,$58,$60,$40,$50,$40,$40,$40,$50,$40,$4a,$60,$40
119+ .byt $40,$44,$41,$70,$7f,$7e,$41,$78,$4a,$70,$58,$58,$50,$40,$40,$40
120+ .byt $40,$40,$40,$40,$40,$46,$4b,$7f,$7f,$7e,$40,$47,$40,$40,$4c,$4c
121+ .byt $64,$40,$49,$7f,$7f,$7f,$7e,$40,$4a,$6a,$40,$42,$43,$60,$7e,$42
122+ .byt $42,$4e,$5e,$43,$7c,$4c,$4c,$42,$40,$40,$40,$40,$43,$7f,$60,$40
123+ .byt $58,$6f,$7f,$7f,$78,$40,$5c,$40,$40,$70,$72,$50,$40,$67,$7f,$7f
124+ .byt $7f,$78,$40,$6a,$68,$40,$48,$4e,$43,$78,$48,$48,$79,$78,$4f,$70
125+ .byt $70,$70,$48,$40,$40,$40,$40,$4f,$7e,$40,$40,$79,$5f,$7f,$7f,$7f
126+ .byt $7e,$42,$55,$55,$4c,$5c,$50,$40,$53,$7f,$7f,$7f,$7f,$40,$4a,$6a
127+ .byt $60,$47,$47,$71,$7f,$4f,$7f,$6e,$5e,$72,$7c,$58,$58,$61,$40,$5f
128+ .byt $70,$40,$5f,$7f,$7c,$43,$65,$7f,$7f,$7f,$7f,$78,$49,$55,$54,$71
129+ .byt $71,$40,$41,$4f,$7f,$7f,$7f,$7c,$40,$6a,$6a,$40,$5c,$5f,$47,$7c
130+ .byt $7f,$7e,$79,$7b,$4b,$71,$61,$62,$44,$41,$7f,$40,$41,$7f,$7f,$70
131+ .byt $73,$47,$7f,$7f,$7f,$7f,$7f,$7a,$6a,$6a,$6c,$78,$4f,$7c,$7f,$7f
132+ .byt $7f,$7f,$7f,$6a,$6a,$6a,$6a,$6f,$6f,$7b,$7f,$62,$42,$4e,$5e,$73
133+ .byt $7c,$70,$70,$50,$63,$7f,$7f,$47,$7f,$7f,$7f,$4c,$5f,$7f,$7f,$7f
134+ .byt $7f,$7f,$6a,$6a,$6a,$73,$60,$7f,$73,$7f,$7f,$7f,$7f,$7e,$6a,$6a
135+ .byt $6a,$6a,$7e,$7f,$6f,$7e,$48,$48,$79,$7b,$4f,$73,$43,$41,$42,$4f
136+ .byt $7f,$7c,$5f,$7f,$7f,$70,$40,$40,$47,$7f,$7e,$40,$40,$41,$40,$40
137+ .byt $43,$7d,$78,$40,$41,$7f,$7f,$7f,$7c,$40,$40,$50,$40,$40,$40,$40
138+ .byt $44,$40,$40,$40,$40,$41,$7e,$40,$40,$40,$40,$40,$40,$40,$40,$40
139+ .byt $40,$40,$40,$5f,$7f,$78,$40,$40,$44,$40,$40,$4f,$77,$60,$40,$47
140+ .byt $7f,$7f,$7f,$70,$40,$41,$40,$40,$40,$40,$40,$50,$40,$40,$40,$40
141+ .byt $47,$78,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$78,$6b
142+ .byt $7f,$60,$40,$47,$70,$40,$47,$43,$44,$40,$42,$40,$40,$40,$42,$40
143+ .byt $41,$54,$40,$40,$40,$60,$4e,$47,$7f,$70,$4f,$41,$56,$43,$43,$42
144+ .byt $40,$40,$40,$40,$40,$40,$40,$40,$43,$62,$6f,$7e,$40,$40,$5f,$40
145+ .byt $40,$5c,$4c,$50,$40,$48,$40,$40,$40,$48,$40,$45,$50,$40,$40,$42
146+ .byt $40,$78,$5f,$7f,$40,$7c,$45,$58,$4c,$4c,$48,$40,$40,$40,$40,$40
147+ .byt $40,$40,$40,$43,$45,$7f,$7f,$7f,$40,$43,$60,$40,$46,$46,$52,$40
148+ .byt $44,$7f,$7f,$7f,$7f,$40,$45,$55,$40,$41,$41,$70,$5f,$41,$41,$47
149+ .byt $4f,$41,$7e,$46,$46,$41,$40,$40,$40,$40,$41,$7f,$70,$40,$4c,$57
150+ .byt $7f,$7f,$7c,$40,$4e,$40,$40,$58,$59,$48,$40,$53,$7f,$7f,$7f,$7c
151+ .byt $40,$55,$54,$40,$44,$47,$41,$7c,$44,$44,$5c,$7c,$47,$78,$58,$58
152+ .byt $44,$40,$40,$40,$40,$47,$7f,$40,$60,$5c,$6f,$7f,$7f,$7f,$7f,$41
153+ .byt $4a,$6a,$66,$4e,$48,$40,$49,$7f,$7f,$7f,$7f,$60,$45,$55,$50,$43
154+ .byt $63,$78,$7f,$67,$7f,$77,$4f,$59,$5e,$4c,$4c,$50,$60,$4f,$78,$40
155+ .byt $4f,$7f,$7e,$41,$72,$7f,$7f,$7f,$7f,$7c,$44,$6a,$6a,$58,$78,$60
156+ .byt $40,$67,$7f,$7f,$7f,$7e,$40,$55,$55,$40,$4e,$4f,$63,$7e,$5f,$7f
157+ .byt $5c,$7d,$65,$78,$70,$71,$42,$40,$7f,$60,$40,$7f,$7f,$70,$79,$63
158+ .byt $7f,$7f,$7f,$7f,$7f,$7d,$55,$55,$56,$5c,$47,$7e,$5f,$7f,$7f,$7f
159+ .byt $7f,$75,$55,$55,$55,$57,$77,$7d,$7f,$71,$41,$47,$4f,$59,$7e,$58
160+ .byt $58,$48,$51,$7f,$7f,$63,$7f,$7f,$7f,$66,$4f,$7f,$7f,$7f,$7f,$7f
161+ .byt $75,$55,$55,$59,$70,$5f,$79,$7f,$7f,$7f,$7f,$7f,$55,$55,$55,$55
162+ .byt $5f,$5f,$77,$7f,$44,$44,$5c,$7d,$67,$79,$61,$60,$61,$47,$7f,$7e
163+ .byt $4f,$7f,$7f,$70
164+
--- users/dbug/games/Road/table.s (revision 1503)
+++ users/dbug/games/Road/table.s (revision 1504)
@@ -1,204 +1,365 @@
1+
2+_Y0 .byt 0
3+_DIV6 .byt 0
4+_MOD6 .byt 0
5+
6+_LeftPattern
7+ .byt 1+2+4+8+16+32
8+ .byt 1+2+4+8+16
9+ .byt 1+2+4+8
10+ .byt 1+2+4
11+ .byt 1+2
12+ .byt 1
13+
14+
15+_RightPattern
16+ .byt 63-(1+2+4+8+16+32)
17+ .byt 63-(1+2+4+8+16)
18+ .byt 63-(1+2+4+8)
19+ .byt 63-(1+2+4)
20+ .byt 63-(1+2)
21+ .byt 63-(1)
22+
23+
24+_Tables_InitialiseScreenAddrTable
25+.(
26+ /*
27+ .( ; Clear the BSS section
28+ lda #0
29+
30+ ldx #<_BssStart_
31+ stx tmp0
32+ ldx #>_BssStart_
33+ stx tmp0
34+
35+ ldx #((_BssEnd_-_BssStart_)+1)/256
36+loop_outer
37+ tay
38+loop_inner
39+ sta (tmp0),y
40+ dey
41+ bne loop_inner
42+ inc tmp0
43+ dex
44+ bne loop_outer
45+ .)
46+ */
47+
48+
49+ .( ; Generate multiple of 6 data table
50+ lda #0
51+ sta tmp0+0 // cur mul
52+ sta tmp0+1 // cur div
53+ sta tmp0+2 // cur mod
54+
55+ ldx #0
56+loop
57+ lda tmp0+0
58+ clc
59+ sta _TableMul6,x
60+ adc #6
61+ sta tmp0+0
62+
63+ lda tmp0+1
64+ sta _TableDiv6,x
65+
66+ lda tmp0+2
67+ sta _TableMod6,x
68+
69+ ldy tmp0+2
70+ iny
71+ cpy #6
72+ bne skip_mod
73+ ldy #0
74+ inc tmp0+1
75+skip_mod
76+ sty tmp0+2
77+
78+ inx
79+ bne loop
80+ .)
81+
82+ .( ; Generate the patterns
83+ lda #0
84+ sta _Y0
85+
86+ ldx #0
87+loop_div
88+ ;
89+ ; Store Div6
90+ ;
91+ lda _DIV6
92+ ldy _Y0
93+ //sta _Div6,y
94+
95+ ;
96+ ; Store Mod6
97+ ;
98+ ldy _MOD6
99+ lda _LeftPattern,y
100+ ldy _Y0
101+ ora #64
102+ sta _Mod6Left,y
103+
104+ ldy _MOD6
105+ lda _RightPattern,y
106+ ldy _Y0
107+ ora #64
108+ sta _Mod6Right,y
109+
110+
111+ ;
112+ ; Update Div/Mod
113+ ;
114+ inc _MOD6
115+ lda _MOD6
116+ cmp #6
117+ bne no_update
118+ lda #0
119+ sta _MOD6
120+ inc _DIV6
121+no_update
122+
123+ ;
124+ ; Inc Y
125+ ;
126+ inc _Y0
127+ ldy _Y0
128+ bne loop_div
129+ .)
130+
131+ .( ; Generate the screen addresses
132+ lda #<$a000
133+ sta tmp0+0
134+ lda #>$a000
135+ sta tmp0+1
136+
137+ ldx #0
138+loop
139+ lda tmp0+0
140+ sta _HiresAddrLow,x
141+ lda tmp0+1
142+ sta _HiresAddrHigh,x
143+
144+ clc
145+ lda tmp0+0
146+ adc #40
147+ sta tmp0+0
148+ bcc skip
149+ inc tmp0+1
150+skip
151+
152+ inx
153+ cpx #200
154+ bne loop
155+ .)
156+
157+ rts
158+.)
159+
160+
161+
1162 _Rasters
2- .byt 20
3- .byt 20
4- .byt 20
5- .byt 20
6- .byt 20
7- .byt 20
8- .byt 20
9- .byt 20
10- .byt 20
11- .byt 20
12- .byt 20
13- .byt 20
14- .byt 20
15- .byt 20
16- .byt 20
17- .byt 20
18- .byt 20
19- .byt 20
20- .byt 20
21- .byt 20
22- .byt 20
23- .byt 20
24- .byt 20
25- .byt 20
26- .byt 20
27- .byt 20
28- .byt 20
29- .byt 20
30- .byt 20
31- .byt 20
32- .byt 22
33- .byt 20
34- .byt 20
35- .byt 22
36- .byt 20
37- .byt 22
38- .byt 22
39- .byt 20
40- .byt 22
41- .byt 22
42- .byt 22
43- .byt 22
44- .byt 22
45- .byt 22
46- .byt 22
47- .byt 22
48- .byt 19
49- .byt 22
50- .byt 22
51- .byt 22
52- .byt 19
53- .byt 22
54- .byt 19
55- .byt 19
56- .byt 19
57- .byt 17
58- .byt 19
59- .byt 19
60- .byt 17
61- .byt 19
62- .byt 17
63- .byt 17
64- .byt 17
65- .byt 17
66- .byt 21
67- .byt 17
68- .byt 21
69- .byt 21
70- .byt 17
71- .byt 17
72- .byt 21
73- .byt 21
74- .byt 16
75- .byt 18
76- .byt 16
77- .byt 18
78- .byt 16
79- .byt 18
80- .byt 16
81- .byt 18
82- .byt 16
83- .byt 18
84- .byt 16
85- .byt 18
86- .byt 16
87- .byt 18
88- .byt 16
89- .byt 18
90- .byt 16
91- .byt 18
92- .byt 16
93- .byt 18
94- .byt 16
95- .byt 18
96- .byt 16
97- .byt 18
98- .byt 16
99- .byt 18
100- .byt 16
101- .byt 18
102- .byt 16
103- .byt 18
104- .byt 16
105- .byt 18
106- .byt 16
107- .byt 18
108- .byt 16
109- .byt 18
110- .byt 16
111- .byt 18
112- .byt 16
113- .byt 18
114- .byt 16
115- .byt 18
116- .byt 16
117- .byt 18
118- .byt 16
119- .byt 18
120- .byt 16
121- .byt 18
122- .byt 16
123- .byt 18
124- .byt 16
125- .byt 18
126- .byt 16
127- .byt 18
128- .byt 16
129- .byt 18
130- .byt 16
131- .byt 18
132- .byt 16
133- .byt 18
134- .byt 16
135- .byt 18
136- .byt 16
137- .byt 18
138- .byt 16
139- .byt 18
140- .byt 16
141- .byt 18
142- .byt 16
143- .byt 18
144- .byt 16
145- .byt 18
146- .byt 16
147- .byt 18
148- .byt 16
149- .byt 18
150- .byt 16
151- .byt 18
152- .byt 16
153- .byt 18
154- .byt 16
155- .byt 18
156- .byt 16
157- .byt 18
158- .byt 16
159- .byt 18
160- .byt 16
161- .byt 18
162- .byt 16
163- .byt 18
164- .byt 16
165- .byt 18
166- .byt 16
167- .byt 18
168- .byt 16
169- .byt 18
170- .byt 16
171- .byt 18
172- .byt 16
173- .byt 18
174- .byt 16
175- .byt 18
176- .byt 16
177- .byt 18
178- .byt 16
179- .byt 18
180- .byt 16
181- .byt 18
182- .byt 16
183- .byt 18
184- .byt 16
185- .byt 18
186- .byt 16
187- .byt 18
188- .byt 16
189- .byt 18
190- .byt 16
191- .byt 18
192- .byt 16
193- .byt 18
194- .byt 16
195- .byt 18
196- .byt 16
197- .byt 18
198- .byt 16
199- .byt 18
200- .byt 16
201- .byt 18
163+ .byt 16+4
164+ .byt 16+4
165+ .byt 16+4
166+ .byt 16+4
167+ .byt 16+4
168+ .byt 16+4
169+ .byt 16+4
170+ .byt 16+4
171+ .byt 16+4
172+ .byt 16+4
173+ .byt 16+4
174+ .byt 16+4
175+ .byt 16+4
176+ .byt 16+4
177+ .byt 16+4
178+ .byt 16+4
179+ .byt 16+4
180+ .byt 16+4
181+ .byt 16+4
182+ .byt 16+4
183+ .byt 16+4
184+ .byt 16+4
185+ .byt 16+4
186+ .byt 16+4
187+ .byt 16+4
188+ .byt 16+4
189+ .byt 16+4
190+ .byt 16+4
191+ .byt 16+4
192+ .byt 16+4
193+ .byt 16+6
194+ .byt 16+4
195+ .byt 16+4
196+ .byt 16+6
197+ .byt 16+4
198+ .byt 16+6
199+ .byt 16+6
200+ .byt 16+4
201+ .byt 16+6
202+ .byt 16+6
203+ .byt 16+6
204+ .byt 16+6
205+ .byt 16+6
206+ .byt 16+6
207+ .byt 16+6
208+ .byt 16+6
209+ .byt 16+3
210+ .byt 16+6
211+ .byt 16+6
212+ .byt 16+6
213+ .byt 16+3
214+ .byt 16+6
215+ .byt 16+3
216+ .byt 16+3
217+ .byt 16+3
218+ .byt 16+1
219+ .byt 16+3
220+ .byt 16+3
221+ .byt 16+1
222+ .byt 16+3
223+ .byt 16+1
224+ .byt 16+1
225+ .byt 16+1
226+ .byt 16+1
227+ .byt 16+5
228+ .byt 16+1
229+ .byt 16+5
230+ .byt 16+5
231+ .byt 16+1
232+ .byt 16+1
233+ .byt 16+5
234+ .byt 16+5
235+ .byt 16+0
236+ .byt 16+2
237+ .byt 16+0
238+ .byt 16+2
239+ .byt 16+0
240+ .byt 16+2
241+ .byt 16+0
242+ .byt 16+2
243+ .byt 16+0
244+ .byt 16+2
245+ .byt 16+0
246+ .byt 16+2
247+ .byt 16+0
248+ .byt 16+2
249+ .byt 16+0
250+ .byt 16+2
251+ .byt 16+0
252+ .byt 16+2
253+ .byt 16+0
254+ .byt 16+2
255+ .byt 16+0
256+ .byt 16+2
257+ .byt 16+0
258+ .byt 16+2
259+ .byt 16+0
260+ .byt 16+2
261+ .byt 16+0
262+ .byt 16+2
263+ .byt 16+0
264+ .byt 16+2
265+ .byt 16+0
266+ .byt 16+2
267+ .byt 16+0
268+ .byt 16+2
269+ .byt 16+0
270+ .byt 16+2
271+ .byt 16+0
272+ .byt 16+2
273+ .byt 16+0
274+ .byt 16+2
275+ .byt 16+0
276+ .byt 16+2
277+ .byt 16+0
278+ .byt 16+2
279+ .byt 16+0
280+ .byt 16+2
281+ .byt 16+0
282+ .byt 16+2
283+ .byt 16+0
284+ .byt 16+2
285+ .byt 16+0
286+ .byt 16+2
287+ .byt 16+0
288+ .byt 16+2
289+ .byt 16+0
290+ .byt 16+2
291+ .byt 16+0
292+ .byt 16+2
293+ .byt 16+0
294+ .byt 16+2
295+ .byt 16+0
296+ .byt 16+2
297+ .byt 16+0
298+ .byt 16+2
299+ .byt 16+0
300+ .byt 16+2
301+ .byt 16+0
302+ .byt 16+2
303+ .byt 16+0
304+ .byt 16+2
305+ .byt 16+0
306+ .byt 16+2
307+ .byt 16+0
308+ .byt 16+2
309+ .byt 16+0
310+ .byt 16+2
311+ .byt 16+0
312+ .byt 16+2
313+ .byt 16+0
314+ .byt 16+2
315+ .byt 16+0
316+ .byt 16+2
317+ .byt 16+0
318+ .byt 16+2
319+ .byt 16+0
320+ .byt 16+2
321+ .byt 16+0
322+ .byt 16+2
323+ .byt 16+0
324+ .byt 16+2
325+ .byt 16+0
326+ .byt 16+2
327+ .byt 16+0
328+ .byt 16+2
329+ .byt 16+0
330+ .byt 16+2
331+ .byt 16+0
332+ .byt 16+2
333+ .byt 16+0
334+ .byt 16+2
335+ .byt 16+0
336+ .byt 16+2
337+ .byt 16+0
338+ .byt 16+2
339+ .byt 16+0
340+ .byt 16+2
341+ .byt 16+0
342+ .byt 16+2
343+ .byt 16+0
344+ .byt 16+2
345+ .byt 16+0
346+ .byt 16+2
347+ .byt 16+0
348+ .byt 16+2
349+ .byt 16+0
350+ .byt 16+2
351+ .byt 16+0
352+ .byt 16+2
353+ .byt 16+0
354+ .byt 16+2
355+ .byt 16+0
356+ .byt 16+2
357+ .byt 16+0
358+ .byt 16+2
359+ .byt 16+0
360+ .byt 16+2
361+ .byt 16+0
362+ .byt 16+2
202363
203364
204365
@@ -322,19 +483,180 @@
322483 .byt 44
323484 .byt 42
324485 .byt 41
325- .byt 39
326- .byt 38
327- .byt 35
328- .byt 33
329- .byt 28
330- .byt 25
331- .byt 20
332- .byt 16
333- .byt 10
486+ .byt 38 ;39-----
487+ .byt 36 ;38
488+ .byt 34 ;35-----
489+ .byt 31 ;33
490+ .byt 28 ;28-----
491+ .byt 26 ;25
492+ .byt 24 ;20-----
493+ .byt 21 ;16
494+ .byt 18 ;10-----
334495
496+_BackgroundStart
497+#include "scrolling_background.s"
498+_BackgroundEnd
335499
500+_EnergySpeedStart
501+#include "energy_speed.s"
502+_EnergySpeedEnd
336503
504+_GameLogoStart
505+#include "game_logo.s"
506+_GameLogoEnd
337507
508+_PlayerPodStart
509+#include "player_pod.s"
510+_PlayerPodEnd
338511
512+// 0123456789SCORE:
513+// 32x3 characters
514+_HighScoreCharacterStart
515+#include "highscores_characters.s"
516+_HighScoreCharacterEnd
339517
518+; 30x29 pixels
519+; 5x29 bytes=
520+; 0-Forward
521+; 1-ZigZag
522+; 2-Scared
523+; 3-Left
524+; 4-Right
525+_RoadSignsStart
526+#include "road_signs.s"
527+_RoadSignsEnd
340528
529+_PlayerPodOffsetTable .byt 8*0,
530+
531+
532+_TrackDataPtr .word _TrackData
533+
534+; Commands:
535+; 0 -> END of TRACK
536+; 1 -> IMAGE to draw (followed by pointer)
537+; else -> ROAD segment
538+
539+#define TRACK_END .byt 0
540+#define TRACK_SIGNAL_OFF .byt 1,0,0
541+#define TRACK_SIGNAL(signal) .byt 1,<_RoadSignsStart+signal*5*29,>_RoadSignsStart+signal*5*29
542+
543+#define TRACK_SECTION(duration,curve) .byt duration,curve
544+
545+_TrackData
546+ TRACK_SIGNAL(0)
547+ .byt 128,0 ; Straight
548+ TRACK_SIGNAL_OFF
549+ .byt 128,0 ; Straight
550+
551+ ;TRACK_END
552+
553+ TRACK_SIGNAL(3)
554+ .byt 32,255
555+ TRACK_SIGNAL_OFF
556+ .byt 32,1
557+
558+ .byt 128,0 ; Straight
559+
560+ TRACK_SIGNAL(4)
561+ .byt 32,1
562+ TRACK_SIGNAL_OFF
563+ .byt 32,255
564+
565+ .byt 128,0 ; Straight
566+
567+
568+ TRACK_SIGNAL(3)
569+ .byt 32,254
570+ TRACK_SIGNAL_OFF
571+ .byt 32,2
572+
573+ .byt 128,0 ; Straight
574+
575+ TRACK_SIGNAL(4)
576+ .byt 32,2
577+ TRACK_SIGNAL_OFF
578+ .byt 32,254
579+
580+ .byt 128,0 ; Straight
581+
582+ TRACK_SIGNAL(3)
583+ .byt 32,256-4
584+ TRACK_SIGNAL_OFF
585+ .byt 32,4
586+
587+ .byt 128,0 ; Straight
588+
589+ TRACK_SIGNAL(4)
590+ .byt 32,4
591+ TRACK_SIGNAL_OFF
592+ .byt 32,256-4
593+
594+ .byt 128,0 ; Straight
595+
596+
597+ TRACK_SIGNAL(3)
598+ .byt 128,255 ; Left
599+ .byt 128,0
600+ TRACK_SIGNAL_OFF
601+ .byt 128,1
602+
603+ .byt 128,0
604+
605+ TRACK_SIGNAL(4)
606+ .byt 128,1
607+ .byt 128,0
608+ TRACK_SIGNAL_OFF
609+
610+ .byt 128,255
611+ TRACK_END ; End of track
612+
613+
614+/*
615+_Font6x6Start
616+#include "font_6x6.s"
617+_Font6x6End
618+*/
619+
620+/*
621+_Font8x8Start
622+#include "font_6x6.s"
623+_Font6x6End
624+*/
625+
626+
627+; .bss
628+; *=$C000
629+ .dsb 256-(*&255)
630+
631+_BssStart_
632+
633+_BufferAddrLow
634+_HiresAddrLow .dsb 176
635+_TextAddrLow .dsb 80
636+_BufferAddrHigh
637+_HiresAddrHigh .dsb 176
638+_TextAddrHigh .dsb 80
639+
640+_TableMul6 .dsb 256
641+_TableDiv6 .dsb 256
642+_TableMod6 .dsb 256
643+
644+_Mod6Left .dsb 256
645+_Mod6Right .dsb 256
646+
647+_DivTable .dsb 256
648+
649+_RoadMiddleTableLow .dsb 128
650+_RoadMiddleTableHigh .dsb 128
651+
652+_RoadOffsetTableLow .dsb 128
653+_RoadOffsetTableHigh .dsb 128
654+
655+_RoadWidthTable .dsb 128
656+
657+
658+_BssEnd_
659+
660+ .text
661+
662+
--- users/dbug/games/Road/vbl.s (revision 1503)
+++ users/dbug/games/Road/vbl.s (revision 1504)
@@ -1,6 +1,43 @@
11
22
3+#define VIA_1 $30f
4+#define VIA_2 $30c
5+
6+_PsgVirtualRegisters
7+_PsgfreqA .byt 0,0 ; 0 1 Chanel A Frequency
8+_PsgfreqB .byt 0,0 ; 2 3 Chanel B Frequency
9+_PsgfreqC .byt 0,0 ; 4 5 Chanel C Frequency
10+_PsgfreqNoise .byt 0 ; 6 Chanel sound generator
11+_Psgmixer .byt 0 ; 7 Mixer/Selector
12+_PsgvolumeA .byt 0 ; 8 Volume A
13+_PsgvolumeB .byt 0 ; 9 Volume B
14+_PsgvolumeC .byt 0 ; 10 Volume C
15+_PsgfreqShape .byt 0,0 ; 11 12 Wave period
16+_PsgenvShape .byt 0 ; 13 Wave form
17+
18+_PsgNeedUpdate .byt 1
19+
20+
21+
22+_Breakpoint
23+ jmp _Breakpoint
24+_DoNothing
25+ rts
26+
327 _VSync
28+.(
29+ //rts
30+ pha
31+loop_wait
32+ lda _VblCounter
33+ beq loop_wait
34+ lda #0
35+ sta _VblCounter
36+ pla
37+ rts
38+.)
39+
40+_VSyncHardware
441 lda $300
542 vsync_wait
643 lda $30D
@@ -8,95 +45,277 @@
845 beq vsync_wait
946 rts
1047
11-_VSyncCounter1 .word 0
12-_VSyncCounter2 .word 0
1348
49+_Temporize
50+ ldy #1
51+temporize_outer
52+ ldx #0
53+temporize_inner
54+ dex
55+ bne temporize_inner
1456
15-_VSyncGetCounter
16- lda #0
17- sta _VSyncCounter1
18- sta _VSyncCounter1+1
19- sta _VSyncCounter2
20- sta _VSyncCounter2+1
57+ dey
58+ bne temporize_outer
2159
22- lda $300
23-vsynccounter_wait1
24- lda $30D
25- and #%00010000 ;test du bit cb1 du registre d'indicateur d'IRQ
26- bne vsynccounter_wait1_end
60+ rts
2761
28- inc _VSyncCounter1
29- bne vsynccounter_wait1
30- inc _VSyncCounter1+1
31- beq vsynccounter_end
32- jmp vsynccounter_wait1
3362
34-vsynccounter_wait1_end
3563
64+_System_Initialize
65+ ;jmp _System_Initialize
66+.(
67+ //
68+ // Switch OFF interrupts, and enable Overlay RAM
69+ // Because writing in ROM, is basicaly very hard !
70+ //
71+ sei
72+ lda #%11111101
73+ sta $314
3674
37- lda $300
38-vsynccounter_wait2
39- lda $30D
40- and #%00010000 ;test du bit cb1 du registre d'indicateur d'IRQ
41- bne vsynccounter_wait2_end
75+ //
76+ // Init params
77+ //
78+ lda #0
79+ sta _SystemFrameCounter_low
80+ sta _SystemFrameCounter_high
4281
43- inc _VSyncCounter2
44- bne vsynccounter_wait2
45- inc _VSyncCounter2+1
46- beq vsynccounter_wait2_end
47- jmp vsynccounter_wait2
82+ // Set the VIA parameters
83+ lda #<20000
84+ sta $306
85+ lda #>20000
86+ sta $307
4887
49-vsynccounter_wait2_end
88+ // Install interrupt
89+ lda #<_InterruptCode_SimpleVbl
90+ sta $FFFE
91+ lda #>_InterruptCode_SimpleVbl
92+ sta $FFFF
5093
51-vsynccounter_end
94+ cli
95+
5296 rts
97+.)
5398
5499
55100
101+; A simple IRQ that increment a VBL counter: Should be called at 50hz frequency
102+_InterruptCode_SimpleVbl
103+.(
104+ bit $304
105+ inc _VblCounter
56106
107+ .(
108+ inc _SystemFrameCounter_low
109+ bne skip
110+ inc _SystemFrameCounter_high
111+skip
112+ .)
57113
58-_IrqOff
59- sei
114+
115+ pha
116+ txa
117+ pha
118+ tya
119+ pha
120+
121+ ; Update the sound generator
122+ .(
123+ lda _PsgNeedUpdate
124+ beq skip_update
125+
126+ and #1
127+ sta _PsgNeedUpdate
128+
129+ lda _Psgmixer
130+ ora #%11000000
131+ sta _Psgmixer
132+
133+ ldy #0
134+register_loop
135+ ldx _PsgVirtualRegisters,y
136+
137+ ; y=register number
138+ ; x=value to write
139+ jsr _PsgPlayRegister
140+
141+ iny
142+ cpy #14
143+ bne register_loop
144+skip_update
145+ .)
146+
147+ ; Read the keyboard
148+ jsr _KeyboardRead
149+
150+
151++__auto_callback
152+ jsr _DoNothing
153+
154+ pla
155+ tay
156+ pla
157+ tax
158+ pla
159+
160+ rti
161+.)
162+
163+
164+
165+
166+
167+
168+_KeyboardFlush
169+.(
170+loop
171+ jsr _KeyboardRead
172+ lda _gKey
173+ bne loop
60174 rts
175+.)
61176
177+_KeyboardWait
178+.(
179+ jsr _KeyboardFlush
180+loop
181+ jsr _KeyboardRead
182+ lda _gKey
183+ beq loop
184+ rts
185+.)
186+
187+_KeyboardRead
188+ lda #00
189+ sta _gKey
62190
191+read_left
192+ ldx #$df
193+ jsr KeyboardSetUp
194+ beq read_right
195+ lda _gKey
196+ ora #1
197+ sta _gKey
198+
199+read_right
200+ ldx #$7f
201+ jsr KeyboardSetUp
202+ beq read_up
203+ lda _gKey
204+ ora #2
205+ sta _gKey
206+
207+read_up
208+ ldx #$f7
209+ jsr KeyboardSetUp
210+ beq read_down
211+ lda _gKey
212+ ora #4
213+ sta _gKey
214+
215+read_down
216+ ldx #$bf
217+ jsr KeyboardSetUp
218+ beq read_fire
219+ lda _gKey
220+ ora #8
221+ sta _gKey
222+
223+read_fire
224+ ldx #$fe
225+ jsr KeyboardSetUp
226+ beq read_end
227+ lda _gKey
228+ ora #16
229+ sta _gKey
230+
231+read_end
232+ rts
63233
64-_Temporize
65- ldy #1
66-temporize_outer
67- ldx #0
68-temporize_inner
69- dex
70- bne temporize_inner
71234
72- dey
73- bne temporize_outer
235+KeyboardSetUp
236+ ;x=column a=row
237+ lda #04
238+ sta $300
239+ lda #$0e
240+ sta $30f
241+ lda #$ff
242+ sta $30c
243+ ldy #$dd
244+ sty $30c
245+ stx $30f
246+ lda #$fd
247+ sta $30c
248+ sty $30c
249+ lda $300
250+ and #08
251+ rts
74252
253+
254+
255+
256+
257+
258+
259+; y=register number
260+; x=value to write
261+_PsgPlayRegister
262+.(
263+ sty VIA_1
264+ txa
265+
266+ pha
267+ lda VIA_2
268+ ora #$EE ; $EE 238 11101110
269+ sta VIA_2
270+
271+ and #$11 ; $11 17 00010001
272+ ora #$CC ; $CC 204 11001100
273+ sta VIA_2
274+
275+ tax
276+ pla
277+ sta VIA_1
278+ txa
279+ ora #$EC ; $EC 236 11101100
280+ sta VIA_2
281+
282+ and #$11 ; $11 17 00010001
283+ ora #$CC ; $CC 204 11001100
284+ sta VIA_2
285+
75286 rts
287+.)
76288
77289
78-_DrawBarX .byt 0
79-_DrawBarValue .byt 0
290+_PsgStopSound
291+.(
292+ lda #0
293+ sta _PsgvolumeA
294+ sta _PsgvolumeB
295+ sta _PsgvolumeC
296+ lda #1
297+ sta _PsgNeedUpdate
298+ rts
299+.)
80300
81-_DrawBar
82- lda #$00
83- sta tmp0
84- lda #$a0
85- sta tmp0+1
86- ldx #200
87- ldy _DrawBarX
88-DrawBarLoopY
89- lda _DrawBarValue
90- sta (tmp0),y
91301
92- clc
93- lda tmp0
94- adc #40
95- sta tmp0
96- bcc toto
97- inc tmp0+1
98-toto
99- dex
100- bne DrawBarLoopY
302+ExplodeData
303+ .byt 0,0,0,0,0,0,15
304+ .byt 7,16,16,16,0,24
305+
306+_PsgExplode
307+.(
308+ ldx #0
309+loop
310+ lda ExplodeData,x
311+ sta _PsgVirtualRegisters,x
312+ inx
313+ cpx #14
314+ bne loop
315+
316+ lda #2
317+ sta _PsgNeedUpdate
318+
319+
101320 rts
102-
321+.)
\ No newline at end of file
Show on old repository browser