Gamebuino Stopped Working, Tried Solutions. Help.

For problems with Gamebuino itself, NOT your project

Gamebuino Stopped Working, Tried Solutions. Help.

Postby ArcticJag » Mon Aug 04, 2014 11:54 pm

So it's the basic Gamebuino problem that I am seeing a lot of people having. The screen shows nothing and no sounds are being made. My Gamebuino worked fine for about a a couple of minutes in which i played Snake. Then I turned it off and tried turning it back on. That's when the screen just didn't work. Every so often I will get a random black or gray rectangle. I tried holding C and that wouldn't work. Then I went I tried charging it for a while and that didn't work either. After that I tried uploading the LOADER file through the Arduino software. But it wouldnt even come up with the serial port. I did everything else correct (I'm pretty sure.) such as downloading the drivers, and editing/adding texts and files. It just wouldn't show up with a serial port for the Gamebuino. (It's on when I plug it in to the computer.) At one point a serial port entitles "COM3" showed up and I tried that but it would always fail at the very end of the upload. So yeah, that's it right now. Any solutions would be great. Thanks.
User avatar
ArcticJag
 
Posts: 7
Joined: Mon Apr 21, 2014 1:46 am
Location: United States, Texas

Re: Gamebuino Stopped Working, Tried Solutions. Help.

Postby 94k » Mon Aug 04, 2014 11:58 pm

What OS are you running, if you're on linux (or some derivate), could you post the output of
Code: Select all
dmesg | tail

after connecting the gamebuino and after disconnecting it again?
Last edited by 94k on Tue Aug 05, 2014 1:54 am, edited 1 time in total.
User avatar
94k
 
Posts: 44
Joined: Sun Jul 27, 2014 9:41 pm
Location: Germany

Re: Gamebuino Stopped Working, Tried Solutions. Help.

Postby ArcticJag » Tue Aug 05, 2014 1:48 am

i am not on linux, i am running windows
User avatar
ArcticJag
 
Posts: 7
Joined: Mon Apr 21, 2014 1:46 am
Location: United States, Texas

Re: Gamebuino Stopped Working, Tried Solutions. Help.

Postby ArcticJag » Tue Aug 05, 2014 4:13 am

Okay, so I fixed the problem with Arduino uploading and I can now turn on my Gamebuino and play a couple of games. However sometimes the screen shuts off when i try switching games or press the c button. I have no idea how to fix this.
User avatar
ArcticJag
 
Posts: 7
Joined: Mon Apr 21, 2014 1:46 am
Location: United States, Texas

Re: Gamebuino Stopped Working, Tried Solutions. Help.

Postby jonnection » Tue Aug 05, 2014 6:25 am

Hello Arcticjag

So, I'm gonna tell you what you can really do to fix the problem by taking complete control of your Gamebuino & your destiny by learning to burn the bootloader. Please note that this is just another user commenting, see warning at the end.

In my Arduino-hobbyist opinion:

The problem with the "screen shutting off" as you say, and that pressing the C button does not work comes down to the fact that the bootloader is not doing it's job. The bootloader (a 2kB program residing in the upper end of the atmega program memory space) is supposed to read the LOADER.HEX from the SD card and then flash it into the program memory of the Gamebuino. Sometimes it works, other times it can fail, resulting in the symptoms that you are describing. First thing to do is to download the latest .hex files from Gamebuino github and replace the .hex files on the card with those. Try if this is enough to solve the problem.

For reasons unknown to me (I do not have an authentic Gamebuino to debug) this process of flashing program memory with .hex file from the sd card sometimes fails, leaving you with a partially flashed program in the atmega memory = no response from the Gamebuino. The screen & sounds are not initiated by the bootloader, they are initiated by the LOADER.HEX or the game program. For this reason, if the bootloader fails to flash the program memory, the Gamebuino can not give you indication of what has gone wrong.

You can try the procedures of reloading the HEX files to the SD card, and possibly reformatting the SD card before that, uploading the LOADER.HEX from the Arduino IDE etc as described by Rodot in the Wiki. But my piece of advice to all Gamebuino users is this: if you want to spare yourself from problems, AND learn something cool, I strongly recommend you buy yourself a programmer with which you can re-burn the bootloader. Armed with a programmer and the know-how how to burn the bootloader you will ALWAYS be able to recover your Gamebuino, no matter how badly you mess up. Furthermore, you'll be able to update the Gamebuino firmware on your own, which is insanely cool :D

Now, burning the bootloader is not the same thing as uploading a sketch (=program = game) from the Arduino IDE. Let me explain the difference in detail, for the benefit of everyone:

1) Uploading a sketch from Arduino IDE

When uploading a "sketch" from the Arduino IDE, the Arduino IDE 'talks' with the bootloader that is on the atmega chip. The IDE resets the Gamebuino through the reset line, sends a signal to the bootloader, and then waits for the bootloader to respond with specific id codes. The bootloader sends these codes as serial signal through the USB cable to the IDE. When the IDE receives these codes, it tells the bootloader to begin reprogramming the program space with the code that the IDE will send. Then, the IDE sends the program (basically a .HEX file) through the USB cable to the bootloader, and the bootloader puts it into the program space. The bootloader tells the IDE when it is done with the programming, and the IDE resets the Gamebuino again, after which your game/program begins to run (unless you are pressing C).

2) Burning a bootloader from Arduino IDE

Burning a bootloader, on the other hand, is more complicated. This is because the IDE can not use the USB cable to communicate with the bootloader. Why ? Because the IDE wants to OVERWRITE the bootloader with a new bootloader. Therefore, you need some other means to do the programming.

What you need is one of these (if you want to do it the cool geeky way):
http://www.ebay.com/itm/USBASP-USBISP-AVR-Programmer-USB-10-Pin-Convert-to-Standard-6Pin-Adapter-Board-/180980285082?pt=LH_DefaultDomain_0&hash=item2a2343fe9a

This device (a USBASP programmer) only costs around 5-6 USD (4 €) shipping included and it connects between a USB port on your computer and the ICSP connector on your Gamebuino (CHECK THAT YOU PUT ICSP CABLE RIGHT WAY AROUND, OR YOU CAN DAMAGE YOUR 'BUINO) . You can ALSO use another Arduino board to do this (google: "Arduino as ISP") but I find having a cheap dedicated programmer is just a lot easier.

To burn a bootloader, you select your board type (Gamebuino) from Tools-Board in the Arduino IDE. You then select the programmer type from Tools-Programmer. Serial port is irrelevant in this case. Note that in Windows you might need a driver for the USBASP, not sure since I use Linux. MAKE A NOTE of what was your default programmer, probably AVRISP MK II. You need to switch back to this programmer before you can upload another program later on. Finally, you choose "Burn bootloader" from the tools menu, and wait for the IDE to tell you it has burned the bootloader.

Now, you can try to re-burn the original Gamebuino bootloader. Sometimes this will fix the problem (again for a reason I do not understand).
Alternatively, you can try my experimental bootloader (remember to keep a copy of the original bootloader). To do this, replace the Gamebuino_boot.hex in the Arduino/hardware/bootloaders/Gamebuino folder with the file I have supplied here:

https://drive.google.com/file/d/0BweEjvtKj1KLMnMxNHFlSnZYN2s/edit?usp=sharing

You can find an explanation of what it is in this thread:

http://gamebuino.com/forum/viewtopic.php?f=12&t=932

WARNING: I'm just another user, doing what I have described here may void your warranty ! This was an explanation of what is going on in my opinion and how to fix it if you really want to learn how to master the Arduino tools. PROCEED AT YOUR OWN RISK or work it out with Rodot if you feel unsure about this.

PS: even if you do re-burn the bootloader, it is still a good idea to replace the HEX files on the SD card with the latest versions from the Gamebuino github repository. This is because it is possible that the .HEX files have been corrupted. So: 1) replace HEX files on SD card with latest, try if works. If not 2) re-burn bootloader . This should give you a 100% working Gamebuino in any circumstance.
User avatar
jonnection
 
Posts: 317
Joined: Sun May 04, 2014 8:21 pm

Re: Gamebuino Stopped Working, Tried Solutions. Help.

Postby ArcticJag » Wed Aug 06, 2014 1:55 am

Wow, thanks for the essay! :D Must have taken a bit of your time to type all of that. I learned a lot. Is there an alternative way to burn the bootloader without the aid of a programmer?
User avatar
ArcticJag
 
Posts: 7
Joined: Mon Apr 21, 2014 1:46 am
Location: United States, Texas

Re: Gamebuino Stopped Working, Tried Solutions. Help.

Postby DFX2KX » Wed Aug 06, 2014 3:44 am

ArcticJag wrote:Wow, thanks for the essay! :D Must have taken a bit of your time to type all of that. I learned a lot. Is there an alternative way to burn the bootloader without the aid of a programmer?

That, or using another Arduino as a programmer are your only options. Because the bootloader handles all USB traffic. If you're writing to that program, you're not going to be able to use the USB you're trying to write with.

It's handy to have a programmer to keep things up to date... The only thing I'm not sure about is the orientation of the SPI/programmer port on the side of the buino.
DFX2KX
 
Posts: 250
Joined: Mon Apr 14, 2014 3:48 am

Re: Gamebuino Stopped Working, Tried Solutions. Help.

Postby rodot » Wed Aug 06, 2014 9:41 am

DFX2KX wrote:The only thing I'm not sure about is the orientation of the SPI/programmer port on the side of the buino.

The square pad with a black dot next to it is the pin number 1
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France


Return to Installation & Troubleshooting

Who is online

Users browsing this forum: No registered users and 4 guests