Hacking the Xbox
Hacking the Xbox
Hacking the Xbox
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Appendix E - Debugging: Hints and Tips 249<br />
never, ever ignore an inexplicable or inconsistent behavior, even if it is<br />
intermittent. For example, sometimes a system will work properly or<br />
break if you touch a certain location on <strong>the</strong> circuit board or wave your<br />
hand near a certain area; sometimes a system will demonstrate different<br />
behavior for a brief moment after power-on. It is tempting to write off<br />
such observations as anomalies or trivial occurrences, but <strong>the</strong> fact is that<br />
<strong>the</strong>y did happen and <strong>the</strong>re must be an explanation. One specific example<br />
is touching a circuit board and observing a change in <strong>the</strong> state of <strong>the</strong><br />
system. Where did you touch? How did you touch it? Are your hands<br />
sweaty or dry? When you touch a circuit board, your body acts like a<br />
small capacitance and a large resistance. This can slightly slow down<br />
signals or discharge high-impedance nodes such as an unconnected digital<br />
input. If you pressed firmly on <strong>the</strong> board, you could be flexing <strong>the</strong> board<br />
in such a way that changes <strong>the</strong> electrical properties of a cracked trace or a<br />
bad solder joint.<br />
There are some symptoms that are often times incorrectly interpreted as<br />
causes. A burned-out trace or a damaged component is usually a symptom<br />
and not a cause of <strong>the</strong> problem. In o<strong>the</strong>r words, a malfunction elsewhere in<br />
<strong>the</strong> circuit is usually responsible for <strong>the</strong> failure of a component. Spontaneous<br />
component failure is a relatively rare occurrence. Suppose you are<br />
debugging a broken stereo. You smell something burning coming from <strong>the</strong><br />
stereo, and you see a large resistor that is blackened from overheating.<br />
Chances are that if you just replace that resistor, <strong>the</strong> replacement will just<br />
burn out again. The real cause might be a shorted transistor or a damaged<br />
power supply circuit, but <strong>the</strong>se do not manifest <strong>the</strong>mselves as obviously as<br />
<strong>the</strong> burned out resistor.<br />
Ano<strong>the</strong>r potent observation technique is comparison against a known good<br />
system. If you are trying to debug a broken device, find a working one and<br />
compare voltages and o<strong>the</strong>r operational characteristics between <strong>the</strong> two. If<br />
you are trying to debug your own home-brew system, construct a simulation<br />
of <strong>the</strong> circuit if possible, or find a circuit with a similar design. You can<br />
use <strong>the</strong>se known good systems to quickly isolate anomalous behavior.<br />
Fur<strong>the</strong>rmore, you can induce failures in <strong>the</strong> known good sample in a<br />
controlled fashion to check if you have really found <strong>the</strong> root cause of <strong>the</strong><br />
problem. This technique is particularly applicable to simulated systems.<br />
Common Bugs<br />
The most common source of hardware bugs in home-brew projects are<br />
poor solder joints and improperly installed polarized components, such as<br />
capacitors, diodes, ICs, and connectors. Also, connectors are particularly<br />
notorious sources of failures because <strong>the</strong>y are subjected to <strong>the</strong> most<br />
physical abuse and it is typically difficult to determine if a connector is in<br />
good condition through visual inspection alone. The following is a list of<br />
common bugs, ranked loosely in descending order of popularity.