Heh, this is just one more try of my never ending quest for a nice clean bar at the top of the screen that will hide vertical scrolling glitches. The 2 possible approaches are:
1. Disable rendering during VBlank and enable it back a few scanlines (the bar's height) after the frame has started.
Strong points: since rendering is off, more data can be sent to VRAM; can be done with any mapper and it doesn't matter if CHR is ROM or RAM;
Weak points: will alter the dot crawl pattern; must use hacky $2005/$2006 writes to set the scroll; enabling/disabling sprites during rendering is very timing-sensitive, and glitches may happen; needs timed code or IRQs that don't rely on rendering;
2. Select transparent patterns for the whole pattern table, so that although rendering is enabled, only the background color will be rendered. After a few scanlines, the actual patterns to be used for the frame are switched in.
Strong points: doesn't mess with the regular PPU behavior; mapper IRQs can eliminate the need for timed code;
Weak points: requires a mapper with CHR bankswitching; wastes CHR by holding blank tiles; the time it takes to bankswitch patterns depends on the mapper, so the overall timing has to be adjusted accordingly;
So, I've played with both techniques but there is always a point where one of their flaws gets in my way. So I'm currently experimenting with a variation of the first technique. This variation is supposed to fix the dot crawl issue.
I don't know the details because I don't understand much about video signals, but if rendering is disabled by the time rendering starts, the image looks different than usual. It has something to do with an extra PPU cycle at the end of the pre-render scanline. This affects how jagged some lines look and things like that.
Some people don't mind the difference, but I'd prefer to have the normal type of dot crawl, which is why I was trying a variation of the first technique, where sprite rendering would be on at the start of the frame (the backgorund doesn't need to be enabled).
Thing is that disabling sprites during rendering can have very undesirable results, as
tepples and blargg recently discovered. This topic was my attempt to get others' impressions on this technique, but it appears nobody was really interested. I don't blame them, I've been insisting on this border thing for too long already!
Anyway, if anyone wants to know the result, through tests on my NES I found out that if sprites are disabled and enabled at the very end of the scanlines, no sprite corruption seems to happen. So it appears I will be able to have the border I always wanted with no side effects. But I'm too tired of this already, and if eventually side effects do show up I'll just accept the different dot crawl.