-
Notifications
You must be signed in to change notification settings - Fork 24
Base working branch
The master
branch contains a mostly unmodified copy of Pokémon Crystal. All changes made to this branch are purely
to facilitate further modifications; the game generated by this branch should play almost identically to the original.
This branch's initial commit is a snapshot of the main repository at pret/pokecrystal. This snapshot
may be updated from time to time; a snapshot was used (instead of a simple fork) to keep the commit history clean.
It should be possible to update the initial snapshot to a later version of the original repository, but this will only be done rarely and when there is a clear benefit from applying such a change, since it requires solving plenty of merge conflicts further up the commit tree.
Changes applied to this branch come in three kinds:
- Build and cleanup changes: changes made to simplify the build process and the repository contents. These changes include removing all of the alternate versions built by the codebase (since only one ROM will be built by this project), removing many components that exist only to match the original ROM (such as pre-compressed images), and removing elements that are no longer relevant (like the documentation folder).
- Minor bug fixes and code quality improvements to features that would simply get in the way of any further changes, such as the Ditto assumption bug.
- Quality-of-life improvements to the codebase or the game. These are mostly taken from documentation and guides in the main repository for the base game.
These improvements are listed as QoL #nn
in the commit log, and they contain improvements that mostly have no
user-visible effects. Most of these were made to make the task of implementing 16-bit indexes easier.
The full list is:
- Fix picture far pointers to contain an actual far pointer. The unmodified game refers to pic banks by an index into an array of banks. This serves no useful purpose; using the actual bank number makes the code simpler to update.
- Unlink the base address for Pokémon pic far pointers and Unown pic far pointers. The unmodified game assumes that those pointer arrays will begin at the same address, but in different banks. This hinders ROM reorganization.
- Store Pokémon footprints as a single block, instead of split into upper and lower halves.
- Get rid of dummy items within the TM/HM list, consolidating them before the TMs. This makes them easier to remove.
- Double the size of the temporary buffer used to check for stone evolutions. This allows fitting more of them there; Eevee wouldn't be able to evolve into all of its stone-based forms without this change.
- Allow mixing of stat-based and item-based evolutions in the evolutions list. There's no good reason for this to be forbidden; it's simply a bug in the original code that never manifests because no list contains such a mix.
- Clear all of WRAM properly. The unmodified game only clears the GB banks, not the extra GBC banks; this would get in the way of the new index tables.
- Remove the move grammar table. There are four different ways to say that a Pokémon used a move in Japanese (five if an alternate message with an extra word break for long moves is counted), but that's not true for any of the game's localizations (including English). Since this table serves no purpose in the English game and cannot be maintained by someone who doesn't speak Japanese, it would get in the way of adding more moves or modifying existing ones.
- Implement fast saving. This is simply because most testing will require saving the game very frequently; going through four and a half seconds of pointless waiting each time makes testing far slower.
- Address trainer data through far pointers. This prevents running into problems if the trainer data doesn't fit in a single ROM bank after changing the indexes to be 16-bit values. This change also updates trainer flags to behave as individual bits instead of a single enumerated value.
- Increase the tile limit for Pokémon animations to 255. This makes adding new ones easier.
- Free up wasted home space. This makes adding new code there easier.
- Make
AddNTimes
faster. This function will be called more often and with larger operands after implementing 16-bit indexes, so this improvement alleviates the additional load. - Remove some unused data. This makes maintaining this data unnecessary.
- Use far pointers for Pokémon animation frames instead of deriving the bank number from the national dex number. This makes it simpler to add new Pokémon, as this logic would have to be altered either way.
- Improve some of the name-loading code. This makes it faster and frees up some home bank space.
- Use far pointers for Pokédex entries instead of deriving the bank number from the national dex number. This is similar to #15.