Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates the code for RGBDS 0.3.3. RGBDS 0.2.5 is no longer supported.
I should note that I have no idea what I'm doing. This linkerscript may not be correct (and I'm not sure if
linkerscript.link
is the best name - pret/pokecrystal#389 useslinkerscript.ld
, but the others uselinkerscript.link
). I haven't removed existing bank definitions from the files themselves, and there are some section definitions that aren't in the linkerscript.However, the rom hash matches, and the symbol list matches that from before this change. So I think everything works.
The change that I really don't know for sure, though, is my change to the stack. Originally, it looked like this (bottom of wram.asm):
However,
ds -$100
is no longer legal, so I tried changing it to this, based off of what is done in pokered:However, that also doesn't work:
As far as I can tell, this is because
wBGPPalsBuffer
extends into $DF00 ($def5+NUM_ACTIVE_PALS * PAL_SIZE
=$df15
). This seems to me like a problem, but it's the way the code was written, and as far as I can tell, it's how it's actually used (but I'm not good with assembly). As far as I can tell this means that that buffer will clobber the stack.I've changed the code to this:
which works fine (everything still compiles and the roms match) but I'm not entirely confident that it's correct.
See also: