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.
GCC replaces (value << 8) | (value >> 8) with __builtin_bswap16 if -Os,
-O1 or higher is used. __builtin_bswap16 is as fast as the assembler
declaration.
Still hackish.
Fixed Star Wars Episode One Racer Flicker and Black Screen with Frame Buffer Emulation #1119
Fixed Top Gear Overdrive black screen #1122
Problem: Some games have strange glitch, which looks like vertical line of
pixels outside of right bound of the image. Examples: JFG title screen,
both Zelda games when new game started. Software plugin has the same issue,
but when image passes VI stage, the problem disappears. Most likely
VI filters somehow eat the rightmost pixels. I suspect that it is result of
divots elimination. Thus, the fix works like this:
when divot flag is set the rightmost column of pixels is not shown.
Fixed Majora's Mask screen turns red #790
Problem description:
the game allocates 8bit aux frame buffer when enter to subscreen.
When screen shrink effect started, the game allocates 16bit buffer on the same address.
Since plugin already had buffer allocated, it reused that buffer. Since the buffer's
texture had only red component, whole screen turned red.
Fix: create new buffer if color depth of existing buffer is less than necessary.
glGetStringi can return 0 if there is an error getting the value. If "name" is 0 (happens in RetroArch using GLES3 for whatever reason), then the strcmp segfaults.
The cause was that we were loading the shader cache before we loaded any
microcodes through GBI. With this change, shader storage will now store
wether it's possible to do HW lighting based on GBI status.