mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-25 07:10:00 -06:00
* fix bug with 0-line tall windows (would be enabled for the whole screen)
* map some I/O ports
This commit is contained in:
@ -155,6 +155,8 @@ u16 GPU2D::Read16(u32 addr)
|
|||||||
|
|
||||||
case 0x064: return CaptureCnt & 0xFFFF;
|
case 0x064: return CaptureCnt & 0xFFFF;
|
||||||
case 0x066: return CaptureCnt >> 16;
|
case 0x066: return CaptureCnt >> 16;
|
||||||
|
|
||||||
|
case 0x06C: return MasterBrightness;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("unknown GPU read16 %08X\n", addr);
|
printf("unknown GPU read16 %08X\n", addr);
|
||||||
@ -746,10 +748,10 @@ u16* GPU2D::GetOBJExtPal(u32 pal)
|
|||||||
void GPU2D::CheckWindows(u32 line)
|
void GPU2D::CheckWindows(u32 line)
|
||||||
{
|
{
|
||||||
line &= 0xFF;
|
line &= 0xFF;
|
||||||
if (line == Win0Coords[2]) Win0Active = true;
|
if (line == Win0Coords[3]) Win0Active = false;
|
||||||
else if (line == Win0Coords[3]) Win0Active = false;
|
else if (line == Win0Coords[2]) Win0Active = true;
|
||||||
if (line == Win1Coords[2]) Win1Active = true;
|
if (line == Win1Coords[3]) Win1Active = false;
|
||||||
else if (line == Win1Coords[3]) Win1Active = false;
|
else if (line == Win1Coords[2]) Win1Active = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPU2D::CalculateWindowMask(u32 line, u8* mask)
|
void GPU2D::CalculateWindowMask(u32 line, u8* mask)
|
||||||
|
@ -1397,11 +1397,11 @@ u16 ARM9IORead16(u32 addr)
|
|||||||
case 0x04000304: return PowerControl9;
|
case 0x04000304: return PowerControl9;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (addr >= 0x04000000 && addr < 0x04000060)
|
if ((addr >= 0x04000000 && addr < 0x04000060) || (addr == 0x0400006C))
|
||||||
{
|
{
|
||||||
return GPU::GPU2D_A->Read16(addr);
|
return GPU::GPU2D_A->Read16(addr);
|
||||||
}
|
}
|
||||||
if (addr >= 0x04001000 && addr < 0x04001060)
|
if ((addr >= 0x04001000 && addr < 0x04001060) || (addr == 0x0400106C))
|
||||||
{
|
{
|
||||||
return GPU::GPU2D_B->Read16(addr);
|
return GPU::GPU2D_B->Read16(addr);
|
||||||
}
|
}
|
||||||
@ -1507,11 +1507,11 @@ u32 ARM9IORead32(u32 addr)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (addr >= 0x04000000 && addr < 0x04000060)
|
if ((addr >= 0x04000000 && addr < 0x04000060) || (addr == 0x0400006C))
|
||||||
{
|
{
|
||||||
return GPU::GPU2D_A->Read32(addr);
|
return GPU::GPU2D_A->Read32(addr);
|
||||||
}
|
}
|
||||||
if (addr >= 0x04001000 && addr < 0x04001060)
|
if ((addr >= 0x04001000 && addr < 0x04001060) || (addr == 0x0400106C))
|
||||||
{
|
{
|
||||||
return GPU::GPU2D_B->Read32(addr);
|
return GPU::GPU2D_B->Read32(addr);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user