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

wRAM labels #294

Merged
merged 17 commits into from Aug 17, 2020
Merged

wRAM labels #294

merged 17 commits into from Aug 17, 2020

Conversation

zelosos
Copy link
Collaborator

@zelosos zelosos commented Aug 14, 2020

  • give all used wRAM addresses a label
  • replace wRAM addresses with known labels (need to be continued at 0xD150)

@kemenaran Have fun looking through the work of some days :P

Copy link
Collaborator

@kemenaran kemenaran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, that's quite an impressive refactoring work. This looks much better – and labeling the WRAM addresses will greatly help to reach full RAM shiftability (were we can move the WRAM labels without breaking the game).

I'm all for merging this. I left a few comments, but nothing too bad, I guess. Thanks!

src/constants/memory/wram.asm Outdated Show resolved Hide resolved
; byte 1: X position
; byte 2: tile n°
; byte 3: attribute
wOAMBuffer:: ; C000
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the OAMBuffer area can be used for several purposes.

One is on the World gameplay mode, where indeed part of it is allocated for Link sprites, and part of it for entities.

But it is also used in other gameplay modes, like cutscenes, menus, etc to store a variety of arbitrary sprites.

So I think we need to keep both variables names (wOAMBuffer and wLinkOAMBuffer), even if they refer to the same address technically. In the code, sometimes the code purpose is clearly to update Links sprites (and in this case wLinkOAMBuffer is better used). But otherwise, when the code is simply trying to manipulate arbitrary OAM data, wOAMBuffer is a better fit.

Copy link
Collaborator Author

@zelosos zelosos Aug 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried not to change the comments. Just relocate them.

src/constants/memory/hram.asm Outdated Show resolved Hide resolved
zelosos and others added 2 commits August 14, 2020 13:32
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
@zelosos zelosos merged commit 6a5b1a8 into zladx:master Aug 17, 2020
@kemenaran
Copy link
Collaborator

Thanks for your work!

Also I created a follow-up Pull Request to fix the wOAMBuffer naming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants