made some parameters like plasma frame delays configurable

This commit is contained in:
Christian Kroll 2012-05-09 17:57:51 +00:00
parent da49b6b3b1
commit 131fe546b0
5 changed files with 67 additions and 28 deletions

View File

@ -38,7 +38,7 @@ PROJECT_NUMBER =
# for a project that appears at the top of each page and should give viewer # for a project that appears at the top of each page and should give viewer
# a quick idea about the purpose of the project. Keep the description short. # a quick idea about the purpose of the project. Keep the description short.
PROJECT_BRIEF = "Firmware for the AVR based Borg devices of LABOR e.V." PROJECT_BRIEF = "Firmware for the AVR based Borg devices of \"Das LABOR e.V.\""
# With the PROJECT_LOGO tag one can specify an logo or icon that is # With the PROJECT_LOGO tag one can specify an logo or icon that is
# included in the documentation. The maximum height of the logo should not # included in the documentation. The maximum height of the logo should not

View File

@ -56,8 +56,17 @@ comment "Animations"
dep_bool "Fairydust" ANIMATION_FAIRYDUST $ANIMATION_BMSCROLLER dep_bool "Fairydust" ANIMATION_FAIRYDUST $ANIMATION_BMSCROLLER
endmenu endmenu
bool "Plasma" ANIMATION_PLASMA mainmenu_option next_comment
bool "Psychedelic" ANIMATION_PSYCHEDELIC comment "Fixed-point math patterns"
bool "Double Buffering" FP_DOUBLE_BUFFERING 1
bool "Plasma" ANIMATION_PLASMA $ANIMATION_FIXEDPOINT
int "Additional Frame Delay (in ms) For Plasma" FP_PLASMA_DELAY 1
bool "Psychedelic" ANIMATION_PSYCHEDELIC $ANIMATION_FIXEDPOINT
int "Additional Frame Delay (in ms) For Psychedelic" FP_PSYCHO_DELAY 15
endmenu
bool "Black Hole" ANIMATION_BLACKHOLE bool "Black Hole" ANIMATION_BLACKHOLE
comment "Special Animations" comment "Special Animations"

View File

@ -18,6 +18,7 @@
#include "fpmath_patterns.h" #include "fpmath_patterns.h"
#ifdef DOXYGEN
/** /**
* Double buffering helps in reducing the effect of visibly redrawing every * Double buffering helps in reducing the effect of visibly redrawing every
* frame. With this option turned on, a frame is rendered into an off-screen * frame. With this option turned on, a frame is rendered into an off-screen
@ -25,13 +26,14 @@
* However, given the borg's graphics architecture, half painted frames may * However, given the borg's graphics architecture, half painted frames may
* still occur, but they are barely noticeable with this option enabled. * still occur, but they are barely noticeable with this option enabled.
* *
* Turn this off (#undef DOUBLE_BUFFERING) if you prefer speed over beauty. * Turn this off if you prefer speed over beauty.
*/ */
#define DOUBLE_BUFFERING #define FP_DOUBLE_BUFFERING
#endif DOXYGEN
#ifdef LOW_PRECISION #ifdef FP_LOW_PRECISION
#undef LOW_PRECISION #undef FP_LOW_PRECISION
#endif #endif
#if NUM_COLS <= 16 && NUM_ROWS <= 16 #if NUM_COLS <= 16 && NUM_ROWS <= 16
@ -49,10 +51,10 @@
* ability to store every interim result as Q23.8. Most operations like * ability to store every interim result as Q23.8. Most operations like
* square root, sine, cosine, multiplication etc. utilize 32 bit types. * square root, sine, cosine, multiplication etc. utilize 32 bit types.
*/ */
#define LOW_PRECISION #define FP_LOW_PRECISION
#endif #endif
#ifdef LOW_PRECISION #ifdef FP_LOW_PRECISION
/** This is the type we expect ordinary integers to be. */ /** This is the type we expect ordinary integers to be. */
typedef int16_t ordinary_int_t; typedef int16_t ordinary_int_t;
/** This is the type which we use for fixed-point values. */ /** This is the type which we use for fixed-point values. */
@ -328,7 +330,7 @@ typedef unsigned char (*fpmath_pattern_func_t)(unsigned char const x,
fixp_t const t, fixp_t const t,
void *const r); void *const r);
#ifdef DOUBLE_BUFFERING #ifdef FP_DOUBLE_BUFFERING
# define BUFFER pixmap_buffer # define BUFFER pixmap_buffer
#else #else
# define BUFFER pixmap # define BUFFER pixmap
@ -351,7 +353,7 @@ static void fixPattern(fixp_t const t_start,
fpmath_pattern_func_t fpPattern, fpmath_pattern_func_t fpPattern,
void *r) void *r)
{ {
#ifdef DOUBLE_BUFFERING #ifdef FP_DOUBLE_BUFFERING
// double buffering to reduce half painted pictures // double buffering to reduce half painted pictures
unsigned char pixmap_buffer[NUMPLANE][NUM_ROWS][LINEBYTES]; unsigned char pixmap_buffer[NUMPLANE][NUM_ROWS][LINEBYTES];
#endif #endif
@ -376,7 +378,7 @@ static void fixPattern(fixp_t const t_start,
} }
} }
#ifdef DOUBLE_BUFFERING #ifdef FP_DOUBLE_BUFFERING
memcpy(pixmap, pixmap_buffer, sizeof(pixmap)); memcpy(pixmap, pixmap_buffer, sizeof(pixmap));
#endif #endif
@ -471,7 +473,11 @@ void plasma(void)
#ifndef __AVR__ #ifndef __AVR__
fixPattern(0, fixScaleUp(75), 0.1 * FIX, 80, fixAnimPlasma, &r); fixPattern(0, fixScaleUp(75), 0.1 * FIX, 80, fixAnimPlasma, &r);
#else #else
fixPattern(0, fixScaleUp(60), 0.1 * FIX, 1, fixAnimPlasma, &r); #ifndef FP_PSYCHO_DELAY
#define FP_PSYCHO_DELAY 1
#endif
fixPattern(0, fixScaleUp(60), 0.1 * FIX,
FP_PSYCHO_DELAY, fixAnimPlasma, &r);
#endif /* __AVR__ */ #endif /* __AVR__ */
} }
@ -535,7 +541,11 @@ void psychedelic(void)
#ifndef __AVR__ #ifndef __AVR__
fixPattern(0, fixScaleUp(75), 0.1 * FIX, 80, fixAnimPsychedelic, &r); fixPattern(0, fixScaleUp(75), 0.1 * FIX, 80, fixAnimPsychedelic, &r);
#else #else
fixPattern(0, fixScaleUp(60), 0.1 * FIX, 15, fixAnimPsychedelic, &r); #ifndef FP_PLASMA_DELAY
#define FP_PLASMA_DELAY 15
#endif
fixPattern(0, fixScaleUp(60), 0.1 * FIX, FP_PLASMA_DELAY,
fixAnimPsychedelic, &r);
#endif /* __AVR__ */ #endif /* __AVR__ */
} }

View File

@ -41,6 +41,7 @@ SCROLLTEXT_BUFFER_SIZE=128
SCROLL_X_SPEED=20 SCROLL_X_SPEED=20
SCROLL_Y_SPEED=20 SCROLL_Y_SPEED=20
SCROLLTEXT_TEXT="</#www.das-labor.org" SCROLLTEXT_TEXT="</#www.das-labor.org"
# RFM12_SUPPORT is not set
JOYSTICK_SUPPORT=y JOYSTICK_SUPPORT=y
PARALLEL_JOYSTICK_SUPPORT=y PARALLEL_JOYSTICK_SUPPORT=y
JOYSTICK_PIN_UP=PINB JOYSTICK_PIN_UP=PINB
@ -54,14 +55,15 @@ JOYSTICK_BIT_RIGHT=3
JOYSTICK_PIN_FIRE=PIND JOYSTICK_PIN_FIRE=PIND
JOYSTICK_BIT_FIRE=3 JOYSTICK_BIT_FIRE=3
# NES_PAD_SUPPORT is not set # NES_PAD_SUPPORT is not set
# RFM12_JOYSTICK_SUPPORT is not set
# CAN_SUPPORT is not set # CAN_SUPPORT is not set
MENU_SUPPORT=y MENU_SUPPORT=y
# #
# Games # Games
# #
# GAME_TETRIS_CORE is not set GAME_TETRIS_CORE=y
# GAME_TETRIS is not set GAME_TETRIS=y
# GAME_BASTET is not set # GAME_BASTET is not set
# GAME_TETRIS_FP is not set # GAME_TETRIS_FP is not set
GAME_SPACE_INVADERS=y GAME_SPACE_INVADERS=y
@ -107,9 +109,17 @@ ANIMATION_BMSCROLLER=y
ANIMATION_LABORLOGO=y ANIMATION_LABORLOGO=y
# ANIMATION_AMPHIBIAN is not set # ANIMATION_AMPHIBIAN is not set
# ANIMATION_LOGO_OOS is not set # ANIMATION_LOGO_OOS is not set
# ANIMATION_LOGO_28C3 is not set ANIMATION_FAIRYDUST=y
#
# Fixed-point math patterns
#
FP_DOUBLE_BUFFERING=y
ANIMATION_PLASMA=y ANIMATION_PLASMA=y
FP_PLASMA_DELAY=1
ANIMATION_PSYCHEDELIC=y ANIMATION_PSYCHEDELIC=y
FP_PSYCHO_DELAY=15
# ANIMATION_BLACKHOLE is not set
ANIMATION_TESTS=y ANIMATION_TESTS=y
ANIMATION_OFF=y ANIMATION_OFF=y

View File

@ -38,6 +38,7 @@ SCROLLTEXT_BUFFER_SIZE=128
SCROLL_X_SPEED=20 SCROLL_X_SPEED=20
SCROLL_Y_SPEED=20 SCROLL_Y_SPEED=20
SCROLLTEXT_TEXT="</#www.das-labor.org" SCROLLTEXT_TEXT="</#www.das-labor.org"
# RFM12_SUPPORT is not set
JOYSTICK_SUPPORT=y JOYSTICK_SUPPORT=y
PARALLEL_JOYSTICK_SUPPORT=y PARALLEL_JOYSTICK_SUPPORT=y
JOYSTICK_PIN_UP=PINB JOYSTICK_PIN_UP=PINB
@ -51,6 +52,7 @@ JOYSTICK_BIT_RIGHT=3
JOYSTICK_PIN_FIRE=PIND JOYSTICK_PIN_FIRE=PIND
JOYSTICK_BIT_FIRE=3 JOYSTICK_BIT_FIRE=3
# NES_PAD_SUPPORT is not set # NES_PAD_SUPPORT is not set
# RFM12_JOYSTICK_SUPPORT is not set
# CAN_SUPPORT is not set # CAN_SUPPORT is not set
MENU_SUPPORT=y MENU_SUPPORT=y
@ -103,10 +105,18 @@ TIME_UPDATE_TIMEOUT=50
ANIMATION_BMSCROLLER=y ANIMATION_BMSCROLLER=y
ANIMATION_LABORLOGO=y ANIMATION_LABORLOGO=y
ANIMATION_AMPHIBIAN=y ANIMATION_AMPHIBIAN=y
ANIMATION_LOGO_OOS=y # ANIMATION_LOGO_OOS is not set
# ANIMATION_LOGO_28C3 is not set ANIMATION_FAIRYDUST=y
#
# Fixed-point math patterns
#
FP_DOUBLE_BUFFERING=y
ANIMATION_PLASMA=y ANIMATION_PLASMA=y
FP_PLASMA_DELAY=1
ANIMATION_PSYCHEDELIC=y ANIMATION_PSYCHEDELIC=y
FP_PSYCHO_DELAY=15
ANIMATION_BLACKHOLE=y
# ANIMATION_TESTS is not set # ANIMATION_TESTS is not set
# ANIMATION_OFF is not set # ANIMATION_OFF is not set