Built the uzebox not sure what to do

What is a Uzebox? How can I get one? Check here!
Post Reply
TonyStarkEE
Posts: 1
Joined: Mon Apr 29, 2013 9:25 pm

Built the uzebox not sure what to do

Post by TonyStarkEE »

Ok, so I've built the Uzebox but now I'm a little confused about what to do next. More specifically, am I supposed to flash the Atmega with the kernel? If so, how? I've read the wiki and the first thing it does is teach me to modify a space invaders game. I am uncomfortable with this because the sample calls some headers and libraries that I'm not familiar with.

My familiarity with C is to call the standard io library, and the avr library.

# include <stdio.h>
# include <avr/io.h>

However, the tutorial starts with

#include <uzebox.h>
#include <avr/pgmspace.h>
#include <string.h>

Additionally, according to : http://uzebox.org/wiki/index.php?title=Hello_World
"In AVR Studio, select Project->Configuration Options. Check the box "Use External Makefile". Click the corresponding "..." button and select your project's Makefile."

But it is recommended to develop with Eclipse, not AVR Studio (6? - current version). Are makefiles specific to the game only? How is the kernel initialized?

I was looking for a first step after building more along the lines of:
1) Connect your ISP to the Uzebox
2) Open the kernel C file
3) Build
4) If Errors.... step 4a)
5) Program to the device

Sorry for being a total noob with this. Thanks!
Image
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Built the uzebox not sure what to do

Post by uze6666 »

It depends what you want to do first. If it's just running games, you can flash the Gameloader bootloader. This will allow you to re flash the mega from games stored on a sd card. You can also use any hex file and flash it directly on the chip. In both cases you'll need Avr Studio or some ISP programmer software like avrdude.

If you are looking to program stuff, the tutorials on the wiki are the best we have so far. I recommended eclipses because it integrates the GNU debugger client and you can debug your games with the Uzebox emulator. You can't do that with Avr Studio, but the latter is easier to get started and also has some simulators which are more precise and better to develop the kernel. You can start with AVRStudio and then move to Eclipse when you get more confortable. I'll see to update the wiki with this.

As for getting started right after building and have the Uzebox work just like the kits I sell:
1)connect AVRISP to the Uzebox and power up
2)open AvrStudio
3)assuming you have a "virgin" atmega644 chip, you'll need to program the fuses: follow these instructions:http://uzebox.org/forums/viewtopic.php? ... 20&start=0
4)download the bootloader hex from same forum topic as 3)
5)program bootloader in AvrStudio, menu should appear on Console
6)put .Uze files on sd card
7)reset console... Voila! :)

Perhaps to clarify things a bit, the kernel is the game engine and doesn't run by its own, it's compiled and Linked to game like a library. Let us know if the preceeding procedure helped you.
Post Reply