I've been thinking about the limitations of the NES so as to properly emulate them, and there is something I simply don't understand. Vertical mapping. By which I mean, when the image map for the background is drawn to fill a vertical space. (If I have the term wrong please correct me.)
I want to avoid ever needing that so I don't have to worry about seeing the tiles on one side of the screen using the wrong palette. (Not just because it looks ugly but because I have no idea how to recreate that effect properly.) So I have been studying how various games work to understand how I can avoid the problem. And... I'm kind of at a loss as to why any game had this problem.
Most games can avoid this because the top and bottom edges are cut off on the NTSC NES, and so if the game has the map laid out horizontally, when/if the screen moves vertically those tiles that are the wrong palette are simply not seen. So to avoid seeing this problem, all I need to do is make sure my game is laying out the map horizontally.
Typically, a game that features vertical and horizontal scrolling and a status bar will have this problem. In that situation, the map has the status bar on the top or bottom of the map, and then draws a vertical chunk of the map, and since it has to write over the map to "scroll" to the left or right, an edge will get that palette-bleeding effect.
As I have been studying various games, it has become apparent to me that each scanline can draw the background from any desired co-ordinate in the map. So when it gets to the scanline where the status bar is, it just draws that portion of the map which contains the status bar. (And this is also how games fake parallax scrolling by having some scanlines more at a different rate across the map than others.)
But if this feature exists, why can't a game with a status bar still have vertical scrolling with a horizontal map? Couldn't the system (if it had to) split the screen to draw, say, the bottom portion of the map on the top portion of the screen, and the top portion of the map on the bottom portion of the screen? It wouldn't be too hard to compute the math for that, so I don't see why a game couldn't do that to avoid the palette-bleeding that would come from using a vertical map.
In fact, isn't this already happening in a couple games? Games that have vertical scrolling and a status bar. Some parts of Castlevania III and some maps in Super Mario Bros 3; they have vertical levels that clear are taller than the two screens worth of map the game can load. How do they handle this and not draw the status bar into the play area?
And then I see some games that use a vertical map, and I have no idea why. Mega Man 5 is a good example. Since the health bar is made of sprites, it could just have the map be horizontal, but it doesn't. And it just keeps a chunk of the level that can't even be seen in that spot. Why? It's not using that space; it's a terrible waste.
I want to avoid ever needing that so I don't have to worry about seeing the tiles on one side of the screen using the wrong palette. (Not just because it looks ugly but because I have no idea how to recreate that effect properly.) So I have been studying how various games work to understand how I can avoid the problem. And... I'm kind of at a loss as to why any game had this problem.
Most games can avoid this because the top and bottom edges are cut off on the NTSC NES, and so if the game has the map laid out horizontally, when/if the screen moves vertically those tiles that are the wrong palette are simply not seen. So to avoid seeing this problem, all I need to do is make sure my game is laying out the map horizontally.
Typically, a game that features vertical and horizontal scrolling and a status bar will have this problem. In that situation, the map has the status bar on the top or bottom of the map, and then draws a vertical chunk of the map, and since it has to write over the map to "scroll" to the left or right, an edge will get that palette-bleeding effect.
As I have been studying various games, it has become apparent to me that each scanline can draw the background from any desired co-ordinate in the map. So when it gets to the scanline where the status bar is, it just draws that portion of the map which contains the status bar. (And this is also how games fake parallax scrolling by having some scanlines more at a different rate across the map than others.)
But if this feature exists, why can't a game with a status bar still have vertical scrolling with a horizontal map? Couldn't the system (if it had to) split the screen to draw, say, the bottom portion of the map on the top portion of the screen, and the top portion of the map on the bottom portion of the screen? It wouldn't be too hard to compute the math for that, so I don't see why a game couldn't do that to avoid the palette-bleeding that would come from using a vertical map.
In fact, isn't this already happening in a couple games? Games that have vertical scrolling and a status bar. Some parts of Castlevania III and some maps in Super Mario Bros 3; they have vertical levels that clear are taller than the two screens worth of map the game can load. How do they handle this and not draw the status bar into the play area?
And then I see some games that use a vertical map, and I have no idea why. Mega Man 5 is a good example. Since the health bar is made of sprites, it could just have the map be horizontal, but it doesn't. And it just keeps a chunk of the level that can't even be seen in that spot. Why? It's not using that space; it's a terrible waste.