Quote:
Most wind up doubling everything up to that point, and from then on as well. No idea what byuu does, so he might have a better way than what the old emulators did.


What I do is render each line at whatever the current resolution is, and store its width into a buffer: unsigned lineWidth[480];
I also keep a flag: bool frameHasHires |= (thisLineWidth == 512);

In that way, my filters have the choice of either up-sampling each 256-width line to 512-width, or rendering each different section of the screen in different blocks.

The main problem is handling software filters like HQ2x. If you up-sample a 256-width screen to 512-width, you won't be able to properly HQ2x filter the screen. Games like Secret of Mana 2 will act screwy when your filtering drops every time a text box appears. The lineWidth buffer will allow you to work around that, but will require heroic efforts in writing said filters. For bsnes, only the NTSC filter supports it fully.

Quote:
(ie, as well as you'll get without a dot-based PPU)


If you're really ready to cry, I suspect that it's possible to change between lores and hires in the middle of a scanline. So any width between 256 and 512 should be theoretically possible.

I plan to forcefully always render at 512-width for my dot-based PPU. Indeed, the two modes are very similar on the SNES. It just changes how the main and sub screens blend together.