mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-16 14:42:52 +00:00
Checked PRELOAD_MODE to determine if TMEMODD or TMEMEVEN should be used.
Fixes issue 5212.
This commit is contained in:
parent
fab037446c
commit
c4fbb6e377
@ -476,10 +476,15 @@ void BPWritten(const BPCmd& bp)
|
|||||||
// if this is different from 0, manual TMEM management is used.
|
// if this is different from 0, manual TMEM management is used.
|
||||||
if (bp.newvalue != 0)
|
if (bp.newvalue != 0)
|
||||||
{
|
{
|
||||||
// NOTE(neobrain): Apparently tmemodd doesn't affect hardware behavior at all (libogc uses it just as a buffer and switches its contents with tmemeven whenever this is called)
|
|
||||||
BPS_TmemConfig& tmem_cfg = bpmem.tmem_config;
|
BPS_TmemConfig& tmem_cfg = bpmem.tmem_config;
|
||||||
u8* ram_ptr = Memory::GetPointer(tmem_cfg.preload_addr << 5);
|
u8* ram_ptr = Memory::GetPointer(tmem_cfg.preload_addr << 5);
|
||||||
u32 tmem_addr = tmem_cfg.preload_tmem_even * TMEM_LINE_SIZE;
|
u32 tmem_addr = 0;
|
||||||
|
|
||||||
|
if (bp.newvalue >> 16)
|
||||||
|
tmem_addr = tmem_cfg.preload_tmem_odd * TMEM_LINE_SIZE;
|
||||||
|
else
|
||||||
|
tmem_addr = tmem_cfg.preload_tmem_even * TMEM_LINE_SIZE;
|
||||||
|
|
||||||
u32 size = tmem_cfg.preload_tile_info.count * 32;
|
u32 size = tmem_cfg.preload_tile_info.count * 32;
|
||||||
memcpy(texMem + tmem_addr, ram_ptr, size);
|
memcpy(texMem + tmem_addr, ram_ptr, size);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user