Fixed Yoshi's Story black screen in some levels if frame buffer is enabled #1143
Problem:
The game draws background with BG command.
Background texture is 8bit CI.
For some reason the game set 8bit CI at the address of the
background texture, but renders nothing to it.
Plugin uses empty frame buffer texture instead of background texture.
Solution: Do not use 8bit CI frame buffer as BG textures.
Note: probably the game rendres something to the BG texture at some point
of the game. This can't be emulated in hardware anyway.
Fixed Nushi Zuri 64: fb background doesn't work anymore #1115
Problem: The game normally uses color and depth buffers.
When it needs to show rectangle with text, CPU copies current color buffer
by depth buffer address. This buffer rendered as background, text rendered over.
Plugin detects buffer usage and tries to use depth buffer as background texture.
That buffer in video memory has no color information, because data copied by CPU and contained in RDRAM.
Solution: check that found frame buffer is valid.
In this case validity check will fail because RDRAM content modified by CPU,
and background will be read from RDRAM.
Fixed Jeremy McGrath Supercross 2000: missing jauge line in menu #274
This game sets coordinates of lines vertices via modify_vtx.
modify_vtx set screen coordinates for the vertex.
Screen coordinates must be converted back to normalized device coordinates (NDC)
to apply viewport transformation. Unfortunately, the screen coordinates set are out of current viewport
and just clipped after transformation to NDC coordinates and viewport transformation.
Solution: use fullscreen viewport for modified vertex coordinates and
transform coordinates according to this viewport.
The game copies current frame buffer to the area, which initially allocated for depth buffer.
Game read camera data from that area, not from normal frame buffer.
That's why 'copy color buffer to RDRAM' option does not help there.
Special code needed to process that. Looks ugly, but works.