Closed zlago closed 1 year ago
I agree that the similar naming is confusing, and also that 9000
is a better "base address". (Those are two separate things, imo.)
My only nitpick is that renaming the BG
part to TILE
loses the fact that this change only affects BG/WIN tiles, and not OBJ (OTOH, the current name fails to convey that WIN is affected by that bit, so it's not strictly a loss.) I can't come up with a better alternative, though.
(I reformatted your message for readability, hope you won't mind.)
In the header that I had used before I switched to hardware.inc, I had named them something like LCDCF_CHR21
and LCDCF_CHR01
, based on a conception of $8000-$97FF as three "banks" (NES term) or "character base blocks" (GBA term), each 2 KiB (128 characters) in size. Then I had _CHRRAM0 = $8000
, _CHRRAM1 = $8800
, and _CHRRAM2 = $9000
. Under this terminology, sprites use blocks 0 and 1 always, and the background and window can either use either blocks 0 and 1 or blocks 2 and 1.
Or would that only confuse things for people who have never worked with NES-style video memory bank switching?
Yeah, the term "CHR" is very much absent in the GB dev scene. (It has a few remnants here and there, but it tends not to be used in much documentation or code.) I considered suggesting it, but given that, I chose not to.
TILE01
and TILE21
may work, though. Pan Docs does mention "tile blocks", after all. Maybe BLK01
and BLK21
would convey this better?
If you're going with the 01/21 approach, the original BG
would work just fine
Except that it fails to convey that the window is also affected.
What about rBGP
then?
Fair enough, but I think that e.g. BLK01
conveys better what the two digits are.
Having both
LCDCF_BG8800
/LCDCF_BG8000
andLCDCF_BG9800
/LCDCF_BG9C00
haveBG
in the name can be a little confusing.LCDCF_BG8800
being named after the first tile in address order instead of the first tile in index order seems a little counterintuitive, wouldn't it be better ifLCDCF_BG8000
/LCDCF_BG8800
got renamed toLCDCF_TILE8000
/LCDCF_TILE9000
?