The NES allowed programmers to load more than 512 tiles at a time. There really wasn't a sprite set and a tile set per se either; you simply loaded 8x8 sets of pixel data into the PPU 512 times. Of course you wouldn't want artifacts, so you would typically keep the scanline resets in multiples of 8.
CV3 used 48 scanlines for the status bar, but only 40 of which were visible. In vertical stages, 56 scanlines were used, only 48 of which were visible. Yeah, always 8 scanlines not rendered on-screen. The kicker is the lower 8 scanlines in vertical stages don't have anything at all -- no nametable or PPU data is loaded for them, hence the extra black bar under the status bar. In fact, the PPU data is jumbled in the lower 3 scanlines of the status bar, causing garbage (at least in the Japanese version). I don't know why they shifted everything down 3 scanlines for vertical stages either. It makes reading coordinates in the code difficult.
The status bar always has 6 CHR data loaded: The lower (left) half requires all 128 player tiles (actually only the higher 64 tiles are required but there's no point in changing both), since this will hold the subweapon icon data. The upper (right) half of the PPU retains the tiles for doors, spikes, hearts and money bags because there's no need to overwrite that CHR data, but the CHR for room tiles is replaced with the English font and status bar icons.
PPU data for the status bar |
PPU data for the room |
And what makes working with this game for a PC version such a pain in the ass for me is the room height is less than the screen height, but the NES was programmed using the screen height. So either I redo all my math so it accounts for the difference between room height and screen height (which I'm currently tediously doing) or I redo all my code to set all coordinates based on the view and not the room -- I have no desire to do that at all! ... But in future thought, it does sound like a fun way to program a game.
No comments:
Post a Comment