pokered icon indicating copy to clipboard operation
pokered copied to clipboard

Add documentation in doc/, in particular for the known Gen 1 bugs

Open Rangi42 opened this issue 4 years ago • 14 comments

pokecrystal has at least 66 known bugs, as well as various design flaws (not really bugs, but still things a hack project would want to correct). pokegold has at least three unique bugs. I expect that pokered has many more:

  • https://forums.glitchcity.info/index.php?topic=7682.0 (archived: GCL Archives, archive.today)
  • https://glitchcity.info/wiki/List_of_natural_glitches_in_Generation_I (archived: archive.org, archive.today)
  • https://glitchcity.info/wiki/Category:Generation_I_glitches
  • https://bulbapedia.bulbagarden.net/wiki/List_of_glitches_in_Generation_I

Ideally these would be documented, with minimal fixes if possible.

Design flaws might not be worth documenting (since they're subjective and Gen 1 arguably has enough of them that the appropriate fix is to switch to Gen 2 or port its subsystems en masse—see pokered-crysaudio, pokered-gbc, pokered-clean, etc), but definite bugs are.

Rangi42 avatar Jul 04 '20 05:07 Rangi42

With glitchcity.info shutting down, it would be that much more useful to have a central lookup for all Gen 1 bugs, with source code references.

Rangi42 avatar Jul 14 '20 18:07 Rangi42

I feel like the pret docs focus more on inappropriate behavior of the code, while glitchcity.info focusses more on practical applications of the bugs. These are two very different approaches to the documentation that are hard to combine while keeping consistent.

mid-kid avatar Jul 14 '20 19:07 mid-kid

You're right. I don't mean to document every single glitch they do. But their "natural glitch" list is a good starting point for a level of bug documentation similar to pokecrystal, and that first link to the forums already has YouTube and pokered links.

Rangi42 avatar Jul 14 '20 19:07 Rangi42

There are also some bugs GCL wouldn't have documented which are nevertheless bugs in the code; for example:

; function to check the tile ahead to determine if the character should get on land or keep surfing
; sets carry if there is a collision and clears carry otherwise
; It seems that this function has a bug in it, but due to luck, it doesn't
; show up. After detecting a sprite collision, it jumps to the code that
; checks if the next tile is passable instead of just directly jumping to the
; "collision detected" code. However, it doesn't store the next tile in c,
; so the old value of c is used. 2429 is always called before this function,
; and 2429 always sets c to 0xF0. There is no 0xF0 background tile, so it
; is considered impassable and it is detected as a collision.
CollisionCheckOnWater::

Rangi42 avatar Jul 14 '20 20:07 Rangi42

Oh, yeah, all I'm saying is that this wiki is probably not a good replacement for what glitchcity.info used to provide.

mid-kid avatar Jul 14 '20 21:07 mid-kid

GCL is shutting down in a week (https://forums.glitchcity.info/index.php?topic=9149). Of course their documented glitches will still be archived, but this would be a good time to start a Bugs and Glitches doc for pokered.

Rangi42 avatar Aug 26 '20 23:08 Rangi42

Here's the current link to the GCRI wiki. The contents were carried over from the old GCL wiki.

I'll be sharing some info on bugs in a follow-up comment.

SatoMew avatar Mar 30 '22 22:03 SatoMew

Here are a few examples that could be included in the document:

  • the English RB bug in engine/battle/wild_encounters.asm responsible for these and the discovery of MissingNo., which was already fixed in English Yellow: https://github.com/pret/pokered/blob/fe8d3c51a4056f0dd61dbef332ad9e714b82089a/engine/battle/wild_encounters.asm#L28 Fix: Revert hlcoord 9, 9 to hlcoord 8, 9. TODO: Check the code for the other localizations.
  • the iirc English RB and European RBY issue with Oak's text when delivering the 5 Poké Balls to the player: https://github.com/pret/pokered/blob/fe8d3c51a4056f0dd61dbef332ad9e714b82089a/text/OaksLab.asm#L138-L140 Fix: Replace the second line with cont.
  • Draw audio quirk
  • the experience underflow bug that was carried over to GSC
  • these two issues related to the Ghost cloak
  • an issue preventing the player's progress in Japanese versions and all releases of Yellow that was fixed in Western RB
  • this oversight which prevents Oak from giving the player 5 Poké Balls if the bag is full

SatoMew avatar Mar 31 '22 00:03 SatoMew

When I get some time; i'll see about starting this. I'll create a docs/bugs_and_glitches.md formatted similarly to pokecrystal's. I'll add a bug fix or two... and create a PR to merge. The idea, is that this will serve as a template for others to add to.

vulcandth avatar May 11 '22 18:05 vulcandth

It can start as a wiki page for easy contribution; I thought someone had already made one in the pokered wiki, but apparently not.

Rangi42 avatar May 11 '22 18:05 Rangi42

It can start as a wiki page for easy contribution; I thought someone had already made one in the pokered wiki, but apparently not.

Yeah; that might be a better idea. Then we can look at merging it into the codebase later. I still do like the idea of it eventually making it into the codebase. As things in the codebase tend to be "vetted", and gives downstream users simple bug fixes they can implement with little worry of causing further bugs (in the vanilla rom).

vulcandth avatar May 11 '22 18:05 vulcandth

The 5 Pokéballs text issue and the Cinnabar Island glitch have both been given wiki articles. The latter just needs expansion to deal with the other 2x2 block encounter glitches.

rawr51919 avatar Jul 04 '22 05:07 rawr51919

...please don't start adding issue comments with notifications for every incremental update to the wiki. There are possibly hundreds of Gen 1 bugs to document, certainly more than Gen 2. Just, go ahead and add to the wiki whenever you like, other people can too, and eventually if it looks like a comprehensive document of bugs we can consider putting it in the repo.

Rangi42 avatar Jul 04 '22 05:07 Rangi42

It can start as a wiki page for easy contribution; I thought someone had already made one in the pokered wiki, but apparently not.

Yeah; that might be a better idea. Then we can look at merging it into the codebase later. I still do like the idea of it eventually making it into the codebase. As things in the codebase tend to be "vetted", and gives downstream users simple bug fixes they can implement with little worry of causing further bugs (in the vanilla rom).

Added the wiki page for the bugs and glitches document, still needs video docs otherwise it's pretty well formatted the same as pokegold's and pokecrystal's document: https://github.com/pret/pokered/wiki/Bugs-and-Glitches

rawr51919 avatar Jul 11 '22 16:07 rawr51919