mirror of
https://github.com/gbdev/rgbds.git
synced 2026-09-22 21:57:07 +00:00
Massively simplified, by not trying to shoehorn differently-behaving cases into the same one loop! This may have introduced bugs (the test suite has caught three different oversights, two of which via external projects, in fact!), but this also makes the logic clearer and more streamlined, so that we are also less likely to have any latent or future bugs. In particular, previously, the first iteration of the loop could attempt placement at an address not matching the section's constraints, which made advancing to the next target address unnecessarily complicated (https://github.com/gbdev/rgbds/pull/2064#discussion_r3985466596), among other weirdness. The code ended up being defensive, and thus the overall logic was murky. I'm also expecting that this should provide a performance improvement due to being essentially a form of loop-invariant code motion (and very likely one a compiler couldn't have performed automatically), though I haven't measured.
3 lines
115 B
Plaintext
3 lines
115 B
Plaintext
FATAL: Unable to place "C" (ROM0 section) at address $0150: section overlaps with "A"
|
|
Linking aborted with 1 error
|