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) {
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 (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();
// 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];
}
}
#endif
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/");
#if 0
char c = 'X';
for (;;) {
if (c == 'X')
c = ' ';
else
c = 'X';
crt_waitFrames(250);
video_cls();
crt_waitFrames(100);
*(((char *)0xd000) + 80 * 10 + 39) = c;
for (int i = 0; i < 10; ++i) {
delay_loop(US_TO_LOOPS(50000ULL));
flipflap_init(FVB, 15, 8, 2, 40 - 15 / 2);
while (!flipflap_finished()) {
flipflap_poll();
crt_waitNextFrame();
}
}
#endif
#if 0
performance_test();
#endif
video_enableHorizontalStretch(true);
video_enableVerticalStretch(true);
video_locate(10, 21);
printf("Firenze Vintage Bit");
video_locate(12, 36);
printf("2023");
#if 0
cursor_setXY(39, 10);
crt_waitFrames(250);
video_cls();
crt_waitFrames(100);
for (;;) {
for (int i = 0; i < 16; ++i) {
cursor_setStartRaster(i);
cursor_setEndRaster(i);
crt_waitFrames(8);
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);
}
}
}
#endif
crt_waitFrames(50);
crt_waitFrames(250);
}
return 0;
}