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

Make the source code shiftable #151

Open
kemenaran opened this issue Nov 29, 2019 · 1 comment
Open

Make the source code shiftable #151

kemenaran opened this issue Nov 29, 2019 · 1 comment

Comments

@kemenaran
Copy link
Collaborator

@kemenaran kemenaran commented Nov 29, 2019

ROM hacks are much easier if code can be added and removed without breaking the game.

For this, all ROM raw addresses need to be labeled. That means turning all direct ROM references (e.g. call $1234) into a label (e.g. call Func_000_1234).

(Documenting the label, e.g. call AnimateEntities is a nice-to-have, but is not strictly required.)

TODO

  • Make bank 0 shiftable
  • Make code banks shiftable
  • Make graphics shiftable

Progress

Progress can be tracked by running tools/stats.sh, which counts the number of remaining raw addresses that need to be labeled.

How to

  • To see which banks need to be made shiftable: tools/stats.sh --verbose.
  • To convert blobs of data-interpreted-as-code into an ASM data block with label: tools/data_to_asm.py <start address> <end address>
  • How To: make a bank shiftable
@kemenaran

This comment has been minimized.

Copy link
Collaborator Author

@kemenaran kemenaran commented Dec 17, 2019

Bank 0 is now shiftable.

For the other banks:

$ tools/stats.sh -v

Number of remaining raw addresses:
   Referencing Home (0000-3FFF):
       0
   Referencing non-Home ROM banks (4000-7FFF):
    2623
@kemenaran kemenaran changed the title Make the ROM shiftable Make the source code shiftable Jan 9, 2020
This was referenced Jan 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.