JuiceBox Game of Life
After writing the game itself for the first time on my computer, I proceeded to clean up some of the LCD Demo Code and then port the Game of Life to the JuiceBox. It uses the whole screen as the grid of cells, and each individual pixel as a cell. The initial grid is randomly generated (although not really random at all, it uses the very psuedo-rand() included in the LCD demo code), and then the generations pass by forever, with 5 milliseconds rest in between. Each pixel changes color (any color but black) when it is replotted, just to make them look cool.
Since births and deaths simultaneously occur in the Game of Life, you can’t modify a grid directly when applying the three rules of the game. Originally I kept a temporary copy grid that would be checked, while the original would be modified. But, due to memory limitations on the JuiceBox itself, I had to rewrite the grids to use a more complex “marked for death/birth†status in the cells. Anyway, it runs perfectly, and it’s pretty cool to watch.
Here is a picture of a sample game, near the beginning:
![]()
Here is it towards the end, when it is rather stable:
![]()
If you want to try it for yourself, here is the elf file that can be downloaded with OCD Commander or similar program to your JuiceBox (given you have a JTAG emulator as well): gol.elf
I take absolutely no responsibility for any damage this software may cause.
I will post the sources shortly…
Next project is learning to use those buttons and I/O ports on this ARM chip.

Sebastian Said,
September 5, 2008 @ 8:58 am
Do you mind posting the source (if you still have it…)?
Thanks!