diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/assembly_programming.md | 25 | ||||
-rw-r--r-- | docs/bugs_and_glitches.md | 24 |
2 files changed, 21 insertions, 28 deletions
diff --git a/docs/assembly_programming.md b/docs/assembly_programming.md deleted file mode 100644 index ca6cb9e3..00000000 --- a/docs/assembly_programming.md +++ /dev/null @@ -1,25 +0,0 @@ -# Assembly Programming - -- [**RGBDS documentation**][rgbds-doc]: Includes information on the RGBDS tools and the assembly language syntax. - - [**GBZ80 instructions**][gbz80-instructions]: List of CPU instructions and their effects. - - [**RGBASM features**][rgbasm-features]: How to use the assembler features: constants, labels, sections, macros, etc. - - [**RGBLINK features**][rgblink-features]: How to use the linker, including the [pokecrystal.link](/pokecrystal.link) linkerscript. -- [**ASMSchool**][asmschool]: A gameboy assembly tutorial. -- [**GB ASM Tutorial**][gb-asm-tutorial]: A newer but still in-progress asm tutorial. -- [**Pan Docs**][pan-docs]: Everything You Always Wanted To Know About GAMEBOY (but were afraid to ask). -- [**GameBoy Programming Manual**][gb-manual]: The official GameBoy programming and hardware manual by Nintendo. -- [**GameBoy Opcode Summary**][gb-opcodes]: Describes the opcodes of GameBoy assembly language. -- [**GameBoy Memory Map**][gb-memory-map]: Describes the GameBoy Color address space. -- [**awesome-gbdev**][awesome-gbdev]: A curated list of Game Boy development resources such as tools, docs, emulators, related projects and open-source ROMs. - -[rgbds-doc]: https://rednex.github.io/rgbds/ -[rgbasm-features]: https://rednex.github.io/rgbds/rgbasm.5.html -[rgblink-features]: https://rednex.github.io/rgbds/rgblink.5.html -[gbz80-instructions]: https://rednex.github.io/rgbds/gbz80.7.html -[asmschool]: http://gameboy.mongenel.com/asmschool.html -[gb-asm-tutorial]: https://eldred.fr/gb-asm-tutorial/ -[pan-docs]: http://bgb.bircd.org/pandocs.htm -[gb-manual]: https://ia801906.us.archive.org/19/items/GameBoyProgManVer1.1/GameBoyProgManVer1.1.pdf -[gb-opcodes]: http://www.devrs.com/gb/files/opcodes.html -[gb-memory-map]: http://gameboy.mongenel.com/dmg/asmmemmap.html -[awesome-gbdev]: https://github.com/avivace/awesome-gbdev
\ No newline at end of file diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index 5cda97f9..e1c0527a 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -1,6 +1,6 @@ # Bugs and Glitches -These are known bugs and glitches in the original Pokémon Yellow game: code that clearly does not work as intended, or that only works in limited circumstances but has the possibility to fail or crash. +These are sections of the original Pokémon Yellow game code that clearly do not work as intended or only work in limited circumstances. Fixes are written in the `diff` format. If you've used Git before, this should look familiar: @@ -15,7 +15,8 @@ Fixes are written in the `diff` format. If you've used Git before, this should l - [Options Menu Code Fails to Clear Joypad State on Initialization](#options-menu-code-fails-to-clear-joypad-state-on-initialization) - [Battle Transitions Fail to Account for Scripted Battles](#battle-transitions-fail-to-account-for-scripted-battles) - +- [wPikachuFollowCommandBuffer can Overflow](#wpikachufollowcommandbuffer-can-overflow) +- [Unexpected Counter Damage](#unexpected-counter-damage) ## Options Menu Code Fails to Clear Joypad State on Initialization @@ -38,4 +39,21 @@ The Battle Transitions code has no error handling for this and reads wPartyMon1H This means you can manipulate this first transition to be faster by choosing a default rival name or writing and deleting 6 characters in a custom rival name. A similar series of bugs appears to exist in pokecrystal. -**Fix:** TBD in [engine/battle/battle_transitions.asm](/engine/battle/battle_transitions.asm)
\ No newline at end of file +**Fix:** TBD in [engine/battle/battle_transitions.asm#L93](/engine/battle/battle_transitions.asm#L93) + +## wPikachuFollowCommandBuffer can Overflow + +AppendPikachuFollowCommandToBuffer doesn't have any length checking for the buffer of Pikachu commands. +This can be abused to write data into any address past d437, typically by putting pikachu to sleep in the Pewter Center with Jigglypuff. +While in this state, walking down writes 01, up 02, left 03, and right 04. +This bug is generally known as "Pikawalk." +A typical use for this would be to force the in game time to 255:59. + +**Fix:** TBD in [engine/pikachu_follow.asm#1165](/engine/pikachu_follow.asm#1165) + +## Unexpected Counter Damage + +Counter simply doubles the value of wDamage which can hold the last value of damage dealt whether it was from you, your opponent, a switched out opponent, or a player in another battle. +This is because wDamage is used for both the player's damage and opponent's damage, and is not cleared out between switching or battles. + +**Fix:** TBD in [engine/battle/core.asm#L4960](/engine/battle/core.asm#L4960)
\ No newline at end of file |