From 8fde6f1e74a8a0ae002c3f73a2a99fb5dd6f3e0d Mon Sep 17 00:00:00 2001 From: giomba Date: Wed, 11 Aug 2021 21:23:00 +0200 Subject: [PATCH] some comments and minor fixes --- Makefile | 13 ++----------- frame.cpp | 5 +++++ main.S | 13 ------------- main.c | 1 - 4 files changed, 7 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index 00fe984..16144a5 100644 --- a/Makefile +++ b/Makefile @@ -25,17 +25,8 @@ SRCS += main.c # asm files # S maiuscola! Invoca prima il compilatore gcc che interpreta macro e altro -# ASRC = main.S -ASRC += main.S frame.S -#ASRC += video.S -#ASRC += sleep.S -# ASRC += variables.S -#ASRC += lines/line_white.S -#ASRC += lines/line_black.S -#ASRC += lines/line_mid.S -#ASRC += lines/line_syncs.S -#ASRC += lines/line_calc.S -# ASRC += lines/line_digits.S +ASRC += main.S +ASRC += frame.S # header files # Specify here libraries! Makefile will check existance before launching diff --git a/frame.cpp b/frame.cpp index 0fb820c..e2d29f6 100644 --- a/frame.cpp +++ b/frame.cpp @@ -1,3 +1,8 @@ +/* frame.cpp + * Takes a black/white (1bpp) PNM ASCII-armored image as input, + * and produces the frame.S assembly code to draw it + * as an analog video signal for this project's kernel. + * */ #include #include diff --git a/main.S b/main.S index c2ddf76..20e17c7 100644 --- a/main.S +++ b/main.S @@ -61,8 +61,6 @@ int_horizontal_sync: ; +3 cpi r31, 0 ; +21 breq enter ; +23 jmp int_horizontal_sync_end -# cpi r30, VERTICAL_OFFSET ; +23 -# brlo int_horizontal_sync_end ; +24 enter: ; here, +23 or +24 cycles have passed since horizontal sync @@ -112,17 +110,6 @@ int_timer_0: ijmp -# ; draw things -# ldi r30, lo8(line_buffer) -# ldi r31, hi8(line_buffer) - -#.rept LINE_BUFFER_SIZE -# ld r29, z+ -# out IO(PORTB), r29 -# nop -#.endr - - .global jump_table_return_address jump_table_return_address: pop r29 diff --git a/main.c b/main.c index 13710ce..6c74c6c 100644 --- a/main.c +++ b/main.c @@ -5,7 +5,6 @@ volatile uint16_t frame; volatile uint16_t line; -volatile char line_buffer[LINE_BUFFER_SIZE]; ISR(INT0_vect, ISR_NAKED) { asm("jmp int_vertical_sync");