Naboo does not use depth buffer clear with fillrect,
thus it does not allocate frame buffer for depth buffer clear.
GE multiplayer fix breaks depth compare in Naboo.
BgCopy set dimensions for tile0 to zero.
We can't use dimensions of load tile either because of CopyBlock.
The only way to find size of loaded texture is to use coordinates of texrect.
There is one-to-one correspondence between rect pixels and texture texels in copy mode,
so we can safely use it in this case.
masks and maskt set by gDPSetTile, but _calcTileSizes may change them if actual
tile dimension do not correspond the mask. This creates problem for S2DEX_BG_1Cyc command,
which set tile masks and maskt to maximum, while actual size of loaded tiles may vary.
_calcTileSizes may set new values for masks and maskt, which are valid for the current tile but invalid for next ones.
Thus, original values of tile masks and maskt must be restored when tile size calculated again in _calcTileSizes.
Code of RdpUpdate::update is based on angrylion's rdp_update().
Main visible difference: VI cuts several pixels on left and right of original image.
Cite from angrylion's commit message:
"rdp: new tests revealed the shocking truth:
the VI aggresssively and regardlessly of any data alignment specificities
cuts off either 7 or 8 pixels closest to h_start and h_end, so that nothing
ever appears on the screen unless (h_end - h_start) is 16 pixels or greater
(this removes marginal garbage graphics on the far right in Mario Tennis,
Turok 2 Seeds of Evil intro and probably other games)"
The game uses very unique way to allocate frame buffers.
It uses double buffering, but both buffers share the same address space (sic!)
The game uses interlaced display mode, and lines in RDP buffers are interlaced too.
Plugin's fb and VI emulation code can't handle it properly, so I just added a hack.
Fixed Lode Runner 3-D: No video output if framebuffer is enabled #1937
Rat attack uses color buffer with width 640, but depth buffer width is only 639.
goodDepthBufferTexture check failed because of it, and game run without depth compare.
Fixed Rat attack missing geometry #600
always write depth to buffer when otherMode.depthCompare flag is off.
Up shader storage version.
Fixed 2 players mode in Extreme-G XG2 (U) with N64 depth compare enabled, #1963
It seems that when vi_width <= 320 output uses progressive mode
even if interlaced bit is set in VI_STATUS.
Fixed Bass Rush - ECOGEAR PowerWorm Championship - shakes #1957