Loop demo forever.

This commit is contained in:
giomba 2023-11-24 20:49:47 +01:00
parent ae4a6eea8a
commit a943cbe5c3

View File

@ -44,122 +44,56 @@ const uint8_t FVB[15 * 8] = {
}; };
int main(void) { int main(void) {
cursor_enable(false);
video_cls();
flipflap_init(GLG, 28, 8, 8, 26);
while (!flipflap_finished()) {
flipflap_poll();
crt_waitNextFrame();
}
video_enableHorizontalStretch(true);
video_enableVerticalStretch(true);
video_locate(18, 15);
printf("RetrOfficina GLG Programs");
video_enableHorizontalStretch(false);
video_enableVerticalStretch(false);
video_locate(20, 22);
printf("http://retrofficina.glgprograms.it/");
crt_waitFrames(250);
video_cls();
crt_waitFrames(100);
flipflap_init(FVB, 15, 8, 2, 40 - 15 / 2);
while (!flipflap_finished()) {
flipflap_poll();
crt_waitNextFrame();
}
video_enableHorizontalStretch(true);
video_enableVerticalStretch(true);
video_locate(10, 21);
printf("Firenze Vintage Bit");
video_locate(12, 36);
printf("2023");
crt_waitFrames(250);
video_cls();
crt_waitFrames(100);
const uint8_t trails[] = {5, 10, 20, 50};
for (uint8_t t = 0; t < countof(trails); ++t) {
matrix_init(trails[t]);
for (size_t f = 0; f < 120; ++f) {
matrix_poll();
crt_waitFrames(2);
}
}
#if 0
for (int i = 0; i < 80; ++i) {
cursor_setXY(i, 0);
// TODO(giomba): add vsync?
delay_loop(US_TO_LOOPS(10000ULL));
}
#endif
int counter = 0;
__asm__("di");
#if 0
for (;;) { for (;;) {
for (int i = 0; i < 50; ++i) cursor_enable(false);
video_cls();
flipflap_init(GLG, 28, 8, 8, 26);
while (!flipflap_finished()) {
flipflap_poll();
crt_waitNextFrame(); crt_waitNextFrame();
// wait();
counter++;
int scratch = counter;
uint8_t digits[4];
digits[3] = scratch % 10;
scratch /= 10;
digits[2] = scratch % 10;
scratch /= 10;
digits[1] = scratch % 10;
scratch /= 10;
digits[0] = scratch % 10;
for (int i = 0; i < 4; ++i) {
digits[i] += '0';
*((char *)(0xd000 + i)) = digits[i];
} }
} video_enableHorizontalStretch(true);
#endif video_enableVerticalStretch(true);
video_locate(18, 15);
printf("RetrOfficina GLG Programs");
video_enableHorizontalStretch(false);
video_enableVerticalStretch(false);
video_locate(20, 22);
printf("http://retrofficina.glgprograms.it/");
#if 0 crt_waitFrames(250);
char c = 'X'; video_cls();
for (;;) { crt_waitFrames(100);
if (c == 'X')
c = ' ';
else
c = 'X';
*(((char *)0xd000) + 80 * 10 + 39) = c; flipflap_init(FVB, 15, 8, 2, 40 - 15 / 2);
for (int i = 0; i < 10; ++i) { while (!flipflap_finished()) {
delay_loop(US_TO_LOOPS(50000ULL)); flipflap_poll();
crt_waitNextFrame();
} }
}
#endif
#if 0 video_enableHorizontalStretch(true);
performance_test(); video_enableVerticalStretch(true);
#endif video_locate(10, 21);
printf("Firenze Vintage Bit");
video_locate(12, 36);
printf("2023");
#if 0 crt_waitFrames(250);
cursor_setXY(39, 10); video_cls();
crt_waitFrames(100);
for (;;) { const uint8_t trails[] = {5, 10, 20, 50};
for (int i = 0; i < 16; ++i) { for (uint8_t t = 0; t < countof(trails); ++t) {
cursor_setStartRaster(i); matrix_init(trails[t]);
cursor_setEndRaster(i); for (size_t f = 0; f < 120; ++f) {
crt_waitFrames(8); matrix_poll();
crt_waitFrames(2);
}
} }
}
#endif
crt_waitFrames(50); crt_waitFrames(250);
}
return 0; return 0;
} }