Well, I figured out the problem behind the USB host failing to give the correct connection interrupts - the current draw was too large. The poor 9V battery I’ve been using all this time just couldn’t power the VBUS regulator enough for the USB memory stick, and so the VBUS levels were dropping below the minimum threshold. I’m damned glad I have a JTAG for all this - without being able to see the VBUS error bit set it would have been a needle in a haystack search.
Don’t know what a JTAG is? Here’s an article I wrote about the official Atmel AVR development tools.
Now that I’m getting the connection interrupts, it should be straight forward (if time-consuming) to finish off the host Chapter 9 code and get the host mode in a near-complete state.
As for University, I’m working on a new project. Since the 3D Java code, I’ve since ported the code to VB.NET, as well as to C (with the GDK toolkit for window management on Linux). The latter project was a disaster - horrible performance and very hard to use API.
To break from the graphics mold, I then coded up a rudimentary game of snake, which utilized an experimental linked list library I coded up in Java. That worked well, but I never got to finish it before coming up with my latest idea - a space game!
Actually, a space game with a difference. With the framework almost done, the game should be quite interesting, as no human interaction is possible. The framework allows for multiple ships with multiple teams to be created, each driven by a different AI module. That allows myself (and a few fellow Uni friends) to code up AI modules and pit them against one-another.

The graphics front-end is completely decoupled from the game back-end, so for accelerated testing the game backend can be driven by a graphics-less console front-end. The best way to get an accurate measurement of one AI module’s performance over another is to make the computer play many, many rounds and check the win totals, so that’s what will happen in the end. For now, the graphical, slowed down front-end serves as a great debugging aid.
Recent Comments