2017-05-02 13:09:53 +00:00
|
|
|
#include "cv.h"
|
|
|
|
#include "cvu.h"
|
|
|
|
|
2017-05-25 19:49:30 +00:00
|
|
|
#define PATTERN 0x0000
|
|
|
|
#define IMAGE 0x0800
|
2017-05-02 13:09:53 +00:00
|
|
|
|
|
|
|
uintptr_t __at(0x6a) font_bitmap_a;
|
|
|
|
uintptr_t __at(0x6c) font_bitmap_0;
|
|
|
|
|
2017-05-25 19:49:30 +00:00
|
|
|
void setup_text_mode() {
|
2017-05-02 13:09:53 +00:00
|
|
|
cv_set_screen_mode(CV_SCREENMODE_TEXT);
|
2017-05-25 19:49:30 +00:00
|
|
|
cv_set_image_table(IMAGE);
|
|
|
|
cvu_memtovmemcpy(PATTERN, (void *)(font_bitmap_0 - '0'*8), 256*8);
|
|
|
|
cv_set_character_pattern_t(PATTERN);
|
2017-05-02 13:09:53 +00:00
|
|
|
}
|
|
|
|
|
2017-05-25 19:49:30 +00:00
|
|
|
void show_text() {
|
2017-05-02 13:09:53 +00:00
|
|
|
cv_set_colors(CV_COLOR_LIGHT_GREEN, CV_COLOR_BLACK);
|
2017-05-25 19:49:30 +00:00
|
|
|
cvu_vmemset(IMAGE, '.', 40*24);
|
2017-05-02 13:09:53 +00:00
|
|
|
cvu_memtovmemcpy(IMAGE + 1, "Hello Professor Falken", 22);
|
|
|
|
cv_set_screen_active(true);
|
2017-05-25 19:49:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
setup_text_mode();
|
|
|
|
show_text();
|
2017-05-02 13:09:53 +00:00
|
|
|
while (1);
|
|
|
|
}
|