mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 06:10:03 -06:00
fix bug with ALU operations and shift operands, where the shift operation could obliterate the carry flag
also, misc shit
This commit is contained in:
@ -89,11 +89,11 @@ void GPU2D::Write16(u32 addr, u16 val)
|
||||
{
|
||||
case 0x000:
|
||||
DispCnt = (DispCnt & 0xFFFF0000) | val;
|
||||
printf("[L] DISPCNT=%08X\n", DispCnt);
|
||||
//printf("[L] DISPCNT=%08X\n", DispCnt);
|
||||
return;
|
||||
case 0x002:
|
||||
DispCnt = (DispCnt & 0x0000FFFF) | (val << 16);
|
||||
printf("[H] DISPCNT=%08X\n", DispCnt);
|
||||
//printf("[H] DISPCNT=%08X\n", DispCnt);
|
||||
return;
|
||||
|
||||
case 0x008: BGCnt[0] = val; return;
|
||||
@ -110,7 +110,7 @@ void GPU2D::Write32(u32 addr, u32 val)
|
||||
switch (addr & 0x00000FFF)
|
||||
{
|
||||
case 0x000:
|
||||
printf("DISPCNT=%08X\n", val);
|
||||
//printf("DISPCNT=%08X\n", val);
|
||||
DispCnt = val;
|
||||
return;
|
||||
}
|
||||
@ -222,7 +222,7 @@ void GPU2D::DrawBG_Text_4bpp(u32 line, u16* dst, u32 bgnum)
|
||||
|
||||
if (Num)
|
||||
{
|
||||
tileset = (u8*)GPU::VRAM_BBG[((bgcnt & 0x000C) >> 2)];
|
||||
tileset = (u8*)GPU::VRAM_BBG[((bgcnt & 0x003C) >> 2)];
|
||||
tilemap = (u16*)GPU::VRAM_BBG[((bgcnt & 0x1800) >> 11)];
|
||||
tilemap += ((bgcnt & 0x0700) << 2);
|
||||
|
||||
@ -284,6 +284,7 @@ void GPU2D::DrawBG_Text_4bpp(u32 line, u16* dst, u32 bgnum)
|
||||
}
|
||||
//color = (i >> 4) + ((line >> 4) << 4);
|
||||
//if (Num) color = 0;
|
||||
//if (yoff>127) color=0;
|
||||
if (color)
|
||||
dst[i] = curpal[color];
|
||||
|
||||
|
Reference in New Issue
Block a user