Skip to content

Commit

Permalink
I don't think NWRAMMask is relevant here
Browse files Browse the repository at this point in the history
  • Loading branch information
Arisotura committed Oct 13, 2022
1 parent cdd05c1 commit 243a027
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/DSi_DSP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ u16 DSPRead16(u32 addr)
{
if (!(addr & 0x40000))
{
u8* ptr = DSi::NWRAMMap_B[2][(addr >> 15) & DSi::NWRAMMask[0][1]];
u8* ptr = DSi::NWRAMMap_B[2][(addr >> 15) & 0x7];
return ptr ? *(u16*)&ptr[addr & 0x7FFF] : 0;
}
else
{
u8* ptr = DSi::NWRAMMap_C[2][(addr >> 15) & DSi::NWRAMMask[0][2]];
u8* ptr = DSi::NWRAMMap_C[2][(addr >> 15) & 0x7];
return ptr ? *(u16*)&ptr[addr & 0x7FFF] : 0;
}
}
Expand All @@ -109,12 +109,12 @@ void DSPWrite16(u32 addr, u16 val)

if (!(addr & 0x40000))
{
u8* ptr = DSi::NWRAMMap_B[2][(addr >> 15) & DSi::NWRAMMask[0][1]];
u8* ptr = DSi::NWRAMMap_B[2][(addr >> 15) & 0x7];
if (ptr) *(u16*)&ptr[addr & 0x7FFF] = val;
}
else
{
u8* ptr = DSi::NWRAMMap_C[2][(addr >> 15) & DSi::NWRAMMask[0][2]];
u8* ptr = DSi::NWRAMMap_C[2][(addr >> 15) & 0x7];
if (ptr) *(u16*)&ptr[addr & 0x7FFF] = val;
}
}
Expand Down

0 comments on commit 243a027

Please sign in to comment.