Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PC 16 Rebase Notes #2

Closed
5 of 6 tasks
vulcandth opened this issue Jun 16, 2022 · 1 comment
Closed
5 of 6 tasks

PC 16 Rebase Notes #2

vulcandth opened this issue Jun 16, 2022 · 1 comment
Labels
documentation Improvements or additions to documentation PC16 Issue Issues related to PC16 itself.

Comments

@vulcandth
Copy link
Owner

vulcandth commented Jun 16, 2022

The following are notes I took about each of the commits. Each heading references a commit.

Remove version differences, stuff required for matching

  • - Need to remove Debug rom building in the Makefile

Debug Tools

  • - Need to remove commit when no longer needed.

QoL #10: better structuring of trainer data (allowing splitting it into …

  • The locations for wOtherTrainerType:: db and wTrainerGroupBank:: db didn't match up in wram.asm. So I moved them to a random location with two free bytes. Please provide a better location if desired. (Fixed by creating a union)

QoL #12: free up wasted home bank space

  • Removed useless push/pop in engine\menus\save.asm (Originally this would have left a push af immediately followed by a pop af)
  • Removed useless ret z in engine\overworld\events.asm (Originally this would have left a ret z immediately followed by a ret)

Add generic 16-bit function macros for home bank calls

  • Use strcmp() for lines 12, 19, 23, 28

Update references to evolutions, learnsets, base stats and egg moves to …

  • Added a table_width/assert_table_length to FirstEvoStages:: in data\pokemon\first_stages.asm

Update pic data (pointers, animation frames, bitmasks and scripts) to us…

  • Set the assert_table_length to (NUM_POKEMON + 1) in data\pokemon\pic_pointers.asm

Remove dummy constants for dummy Pokémon and set EGG to -3 instead of 25…

  • Added a table_width/assert_table_length to negative items (EGG -3) in data/pokemon/pic_pointers.asm

Modify map scripts to use 16-bit to 8-bit conversions (and vice-versa) w…

  • LoadReservedID(s) now end with endcallback instead of return

Update wild Pokémon data to contain 16-bit IDs

  • Modern Pokecrystal uses:
DEF GRASS_WILDDATA_LENGTH EQU 2 + 3 + NUM_GRASSMON * 2 * 3
DEF WATER_WILDDATA_LENGTH EQU 2 + 1 + NUM_WATERMON * 2

I changed this to exactly what is used in PC16.

DEF GRASS_WILDDATA_LENGTH EQU 2 + (1 + NUM_GRASSMON * 3) * 3
DEF WATER_WILDDATA_LENGTH EQU 2 + (1 + NUM_WATERMON * 3) * 1

Convert miscellaneous Pokémon IDs in ROM to 16-bit, 1

  • Added table_width/assert_table_length to OddEggSpecies: in data\events\odd_eggs.asm

Convert miscellaneous Pokémon IDs in ROM to 16-bit, 3

  • Used modern pokecrystal's npctrade struct in constants\npc_trade_constants.asm
  • Modern pokecrystal's npctrade macro didn't match PC16's changes... replaced entire macro contents with PC16's formatting in data\events\npc_trades..asm

Remove 8-bit IDs from base data and rename wBaseDexNo to wBaseSpecies

  • Used modern pokecrystal's base data struct in constants\pokemon_data_constants.asm

Use 16-bit IDs in Bill's PC for boxes other than the current one

  • Added a table_width/assert_table_length and label to BoxIndexAddresses in engine\menus\save.asm
  • Added boxindexes macro similar to modern pokecrystal boxes macro for sBox#PokemonIndexes:: ds 2 * MONS_PER_BOX in sram.asm

Use indirect pointers for some structures (base data, evolutions and mov…

Update move animations to use 16-bit move indexes

Other Things that need to be done:

@vulcandth vulcandth added documentation Improvements or additions to documentation PC16 Issue Issues related to PC16 itself. labels Nov 3, 2022
@vulcandth
Copy link
Owner Author

Complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation PC16 Issue Issues related to PC16 itself.
Projects
None yet
Development

No branches or pull requests

1 participant