Just got a Uzebox! Need help with setup.

What is a Uzebox? How can I get one? Check here!
Post Reply
User avatar
PitfallJones
Posts: 39
Joined: Mon Aug 16, 2010 12:01 am

Just got a Uzebox! Need help with setup.

Post by PitfallJones »

Hi,

Well I finally did it and got myself a Sparkfun Uzebox!
Thanks for Uze with his advice about getting a STK500 programmer - that wasn't initially clear to me that one was necessary.

I've been waiting all year it seems for one to become available - then the price was putting me off - but I took the plunge after the number left at Sparkfun was down to one!

Anyway I'm rather ignorant about hardware stuff so some help would be appreciated - here's some questions:

(1)
I've got the STK500 USB programmer:
AVR-ISP500.jpg
AVR-ISP500.jpg (51.45 KiB) Viewed 7646 times
http://www.sparkfun.com/products/8702

I'm assuming I connect it's 6 pin header to the 6 pin connector on the Uzebox - but the smaller cable does not have line 1 marked in red so which way round do I connect it?

There's a raised tab on one side on the connector - does that face the red AVcore or away from it?


(2)
sk500.jpg
sk500.jpg (49.56 KiB) Viewed 7540 times
In AVR Studio it comes up with the HW Settings tab - what values am I supposed to fill in for the voltage and clock settings?

(3)
prog_flash.jpg
prog_flash.jpg (75.75 KiB) Viewed 7597 times
To run a game I'm guessing I use the program tab to flash a .hex file onto it and the it just works.
Should I Erase Device first, or should I use the elf box instead and what are the Fuses and Lockbits settings (I saw those mentioned somewhere on these forums).

(4)
Is there a more straightforwards method of just copying games onto a sd card and running them from there, instead of using the programmer everytime.

(5)
Are there any power-on sequences needed like - power on the uzebox first and then connect the usb programmer or visa versa?

Thanks for any help

- PJ
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Just got a Uzebox! Need help with setup.

Post by uze6666 »

Hi PJ,

I'm at work now so I can't answer the hardware questions. Here's some other answers in the mean time:
(3)
To run a game I'm guessing I use the program tab to flash a .hex file onto it and the it just works.
Should I Erase Device first, or should I use the elf box instead and what are the Fuses and Lockbits settings (I saw those mentioned somewhere on these forums).
Exact, simply select a HEX file to program stuff on the chip. Devices must always be erased first. Don't change fuses settings unless you know what you are doing or you can brick your AVCore for good!! Fuses on the AVCore are correctly preset at the factory.
(4)
Is there a more straightforwards method of just copying games onto a sd card and running them from there, instead of using the programmer everytime.
Absolutely! You simply flash the gameloader and then put .UZE files on the microSD card and voila. Check out this post for details.
(5)
Are there any power-on sequences needed like - power on the uzebox first and then connect the usb programmer or visa versa?
There no specific order required. Sometime you may need to remove the SD card and reset the Uzebox before you are able to reflash the 644.
User avatar
PitfallJones
Posts: 39
Joined: Mon Aug 16, 2010 12:01 am

Re: Just got a Uzebox! Need help with setup.

Post by PitfallJones »

Thanks for the reply - most helpful.
I've got it flashing successfully now - the raised tab faces the AVcore. (So pin1 is on the same side on both cables).
Unfortunately most programs boot but appear to freeze up (like Tetris, Arkanoid) - I'm guessing there's something wrong with the joystick.
ESD Attack is one of the few programs to actually run but that doesn't respond to joystick input either.
I've modified the hello world program to print the button state and I'm just getting FF.
I'll have to wait till this evening to try another joystick....
- PJ
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Just got a Uzebox! Need help with setup.

Post by uze6666 »

Glad to hear that you got flashing to work. If you bough one of those cheap SNES second market controller (like those from Sparkfun), it would not surprise me if it was dead on arrival. Check out the Uzebox Controller Tester app, to get a more exhaustive testing of the controller/ports. Be sure to plug a controller in the left socket (player 1 port), or certain older games will freeze or reset. Getting a good 'ol original Nintendo SNES controller is definitively worth the 10$ on Ebay! :)

-Uze
User avatar
PitfallJones
Posts: 39
Joined: Mon Aug 16, 2010 12:01 am

Re: Just got a Uzebox! Need help with setup.

Post by PitfallJones »

Success and failure!

That joystick test program is great!

I did indeed buy a Sparkfun clone controller but there's nothing wrong with that - it seems that there is something wrong with port#0 - the program thinks a mouse is connected even when nothing is in the port. I've got a real SNES controller as well and the result is the same.

But I have managed to play a game now - I recompiled Donkey Kong to use port#1 and it works great - this Uzebox is terrific and it's much smaller than I imagined.

So I'm now wondering what could be broken - the AV core or the baseboard? - they both look fine - could you suggest anything I could try to test / fix it?

- PJ
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Just got a Uzebox! Need help with setup.

Post by uze6666 »

If you know your joypads are fine, getting 0xff can be some defect with the data/latch/clock lines of port #0. Unless you have a scope or logic analyaer it's hard to troubleshoot. :( What suck if it's broken and return it to sparkfun, you never see another one again since they are out of stock! As a quick check, inspect the connector's pins to see if there's one broken or if there's a cold solder.
User avatar
PitfallJones
Posts: 39
Joined: Mon Aug 16, 2010 12:01 am

Question about the sd card bootloader

Post by PitfallJones »

Yeah I saw Sparkfun were out of stock now - but at least I can use it for the time being with Joystick#B.

All I have is a multimeter, the board looks good - I'll email you a photo of it and you can see is anything looks bad.

In the meantime I'm going to flash the bootloader so I can use the sd card.
(I tired it without doing that fuse thing and the Uzebox was just a black screen)

I guess I'll have to make sure I change the bootloader code to use Joystick#B first. (It didn't seem to work in the emulator, nor does that joystick test program)

Regarding that setting the fuse business - is they are way to revert the Uzebox back to work without a bootloader later?

What is a fuse anyhow?

- PJ
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Just got a Uzebox! Need help with setup.

Post by uze6666 »

I guess I'll have to make sure I change the bootloader code to use Joystick#B first. (It didn't seem to work in the emulator, nor does that joystick test program)
Unfortunately, yes and also recompile all the games. On the bright side, you check out the latest code, modify the kernel and use the global make script to compile all demo games at once.
Regarding that setting the fuse business - is they are way to revert the Uzebox back to work without a bootloader later?
Sure, you simply uncheck the BOOTRST fuse.
What is a fuse anyhow?
INsure BOOTSZ is set to 2048 words and BOOTRST is checked and hit "Program".
Image

-Uze
Post Reply