mirror of
https://gitee.com/anod/open_agb_firm.git
synced 2025-05-06 22:04:10 +08:00
试试使用下屏作为显示
This commit is contained in:
parent
fe386988ff
commit
019b1501c9
@ -675,17 +675,19 @@ static void gbaGfxHandler(void *args)
|
||||
// 地址0x18180000保存的是360x240大小的贴图数据rgb888(序列:↑↘↑)
|
||||
// 地址0x18200000保存的是512x512大小的GBA的240x160贴图数据(序列:→↙→)
|
||||
// 所以GPU做的事情就是将18200000的数据逆时针旋转90°
|
||||
int src_offset = 16*240*3;
|
||||
int src = 16*240*3;
|
||||
int dst_offset = src_offset;
|
||||
if( g_oafConfig.scaler == 0 )
|
||||
{
|
||||
int base_offset = 120; // 3ds高240, gba高160,居中需要平移40个像素,rgb888每个像素3字节,共120字节
|
||||
// 但是,gpu的transfer engine只支持16字节对齐的地址。现在需要
|
||||
// 0x18180000 <----------> screen_top + 16*240*3 + 120 是正确对准,左边对16求余为0,右边为8
|
||||
dst_offset += 144;
|
||||
// 现在右边加上8,是2|2/3个像素
|
||||
GX_displayTransfer((u32*)(0x18180000 + 24*240*3), 300u<<16 | 240u,
|
||||
GFX_getFramebuffer(SCREEN_BOT) + 40*3, 300u<<16 | 240u, 2u<<12 | 1u<<8);
|
||||
}
|
||||
GX_displayTransfer((u32*)(0x18180000 + src_offset), 368u<<16 | 240u,
|
||||
GFX_getFramebuffer(SCREEN_TOP) + dst_offset, 368u<<16 | 240u, 1u<<12 | 1u<<8);
|
||||
else GX_displayTransfer((u32*)(0x18180000 + 16*240*3), 368u<<16 | 240u,
|
||||
GFX_getFramebuffer(SCREEN_TOP) + 16*240*3, 368u<<16 | 240u, 1u<<12 | 1u<<8);
|
||||
GFX_waitForPPF();
|
||||
GFX_swapFramebufs();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user