hdon / avr-light-game
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
Donny Viszneki (author)
Thu Jan 08 06:06:42 -0800 2009
| name | age | message | |
|---|---|---|---|
| |
Makefile | Thu Jan 08 05:58:15 -0800 2009 | |
| |
README | Thu Jan 08 05:58:15 -0800 2009 | |
| |
display-driver.c | Thu Jan 08 05:58:15 -0800 2009 | |
| |
display-driver.h | Thu Jan 08 05:58:15 -0800 2009 | |
| |
header-pin-connector-2.jpeg | ||
| |
header-pin-connector.jpeg | ||
| |
leveldata.c | Thu Jan 08 05:58:15 -0800 2009 | |
| |
leveldump.js | Thu Jan 08 05:58:15 -0800 2009 | |
| |
levels.txt | Thu Jan 08 05:58:15 -0800 2009 | |
| |
snes-ports.jpeg | Thu Jan 08 06:00:02 -0800 2009 | |
| |
snes.c | Thu Jan 08 05:58:15 -0800 2009 | |
| |
snes.h | Thu Jan 08 05:58:15 -0800 2009 | |
| |
wnes.c | Thu Jan 08 05:58:15 -0800 2009 |
README
This game is very simple, and comes with a tool for building your own levels in a text editor. Step on lights to turn them off: that's the entire game. Play with an SNES controller. The display is intended to be a very small (8x8) matrix of LEDs driven by 16 pins (8 anodes and 8 cathodes.) The program model is very rudimentary: no timing functions of the chip are even used. Still, if you are new to microcontroller programming, maybe this would be a fun place to start. I run this game on an ATMega32 at 1MHz using the internal oscillator, although I'm sure other hardware configurations can be made to run the code. Personally I use avr-gcc, avr-libc, and avrdude, but make substitutions as you see fit. Some practical notes: The default configuration places the LED display anodes and cathodes on ports A and C respectively NOT because the letters are intuitive, but because they are on the same side of the ATMega32 (in DIP form factor) and because all eight anode pins and all eight cathode pins are all together, thus making it easier to work with. The program currently disables JTAG to free up four of the I/O pins. If there are any useful parts of this program, it might be the SNES controller bus driver code, or the display driver code, to serve as examples. Hope somebody out there finds the code to be an amusing place to start programming AVR amusements!

