mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-26 07:39:56 -06:00
handle address wrap around in texture cache
fixes out of bounds access in Mario 64 also slightly optimise paletted texture conversion
This commit is contained in:
11
src/GPU.h
11
src/GPU.h
@ -499,6 +499,17 @@ public:
|
||||
OAMDirty |= 1 << (addr / 1024);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T ReadVRAMFlat_Texture(u32 addr) const
|
||||
{
|
||||
return *(T*)&VRAMFlat_Texture[addr & 0x7FFFF];
|
||||
}
|
||||
template <typename T>
|
||||
inline T ReadVRAMFlat_TexPal(u32 addr) const
|
||||
{
|
||||
return *(T*)&VRAMFlat_TexPal[addr & 0x1FFFF];
|
||||
}
|
||||
|
||||
void SetPowerCnt(u32 val) noexcept;
|
||||
|
||||
void StartFrame() noexcept;
|
||||
|
Reference in New Issue
Block a user