-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;
|
return;
|
||||||
case 2: // Display framebuffer
|
case 2: // Display framebuffer
|
||||||
{
|
{
|
||||||
//addition from Normatt
|
int ii = l * 256 * 2;
|
||||||
/* we only draw one of the VRAM blocks */
|
u8 * vram;
|
||||||
vram_bank = gpu->dispCnt.bits.VRAM_Block ;
|
|
||||||
|
|
||||||
// if(!(gpu->lcd)) dest = mdst; else dest = sdst;
|
/* we only draw one of the VRAM blocks */
|
||||||
dest = dst ;
|
vram_bank = gpu->dispCnt.bits.VRAM_Block ;
|
||||||
{
|
|
||||||
int ii = l * 256 * 2;
|
|
||||||
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));
|
// This probably only needs to be calculated once per frame, but at least it's better than before >_<
|
||||||
ii+=2;
|
if (MMU.vram_mode[vram_bank] & 4)
|
||||||
}
|
vram = ARM9Mem.ARM9_LCD + (MMU.vram_mode[vram_bank] & 3) * 0x20000;
|
||||||
return;
|
else
|
||||||
}
|
vram = ARM9Mem.ARM9_ABG + MMU.vram_mode[vram_bank] * 0x20000;
|
||||||
|
|
||||||
|
for (i=0; i<(256 * 2); i+=2)
|
||||||
|
{
|
||||||
|
T2WriteWord(dst, i, T1ReadWord(vram, ii));
|
||||||
|
ii+=2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case 3:
|
case 3:
|
||||||
|
|
Loading…
Reference in New Issue