Troubleshooting: Difference between revisions

From Uzebox Wiki
Jump to navigation Jump to search
(New page: ===No image and High pitch noise=== * There's nothing in the screen or bunch of random lines/dots appears * The sound is a horrible high pitched noise out the speaker Insure *only* these...)
 
No edit summary
 
(22 intermediate revisions by 4 users not shown)
Line 1: Line 1:
===No image and High pitch noise===
==EUzebox image and color problems==
Some European TV have issues withe the NTSC signal timing used by the Uzebox kernel. Here's a compilation of the models known to have issues:
* Philips 40PFL8664H : Whole picture slowly drift to all red.
 
==No image and no sound==
Insure the composite audio/video outputs to your TV are not inversed.
 
==No image and High pitch noise==
* There's nothing in the screen or bunch of random lines/dots appears
* There's nothing in the screen or bunch of random lines/dots appears
* The sound is a horrible high pitched noise out the speaker
* The sound is a horrible high pitched noise out the speaker




Insure *only* these fuses are activated:
Mega644s ships with CKDIV8 AND JTAGEN activated and *must* be uncheked/unprogrammed. CKDIV8 internally divides the master clock by 8, so your Uzebox runs at 3.57Mhz. No chance it will generate video with that! Also JTAGEN activates the debug port, which is on the VIDEO DAC port and will screw up some color component if left active.


-BODLEVEL2
Insure *only* these fuses are written (this means checked in AVRStudio) (written fuse=0, unwritten fuse=1):
-BODLEVEL1
-BODLEVEL0
-EESAVE


'''IF''' you are using a crystal:
''' IF''' you are using a crystal:
-CKSEL2
-SPIEN (pre-written in the factory)
-CKSEL1
-EESAVE
-CKSEL0
-CKSEL3
-SUT0
-SUT1
-These fuses correspond to a setting of 0xD7 for lfuse and 0xD7 for hfuse


'''IF''' you are using an oscillator module:
'''IF''' you are using an oscillator module:
(TBD)
-SPIEN (pre-written in the factory)
-EESAVE
-CKSEL0
-CKSEL1
-CKSEL2
-CKSEL3
-SUT0
-SUT1
-These fuses correspond to a setting of 0xC0 for lfuse and 0xD7 for hfuse


EESAVE preserves the eeprom between flash writes (will be useful later on). CKSEL=0111 SUT=01 starts with a full swing oscillator 16K delay+0ms.
EESAVE preserves the eeprom between flash writes (will be useful later on). CKSEL=0111 SUT=01 starts with a full swing oscillator 16K delay+0ms.
Mega644s ships with CKDIV8 AND JTAGEN activated and must be uncheked. CKDIV8 internally divides the master clock by 8, so your Uzebox runs at 3.57Mhz. No chance it will generate video with that! Also JTAGEN activates the debug port, which is on the VIDEO DAC port and will screw up some color component if left active.
 
==Game loader says "SD Init fail" or shows no games==
You are able to access the game loader but it says "SD Init fail". This is usually a hardware problem due to cold solders.
 
* Confirm the card still work. Insert the card in your computer and check you can see the files.
* Clean the contacts and plug/unplug the card a few times
* If the card is not straight from the Uzebox kit, insure it is a regular SD card (not SDHC) and not fragmented. The game loader does not (yet) support fragmentation. Backup the game then format in *FAT16* then recopy all games.
* Verify the resistors on SD card's voltage divider have the right values. If those are wrong, desolder and put in the correct ones. If those are right, then go to next step.
* Check for cold solder joints. You can quickly touch a hot iron to pins related to the SD card(or anything where the solder is not shiny indicating a bad joint) and they should remelt.
* If all of that is good, then a multimeter in continuity mode will be needed. Basically you can check from point to point, from the '644 pin to the resistors, from the end of the resistors to the pins on the SD socket to find where it is open. I had once where I held too long on the pins for the SD socket, and screwed up the socket itself, but hopefully that is not the case here. If there is contact and correct resistance along the path from the '644 pins to the SD card, it will work.
 
==Colors are weird or missing (i.e. green)==
Insure the JTAG fuse is not programmed since it activates the debug interface on some pins of PORTC.
 
==The video signal on the S-video output exhibits a "checker board" pattern.==
This is most probably a ground problem. Ensure the S-video connector's metal casing is soldered to your ground plane.
 
==Weird graphics glitches or random crashes when using different optimization level==
Insure you *always* clear r1 before calling C routines from assembler functions otherwise, results can be unpredictable.
 
==During compilation, receiving error:'variable' undeclared (first use in this function)==
Some kernel functions or variables exists only when certain compile switch are defined in your makefile. For instance, trying to use the "sprites" struct when using video mode 1 (-DVIDEO_MODE=1) will result in the following compilation error:
 
error: 'sprites' undeclared (first use in this function)
 
This happens because video mode 1 does not support sprites, hence to save memory the sprites variable is not declared.
 
==Simulator in AVRStudio 4 crashes with GCC 4.8+==
In the makefile, add:
CFLAGS+= -gstrict-dwarf
ASMFLAGS+=-Wa,-gstrict-dwarf

Latest revision as of 04:16, 29 March 2017

EUzebox image and color problems

Some European TV have issues withe the NTSC signal timing used by the Uzebox kernel. Here's a compilation of the models known to have issues:

  • Philips 40PFL8664H : Whole picture slowly drift to all red.

No image and no sound

Insure the composite audio/video outputs to your TV are not inversed.

No image and High pitch noise

  • There's nothing in the screen or bunch of random lines/dots appears
  • The sound is a horrible high pitched noise out the speaker


Mega644s ships with CKDIV8 AND JTAGEN activated and *must* be uncheked/unprogrammed. CKDIV8 internally divides the master clock by 8, so your Uzebox runs at 3.57Mhz. No chance it will generate video with that! Also JTAGEN activates the debug port, which is on the VIDEO DAC port and will screw up some color component if left active.

Insure *only* these fuses are written (this means checked in AVRStudio) (written fuse=0, unwritten fuse=1):

IF you are using a crystal:

-SPIEN (pre-written in the factory)
-EESAVE
-CKSEL3
-SUT1
-These fuses correspond to a setting of 0xD7 for lfuse and 0xD7 for hfuse

IF you are using an oscillator module:

-SPIEN (pre-written in the factory)
-EESAVE
-CKSEL0
-CKSEL1
-CKSEL2
-CKSEL3
-SUT0
-SUT1
-These fuses correspond to a setting of 0xC0 for lfuse and 0xD7 for hfuse

EESAVE preserves the eeprom between flash writes (will be useful later on). CKSEL=0111 SUT=01 starts with a full swing oscillator 16K delay+0ms.

Game loader says "SD Init fail" or shows no games

You are able to access the game loader but it says "SD Init fail". This is usually a hardware problem due to cold solders.

  • Confirm the card still work. Insert the card in your computer and check you can see the files.
  • Clean the contacts and plug/unplug the card a few times
  • If the card is not straight from the Uzebox kit, insure it is a regular SD card (not SDHC) and not fragmented. The game loader does not (yet) support fragmentation. Backup the game then format in *FAT16* then recopy all games.
  • Verify the resistors on SD card's voltage divider have the right values. If those are wrong, desolder and put in the correct ones. If those are right, then go to next step.
  • Check for cold solder joints. You can quickly touch a hot iron to pins related to the SD card(or anything where the solder is not shiny indicating a bad joint) and they should remelt.
  • If all of that is good, then a multimeter in continuity mode will be needed. Basically you can check from point to point, from the '644 pin to the resistors, from the end of the resistors to the pins on the SD socket to find where it is open. I had once where I held too long on the pins for the SD socket, and screwed up the socket itself, but hopefully that is not the case here. If there is contact and correct resistance along the path from the '644 pins to the SD card, it will work.

Colors are weird or missing (i.e. green)

Insure the JTAG fuse is not programmed since it activates the debug interface on some pins of PORTC.

The video signal on the S-video output exhibits a "checker board" pattern.

This is most probably a ground problem. Ensure the S-video connector's metal casing is soldered to your ground plane.

Weird graphics glitches or random crashes when using different optimization level

Insure you *always* clear r1 before calling C routines from assembler functions otherwise, results can be unpredictable.

During compilation, receiving error:'variable' undeclared (first use in this function)

Some kernel functions or variables exists only when certain compile switch are defined in your makefile. For instance, trying to use the "sprites" struct when using video mode 1 (-DVIDEO_MODE=1) will result in the following compilation error:

error: 'sprites' undeclared (first use in this function)

This happens because video mode 1 does not support sprites, hence to save memory the sprites variable is not declared.

Simulator in AVRStudio 4 crashes with GCC 4.8+

In the makefile, add:

CFLAGS+= -gstrict-dwarf
ASMFLAGS+=-Wa,-gstrict-dwarf