incorporated borg drivers from "Hackerspace FFM" - thx guys!

This commit is contained in:
Christian Kroll 2012-09-13 01:19:33 +00:00
parent d3c94d3101
commit e1eda5b888
19 changed files with 1873 additions and 2 deletions

View File

@ -26,6 +26,14 @@ ifeq ($(BORG_HW),HW_BORG_MH)
SRC = borg_hw_borg_mh.c
endif
ifeq ($(BORG_HW),HW_BORG_LSJO)
SRC = borg_hw_borg_lsjo.c
endif
ifeq ($(BORG_HW),HW_LEDBRETT)
SRC = borg_hw_ledbrett.c
endif
ifeq ($(BORG_HW),HW_BORG_MINI)
SRC = borg_hw_borg_mini.c
endif

177
borg_hw/borg_hw_borg_lsjo.c Normal file
View File

@ -0,0 +1,177 @@
#include "../config.h"
#include "../makros.h"
#include <avr/interrupt.h>
#include <avr/io.h>
#include <avr/wdt.h>
#include "borg_hw.h"
/*
// those macros get defined via menuconfig, now
#define ROWPORT PORTB
#define ROWDDR DDRB
#define COLPORT PORTD
#define COLDDR DDRD
#define PIN_DATA PC4
#define PIN_CLK PC6 //active low
#define PIN_LINE_EN PC5 //active low
EN = 3 PD3
RT 4 PD4
GN 5 PD5
Latch 6 PD6
Clk 7 PD7
Row a-d 10-13 PB2-5
Clk 13 PB5
GN 11 PB3
Row d-a A3-A0 PC3-0
*/
#define D_EN_H() PORTD |= (1<<PD3)
#define D_EN_L() PORTD &= ~(1<<PD3)
#define D_RT_H() PORTD |= (1<<PD4)
#define D_RT_L() PORTD &= ~(1<<PD4)
#define D_GN_H() PORTB |= (1<<PB3)
#define D_GN_L() PORTB &= ~(1<<PB3)
#define D_LATCH_H() PORTD |= (1<<PD6)
#define D_LATCH_L() PORTD &= ~(1<<PD6)
#define D_CLK_H() PORTB |= (1<<PB5)
#define D_CLK_L() PORTB &= ~(1<<PB5)
#define ROW_PORT PORTC
#define COLDDR DDR(COLPORT)
#define ROWDDR DDR(ROWPORT)
unsigned char pixmap[NUMPLANE][NUM_ROWS][LINEBYTES];
inline void rowshow(unsigned char row, unsigned char plane) {
D_EN_L(); //blank display
// ROWPORT = (ROWPORT & 0xF8) | row;
ROW_PORT = (ROW_PORT & 0xf0) | row;
unsigned char d, x;
signed char b;
for (b = LINEBYTES - 1; b >= 0; b--) {
d = pixmap[plane][row][b];
while (!(SPSR & (1 << SPIF)))
;
SPDR = ~d;
/*
for (x = 0; x < 8; x++) {
if (d & 0x80) {
D_GN_L();
} else {
D_GN_H();
}
d <<= 1;
D_CLK_L();
D_CLK_H();
}
*/
}
while (!(SPSR & (1 << SPIF)));
D_LATCH_H();
asm volatile ("nop");
D_LATCH_L();
D_EN_H(); // unblank display
}
ISR( TIMER0_COMPA_vect) {
static unsigned char plane = 0;
static unsigned char row = 0;
if (row == 0) {
switch (plane) {
case 0:
OCR0A = 7;
break;
case 1:
OCR0A = 20;
break;
case 2:
OCR0A = 40;
}
}
rowshow(row, plane);
if (++row == NUM_ROWS) {
row = 0;
if (++plane == NUMPLANE)
plane = 0;
}
wdt_reset();
}
void timer0_on() {
/* TCCR0: FOC0 WGM00 COM01 COM00 WGM01 CS02 CS01 CS00
CS02 CS01 CS00
0 0 0 stop
0 0 1 clk
0 1 0 clk/8
0 1 1 clk/64
1 0 0 clk/256
1 0 1 clk/1024
*/
// CTC Mode, clk/256
TCCR0A = 0x02;
TCCR0B = 0x04;
TCNT0 = 0; // reset timer
OCR0A = 0x30; // compare with this value
TIMSK0 = 0x02; // compare match Interrupt on
}
void timer0_off() {
cli();
D_EN_L(); //blank display
TCCR0B = 0x00;
sei();
}
void watchdog_enable() {
wdt_reset();
wdt_enable(0x00); // 17ms
}
void borg_hw_init() {
// COLPORT |= (1 << PIN_CLK) | (1 << PIN_LINE_EN);
// COLDDR |= (1 << PIN_CLK) | (1 << PIN_LINE_EN) | (1 << PIN_DATA);
// ROWDDR |= 0x07;
DDRD |= 0xf8;
DDRB = 0x2f;
DDRC |= 0x0f;
D_RT_H();
D_GN_H();
SPCR = 0x50;
SPSR |= (1 << SPI2X);
SPDR = 0;
watchdog_enable();
timer0_on();
}

344
borg_hw/borg_hw_ledbrett.c Normal file
View File

@ -0,0 +1,344 @@
#include "../config.h"
#include "../makros.h"
#include <avr/interrupt.h>
#include <avr/io.h>
#include <avr/wdt.h>
#include "borg_hw.h"
/*
// those macros get defined via menuconfig, now
// 8x 74HC595 Shift-Registers on SPI with
// additional load-pin
// 4x ROW-Drivers
*/
#define ROW1_ON() (PORTC &= ~(_BV(1)))
#define ROW2_ON() (PORTA &= ~(_BV(1)))
#define ROW3_ON() (PORTA &= ~(_BV(2)))
#define ROW4_ON() (PORTC &= ~(_BV(2)))
#define ROW1_OFF() (PORTC |= (_BV(1)))
#define ROW2_OFF() (PORTA |= (_BV(1)))
#define ROW3_OFF() (PORTA |= (_BV(2)))
#define ROW4_OFF() (PORTC |= (_BV(2)))
#define LOAD_OFF() (PORTA &= ~(_BV(4)))
#define LOAD_ON() (PORTA |= (_BV(4)))
#define MUX_ROWS 4
#if defined (__AVR_ATmega644P__) || defined (__AVR_ATmega644__)
/* more ifdef magic :-( */
#define OCR0 OCR0A
#define SIG_OUTPUT_COMPARE0 SIG_OUTPUT_COMPARE0A
#endif
#ifdef HC165_JOYSTICK_SUPPORT
extern volatile uint8_t hc165_joystick_val;
#endif
// buffer which holds the currently shown frame
unsigned char pixmap[NUMPLANE][NUM_ROWS][LINEBYTES];
unsigned char rowbuf[4][8];
static inline unsigned short bitgeschubse1(unsigned short x_in) {
unsigned short result;
//
asm volatile (
"bst %A1, 0" "\n\t"
"bld %A0, 7" "\n\t"
"bst %A1, 1" "\n\t"
"bld %A0, 5" "\n\t"
"bst %A1, 2" "\n\t"
"bld %A0, 3" "\n\t"
"bst %A1, 3" "\n\t"
"bld %A0, 1" "\n\t"
"bst %A1, 4" "\n\t"
"bld %B0, 7" "\n\t"
"bst %A1, 5" "\n\t"
"bld %B0, 5" "\n\t"
"bst %A1, 6" "\n\t"
"bld %B0, 3" "\n\t"
"bst %A1, 7" "\n\t"
"bld %B0, 1" "\n\t"
"bst %B1, 4" "\n\t"
"bld %B0, 6" "\n\t"
"bst %B1, 5" "\n\t"
"bld %B0, 4" "\n\t"
"bst %B1, 6" "\n\t"
"bld %B0, 2" "\n\t"
"bst %B1, 7" "\n\t"
"bld %B0, 0" "\n\t"
"bst %B1, 0" "\n\t"
"bld %A0, 6" "\n\t"
"bst %B1, 1" "\n\t"
"bld %A0, 4" "\n\t"
"bst %B1, 2" "\n\t"
"bld %A0, 2" "\n\t"
"bst %B1, 3" "\n\t"
"bld %A0, 0"
: "=&r" (result)
: "r" (x_in)
);
return result;
}
static inline unsigned short bitgeschubse2(unsigned short x_in) {
unsigned short result;
//
asm volatile (
"bst %A1, 0" "\n\t"
"bld %A0, 1" "\n\t"
"bst %A1, 1" "\n\t"
"bld %A0, 3" "\n\t"
"bst %A1, 2" "\n\t"
"bld %A0, 5" "\n\t"
"bst %A1, 3" "\n\t"
"bld %A0, 7" "\n\t"
"bst %A1, 4" "\n\t"
"bld %B0, 1" "\n\t"
"bst %A1, 5" "\n\t"
"bld %B0, 3" "\n\t"
"bst %A1, 6" "\n\t"
"bld %B0, 5" "\n\t"
"bst %A1, 7" "\n\t"
"bld %B0, 7" "\n\t"
"bst %B1, 4" "\n\t"
"bld %B0, 0" "\n\t"
"bst %B1, 5" "\n\t"
"bld %B0, 2" "\n\t"
"bst %B1, 6" "\n\t"
"bld %B0, 4" "\n\t"
"bst %B1, 7" "\n\t"
"bld %B0, 6" "\n\t"
"bst %B1, 0" "\n\t"
"bld %A0, 0" "\n\t"
"bst %B1, 1" "\n\t"
"bld %A0, 2" "\n\t"
"bst %B1, 2" "\n\t"
"bld %A0, 4" "\n\t"
"bst %B1, 3" "\n\t"
"bld %A0, 6"
: "=&r" (result)
: "r" (x_in)
);
return result;
}
// show a row
static void rowshow(unsigned char row, unsigned char plane) {
// depending on the currently drawn plane, display the row for a specific
// amount of time
static unsigned char const ocr_table[] = { 3, 4, 22 };
unsigned char i;
union u {
unsigned short sValue;
unsigned char cValue[2];
} u1, u2;
unsigned char *rowpointer = &rowbuf[row][0];
OCR0 = ocr_table[plane];
#ifdef PROJECTION_MODE
// upper half
u1.cValue[0] = pixmap[plane][row][0];
u1.cValue[1] = pixmap[plane][row + 4][0];
u2.sValue = bitgeschubse2(u1.sValue);
rowbuf[row][3] = u2.cValue[0];
rowbuf[row][2] = u2.cValue[1];
u1.cValue[0] = pixmap[plane][row][1];
u1.cValue[1] = pixmap[plane][row + 4][1];
u2.sValue = bitgeschubse2(u1.sValue);
rowbuf[row][1] = u2.cValue[0];
rowbuf[row][0] = u2.cValue[1];
// lower half
u1.cValue[0] = pixmap[plane][row + 8][0];
u1.cValue[1] = pixmap[plane][row + 12][0];
u2.sValue = bitgeschubse1(u1.sValue);
rowbuf[row][4] = u2.cValue[0];
rowbuf[row][5] = u2.cValue[1];
u1.cValue[0] = pixmap[plane][row + 8][1];
u1.cValue[1] = pixmap[plane][row + 12][1];
u2.sValue = bitgeschubse1(u1.sValue);
rowbuf[row][6] = u2.cValue[0];
rowbuf[row][7] = u2.cValue[1];
#else
// upper half
u1.cValue[0] = pixmap[plane][row][0];
u1.cValue[1] = pixmap[plane][row+4][0];
u2.sValue = bitgeschubse1(u1.sValue);
rowbuf[row][0] = u2.cValue[0];
rowbuf[row][1] = u2.cValue[1];
u1.cValue[0] = pixmap[plane][row][1];
u1.cValue[1] = pixmap[plane][row+4][1];
u2.sValue = bitgeschubse1(u1.sValue);
rowbuf[row][2] = u2.cValue[0];
rowbuf[row][3] = u2.cValue[1];
// lower half
u1.cValue[0] = pixmap[plane][row+8][0];
u1.cValue[1] = pixmap[plane][row+12][0];
u2.sValue = bitgeschubse2(u1.sValue);
rowbuf[row][7] = u2.cValue[0];
rowbuf[row][6] = u2.cValue[1];
u1.cValue[0] = pixmap[plane][row+8][1];
u1.cValue[1] = pixmap[plane][row+12][1];
u2.sValue = bitgeschubse2(u1.sValue);
rowbuf[row][5] = u2.cValue[0];
rowbuf[row][4] = u2.cValue[1];
#endif
#ifdef HC165_JOYSTICK_SUPPORT
HC165_JOYSTICK_PORT_LOAD &= ~(1 << HC165_JOYSTICK_BIT_LOAD);
asm volatile("nop\r\t");
HC165_JOYSTICK_PORT_LOAD |= (1 << HC165_JOYSTICK_BIT_LOAD);
#endif
ROW1_OFF();
ROW2_OFF();
ROW3_OFF();
ROW4_OFF();
i = 8;
while (i--) {
SPDR = *(rowpointer++);
while (!(SPSR & _BV(SPIF))) {
}
#ifdef HC165_JOYSTICK_SUPPORT
if (i == 7)
hc165_joystick_val = SPDR;
#endif
}
/* for(i=0;i<10;i++) {
nop();
} */
LOAD_ON();
LOAD_OFF();
switch (row) {
case 0:
ROW4_ON();
break;
case 1:
ROW3_ON();
break;
case 2:
ROW2_ON();
break;
case 3:
ROW1_ON();
break;
}
}
// depending on the plane this interrupt triggers at 50 kHz, 31.25 kHz or
// 12.5 kHz
ISR( TIMER0_COMP_vect) {
static unsigned char plane = 0;
static unsigned char row = 0;
// reset watchdog
wdt_reset();
// increment both row and plane
if (++plane == NUMPLANE) {
plane = 0;
if (++row == MUX_ROWS) {
row = 0;
}
}
// output current row according to current plane
rowshow(row, plane);
}
void timer0_off() {
cli();
ROW1_OFF();
ROW2_OFF();
ROW3_OFF();
ROW4_OFF();
#if defined (__AVR_ATmega644P__) || defined (__AVR_ATmega644__)
TCCR0A = 0x00;
TCCR0B = 0x00;
#else
TCCR0 = 0x00;
#endif
sei();
}
// initialize timer which triggers the interrupt
static void timer0_on() {
/* TCCR0: FOC0 WGM00 COM01 COM00 WGM01 CS02 CS01 CS00
CS02 CS01 CS00
0 0 0 stop
0 0 1 clk
0 1 0 clk/8
0 1 1 clk/64
1 0 0 clk/256
1 0 1 clk/1024
*/
#if defined (__AVR_ATmega644P__) || defined (__AVR_ATmega644__)
TCCR0A = 0x02; // CTC Mode
TCCR0B = 0x04; // clk/256
TCNT0 = 0; // reset timer
OCR0 = 20; // compare with this value
TIMSK0 = 0x02; // compare match Interrupt on
#else
TCCR0 = 0x0C; // CTC Mode, clk/256
TCNT0 = 0; // reset timer
OCR0 = 20; // compare with this value
TIMSK = 0x02; // compare match Interrupt on
#endif
}
void borg_hw_init() {
PORTA |= ((1 << 1) | (1 << 2)); // ROW2, ROW3, LOAD
PORTA &= ~((1 << 4));
PORTB |= ((1 << 4) | (1 << 5) | (1 << 6) | (1 << 7)); // MOSI, MISO, SCK
PORTC |= ((1 << 1) | (1 << 2)); // ROW1, ROW4
PORTD |= ((1 << 0) | (1 << 1)); // RxD, TxD
DDRA |= ((1 << 1) | (1 << 2) | (1 << 4)); // 1 = Output
DDRB |= ((1 << 4) | (1 << 5) | (1 << 7));
DDRB &= ~((1 << 6));
DDRC |= ((1 << 1) | (1 << 2));
DDRD |= ((1 << 1));
DDRD &= ~((1 << 0));
SPCR = 0b01010000;
SPSR = 0x01;
timer0_on();
// activate watchdog timer
wdt_reset();
wdt_enable(0x00); // 17ms watchdog
}

View File

@ -14,6 +14,8 @@ choice 'Hardware Driver' \
Andre-Borg HW_BORG_ANDRE \
Laufschrift-Borg HW_BORG_LS \
Laufschrift-Borg-MH HW_BORG_MH \
FFM-Jochen HW_BORG_LSJO \
FFM-LedBrett HW_LEDBRETT \
Borg-Mini HW_BORG_MINI \
Panel-One HW_PANEL_ONE \
4xPD1165 HW_PD1165 \
@ -43,6 +45,14 @@ if [ "$BORG_HW" == "HW_BORG_MH" ] ; then
source borg_hw/config_borg_mh.in
fi
if [ "$BORG_HW" == "HW_BORG_LSJO" ] ; then
source borg_hw/config_borg_lsjo.in
fi
if [ "$BORG_HW" == "HW_LEDBRETT" ] ; then
source borg_hw/config_ledbrett.in
fi
if [ "$BORG_HW" == "HW_BORG_MINI" ] ; then
source borg_hw/config_borg_mini.in
fi

View File

@ -0,0 +1,55 @@
mainmenu_option next_comment
comment "Laufschrift-Borg Jochen port setup"
choice 'port for row select' \
"PORTA PORTA \
PORTB PORTB \
PORTC PORTC \
PORTD PORTD" \
'PORTB' ROWPORT
choice 'Column shiftregister Port' \
"PORTA PORTA \
PORTB PORTB \
PORTC PORTC \
PORTD PORTD" \
'PORTD' COLPORT
comment "pin numbers on shiftregister port"
choice 'CLK Pin' \
"Pin0 0 \
Pin1 1 \
Pin2 2 \
Pin3 3 \
Pin4 4 \
Pin5 5 \
Pin6 6 \
Pin7 7" \
'Pin6' PIN_CLK
choice 'DATA Pin' \
"Pin0 0 \
Pin1 1 \
Pin2 2 \
Pin3 3 \
Pin4 4 \
Pin5 5 \
Pin6 6 \
Pin7 7" \
'Pin4' PIN_DATA
choice 'LINE_EN Pin' \
"Pin0 0 \
Pin1 1 \
Pin2 2 \
Pin3 3 \
Pin4 4 \
Pin5 5 \
Pin6 6 \
Pin7 7" \
'Pin5' PIN_LINE_EN
endmenu

View File

@ -0,0 +1,11 @@
mainmenu_option next_comment
comment "LedBrett setup"
comment "fixing hardwareproblems in software"
bool "projection mode (mirrored)" PROJECTION_MODE n
endmenu

View File

@ -8,6 +8,7 @@ comment "General Setup"
choice 'Target MCU' \
"ATmega8 atmega8 \
ATmega32 atmega32 \
ATmega328 atmega328 \
ATmega644 atmega644 \
ATmega644p atmega644p \
ATmega8515 atmega8515" \

View File

@ -14,5 +14,8 @@ endif
ifeq ($(RFM12_JOYSTICK_SUPPORT), y)
SRC = rfm12_joystick.c
endif
ifeq ($(HC165_JOYSTICK_SUPPORT), y)
SRC = hc165_joystick.c
endif
include $(TOPDIR)/rules.mk

View File

@ -167,6 +167,31 @@ if [ "$JOYSTICK_SUPPORT" = "y" ]; then
endmenu
###################### 74HC165 joystick menu #################################
dep_bool_menu "74HC165 joystick support" HC165_JOYSTICK_SUPPORT y
if [ "$HC165_JOYSTICK_SUPPORT" = "y" ]; then
choice 'Port load' \
"PORTA PORTA \
PORTB PORTB \
PORTC PORTC \
PORTD PORTD" \
'PORTD' HC165_JOYSTICK_PORT_LOAD
choice 'Bit load' \
"Bit0 0 \
Bit1 1 \
Bit2 2 \
Bit3 3 \
Bit4 4 \
Bit5 5 \
Bit6 6 \
Bit7 7" \
'Bit2' HC165_JOYSTICK_BIT_LOAD
fi
endmenu
###############################################################################
fi

14
joystick/hc165_joystick.c Normal file
View File

@ -0,0 +1,14 @@
#include <avr/io.h>
#include "../makros.h"
#include "../config.h"
#define HC165_JOYSTICK_DDR_LOAD DDR(HC165_JOYSTICK_PORT_LOAD)
volatile volatile uint8_t hc165_joystick_val;
// unsigned char waitForFire;
void joy_init(){
HC165_JOYSTICK_PORT_LOAD |= (1<<HC165_JOYSTICK_BIT_LOAD);
HC165_JOYSTICK_DDR_LOAD |= (1<<HC165_JOYSTICK_BIT_LOAD);
}

View File

@ -30,6 +30,17 @@ void joy_init();
# define JOYISRIGHT (!! ((1<<3) & rfm12_joystick_val))
# define JOYISFIRE (!! ((1<<4) & rfm12_joystick_val))
# elif defined(HC165_JOYSTICK_SUPPORT)
extern volatile uint8_t hc165_joystick_val;
# define JOYISUP (! ((1<<0) & hc165_joystick_val))
# define JOYISDOWN (! ((1<<1) & hc165_joystick_val))
# define JOYISLEFT (! ((1<<2) & hc165_joystick_val))
# define JOYISRIGHT (! ((1<<3) & hc165_joystick_val))
# define JOYISFIRE (! ((1<<4) & hc165_joystick_val))
# else
# define JOYISUP (!(JOYSTICK_PIN_UP & (1<<JOYSTICK_BIT_UP )))

123
profiles/FFM-Jochen Normal file
View File

@ -0,0 +1,123 @@
#
# Automatically generated by make menuconfig: don't edit
#
#
# General Setup
#
MCU=atmega328
FREQ=16000000
#
# Borg Hardware
#
NUM_ROWS=8
NUM_COLS=80
NUMPLANE=3
BORG_HW=HW_BORG_LSJO
#
# Laufschrift-Borg Jochen port setup
#
ROWPORT=PORTD
COLPORT=PORTD
PIN_CLK=6
PIN_DATA=7
PIN_LINE_EN=5
#
# Features
#
RANDOM_SUPPORT=y
# LAP_TIME_EXTENSION is not set
SCROLLTEXT_SUPPORT=y
SCROLLTEXT_FONT=FONT_C64
SCROLLTEXT_BUFFER_SIZE=128
SCROLL_X_SPEED=10
SCROLL_Y_SPEED=20
SCROLLTEXT_TEXT="</#COMMODORE C64 - All your base are belong to us!!!"
# RFM12_SUPPORT is not set
# JOYSTICK_SUPPORT is not set
# CAN_SUPPORT is not set
# MENU_SUPPORT is not set
#
# Games
#
# GAME_TETRIS_CORE is not set
# GAME_TETRIS is not set
# GAME_BASTET is not set
# GAME_TETRIS_FP is not set
# GAME_SPACE_INVADERS is not set
# GAME_SNAKE is not set
# GAME_BREAKOUT is not set
#
# Animations
#
ANIMATION_SCROLLTEXT=y
ANIMATION_SPIRAL=y
SPIRAL_DELAY=5
# ANIMATION_JOERN1 is not set
ANIMATION_SNAKE=y
SNAKE_CYCLE_DELAY=40
SNAKE_TERMINATION_DELAY=30
SNAKE_MAX_LENGTH=64
SNAKE_MAX_APPLES=10
# ANIMATION_CHECKERBOARD is not set
ANIMATION_FIRE=y
FIRE_S=30
FIRE_N=5
FIRE_DIV=44
FIRE_DELAY=50
FIRE_CYCLES=400
ANIMATION_MATRIX=y
MATRIX_STREAMER_NUM=30
MATRIX_CYCLES=500
MATRIX_DELAY=60
ANIMATION_RANDOM_BRIGHT=y
# ANIMATION_STONEFLY is not set
ANIMATION_FLYINGDOTS=y
ANIMATION_GAMEOFLIFE=y
GOL_DELAY=10
GOL_CYCLES=360
# ANIMATION_BREAKOUT is not set
# ANIMATION_MHERWEG is not set
# ANIMATION_LTN_ANT is not set
# ANIMATION_TIME is not set
TIME_MASTER_ADDR=0x00
TIME_UPDATE_TIMEOUT=23
ANIMATION_BMSCROLLER=y
# ANIMATION_LABORLOGO is not set
# ANIMATION_AMPHIBIAN is not set
# ANIMATION_LOGO_OOS is not set
ANIMATION_FAIRYDUST=y
# ANIMATION_IDEENPARK is not set
#
# Fixed-point math patterns
#
# ANIMATION_PLASMA is not set
FP_PLASMA_DELAY=1
# ANIMATION_PSYCHEDELIC is not set
FP_PSYCHO_DELAY=15
# ANIMATION_BLACKHOLE is not set
# ANIMATION_SQUARES is not set
# ANIMATION_TESTS is not set
# ANIMATION_OFF is not set
#
# small Animations
#
# SMALLANIMATION_ROWWALK is not set
SMALLANIMATION_ROWWALK_SPEED=50
SMALLANIMATION_ROWWALK_COUNT=10
# SMALLANIMATION_COLWALK is not set
SMALLANIMATION_COLWALK_SPEED=50
SMALLANIMATION_COLWALK_COUNT=10
# SMALLANIMATION_ROWBOUNCE is not set
SMALLANIMATION_ROWBOUNCE_SPEED=50
SMALLANIMATION_ROWBOUNCE_COUNT=10
# SMALLANIMATION_COLBOUNCE is not set
SMALLANIMATION_COLBOUNCE_SPEED=50
SMALLANIMATION_COLBOUNCE_COUNT=10

117
profiles/FFM-LedBrett Normal file
View File

@ -0,0 +1,117 @@
#
# Automatically generated by make menuconfig: don't edit
#
#
# General Setup
#
MCU=atmega32
FREQ=16000000
#
# Borg Hardware
#
NUM_ROWS=16
NUM_COLS=16
NUMPLANE=3
BORG_HW=HW_LEDBRETT
#
# LedBrett setup
#
PROJECTION_MODE=y
#
# Features
#
RANDOM_SUPPORT=y
# LAP_TIME_EXTENSION is not set
SCROLLTEXT_SUPPORT=y
SCROLLTEXT_FONT=FONT_ARIAL8
SCROLLTEXT_BUFFER_SIZE=128
SCROLL_X_SPEED=20
SCROLL_Y_SPEED=20
SCROLLTEXT_TEXT="</#www.hackerspace-ffm.de"
# RFM12_SUPPORT is not set
JOYSTICK_SUPPORT=y
# PARALLEL_JOYSTICK_SUPPORT is not set
# NES_PAD_SUPPORT is not set
# RFM12_JOYSTICK_SUPPORT is not set
HC165_JOYSTICK_SUPPORT=y
HC165_JOYSTICK_PORT_LOAD=PORTD
HC165_JOYSTICK_BIT_LOAD=2
# CAN_SUPPORT is not set
MENU_SUPPORT=y
#
# Games
#
GAME_TETRIS_CORE=y
GAME_TETRIS=y
# GAME_BASTET is not set
# GAME_TETRIS_FP is not set
GAME_SPACE_INVADERS=y
GAME_SNAKE=y
GAME_BREAKOUT=y
#
# Animations
#
ANIMATION_SCROLLTEXT=y
ANIMATION_SPIRAL=y
SPIRAL_DELAY=5
# ANIMATION_JOERN1 is not set
# ANIMATION_SNAKE is not set
SNAKE_CYCLE_DELAY=100
SNAKE_TERMINATION_DELAY=60
SNAKE_MAX_LENGTH=64
SNAKE_MAX_APPLES=10
# ANIMATION_CHECKERBOARD is not set
ANIMATION_FIRE=y
FIRE_S=30
FIRE_N=5
FIRE_DIV=44
FIRE_DELAY=50
FIRE_CYCLES=400
ANIMATION_MATRIX=y
MATRIX_STREAMER_NUM=30
MATRIX_CYCLES=500
MATRIX_DELAY=60
ANIMATION_RANDOM_BRIGHT=y
ANIMATION_STONEFLY=y
ANIMATION_FLYINGDOTS=y
ANIMATION_GAMEOFLIFE=y
GOL_DELAY=100
GOL_CYCLES=360
# ANIMATION_BREAKOUT is not set
# ANIMATION_MHERWEG is not set
# ANIMATION_LTN_ANT is not set
# ANIMATION_TIME is not set
TIME_MASTER_ADDR=0x00
TIME_UPDATE_TIMEOUT=23
ANIMATION_BMSCROLLER=y
# ANIMATION_LABORLOGO is not set
ANIMATION_AMPHIBIAN=y
# ANIMATION_LOGO_OOS is not set
# ANIMATION_FAIRYDUST is not set
ANIMATION_PLASMA=y
ANIMATION_PSYCHEDELIC=y
ANIMATION_BLACKHOLE=y
ANIMATION_TESTS=y
ANIMATION_OFF=y
#
# small Animations
#
# SMALLANIMATION_ROWWALK is not set
SMALLANIMATION_ROWWALK_SPEED=50
SMALLANIMATION_ROWWALK_COUNT=10
# SMALLANIMATION_COLWALK is not set
SMALLANIMATION_COLWALK_SPEED=50
SMALLANIMATION_COLWALK_COUNT=10
# SMALLANIMATION_ROWBOUNCE is not set
SMALLANIMATION_ROWBOUNCE_SPEED=50
SMALLANIMATION_ROWBOUNCE_COUNT=10
# SMALLANIMATION_COLBOUNCE is not set
SMALLANIMATION_COLBOUNCE_SPEED=50
SMALLANIMATION_COLBOUNCE_COUNT=10

View File

@ -5,7 +5,8 @@ if [ "$SCROLLTEXT_SUPPORT" = "y" ]; then
choice 'Scrolltext Font' \
"Arial_8 FONT_ARIAL8 \
Small_6 FONT_SMALL6 \
Uni_53 FONT_UNI53" \
Uni_53 FONT_UNI53 \
C64 FONT_C64" \
'Arial_8' SCROLLTEXT_FONT
int "Scrolltest buffer size" SCROLLTEXT_BUFFER_SIZE 128

960
scrolltext/font_c64.c Normal file
View File

@ -0,0 +1,960 @@
#include "font.h"
unsigned int const fontIndex_c64[] PROGMEM = {
0, /* */
8, /* ! */
16, /* " */
24, /* # */
32, /* $ */
40, /* % */
48, /* & */
56, /* ' */
64, /* ( */
72, /* ) */
80, /* * */
88, /* + */
96, /* , */
104, /* - */
112, /* . */
120, /* / */
128, /* 0 */
136, /* 1 */
144, /* 2 */
152, /* 3 */
160, /* 4 */
168, /* 5 */
176, /* 6 */
184, /* 7 */
192, /* 8 */
200, /* 9 */
208, /* : */
216, /* ; */
224, /* < */
232, /* = */
240, /* > */
248, /* ? */
256, /* @ */
264, /* A */
272, /* B */
280, /* C */
288, /* D */
296, /* E */
304, /* F */
312, /* G */
320, /* H */
328, /* I */
336, /* J */
344, /* K */
352, /* L */
360, /* M */
368, /* N */
376, /* O */
384, /* P */
392, /* Q */
400, /* R */
408, /* S */
416, /* T */
424, /* U */
432, /* V */
440, /* W */
448, /* X */
456, /* Y */
464, /* Z */
472, /* [ */
480, /* \ */
488, /* ] */
496, /* ^ */
504, /* _ */
512, /* ` */
520, /* a */
528, /* b */
536, /* c */
544, /* d */
552, /* e */
560, /* f */
568, /* g */
576, /* h */
584, /* i */
592, /* j */
600, /* k */
608, /* l */
616, /* m */
624, /* n */
632, /* o */
640, /* p */
648, /* q */
656, /* r */
664, /* s */
672, /* t */
680, /* u */
688, /* v */
696, /* w */
704, /* x */
712, /* y */
720, /* z */
728, /* { */
736, /* | */
744, /* } */
752, /* ~ */
};
unsigned char const fontData_c64[] PROGMEM = {
/* character / ASCII code 32 / offsets: 39 / 32 */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
/* character ! / ASCII code 33 / offsets: 39 / 43 */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
0x4f, /* .#..#### */
0x4f, /* .#..#### */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
/* character " / ASCII code 34 / offsets: 39 / 54 */
0x00, /* ........ */
0x07, /* .....### */
0x07, /* .....### */
0x00, /* ........ */
0x00, /* ........ */
0x07, /* .....### */
0x07, /* .....### */
0x00, /* ........ */
/* character # / ASCII code 35 / offsets: 39 / 65 */
0x14, /* ...#.#.. */
0x7f, /* .####### */
0x7f, /* .####### */
0x14, /* ...#.#.. */
0x14, /* ...#.#.. */
0x7f, /* .####### */
0x7f, /* .####### */
0x14, /* ...#.#.. */
/* character $ / ASCII code 36 / offsets: 39 / 76 */
0x00, /* ........ */
0x24, /* ..#..#.. */
0x2e, /* ..#.###. */
0x6b, /* .##.#.## */
0x6b, /* .##.#.## */
0x3a, /* ..###.#. */
0x12, /* ...#..#. */
0x00, /* ........ */
/* character % / ASCII code 37 / offsets: 39 / 87 */
0x00, /* ........ */
0x63, /* .##...## */
0x33, /* ..##..## */
0x18, /* ...##... */
0x0c, /* ....##.. */
0x66, /* .##..##. */
0x63, /* .##...## */
0x00, /* ........ */
/* character & / ASCII code 38 / offsets: 39 / 98 */
0x00, /* ........ */
0x32, /* ..##..#. */
0x7f, /* .####### */
0x4d, /* .#..##.# */
0x4d, /* .#..##.# */
0x77, /* .###.### */
0x72, /* .###..#. */
0x50, /* .#.#.... */
/* character ' / ASCII code 39 / offsets: 39 / 109 */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
0x04, /* .....#.. */
0x06, /* .....##. */
0x03, /* ......## */
0x01, /* .......# */
0x00, /* ........ */
/* character ( / ASCII code 40 / offsets: 39 / 120 */
0x00, /* ........ */
0x00, /* ........ */
0x1c, /* ...###.. */
0x3e, /* ..#####. */
0x63, /* .##...## */
0x41, /* .#.....# */
0x00, /* ........ */
0x00, /* ........ */
/* character ) / ASCII code 41 / offsets: 39 / 131 */
0x00, /* ........ */
0x00, /* ........ */
0x41, /* .#.....# */
0x63, /* .##...## */
0x3e, /* ..#####. */
0x1c, /* ...###.. */
0x00, /* ........ */
0x00, /* ........ */
/* character * / ASCII code 42 / offsets: 39 / 142 */
0x08, /* ....#... */
0x2a, /* ..#.#.#. */
0x3e, /* ..#####. */
0x1c, /* ...###.. */
0x1c, /* ...###.. */
0x3e, /* ..#####. */
0x2a, /* ..#.#.#. */
0x08, /* ....#... */
/* character + / ASCII code 43 / offsets: 39 / 153 */
0x00, /* ........ */
0x08, /* ....#... */
0x08, /* ....#... */
0x3e, /* ..#####. */
0x3e, /* ..#####. */
0x08, /* ....#... */
0x08, /* ....#... */
0x00, /* ........ */
/* character , / ASCII code 44 / offsets: 39 / 164 */
0x00, /* ........ */
0x00, /* ........ */
0x80, /* #....... */
0xe0, /* ###..... */
0x60, /* .##..... */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
/* character - / ASCII code 45 / offsets: 39 / 175 */
0x00, /* ........ */
0x08, /* ....#... */
0x08, /* ....#... */
0x08, /* ....#... */
0x08, /* ....#... */
0x08, /* ....#... */
0x08, /* ....#... */
0x00, /* ........ */
/* character . / ASCII code 46 / offsets: 39 / 186 */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
0x60, /* .##..... */
0x60, /* .##..... */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
/* character / / ASCII code 47 / offsets: 39 / 197 */
0x00, /* ........ */
0x40, /* .#...... */
0x60, /* .##..... */
0x30, /* ..##.... */
0x18, /* ...##... */
0x0c, /* ....##.. */
0x06, /* .....##. */
0x02, /* ......#. */
/* character 0 / ASCII code 48 / offsets: 51 / 32 */
0x00, /* ........ */
0x3e, /* ..#####. */
0x7f, /* .####### */
0x49, /* .#..#..# */
0x45, /* .#...#.# */
0x7f, /* .####### */
0x3e, /* ..#####. */
0x00, /* ........ */
/* character 1 / ASCII code 49 / offsets: 51 / 43 */
0x00, /* ........ */
0x40, /* .#...... */
0x44, /* .#...#.. */
0x7f, /* .####### */
0x7f, /* .####### */
0x40, /* .#...... */
0x40, /* .#...... */
0x00, /* ........ */
/* character 2 / ASCII code 50 / offsets: 51 / 54 */
0x00, /* ........ */
0x62, /* .##...#. */
0x73, /* .###..## */
0x51, /* .#.#...# */
0x49, /* .#..#..# */
0x4f, /* .#..#### */
0x46, /* .#...##. */
0x00, /* ........ */
/* character 3 / ASCII code 51 / offsets: 51 / 65 */
0x00, /* ........ */
0x22, /* ..#...#. */
0x63, /* .##...## */
0x49, /* .#..#..# */
0x49, /* .#..#..# */
0x7f, /* .####### */
0x36, /* ..##.##. */
0x00, /* ........ */
/* character 4 / ASCII code 52 / offsets: 51 / 76 */
0x00, /* ........ */
0x18, /* ...##... */
0x18, /* ...##... */
0x14, /* ...#.#.. */
0x16, /* ...#.##. */
0x7f, /* .####### */
0x7f, /* .####### */
0x10, /* ...#.... */
/* character 5 / ASCII code 53 / offsets: 51 / 87 */
0x00, /* ........ */
0x27, /* ..#..### */
0x67, /* .##..### */
0x45, /* .#...#.# */
0x45, /* .#...#.# */
0x7d, /* .#####.# */
0x39, /* ..###..# */
0x00, /* ........ */
/* character 6 / ASCII code 54 / offsets: 51 / 98 */
0x00, /* ........ */
0x3e, /* ..#####. */
0x7f, /* .####### */
0x49, /* .#..#..# */
0x49, /* .#..#..# */
0x7b, /* .####.## */
0x32, /* ..##..#. */
0x00, /* ........ */
/* character 7 / ASCII code 55 / offsets: 51 / 109 */
0x00, /* ........ */
0x03, /* ......## */
0x03, /* ......## */
0x79, /* .####..# */
0x7d, /* .#####.# */
0x07, /* .....### */
0x03, /* ......## */
0x00, /* ........ */
/* character 8 / ASCII code 56 / offsets: 51 / 120 */
0x00, /* ........ */
0x36, /* ..##.##. */
0x7f, /* .####### */
0x49, /* .#..#..# */
0x49, /* .#..#..# */
0x7f, /* .####### */
0x36, /* ..##.##. */
0x00, /* ........ */
/* character 9 / ASCII code 57 / offsets: 51 / 131 */
0x00, /* ........ */
0x26, /* ..#..##. */
0x6f, /* .##.#### */
0x49, /* .#..#..# */
0x49, /* .#..#..# */
0x7f, /* .####### */
0x3e, /* ..#####. */
0x00, /* ........ */
/* character : / ASCII code 58 / offsets: 51 / 142 */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
0x24, /* ..#..#.. */
0x24, /* ..#..#.. */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
/* character ; / ASCII code 59 / offsets: 51 / 153 */
0x00, /* ........ */
0x00, /* ........ */
0x80, /* #....... */
0xe4, /* ###..#.. */
0x64, /* .##..#.. */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
/* character < / ASCII code 60 / offsets: 51 / 164 */
0x00, /* ........ */
0x08, /* ....#... */
0x1c, /* ...###.. */
0x36, /* ..##.##. */
0x63, /* .##...## */
0x41, /* .#.....# */
0x41, /* .#.....# */
0x00, /* ........ */
/* character = / ASCII code 61 / offsets: 51 / 175 */
0x00, /* ........ */
0x14, /* ...#.#.. */
0x14, /* ...#.#.. */
0x14, /* ...#.#.. */
0x14, /* ...#.#.. */
0x14, /* ...#.#.. */
0x14, /* ...#.#.. */
0x00, /* ........ */
/* character > / ASCII code 62 / offsets: 51 / 186 */
0x00, /* ........ */
0x41, /* .#.....# */
0x41, /* .#.....# */
0x63, /* .##...## */
0x36, /* ..##.##. */
0x1c, /* ...###.. */
0x08, /* ....#... */
0x00, /* ........ */
/* character ? / ASCII code 63 / offsets: 51 / 197 */
0x00, /* ........ */
0x02, /* ......#. */
0x03, /* ......## */
0x51, /* .#.#...# */
0x59, /* .#.##..# */
0x0f, /* ....#### */
0x06, /* .....##. */
0x00, /* ........ */
/* character @ / ASCII code 64 / offsets: 63 / 32 */
0x00, /* ........ */
0x3e, /* ..#####. */
0x7f, /* .####### */
0x41, /* .#.....# */
0x4d, /* .#..##.# */
0x4f, /* .#..#### */
0x2e, /* ..#.###. */
0x00, /* ........ */
/* character A / ASCII code 65 / offsets: 63 / 43 */
0x00, /* ........ */
0x7c, /* .#####.. */
0x7e, /* .######. */
0x0b, /* ....#.## */
0x0b, /* ....#.## */
0x7e, /* .######. */
0x7c, /* .#####.. */
0x00, /* ........ */
/* character B / ASCII code 66 / offsets: 63 / 54 */
0x00, /* ........ */
0x7f, /* .####### */
0x7f, /* .####### */
0x49, /* .#..#..# */
0x49, /* .#..#..# */
0x7f, /* .####### */
0x36, /* ..##.##. */
0x00, /* ........ */
/* character C / ASCII code 67 / offsets: 63 / 65 */
0x00, /* ........ */
0x3e, /* ..#####. */
0x7f, /* .####### */
0x41, /* .#.....# */
0x41, /* .#.....# */
0x63, /* .##...## */
0x22, /* ..#...#. */
0x00, /* ........ */
/* character D / ASCII code 68 / offsets: 63 / 76 */
0x00, /* ........ */
0x7f, /* .####### */
0x7f, /* .####### */
0x41, /* .#.....# */
0x63, /* .##...## */
0x3e, /* ..#####. */
0x1c, /* ...###.. */
0x00, /* ........ */
/* character E / ASCII code 69 / offsets: 63 / 87 */
0x00, /* ........ */
0x7f, /* .####### */
0x7f, /* .####### */
0x49, /* .#..#..# */
0x49, /* .#..#..# */
0x41, /* .#.....# */
0x41, /* .#.....# */
0x00, /* ........ */
/* character F / ASCII code 70 / offsets: 63 / 98 */
0x00, /* ........ */
0x7f, /* .####### */
0x7f, /* .####### */
0x09, /* ....#..# */
0x09, /* ....#..# */
0x01, /* .......# */
0x01, /* .......# */
0x00, /* ........ */
/* character G / ASCII code 71 / offsets: 63 / 109 */
0x00, /* ........ */
0x3e, /* ..#####. */
0x7f, /* .####### */
0x41, /* .#.....# */
0x49, /* .#..#..# */
0x7b, /* .####.## */
0x3a, /* ..###.#. */
0x00, /* ........ */
/* character H / ASCII code 72 / offsets: 63 / 120 */
0x00, /* ........ */
0x7f, /* .####### */
0x7f, /* .####### */
0x08, /* ....#... */
0x08, /* ....#... */
0x7f, /* .####### */
0x7f, /* .####### */
0x00, /* ........ */
/* character I / ASCII code 73 / offsets: 63 / 131 */
0x00, /* ........ */
0x00, /* ........ */
0x41, /* .#.....# */
0x7f, /* .####### */
0x7f, /* .####### */
0x41, /* .#.....# */
0x00, /* ........ */
0x00, /* ........ */
/* character J / ASCII code 74 / offsets: 63 / 142 */
0x00, /* ........ */
0x20, /* ..#..... */
0x60, /* .##..... */
0x41, /* .#.....# */
0x7f, /* .####### */
0x3f, /* ..###### */
0x01, /* .......# */
0x00, /* ........ */
/* character K / ASCII code 75 / offsets: 63 / 153 */
0x00, /* ........ */
0x7f, /* .####### */
0x7f, /* .####### */
0x1c, /* ...###.. */
0x36, /* ..##.##. */
0x63, /* .##...## */
0x41, /* .#.....# */
0x00, /* ........ */
/* character L / ASCII code 76 / offsets: 63 / 164 */
0x00, /* ........ */
0x7f, /* .####### */
0x7f, /* .####### */
0x40, /* .#...... */
0x40, /* .#...... */
0x40, /* .#...... */
0x40, /* .#...... */
0x00, /* ........ */
/* character M / ASCII code 77 / offsets: 63 / 175 */
0x00, /* ........ */
0x7f, /* .####### */
0x7f, /* .####### */
0x06, /* .....##. */
0x0c, /* ....##.. */
0x06, /* .....##. */
0x7f, /* .####### */
0x7f, /* .####### */
/* character N / ASCII code 78 / offsets: 63 / 186 */
0x00, /* ........ */
0x7f, /* .####### */
0x7f, /* .####### */
0x0e, /* ....###. */
0x1c, /* ...###.. */
0x7f, /* .####### */
0x7f, /* .####### */
0x00, /* ........ */
/* character O / ASCII code 79 / offsets: 63 / 197 */
0x00, /* ........ */
0x3e, /* ..#####. */
0x7f, /* .####### */
0x41, /* .#.....# */
0x41, /* .#.....# */
0x7f, /* .####### */
0x3e, /* ..#####. */
0x00, /* ........ */
/* character P / ASCII code 80 / offsets: 75 / 32 */
0x00, /* ........ */
0x7f, /* .####### */
0x7f, /* .####### */
0x09, /* ....#..# */
0x09, /* ....#..# */
0x0f, /* ....#### */
0x06, /* .....##. */
0x00, /* ........ */
/* character Q / ASCII code 81 / offsets: 75 / 43 */
0x00, /* ........ */
0x1e, /* ...####. */
0x3f, /* ..###### */
0x21, /* ..#....# */
0x61, /* .##....# */
0x7f, /* .####### */
0x5e, /* .#.####. */
0x00, /* ........ */
/* character R / ASCII code 82 / offsets: 75 / 54 */
0x00, /* ........ */
0x7f, /* .####### */
0x7f, /* .####### */
0x19, /* ...##..# */
0x39, /* ..###..# */
0x6f, /* .##.#### */
0x46, /* .#...##. */
0x00, /* ........ */
/* character S / ASCII code 83 / offsets: 75 / 65 */
0x00, /* ........ */
0x26, /* ..#..##. */
0x6f, /* .##.#### */
0x49, /* .#..#..# */
0x49, /* .#..#..# */
0x7b, /* .####.## */
0x32, /* ..##..#. */
0x00, /* ........ */
/* character T / ASCII code 84 / offsets: 75 / 76 */
0x00, /* ........ */
0x01, /* .......# */
0x01, /* .......# */
0x7f, /* .####### */
0x7f, /* .####### */
0x01, /* .......# */
0x01, /* .......# */
0x00, /* ........ */
/* character U / ASCII code 85 / offsets: 75 / 87 */
0x00, /* ........ */
0x3f, /* ..###### */
0x7f, /* .####### */
0x40, /* .#...... */
0x40, /* .#...... */
0x7f, /* .####### */
0x3f, /* ..###### */
0x00, /* ........ */
/* character V / ASCII code 86 / offsets: 75 / 98 */
0x00, /* ........ */
0x1f, /* ...##### */
0x3f, /* ..###### */
0x60, /* .##..... */
0x60, /* .##..... */
0x3f, /* ..###### */
0x1f, /* ...##### */
0x00, /* ........ */
/* character W / ASCII code 87 / offsets: 75 / 109 */
0x00, /* ........ */
0x7f, /* .####### */
0x7f, /* .####### */
0x30, /* ..##.... */
0x18, /* ...##... */
0x30, /* ..##.... */
0x7f, /* .####### */
0x7f, /* .####### */
/* character X / ASCII code 88 / offsets: 75 / 120 */
0x00, /* ........ */
0x63, /* .##...## */
0x77, /* .###.### */
0x1c, /* ...###.. */
0x1c, /* ...###.. */
0x77, /* .###.### */
0x63, /* .##...## */
0x00, /* ........ */
/* character Y / ASCII code 89 / offsets: 75 / 131 */
0x00, /* ........ */
0x07, /* .....### */
0x0f, /* ....#### */
0x78, /* .####... */
0x78, /* .####... */
0x0f, /* ....#### */
0x07, /* .....### */
0x00, /* ........ */
/* character Z / ASCII code 90 / offsets: 75 / 142 */
0x00, /* ........ */
0x61, /* .##....# */
0x71, /* .###...# */
0x59, /* .#.##..# */
0x4d, /* .#..##.# */
0x47, /* .#...### */
0x43, /* .#....## */
0x00, /* ........ */
/* character [ / ASCII code 91 / offsets: 75 / 153 */
0x00, /* ........ */
0x00, /* ........ */
0x7f, /* .####### */
0x7f, /* .####### */
0x41, /* .#.....# */
0x41, /* .#.....# */
0x00, /* ........ */
0x00, /* ........ */
/* character \ / ASCII code 92 / offsets: 75 / 164 */
0x00, /* ........ */
0x02, /* ......#. */
0x06, /* .....##. */
0x0c, /* ....##.. */
0x18, /* ...##... */
0x30, /* ..##.... */
0x60, /* .##..... */
0x40, /* .#...... */
/* character ] / ASCII code 93 / offsets: 75 / 175 */
0x00, /* ........ */
0x00, /* ........ */
0x41, /* .#.....# */
0x41, /* .#.....# */
0x7f, /* .####### */
0x7f, /* .####### */
0x00, /* ........ */
0x00, /* ........ */
/* character ^ / ASCII code 94 / offsets: 75 / 186 */
0x00, /* ........ */
0x08, /* ....#... */
0x0c, /* ....##.. */
0x06, /* .....##. */
0x06, /* .....##. */
0x0c, /* ....##.. */
0x08, /* ....#... */
0x00, /* ........ */
/* character _ / ASCII code 95 / offsets: 75 / 197 */
0xc0, /* ##...... */
0xc0, /* ##...... */
0xc0, /* ##...... */
0xc0, /* ##...... */
0xc0, /* ##...... */
0xc0, /* ##...... */
0xc0, /* ##...... */
0xc0, /* ##...... */
/* character ` / ASCII code 96 / offsets: 87 / 32 */
0x00, /* ........ */
0x00, /* ........ */
0x01, /* .......# */
0x03, /* ......## */
0x06, /* .....##. */
0x04, /* .....#.. */
0x00, /* ........ */
0x00, /* ........ */
/* character a / ASCII code 97 / offsets: 87 / 43 */
0x00, /* ........ */
0x20, /* ..#..... */
0x74, /* .###.#.. */
0x54, /* .#.#.#.. */
0x54, /* .#.#.#.. */
0x7c, /* .#####.. */
0x78, /* .####... */
0x00, /* ........ */
/* character b / ASCII code 98 / offsets: 87 / 54 */
0x00, /* ........ */
0x7f, /* .####### */
0x7f, /* .####### */
0x44, /* .#...#.. */
0x44, /* .#...#.. */
0x7c, /* .#####.. */
0x38, /* ..###... */
0x00, /* ........ */
/* character c / ASCII code 99 / offsets: 87 / 65 */
0x00, /* ........ */
0x38, /* ..###... */
0x7c, /* .#####.. */
0x44, /* .#...#.. */
0x44, /* .#...#.. */
0x6c, /* .##.##.. */
0x28, /* ..#.#... */
0x00, /* ........ */
/* character d / ASCII code 100 / offsets: 87 / 76 */
0x00, /* ........ */
0x38, /* ..###... */
0x7c, /* .#####.. */
0x44, /* .#...#.. */
0x44, /* .#...#.. */
0x7f, /* .####### */
0x7f, /* .####### */
0x00, /* ........ */
/* character e / ASCII code 101 / offsets: 87 / 87 */
0x00, /* ........ */
0x38, /* ..###... */
0x7c, /* .#####.. */
0x54, /* .#.#.#.. */
0x54, /* .#.#.#.. */
0x5c, /* .#.###.. */
0x58, /* .#.##... */
0x00, /* ........ */
/* character f / ASCII code 102 / offsets: 87 / 98 */
0x00, /* ........ */
0x08, /* ....#... */
0x7e, /* .######. */
0x7f, /* .####### */
0x09, /* ....#..# */
0x03, /* ......## */
0x02, /* ......#. */
0x00, /* ........ */
/* character g / ASCII code 103 / offsets: 87 / 109 */
0x00, /* ........ */
0x98, /* #..##... */
0xbc, /* #.####.. */
0xa4, /* #.#..#.. */
0xa4, /* #.#..#.. */
0xfc, /* ######.. */
0x7c, /* .#####.. */
0x00, /* ........ */
/* character h / ASCII code 104 / offsets: 87 / 120 */
0x00, /* ........ */
0x7f, /* .####### */
0x7f, /* .####### */
0x04, /* .....#.. */
0x04, /* .....#.. */
0x7c, /* .#####.. */
0x78, /* .####... */
0x00, /* ........ */
/* character i / ASCII code 105 / offsets: 87 / 131 */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
0x7d, /* .#####.# */
0x7d, /* .#####.# */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
/* character j / ASCII code 106 / offsets: 87 / 142 */
0x00, /* ........ */
0x40, /* .#...... */
0xc0, /* ##...... */
0x80, /* #....... */
0x80, /* #....... */
0xfd, /* ######.# */
0x7d, /* .#####.# */
0x00, /* ........ */
/* character k / ASCII code 107 / offsets: 87 / 153 */
0x00, /* ........ */
0x7f, /* .####### */
0x7f, /* .####### */
0x30, /* ..##.... */
0x38, /* ..###... */
0x6c, /* .##.##.. */
0x44, /* .#...#.. */
0x00, /* ........ */
/* character l / ASCII code 108 / offsets: 87 / 164 */
0x00, /* ........ */
0x00, /* ........ */
0x41, /* .#.....# */
0x7f, /* .####### */
0x7f, /* .####### */
0x40, /* .#...... */
0x00, /* ........ */
0x00, /* ........ */
/* character m / ASCII code 109 / offsets: 87 / 175 */
0x00, /* ........ */
0x7c, /* .#####.. */
0x7c, /* .#####.. */
0x18, /* ...##... */
0x30, /* ..##.... */
0x18, /* ...##... */
0x7c, /* .#####.. */
0x7c, /* .#####.. */
/* character n / ASCII code 110 / offsets: 87 / 186 */
0x00, /* ........ */
0x7c, /* .#####.. */
0x7c, /* .#####.. */
0x04, /* .....#.. */
0x04, /* .....#.. */
0x7c, /* .#####.. */
0x78, /* .####... */
0x00, /* ........ */
/* character o / ASCII code 111 / offsets: 87 / 197 */
0x00, /* ........ */
0x38, /* ..###... */
0x7c, /* .#####.. */
0x44, /* .#...#.. */
0x44, /* .#...#.. */
0x7c, /* .#####.. */
0x38, /* ..###... */
0x00, /* ........ */
/* character p / ASCII code 112 / offsets: 99 / 32 */
0x00, /* ........ */
0xfc, /* ######.. */
0xfc, /* ######.. */
0x24, /* ..#..#.. */
0x24, /* ..#..#.. */
0x3c, /* ..####.. */
0x18, /* ...##... */
0x00, /* ........ */
/* character q / ASCII code 113 / offsets: 99 / 43 */
0x00, /* ........ */
0x18, /* ...##... */
0x3c, /* ..####.. */
0x24, /* ..#..#.. */
0x24, /* ..#..#.. */
0xfc, /* ######.. */
0xfc, /* ######.. */
0x00, /* ........ */
/* character r / ASCII code 114 / offsets: 99 / 54 */
0x00, /* ........ */
0x7c, /* .#####.. */
0x7c, /* .#####.. */
0x04, /* .....#.. */
0x04, /* .....#.. */
0x0c, /* ....##.. */
0x08, /* ....#... */
0x00, /* ........ */
/* character s / ASCII code 115 / offsets: 99 / 65 */
0x00, /* ........ */
0x48, /* .#..#... */
0x5c, /* .#.###.. */
0x54, /* .#.#.#.. */
0x54, /* .#.#.#.. */
0x74, /* .###.#.. */
0x20, /* ..#..... */
0x00, /* ........ */
/* character t / ASCII code 116 / offsets: 99 / 76 */
0x04, /* .....#.. */
0x04, /* .....#.. */
0x3f, /* ..###### */
0x7f, /* .####### */
0x44, /* .#...#.. */
0x64, /* .##..#.. */
0x20, /* ..#..... */
0x00, /* ........ */
/* character u / ASCII code 117 / offsets: 99 / 87 */
0x00, /* ........ */
0x3c, /* ..####.. */
0x7c, /* .#####.. */
0x40, /* .#...... */
0x40, /* .#...... */
0x7c, /* .#####.. */
0x3c, /* ..####.. */
0x00, /* ........ */
/* character v / ASCII code 118 / offsets: 99 / 98 */
0x00, /* ........ */
0x1c, /* ...###.. */
0x3c, /* ..####.. */
0x60, /* .##..... */
0x60, /* .##..... */
0x3c, /* ..####.. */
0x1c, /* ...###.. */
0x00, /* ........ */
/* character w / ASCII code 119 / offsets: 99 / 109 */
0x00, /* ........ */
0x1c, /* ...###.. */
0x7c, /* .#####.. */
0x30, /* ..##.... */
0x18, /* ...##... */
0x30, /* ..##.... */
0x7c, /* .#####.. */
0x1c, /* ...###.. */
/* character x / ASCII code 120 / offsets: 99 / 120 */
0x00, /* ........ */
0x44, /* .#...#.. */
0x6c, /* .##.##.. */
0x38, /* ..###... */
0x38, /* ..###... */
0x6c, /* .##.##.. */
0x44, /* .#...#.. */
0x00, /* ........ */
/* character y / ASCII code 121 / offsets: 99 / 131 */
0x00, /* ........ */
0x9c, /* #..###.. */
0xbc, /* #.####.. */
0xa0, /* #.#..... */
0xa0, /* #.#..... */
0xfc, /* ######.. */
0x7c, /* .#####.. */
0x00, /* ........ */
/* character z / ASCII code 122 / offsets: 99 / 142 */
0x00, /* ........ */
0x44, /* .#...#.. */
0x64, /* .##..#.. */
0x74, /* .###.#.. */
0x5c, /* .#.###.. */
0x4c, /* .#..##.. */
0x44, /* .#...#.. */
0x00, /* ........ */
/* character { / ASCII code 123 / offsets: 99 / 153 */
0x00, /* ........ */
0x08, /* ....#... */
0x08, /* ....#... */
0x3e, /* ..#####. */
0x77, /* .###.### */
0x41, /* .#.....# */
0x41, /* .#.....# */
0x00, /* ........ */
/* character | / ASCII code 124 / offsets: 99 / 164 */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
0xff, /* ######## */
0xff, /* ######## */
0x00, /* ........ */
0x00, /* ........ */
0x00, /* ........ */
/* character } / ASCII code 125 / offsets: 99 / 175 */
0x00, /* ........ */
0x41, /* .#.....# */
0x41, /* .#.....# */
0x77, /* .###.### */
0x3e, /* ..#####. */
0x08, /* ....#... */
0x08, /* ....#... */
0x00, /* ........ */
/* character ~ / ASCII code 126 / offsets: 99 / 186 */
0x00, /* ........ */
0x02, /* ......#. */
0x03, /* ......## */
0x01, /* .......# */
0x03, /* ......## */
0x02, /* ......#. */
0x03, /* ......## */
0x01, /* .......# */
};
font font_c64 = {8, fontIndex_c64, fontData_c64, ' ', '~', '.', 1};

7
scrolltext/font_c64.h Normal file
View File

@ -0,0 +1,7 @@
#ifndef FONT_C64_H
#define FONT_C64_H
#include "font.h"
extern font font_c64;
#endif /* FONT_SMALL6_H_ */

View File

@ -4,6 +4,7 @@
#define FONT_ARIAL8 1
#define FONT_SMALL6 2
#define FONT_UNI53 3
#define FONT_C64 4
void scrolltext(char *str);

View File

@ -17,6 +17,9 @@
#elif SCROLLTEXT_FONT == FONT_SMALL6
#include "font_small6.h"
#define FONT_NAME font_small6
#elif SCROLLTEXT_FONT == FONT_C64
#include "font_c64.h"
#define FONT_NAME font_c64
#elif SCROLLTEXT_FONT == FONT_UNI53
#include "font_uni53.h"
#define FONT_NAME font_uni53

2
util.c
View File

@ -60,7 +60,7 @@ void wait(int ms){
}
#endif
#if defined (__AVR_ATmega644P__) || defined (__AVR_ATmega644__)
#if defined (__AVR_ATmega644P__) || defined (__AVR_ATmega644__) || defined (__AVR_ATmega328__)
while(!(TIFR1&(1<<OCF1A))); //wait for compare match flag
TIFR1=(1<<OCF1A); //reset flag
#else