#include <avr/interrupt.h>
#include <util/delay.h>
#include <stdlib.h>
+#include <avr/pgmspace.h>
#include "video_properties.h"
#include "render.h"
#include "draw.h"
+#include "font.h"
void (*line_handler)( void );
// Enable interrupts globally.
sei();
+/*
// Do some static drawing :P
set_pixel(28, 8, 1);
set_pixel(92, 82, 1);
}
Delay_ms(250);
}
+*/
+
+ for (int q = 0; q < font_height; q++ )
+ {
+ //for (int r = 0; r < font_width; r++ )
+ //{
+ uint8_t t = pgm_read_byte(&(font[0][q]));
+ screen_buffer[q*hres_bytes+3+hres_bytes] |= t;
+
+ t = pgm_read_byte(&(font[1][q]));
+ screen_buffer[q*hres_bytes+5+hres_bytes] |= t;
+
+ t = pgm_read_byte(&(font[2][q]));
+ screen_buffer[q*hres_bytes+6+hres_bytes] |= t;
+
+ //}
+ }
+
+ for (;;)
+ {
+
+ }
}
--- /dev/null
+const uint8_t font_width = 8;
+const uint8_t font_height = 8;
+
+const uint8_t font[3][64] PROGMEM = {
+// Space
+// !
+// "
+// #
+// $
+// %
+// &
+// '
+// (
+// )
+// *
+// +
+// ,
+// -
+// .
+// /
+// 0
+// 1
+// 2
+// 3
+// 4
+// 5
+// 6
+// 7
+// 8
+// 9
+// :
+// ;
+// <
+// =
+// >
+// ?
+// @
+// A
+ {
+ 0b00010000,
+ 0b00101000,
+ 0b01000100,
+ 0b10000010,
+ 0b11111110,
+ 0b10000010,
+ 0b10000010,
+ 0b10000010
+ },
+// B
+ {
+ 0b11111000,
+ 0b10000100,
+ 0b10000100,
+ 0b11111000,
+ 0b10000100,
+ 0b10000100,
+ 0b10000100,
+ 0b11111000
+ },
+// C
+ {
+ 0b01111100,
+ 0b10000010,
+ 0b10000000,
+ 0b10000000,
+ 0b10000000,
+ 0b10000000,
+ 0b10000010,
+ 0b01111100
+ },
+// D
+// E
+// F
+// G
+// H
+// I
+// J
+// K
+// L
+// M
+// N
+// O
+// P
+// Q
+// R
+// S
+// T
+// U
+// V
+// W
+// X
+// Y
+// Z
+// [
+// \
+// ]
+// ^
+// _
+// `
+// a
+// b
+// c
+// d
+// e
+// f
+// g
+// h
+// i
+// j
+// k
+// l
+// m
+// n
+// o
+// p
+// q
+// r
+// s
+// t
+// u
+// v
+// w
+// x
+// y
+// z
+// {
+// |
+// }
+// ~
+};
\ No newline at end of file
--- /dev/null
+image_widtdh = 23; // pixels
+image_height = 9; // rows
+
+uint8_t image[] = {
+ 0b00001111, 0b00000001, 0b11100000, 0b00100001, 0b00000100, 0b00100000
+ 0b10011001, 0b00010011, 0b00100010, 0b01001001, 0b01001001, 0b00101001
+ 0b00001001, 0b00100001, 0b00101001, 0b00100101, 0b00100100, 0b10001001
+ 0b10010001, 0b00110010, 0b00001000, 0b01000001, 0b00001000, 0b00001111
+ 0b00000001,
+ 0b11100000 // Note, last byte padded to fill one byte by adding a 0 at the end..
+};