Weird Euzebox issue: starts, but no bootloader
Re: Weird Euzebox issue: starts, but no bootloader
Thanks again guys.
@D3thAdd3r, yeah I still can't figure out how the bootloader got corrupted. My understanding was that those that come with kits have the memory where the bootloader resides locked, to prevent overwriting when loading games bigger than 61Kb?
@ry755, that sounds like a great idea! I will give it a go when I get back home. I had some time this morning and I already wired it up (with no other components) to the arduino. Avrdude sees the arduino as a programmer when I use the first command per this post, but it later gives the following error: "Yikes! Invalid device signature."
I'm gonna try with the oscillator and caps and report back. In the meantime if anyone has any other idea I'd be more than grateful!
@D3thAdd3r, yeah I still can't figure out how the bootloader got corrupted. My understanding was that those that come with kits have the memory where the bootloader resides locked, to prevent overwriting when loading games bigger than 61Kb?
@ry755, that sounds like a great idea! I will give it a go when I get back home. I had some time this morning and I already wired it up (with no other components) to the arduino. Avrdude sees the arduino as a programmer when I use the first command per this post, but it later gives the following error: "Yikes! Invalid device signature."
I'm gonna try with the oscillator and caps and report back. In the meantime if anyone has any other idea I'd be more than grateful!
Re: Weird Euzebox issue: starts, but no bootloader
I managed to salvage an oscillator and some caps and just tried connecting it per ry755's suggestion. Still no joy \:
Re: Weird Euzebox issue: starts, but no bootloader
Maybe Hartmut can help at this point since it seems you have exhausted most options. Maybe double check you had all the ISP connections to the right pins on the '644...at least for me I really had some trouble before(breadboard versions) and I just had things hooked wrong going by inaccurate orientation of the ISP socket.
Re: Weird Euzebox issue: starts, but no bootloader
Thanks D3thAdd3r, I'm gonna triple check everything cause I'm out of options right now. I already contacted Harty cause my wife is about to kill me for the mess I've done with all the wires and solder balls lying around in the living room
Re: Weird Euzebox issue: starts, but no bootloader
Looking at the pictures here: https://www.hwhardsoft.de/english/projects/euzebox/ header K2 appears to be an ISP connector. But one picture shows the silkscreen for a 10 pin socket and another shows a 6 pin socket soldered to it.
Here's what it looks like in the schematic:
Try using this instead of taking the chip out. Make sure it's wired correctly though because the schematic has a 6 pin connector but the board has a 10 pin socket.
I don't know if it's actually a 10 pin ISP connector or if you only use the middle 6 pins.
Here's what it looks like in the schematic:
Try using this instead of taking the chip out. Make sure it's wired correctly though because the schematic has a 6 pin connector but the board has a 10 pin socket.
I don't know if it's actually a 10 pin ISP connector or if you only use the middle 6 pins.
- nicksen782
- Posts: 714
- Joined: Wed Feb 01, 2012 8:23 pm
- Location: Detroit, United States
- Contact:
Re: Weird Euzebox issue: starts, but no bootloader
I have seen the 10 pin connector on the ICSP side and the 6 pin connector on the device side.
If you have a proper ICSP then I would suggest that. They are really cheap on eBay (even if knock-offs of the USBASP.) They DO work.
If you want to go the breadboard route be concerned with MISO and MOSI. One talks to the other one.
I have been looking for a picture of a breadboard ICSP I once built but I can't find it. I did use it to program the Uzebox chip though and it worked. Pay attention to MISO/MOSI. That is where I slipped up before I got my breadboard ICSP working.
BTW, I use one of the cheap USBASP now. For ten bucks or so it is totally worth it.
EDIT: To mitigate the issue of the ICSP port orientation, you could use the continuity test of a multi-meter to make sure that the ICSP pin is going to the correct pin on the ATMEGA644. Good luck!
If you have a proper ICSP then I would suggest that. They are really cheap on eBay (even if knock-offs of the USBASP.) They DO work.
If you want to go the breadboard route be concerned with MISO and MOSI. One talks to the other one.
I have been looking for a picture of a breadboard ICSP I once built but I can't find it. I did use it to program the Uzebox chip though and it worked. Pay attention to MISO/MOSI. That is where I slipped up before I got my breadboard ICSP working.
BTW, I use one of the cheap USBASP now. For ten bucks or so it is totally worth it.
EDIT: To mitigate the issue of the ICSP port orientation, you could use the continuity test of a multi-meter to make sure that the ICSP pin is going to the correct pin on the ATMEGA644. Good luck!
Re: Weird Euzebox issue: starts, but no bootloader
Hi!
I suspect that your bootloader might not actually be corrupted, rather one of the followings might apply:
Anyway, if the fuses are wrong, you will have to use an ISP to set them right! By the way I have this programmer: https://www.sparkfun.com/products/9825 , and it works just fine with the E-Uzebox I have. Just mentioning, that I didn't need to do anything to the E-Uzebox to program it (at least with this programmer).
I suspect that your bootloader might not actually be corrupted, rather one of the followings might apply:
- The most probable is that your fuses are wrong: If you become able to read them, check them against this list: http://uzebox.org/wiki/ATmega644_Fuse_Settings , especially the BOOTSZ and BOOTRST fuses. If they are wrong, it could happen that on a clean Uzebox the empty Flash acts as a "NOP slide" on an incorrectly fused ATMega, entering the bootloader initially ("NOP"ing through the entire Flash to reach it), but then once there is a game programmed, you will never be able to reach the bootloader.
- You might be trying to access the bootloader with the wrong controller. Only the first controller works for that!
- Another possibility could be that the controller is somewhat "slow". The bootloader (the 0.4.5 one which you likely have) tries to read it faster than games, and for this, probably with some other factors involved, might cause it being unable to register the held-down button on startup. Try to swap controllers, or if you have any different one somewhere, maybe give it a try.
Anyway, if the fuses are wrong, you will have to use an ISP to set them right! By the way I have this programmer: https://www.sparkfun.com/products/9825 , and it works just fine with the E-Uzebox I have. Just mentioning, that I didn't need to do anything to the E-Uzebox to program it (at least with this programmer).
Re: Weird Euzebox issue: starts, but no bootloader
On some versions of avrdude, after doing something and you get the usual output, the hfuse and efuse labels get swapped. My version of avrdude was compiled before that got fixed so mine has that issue.
It should output something like:
See here: http://www.avrfreaks.net/forum/hfuse-an ... ed-avrdude
(You might have a newer version, so this might not apply to you. I just thought I'd let you know so you wouldn't get confused just incase you have an old version with that typo.)
EDIT: Also, if you're using an Arduino as ISP, use instead of
It helped fix some of the errors I was getting.
Code: Select all
Ryans-iMac:~ ryanstenz$ avrdude -patmega644 -P /dev/cu.usbmodemFD141 -b19200 -cavrisp
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e9609
avrdude: safemode: Fuses OK (H:FF, E:D2, L:D7)
avrdude done. Thank you.
Code: Select all
avrdude: safemode: Fuses OK (E:FF, H:D2, L:D7)
(You might have a newer version, so this might not apply to you. I just thought I'd let you know so you wouldn't get confused just incase you have an old version with that typo.)
EDIT: Also, if you're using an Arduino as ISP, use
Code: Select all
-cavrisp
Code: Select all
-carduino
Re: Weird Euzebox issue: starts, but no bootloader
Guys, you can't believe how thankful I am! IT WORKS!!!!!!!! ry755 extra thanks to you man, for suggesting to burn the bootloader with the chip onboard! It worked first time and without a hitch!
The only think I omitted was to mess with the lock bits after burning the bootloader. I guess I have to be careful not to put any games > 61440Kb.
Again thank you all from the bottom of my heart!
The only think I omitted was to mess with the lock bits after burning the bootloader. I guess I have to be careful not to put any games > 61440Kb.
Again thank you all from the bottom of my heart!
Re: Weird Euzebox issue: starts, but no bootloader
Great! By the way could you recall / reproduce the situation? As far as I see, Arkanoid is smaller than 60K (it is 56K by compiling from the current master), and also the packrom tool which generates the .uze files should refuse to make them larger than 60K. So if it still happened (I don't know whether the 0.4.5 bootloader is adequately protected, the 5.0.09 loader should be), we have some problem somewhere which should be fixed to prevent others bricking their Uzebox.immortalx wrote: ↑Fri Dec 29, 2017 8:37 am Guys, you can't believe how thankful I am! IT WORKS!!!!!!!! ry755 extra thanks to you man, for suggesting to burn the bootloader with the chip onboard! It worked first time and without a hitch!
The only think I omitted was to mess with the lock bits after burning the bootloader. I guess I have to be careful not to put any games > 61440Kb.
Again thank you all from the bottom of my heart!
You may also do a test with this, more than once (I mean load it, let it run to see how it responds, load a game, then load the tester again, see what it does etc). The 0.4.5 bootloader does not guard against bad reads from the SD card, and it seems like it isn't especially uncommon to experience such (not very common either, but happens with some combinations of cards, sockets and soldering). If the card is weak in this regard, you will get randomly failing games (as there is no indication whether the read and program failed in any manner). The tester can reveal if your Uzebox has such problems.