FinalZero wrote:Unlike the GBC PPU, the NES PPU has only one color #0. There is space for 28 colors in CGRAM,
I thought there was only 4 palettes for each the background and the sprites?
There are 28 colors in these 4 + 4 palettes:
Background palette 0: 0, 1, 2, 3
Background palette 1: 4, 5, 6, 7
Background palette 2: 8, 9, 10, 11
Background palette 3: 12, 13, 14, 15
Sprite palette 0: 17, 18, 19
Sprite palette 1: 21, 22, 23
Sprite palette 2: 25, 26, 27
Sprite palette 3: 29, 30, 31
Colors 16, 20, 24, and 28 do not have distinct memory cells in the PPU. (They're mirrors of 0, 4, 8, and 12 respectively.) An oversight in the PPU design causes colors 4, 8, and 12 to be replaced with color 0 when rendering is turned on.
And the GBC has a lot more work RAM than any licensed NES board, and more than any Famicom board short of SXROM, so you could probably just read the tiles out of VRAM, display your text box, and put them back.
One would still do the same thing for the NES though, no?
On the NES, it's a bit harder because reading from VRAM is unreliable if sample playback is turned on. If a sample fetch happens on a certain clock cycle of the readback (LDA $2007), the CPU sends two read requests to the PPU as the DMA unit grabs and releases control of the address bus, and it misses one of the results. This also affects reading the controller ($4016 and $4017), but there are well-known ways to work around that, such as reading the controller twice and using the previous frame's keypresses if the read key states don't match. GBC doesn't have this problem because it has no DMA-based sample playback channel; instead, its triangle channel's waveform is rewritable like the waveforms on the FDS or TG16.
Btw, in case anyone was wondering, the screenshot posted on the last page was from Dragon Warrior III, the remake for the GBC. It's interesting to compare it with the NES version, because the graphics were so vastly improved, yet I can't see any reason why the NES version couldn't have done most of the graphical techniques that the GBC version used.
NES has no background tile flipping, unlike GBC. Tile flipping allows for certain CHR optimizations on trees, walls, grass, etc. GBC also has MMC5-style palette per tile instead of per block of 2x2 tiles. NES has less capacity for sprite overdraw: 8 sprites per line (25% overdraw on a 256px wide screen) vs. GB/GBC 10 sprites per line (50% overdraw on a 160px wide screen), and possibly for this reason, characters using Mega Man-style overlays for extra color appear to be more common on GBC than on NES because they're less likely to cause dropouts and flicker. Oh, and there are thousands of usable colors on the GBC (like on the Game Gear), unlike the NES where 52 colors in an HSV arrangement plus a screen-wide tint control are all you get.
On that note, how many pattern tables can the GBC store? I assume at least 4, since it can hold twice as many palettes also?
The Game Boy has 6 KiB of VRAM devoted to one and a half pattern tables: 128 tiles just for sprites, 128 tiles to share between sprites and backgrounds, and 128 tiles just for backgrounds. The remaining 2 KiB of VRAM is used by two nametables in a single-screen mirroring configuration.
The Game Boy Color has two sets of one and a half pattern tables, and one bit of the attribute selects whether a tile or sprite uses the first or second table.