
How I Fixed a 10-Year-Old Guitar Hero Bug Without the Source Code [video] - adamnemecek
https://www.youtube.com/watch?v=A9U5wK_boYM
======
btown
An amazing technical accomplishment, and in addition, I love this teaching
style. Doesn't assume any level of knowledge of reverse engineering, but moves
quickly enough to be a teaser, not a tutorial. Visuals are painstakingly put
together, with supplementary information flashed on the screen. A sense of
humor throughout. If I were teaching a CS class, this would be a great thing
to play.

This also demonstrates how much "human working memory" reverse engineering
requires. No matter how much the tools try to assist, you need a tremendous
amount of context to be able to make sense of what you're seeing. Really
impressive work.

------
Zekio
Man do I feel stupid every time I watch something like this

~~~
adamnemecek
Don't. Been there, done that, it's counterproductive. You have to realize that
the OP has probably put hundreds to thousands of hours into reverse
engineering (it's a skill just like any other) and therefore he can do
something like this quickly. But note that what he's doing isn't like next
level stuff. It's like someone being impressed with someone playing "Fur
Elise" (i.e. a task that anyone who's spent even a couple months doing it will
be able to accomplish).

Check out [https://godbolt.org/](https://godbolt.org/), you'll learn some
assembly.

~~~
jamesu
As an example, I once reverse engineered encryption for data files in a game.
Took me about three weeks to determine which encryption algorithm was being
used, and what the key was (including learning some ARM along the way).

But I was fortunate in that I could run the game in the debugger and see what
was happening, the path from reading the data to decrypting it was rather
simple to figure out, and the algorithm was pretty easy to spot. If I were to
reverse engineer the actual asset formats I'd imagine it would take months as
you need to know how everything is tied together in order to make sense of
what is happening. It looks like in the case of guitar hero, this guy has
spent an extortionate amount of time reverse engineering everything.

------
romeoEtJoliet
Does anyone have any recommendations for YouTube channels that focus on
reverse engineering?

~~~
joshschreuder
LiveOverflow seems to be well regarded

[https://www.youtube.com/channel/UClcE-
kVhqyiHCcjYwcpfj9w/vid...](https://www.youtube.com/channel/UClcE-
kVhqyiHCcjYwcpfj9w/videos)

------
alva
Fantastic, entertaining editing for what can sometimes be a dull topic to
watch!

~~~
Tempest1981
Fast paced and captivating. And the surprise ending, which turns from sweet to
bittersweet, after what must have been weeks and weeks of work.

------
kihadi
i wish i loved something or someone like this fella loves his guitar hero.

~~~
rootsudo
I wonder how some people have this sort of passion too.

------
tejasmanohar
Captivating! Anyone have other recommendations for blogs, YouTube channels,
etc. about reverse-engineering cool stuff?

~~~
chrsstrm
This video [0] has definitely made the rounds here before, discussing how to
complete a level in Super Mario 64 with less than 1 full A press and in the
process discovering parallel universes in the map.

[0]
[https://www.youtube.com/watch?v=kpk2tdsPh0A](https://www.youtube.com/watch?v=kpk2tdsPh0A)

------
zapperdapper
This was fascinating and I have to admire the guy's reverse engineering
skills. Very nice tool set up and crazy screen resolution!

------
bhhaskin
Thank you for posting this. It was very interesting to watch. I love seeing
other areas of CS that I don't get to touch in my daily job.

------
lousken
Another reason to hate DRM. Not only it doesn't work but it makes custom
fixing harder.

------
hardlianotion
I must admit my initial reaction was "What - Guitar hero is 10 eyears old
already?"

Very nice video.

~~~
SimbaOnSteroids
Not just Guitar Hero, Guitar Hero III. Guitar Hero is almost 12 years old.

------
k__
Guitar Hero is 10 years old?!

~~~
Vilkku
That's Guitar Hero 3, released in 2007, so yes, 10 years old. The original
Guitar Hero is a couple of years older (released in 2005).

~~~
k__
Ah sorry, I was thinking about Rocksmith.

------
carlmungz
Loved this!

------
rljy
I'd like to see more of this on HN, actually interesting technical content.
The video is amazingly well put together. I don't know if it is sped up or
not, my only experiences with windows now adays are through my non-technical
relatives computers which I'm asked to fix, but I was surprised at how quick
windows appears to be in this video.

But what bothers me, is the bug itself. It is shocking to me that someone set
a hard limit on a pool and didn't add any code for replenishing it. I would
just never do such a thing.

One of the first programming environments that I used was MicroWorlds LOGO,
and they had a cheaper version which allowed a maximum of 200 turtles, and a
more expensive version that differed only in that the number of turtles was
unlimited. My father got me the cheaper one and since then I've had a
religious hatred of arbitrary limits in programs. But even if you didn't have
this experience, I'd have a hard time respecting any programmer who would have
left that pool unreplentished and called it a finished project. I accept the
fact that we all make mistakes and make bugs, but that wasn't a mistake bug,
that was consciously sucking out of laziness and not even bothering to
gracefully handle failure.

~~~
teej
This limit is anything but arbitrary. There's a few things to keep in mind:

\- This code was written for the XBox 360 which only has 512MB of memory.

\- Because the game was made for a console, it needs to go through the
notorious Xbox certification process. This involves running the game for hours
at a time at maximum load to ensure no memory leaks exist and that the game
runs at a consistent 60 fps.

\- Games are not the same as long-living applications. They are made on a
project basis. There are constant trade-offs where good enough is the correct
decision.

\- This is a port, so there's care to be taken in reducing the footprint of
changed code.

It's unfortunate that this particular bug wasn't found before release but I
think the root cause wasn't necessarily this pool size being low but instead
insufficient testing.

~~~
to3m
I worked on an Xbox title many years ago, when I was still a bit
inexperienced, and one of the requirements was that it had to run the attract
mode for a _week_ without fucking up. The other guy working on it was even
worse than me, so no prizes for guessing who ended up sorting that out. And
what a huge pain it was!

There was nothing awfully wrong with the code, sure, much of which had been
through numerous PC games, and a lot of which was shared with the PS2
version... but finding all the stuff that wasn't awfully wrong, just a bit
wrong, and wrong enough to cause problems after running it for 3+ days solid,
was surprisingly painful. But I figured it out. Even if I'm not the sharpest
tool in the box, I'm persistent, and I've been served well over the years by
my ability to bring this to bear on whatever problem I'm facing. So I did
that, and it all got fixed, and it shipped like that.

Once it got signed off, I started working on another Xbox title that was
nearing completion. But by the time that one reached the certification stage,
about 3 months later, the requirement had mysteriously changed to just 2 days!
I wonder why...

~~~
smcl
That sounds like a pretty painstaking process, I would've been a bit deflated
after finding the requirement was more than halved after you were done!. BTW
what is meant by "attract mode" ?

~~~
to3m
Attract mode is where a game cycles between front end, intro video, rolling
gameplay demo, and so on:
[https://en.wikipedia.org/wiki/Glossary_of_video_game_terms#A](https://en.wikipedia.org/wiki/Glossary_of_video_game_terms#A)

(I expect what they had in mind was using it in shops, either running in the
shop window, or as part of a counter display, and so on, and that drove the
requirement that it had to run for a week.)

~~~
ballenf
Holdover from the arcade days where games were competing to 'attract' players.

