13.03.2013 Views

Hacking the Xbox

Hacking the Xbox

Hacking the Xbox

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

248<br />

<strong>Hacking</strong> <strong>the</strong> <strong>Xbox</strong>: An Introduction to Reverse Engineering<br />

what to expect, but enlightenment only comes after you have read <strong>the</strong><br />

component data sheets. The more you understand about a system, <strong>the</strong><br />

easier it will be to figure out why things went wrong. Keep notes as you read<br />

more about <strong>the</strong> system, and think to yourself about ways problems might<br />

express <strong>the</strong>mselves if something did go wrong. It also helps to have seen<br />

o<strong>the</strong>r systems that are similar to <strong>the</strong> one you are trying to fix, and it helps to<br />

have an understanding of <strong>the</strong> <strong>the</strong>ory of operation.<br />

Observe Symptoms<br />

Bugs manifest <strong>the</strong>mselves through symptoms, and it is up to you to<br />

deduce <strong>the</strong> root cause by observing several symptoms and deducing <strong>the</strong><br />

culprit. A blank screen on a TV that should be showing <strong>the</strong> video output of<br />

your console is an example of a symptom. There are many reasons why<br />

your TV screen could be blank, such as a broken video cable, a broken TV, a<br />

broken video connector, a broken video source, blank media in <strong>the</strong> video<br />

source, or even lack of power to <strong>the</strong> system. As a general rule, you should<br />

observe at least two, preferably three, symptoms that are consistent with a<br />

cause before concluding that you have found <strong>the</strong> root cause. Keep in mind<br />

that <strong>the</strong> most telling symptoms are often not outwardly obvious, and will<br />

require a measurement or an experiment to find <strong>the</strong>m. In <strong>the</strong> example of<br />

our blank TV screen, our measurements are as simple as seeing if <strong>the</strong> power<br />

light on <strong>the</strong> TV turns on, or if sound comes out of <strong>the</strong> TV without <strong>the</strong><br />

video.<br />

The basic strategy for debugging is to start with an obvious symptom and<br />

isolate various parts of <strong>the</strong> system to determine which part is <strong>the</strong> immediate<br />

cause of <strong>the</strong> symptom. An immediate cause is defined as something that<br />

directly impacts <strong>the</strong> observed symptom. Immediate causes for video failure<br />

on a TV are lack of a signal to <strong>the</strong> TV, a broken TV, or lack of power; nonimmediate<br />

causes would be a hardware failure in your video source or <strong>the</strong><br />

phase of <strong>the</strong> moon. In o<strong>the</strong>r words, given symptom A, think of all <strong>the</strong><br />

possible immediate causes X, Y, and Z, and <strong>the</strong>n test each to determine<br />

which is <strong>the</strong> actual cause. Once you have isolated <strong>the</strong> problem, think about<br />

what might have caused it to fail and repeat <strong>the</strong> process until you have<br />

discovered <strong>the</strong> root cause.<br />

Isolating <strong>the</strong> cause of bugs can be facilitated by <strong>the</strong> use of known good<br />

references. In our example, you can eliminate <strong>the</strong> TV as a source of failure by<br />

feeding it a signal from a known good DVD player. In order for a known<br />

good reference experiment to be valid, you must keep everything constant<br />

except for <strong>the</strong> piece you are replacing with <strong>the</strong> reference. Plugging <strong>the</strong> good<br />

DVD player into a different input from <strong>the</strong> consoles’ on <strong>the</strong> TV will only<br />

tell us that <strong>the</strong> display part of <strong>the</strong> TV works. The path from <strong>the</strong> console<br />

input to <strong>the</strong> TV is not tested. A proper execution of <strong>the</strong> experiment would<br />

plug <strong>the</strong> DVD player into <strong>the</strong> video input used by <strong>the</strong> console.<br />

This kind of paranoia or inherent mistrust of <strong>the</strong> system becomes very<br />

important when tracing down subtle hardware bugs. Do not take any<br />

factor for granted that could affect <strong>the</strong> system you are observing, and

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!