Romhacking => Newcomer's Board => Topic started by: Omnigamer on May 30, 2011, 01:27:10 am

Title: Hunting for glitches/bugs
Post by: Omnigamer on May 30, 2011, 01:27:10 am
OK, this is a little bit of an odd request, but it seemed like this may be one of the best places to ask.

For a small portion of a project/presentation that I'm working on, I'd like to show that knowledge of the how particular assembly code operates can be used to try to find glitches/bugs. I am specifically referring to integer under/overflows, stack smashing, and other forms of memory corruption. Now, I certainly know it's possible (no such thing as "perfect" code), and there are a variety of glitches documented for a lot of different games, but coming up with a simple correlation between code and an example is turning out to be difficult. Just knowing that a certain subroutine only checks against a ceiling doesn't constitute a bug until there's some in-game method of exploiting it, which is the interesting/creative part. So in the end, I'm looking for any such glitches that have an easily verifiable effect (eg, "negative" values where they shouldn't be, infinite/max <thing> bugs, corrupted graphics, etc) that can fairly simply be related back to how the assembly code operates. I figure that there are plenty of veterans out there that have come across these sorts of things by accident, so if there are any you can share, I'd really appreciate it. In particular I'm focusing on the SNES for this, but I'm interested in hearing anything else you've seen from other platforms. You also don't have to know exactly why the glitch occurs; if you can describe how to reproduce it well enough I can go through and try to figure things out from the machine code.
Title: Re: Hunting for glitches/bugs
Post by: Ryusui on May 30, 2011, 01:30:40 am
Look up the Minus World from Super Mario Bros. and Missingno from Pokémon. These are well-known and well-documented glitches with dramatic effects, the result of garbage data getting loaded due to undefined states.
Title: Re: Hunting for glitches/bugs
Post by: Omnigamer on May 30, 2011, 02:03:13 am
Those are certainly some of the most well-known glitches, but the rest of the project is SNES-specific, so I'd like to find a couple for that platform specifically. Certainly something along those lines would work, but I haven't found any prevalent glitches like it yet so I figured I'd ask around for some not-so-prevalent ones  :)
Title: Re: Hunting for glitches/bugs
Post by: Jorpho on May 30, 2011, 10:28:40 am
There are thorough disassemblies of the arcade Donkey Kong, Pac Man, and Dig Dug kill-screen bugs - but I guess those aren't SNES-specific either.

Have you looked through ?  Maybe the millions-of-points-from-Wrigglers in Super Mario World could qualify?
Title: Re: Hunting for glitches/bugs
Post by: KingMike on May 30, 2011, 12:52:06 pm
The Sketch Bug in FF3 US 1.0, which causes the game to start processing garbage data as program code?
Title: Re: Hunting for glitches/bugs
Post by: Jorpho on May 30, 2011, 11:05:09 pm
But the rest of the project is unique to Sega Saturn, so I want to find a dedicated platform for couples. Of course, things will work in accordance with these principles, but I have not found any glitches yet so widespread like it I think I will ask around some of the less popular...
Dayum, that's some fine autospammin'.
Title: Re: Hunting for glitches/bugs
Post by: Omnigamer on May 30, 2011, 11:19:21 pm
I ended up going through and discussing the Wiggler point bug. For those of you that are curious, jumping on a Wiggler uses a different subroutine than normal enemies and calls the "give points" subroutine after directly loading the number of consecutive enemy bounces in the accumulator. For any other enemy, there is an additional check to keep this capped at 08 (give a 1-up) before jumping into the "give points" subroutine. The subroutine itself is only meant to handle values up to 0A, so whenever you have more than that many consecutive bounces and you land on a Wiggler, it starts indexing to some addresses it's not supposed to touch. Gives some nice corrupted sprites and odd behavior with the coins, but everything is stable beyond that as far as I can tell.

This is still an interesting enough topic though, so if anybody comes along with some other fun glitches/bugs, feel free to share :)
Title: Re: Hunting for glitches/bugs
Post by: Tomato on May 31, 2011, 09:53:38 am
Here's an interesting glitch from EarthBound. There are actually a whole bunch of glitches in the game, this is just one of them:
Title: Re: Hunting for glitches/bugs
Post by: Vegetaman on June 02, 2011, 07:37:21 pm
I was going to suggest Lufia II: Rise of the Sinistrals. It is rife with all sorts of little bugs and glitches. Things like improper names, the item pricing glitch, killing the Egg Dragon (heal it to make it's 65535 health pass over 0 and then hit it once to slay it)... Etc.