In another thread I considered drawing a raycaster's viewport using tiles that contain only 1 software pixel in the Y axis, and vertically compressing 2 name tables (60 tiles) into a 120-pixel tall area by changing the scroll every 2 scanlines. Changing the scroll isn't much of a problem, since the fine Y scroll isn't used at all and 2 $2006 writes can take care of it, but doing it without wasting massive amounts of CPU time is looking like a challenge.
Without a mapper, 100% of the time while the viewport is rendered would be spent on this, since I can't think of any constant-timed task that could be done between scroll changes. MMC3 IRQs fire kinda late in the scanline, enough that the scroll can't be reliably changed right away. Waiting for the next scanline would mean a little over 50% of the time spent squeezing the viewport, which is much better but still fairly expensive.
What would the alternative be? A cycle-based IRQ counter? With that I could time the IRQs so there'd be no waiting at all, and all the stolen time would go towards actually changing the scroll, which I imagine will be around 30% of the time, which sounds more reasonable. Problem is these mappers aren't as easy to come as the MMC3, and I don't know if they'll play nice with 4-screen mirroring across different emulators and flash carts.
Can anyone think of other ways to vertically squeeze the screen without sacrificing too much CPU time?
Without a mapper, 100% of the time while the viewport is rendered would be spent on this, since I can't think of any constant-timed task that could be done between scroll changes. MMC3 IRQs fire kinda late in the scanline, enough that the scroll can't be reliably changed right away. Waiting for the next scanline would mean a little over 50% of the time spent squeezing the viewport, which is much better but still fairly expensive.
What would the alternative be? A cycle-based IRQ counter? With that I could time the IRQs so there'd be no waiting at all, and all the stolen time would go towards actually changing the scroll, which I imagine will be around 30% of the time, which sounds more reasonable. Problem is these mappers aren't as easy to come as the MMC3, and I don't know if they'll play nice with 4-screen mirroring across different emulators and flash carts.
Can anyone think of other ways to vertically squeeze the screen without sacrificing too much CPU time?