Well, I tried it, and no joy. At least, not with the scanline basically full of sprites... It seems the PPU does in fact read OAM during HBlank, because on real hardware the writes are ending up all over the place. In higan, they all go to the highest HiOAM address actually used on the scanline (NOT the top of HiOAM like I thought), which implies the same thing if you think about it in context.
(Take this result with a grain of salt - I didn't do too much double-checking, so I may have screwed something up.)
I'd try to check for address incrementing, but it's late. Maybe tomorrow I'll try on a scanline without any sprites and see what it does...
Espozo wrote:If it doesn't, you're only writing to sprite 0's X position?
No, it wouldn't even get that far, not even if sprite 125 or higher was on that particular scanline. It would repeatedly write to the last HiOAM byte the PPU looked at (assuming sprite rendering was finished - if not, it would go wherever the PPU was reading at the moment).
As nice as it would be, I don't see this happening.
Well, it doesn't. It would have been nice if the PPU had turned out to internally cache the OAM data for the 32 sprites on the scanline, rather than having to read it again during HBlank, but I guess the designers figured there was no point adding extra circuitry just so that OAM could sit idle for 85 dot-cycles per line...
They sent the data for changing sprite 1 and 2's position in HiOAM just as it was being scanned by coincidence?
More probably they sent the data after sprite rendering was finished, and the internal address had been left at that byte by the PPU.
byuu wrote:The only viable trick with OAM mid-frame is a trick that some games use to make an entire background from sprites alone: you can change the tiledata address at the halfway point, but leave all the sprite attribute data alone.
It's not very useful. Yet several games do this for no reason: Megalomania OP, Winter Games main menu, etc.
You might find a use in making a static 256x224 background while using Mode7 as a giant single rotating sprite.
Are you serious? Actual
games do that?
I thought it was just that one
demo, and it didn't even do it right (used HDMA rather than a mid-line IRQ, thus interrupting rendering and causing glitches)... I was so proud of figuring out the right way to do it, too...
My (glacially proceeding) shmup port uses this trick for a Super FX layer on top of a Mode 7 background, which is why I was investigating it.