Introduction
JConsole8 is based on the 32-bit MSP432 MCU. Early in development I realized that out-of-the box TI MCUs are not set to their maximum clock speeds.When I discovered this I made changes to the code in all the previous JConsoles to bump their clock speeds to full. This vastly improved the performance of each JConsole.
JConsole8 was the most successful game system I have ever built and is; to this day; my firmware masterpiece. I took full advantage of the available MSP432 interrupts to create a multi-process architecture. JConsole8 had the following tasks that would run in their own interrupts:
Main Loop: Contained the games, UI and LCD print functions
Joystick Interrupt: This interrupt would fire periodically starting an ADC sequence which would trigger a second interrupt and update the values of the joystick and CDS cell.
Systick Handler: This was set to go off at 1ms intervals providing a common system timer. This was used to time events in the games.
Sound Interrupt: Sound has always been tricky to implement using such low power tools. JConsole3, JConsole4 and JConsole5 simply used the main loop. JConsole6 had sound code built into the Systick interrupt. JConsole8 actually had its own dedicated sound interrupt that would only
fire when the sound system was turned on.
JConsole8 was the most successful game system I have ever built and is; to this day; my firmware masterpiece. I took full advantage of the available MSP432 interrupts to create a multi-process architecture. JConsole8 had the following tasks that would run in their own interrupts:
Main Loop: Contained the games, UI and LCD print functions
Joystick Interrupt: This interrupt would fire periodically starting an ADC sequence which would trigger a second interrupt and update the values of the joystick and CDS cell.
Systick Handler: This was set to go off at 1ms intervals providing a common system timer. This was used to time events in the games.
Sound Interrupt: Sound has always been tricky to implement using such low power tools. JConsole3, JConsole4 and JConsole5 simply used the main loop. JConsole6 had sound code built into the Systick interrupt. JConsole8 actually had its own dedicated sound interrupt that would only
fire when the sound system was turned on.
A Random Problem
Any good game designer will tell you that generating random numbers is very important to a quality game. Random numbers can be used to make events occur spontaneously and that makes games challenging because each time you play things are a little different.
There are a number of approaches to creating random numbers however on an embedded platform it can be quit challenging as the limited resources and limited register sizes make for poor randomness.
I solved the problem very effectively for JConsole. Each JConsole is equipped with a CDS cell connected to an ADC. The light hitting that CDS cell will never be the same from moment to moment on a hand-held platform. Random numbers are collected from the CDS cell at regular intervals and stored in an array, that way if the application pulls multiple random numbers they will not be the same.
There are a number of approaches to creating random numbers however on an embedded platform it can be quit challenging as the limited resources and limited register sizes make for poor randomness.
I solved the problem very effectively for JConsole. Each JConsole is equipped with a CDS cell connected to an ADC. The light hitting that CDS cell will never be the same from moment to moment on a hand-held platform. Random numbers are collected from the CDS cell at regular intervals and stored in an array, that way if the application pulls multiple random numbers they will not be the same.
JConsole8 Demo
Debris Game Demo
Flak Game Demo
Brick Breaker
JConsole8 Pong
Source Code
The JConsole8 source code contains MSP432 drivers for the ILI9341 LCD as well as pixel draw functions. You can view it on GitHub here.