-Optimizations to frame buffer drawing
This commit is contained in:
parent
4f32c12385
commit
9c816b2a50
|
@ -517,30 +517,23 @@ static INLINE void GPU_ligne(Screen * screen, u16 l)
|
|||
return;
|
||||
case 2: // Display framebuffer
|
||||
{
|
||||
//addition from Normatt
|
||||
int ii = l * 256 * 2;
|
||||
u8 * vram;
|
||||
|
||||
/* we only draw one of the VRAM blocks */
|
||||
vram_bank = gpu->dispCnt.bits.VRAM_Block ;
|
||||
|
||||
// if(!(gpu->lcd)) dest = mdst; else dest = sdst;
|
||||
dest = dst ;
|
||||
{
|
||||
int ii = l * 256 * 2;
|
||||
// This probably only needs to be calculated once per frame, but at least it's better than before >_<
|
||||
if (MMU.vram_mode[vram_bank] & 4)
|
||||
vram = ARM9Mem.ARM9_LCD + (MMU.vram_mode[vram_bank] & 3) * 0x20000;
|
||||
else
|
||||
vram = ARM9Mem.ARM9_ABG + MMU.vram_mode[vram_bank] * 0x20000;
|
||||
|
||||
for (i=0; i<(256 * 2); i+=2)
|
||||
{
|
||||
u8 * vram ;
|
||||
if (MMU.vram_mode[vram_bank] & 4)
|
||||
{
|
||||
vram = ARM9Mem.ARM9_LCD + (MMU.vram_mode[vram_bank] & 3) * 0x20000;
|
||||
} else
|
||||
{
|
||||
vram = ARM9Mem.ARM9_ABG + MMU.vram_mode[vram_bank] * 0x20000;
|
||||
}
|
||||
|
||||
T2WriteWord(dest, i, T1ReadWord(vram, ii));
|
||||
T2WriteWord(dst, i, T1ReadWord(vram, ii));
|
||||
ii+=2;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
return;
|
||||
case 3:
|
||||
|
|
Loading…
Reference in New Issue