Christian Kroll
6246a13c65
|
11 years ago | |
---|---|---|
animations | 12 years ago | |
borg_hw | 12 years ago | |
can | 12 years ago | |
compat | 16 years ago | |
doc/img | 11 years ago | |
games | 12 years ago | |
joystick | 12 years ago | |
mcuf | 16 years ago | |
menu | 13 years ago | |
profiles | 12 years ago | |
random | 14 years ago | |
rfm12 | 13 years ago | |
scripts | 11 years ago | |
scrolltext | 12 years ago | |
simulator | 11 years ago | |
smallani | 14 years ago | |
uart | 13 years ago | |
.gitignore | 12 years ago | |
.travis.yml | 11 years ago | |
Doxyfile | 13 years ago | |
Makefile | 11 years ago | |
Makefile-old | 13 years ago | |
README.md | 11 years ago | |
avr5.x | 16 years ago | |
config.h | 13 years ago | |
config.in | 12 years ago | |
defaults.mk | 11 years ago | |
depend.mk | 16 years ago | |
display_loop.c | 12 years ago | |
display_loop.h | 16 years ago | |
eeprom_reserve.c | 16 years ago | |
ioport.h | 14 years ago | |
main.c | 13 years ago | |
makros.h | 16 years ago | |
pixel.c | 14 years ago | |
pixel.h | 12 years ago | |
rules.mk | 12 years ago | |
util.c | 12 years ago | |
util.h | 16 years ago |
README.md
Borgware-2D
Firmware for AVR based two-dimensional LED matrices, especially the Blinken Borgs from Das LABOR. Main platform is the Borg16 construction kit. Other supported platforms are the LED Brett projector from Hackerspace FFM or the ELO Ping-Pong Board.
Animations
Games
- Tetris
- Classic: Standard Tetris Clone
- First Person Tetris: Rotate the bucket instead of the Tetromino.
- Bastet: Dices the worst the possible Tetromino the whole time.
- Snake
- Breakout
- Space Invaders
Build
Supported build platforms are Linux, FreeBSD and Windows (via Cygwin). Due to customized linker scripts, simulator support is currently limited to x86 and x86_64 archs. Following dependencies have to be met:
Linux / FreeBSD
Package names are based on Debian/Ubuntu repositories. Please adapt the names according to your Linux distribution (or FreeBSD for that matter).
- build-essential (pulls in an ordinary gcc build tool chain for the host)
- make (gmake on FreeBSD)
- libncurses5-dev
- gcc-avr
- avr-libc
- binutils-avr
- avrdude
- freeglut3-dev
Windows
- WinAVR (includes avr-gcc and avrdude)
- Cygwin(64)
- make
- gcc-core
- libncurses-devel (Cygwin)
- libncursesw-devel (Cygwin64)
- libusb-win32 if you want to use your USBasp programmer device with avrdude on Windows
Configure
Open a (Cygwin) terminal, change to your checkout directory and type:
make menuconfig
This starts a curses based text interface for configuring certain aspects of your target platform. Be careful if you use an IDE like Eclipse to manage the build, as integrated terminal emulators tend to choke on curses generated shell output. Make sure that 'make menuconfig' has been run at least once in an ordinary terminal emulator after a fresh checkout or after issuing 'make mrproper'.
Compile
To build for the actual target platform, just type:
make
If you want to test and debug your code within a GUI application, you can use the simulator:
make simulator
In case you build on FreeBSD, just use 'gmake' instead of 'make'.
You can start the simulator by typing ./borgsim(.exe)
Simulator Handling
Please keep in mind that the simulator is NOT an emulator. All it does is compile the source to a native host application so you can step through your C-Code. The GUI thread reads the simulated frame buffer every 40ms and draws its contents.
Joystick directions are simulated by the WASD keys and SPACE acts as the fire button. The OpenGL based simulator (Linux/FreeBSD) enables you to adjust the viewing angle of the LED matrix via the arrow keys (not available on Windows).