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

Split neslib and nesdoug components so they are linked conditionally #217

Merged
merged 3 commits into from
Sep 24, 2023

Conversation

cogwheel
Copy link
Contributor

@cogwheel cogwheel commented Sep 22, 2023

Fixes #214

The following components are only linked in if used (including any data,
init/nmi routines, etc.):

- vram update (aka name_upd)
- OAM_BUF
- PAL_BUF
- pal_bright
@mysterymath
Copy link
Member

mysterymath commented Sep 22, 2023

Addresses #214

Nitpick, if you say the "Fixes" instead of "Addresses", Github will automatically close the issue on merge; very nice to have.
See https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword for details.

EDIT: That list is quite long, you just happened to choose a word that isn't on it. I blame the list, get the thesaurus!

@cogwheel
Copy link
Contributor Author

EDIT: That list is quite long, you just happened to choose a word that isn't on it. I blame the list, get the thesaurus!

This is very on-brand for me. ><

@@ -3,9 +3,15 @@
.include "ntsc.inc"
.include "neslib.inc"

.section .init.275,"axR",@progbits
.section .init.330,"axR",@progbits
Copy link
Member

Choose a reason for hiding this comment

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

We should maintain the property that the neslib initializers are done before .init.300; that's when user-defined module level constructors fire, and broadly anything that is accessible in C should work properly from those pre-main constructors, including the NTSC mode.

This is true here and throughout this file; anything that previously occurred before .init.300 should stay before .init.300.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

looks like i forgot to include mos-platform/common when I was searching for existing init ranges.

@mysterymath mysterymath merged commit 55051dd into llvm-mos:main Sep 24, 2023
mysterymath added a commit that referenced this pull request Sep 24, 2023
…ionally (#217)"

This reverts commit 55051dd.

I gave this a quick spin-through compiling
/~https://github.com/mysterymath/nesdoug/26_Full_Game, and this change
causes it to immediately present "You Died" after hitting Start. Not
sure exactly what changed, but it looks like this introduces some kind
of significant behavioral change.
@mysterymath
Copy link
Member

Unfortunately, I ended up having to revert this; see the above commit message for details.

mysterymath added a commit that referenced this pull request Sep 24, 2023
cogwheel added a commit to cogwheel/llvm-mos-sdk that referenced this pull request Sep 24, 2023
mysterymath pushed a commit that referenced this pull request Sep 24, 2023
* Un-revert "Split neslib and nesdoug components so they are linked conditionally (#217)"

This reverts commit 2207d5a.

* Fix immediate death in nesdoug full game
@cogwheel cogwheel deleted the cog/split-neslib branch September 28, 2023 15:08
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.

Split out VRAM buffer parts of neslib/nesdoug
2 participants