Make 'Iris no Atelier: Eternal Mana' work.
Posted on 2006-06-14 00:00:00
The moment at which the game clears the screen isn't invalid afterall... All the rendering for movies happens in an interrupt handler on the vblank start line. First, it renders all the textured primitives on an offscreen frame buffer and at the end, changes the read circuit's frame buffer location to the offscreen one and switches it with the frame buffer location for drawing.

This is just simple double-buffering, but it's not supported very well by the current renderer since all it does is rendering the primitives on the output window regardless of which "virtual" frame buffer is being used for rendering and whether it's visible or not.

The same double-buffering mechanism is used for the other stuff too, but this stuff is visible because it's rendered on the offscreen buffer before the v-blank interrupt is triggered and not at the same time. So, there's no easy solution for this. We could try detecting changes to the read circuit's frame buffer location and flip our offscreen buffer at this moment, but this isn't very good for programs that don't use double buffering (I wonder if there is a lot of these?). There might be other solutions that fits with everything and that are implementable with OpenGL, but I can't confirm anything. And of course, a good software renderer wouldn't have this kind of problem. I also tried creating a patch to prevent the frame-buffer switch to happen, but it prevents the second movie from playing...

So, what I'll do for now is keep that patch that allowed us to skip movies and come back to this problem later. The last thing I'd like to work on in the context of this development, is to make the US version of this game work. But there's a little problem with reading data from a disk drive that I'll have to fix before.