Emulator Issues #13733
open[Graphical emulation issue] CI texture TLUT address calculation is wrong
0%
Description
Game Name/ID?
Any game
What's the problem? Describe what went wrong.
Current implementation does something like the following (obviously not accurate):
tmem_addr = ( tmem_offset + tex_ci ) & tmem_bank_size_mask;
pixel_color = TMEMGetTlutValue(tmem_addr);
where tmem_offset is the offset of the TLUT begining in high bank TMEM and tex_ci is the current pixel index value of the texture.
As per my testing, the address of a TLUT value should be calculated by using an OR operation:
tmem_addr = ( tmem_offset | tex_ci ) & tmem_bank_size_mask;
Meaning that in real hardware there is no wrapping around high bank TMEM.
Is the issue present in the latest development version?
Yes, Issue occurring as of rev 2412-225
Is the issue present in the latest release?
Yes, as of rev 2409.0
Files