Update Makefile and main.c to use new modules.

This commit is contained in:
giomba 2023-10-22 22:08:37 +02:00
parent 7a9e33e352
commit 3c0c65c0d4
2 changed files with 34 additions and 4 deletions

View File

@ -14,6 +14,7 @@ SRC = \
src/printf.c \ src/printf.c \
src/lfsr.c \ src/lfsr.c \
src/matrix.c \ src/matrix.c \
src/flipflap.c \
\ \
OBJ = $(patsubst %, %.o, $(basename $(SRC))) OBJ = $(patsubst %, %.o, $(basename $(SRC)))

View File

@ -1,6 +1,8 @@
#include "compiler.h"
#include "crt.h" #include "crt.h"
#include "cursor.h" #include "cursor.h"
#include "delay.h" #include "delay.h"
#include "flipflap.h"
#include "io.h" #include "io.h"
#include "lfsr.h" #include "lfsr.h"
#include "matrix.h" #include "matrix.h"
@ -21,15 +23,42 @@ void _putchar(char c) {
video_putchar(c); video_putchar(c);
} }
const uint8_t GLG[28 * 8] = {
1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0,
1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1,
};
int main(void) { int main(void) {
cursor_enable(false); cursor_enable(false);
video_cls(); video_cls();
matrix_init(); #if 0
for (;;) { 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(); matrix_poll();
crt_waitFrames(4); crt_waitFrames(2);
} }
}
#endif
video_cls();
flipflap_init(GLG, 28, 8, 8, 26);
while (!flipflap_finished()) {
flipflap_poll();
crt_waitNextFrame();
}
video_cls();
#if 0 #if 0
for (int i = 0; i < 80; ++i) { for (int i = 0; i < 80; ++i) {