3 ms·
This is an idea I had for a custom mapper that would raise the number of background tiles from 256 to 1024. The idea is that you divide each 16x16 block into 4
by Dwedit 3y ago
This is an idea I had for a custom mapper that would raise the number of background tiles from 256 to 1024. The idea is that you divide each 16x16 block into 4 different graphics banks. Top-Left tile gets its own back, Top-Right tile gets its own bank, Bottom-Left tile gets its own bank, Bottom-Right tile gets its own bank. Wouldn't require very much hardware at all, just 32K of SRAM for the CHR-RAM, and a few discrete logic chips.
NES repeats this sequence of reads:
* Read Nametable byte
* Read Attribute Table byte
* Read background tile graphics low byte
* Read background tile graphics high byte
Then when it's time for sprites:
* Read garbage Nametable byte
* Read garbage Nametable byte
* Read sprite Tile graphics (sprite) low byte
* Read sprite Tile graphics (sprite) high byte
-
The critical part of this pattern is that it's always an Attribute table byte before background tile graphics, and always a Nametable byte before sprite tile graphics.
Nametables are at 2000-23BF and repeating every 400 bytes later (appears four times).
Attribute tables are at 23C0-23FF and repeating every 400 bytes later (appears four times)
Distinguishing the two requires not much more than ANDing a bunch of address lines together.
So now, when you see a Nametable read:
- Save the low bit of column and low bit of row, use those to make a value 0-3.
- Bankswitch CHR-RAM to bank 4 for sprites
Then when you see an Attribute table read:
- Bankswitch CHR-RAM to your value 0-3 for the background tile read
- msk-lywenn 3y agoIf I get this right, it's not extending the background tiles from 256 to 1024 but making them bigger. So you'd end up with 256 16x16 tiles rather than 8x8 one. It's super interesting but not as flexible as 1024 8x8 tiles. Hopefully you can make it someday!
- Dwedit 3y agoNot quite, the 4 pieces can still select different tile numbers. It's more like 256 tiles that can only appear as top-left, 256 tiles that can only appear as top-right, etc...
- pipes 3y agoThanks, I gave up on the article. It seemed like it would never get to the point
- Dwedit 3y agoMy post is not the article.