Skip to content

Commit

Permalink
close gaps in VRAM mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Arisotura committed Apr 9, 2022
1 parent 86f725f commit 0feed13
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/GPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,8 @@ u8* GetUniqueBankPtr(u32 mask, u32 offset)

void MapVRAM_AB(u32 bank, u8 cnt)
{
cnt &= 0x9B;

u8 oldcnt = VRAMCNT[bank];
VRAMCNT[bank] = cnt;

Expand Down Expand Up @@ -587,6 +589,8 @@ void MapVRAM_AB(u32 bank, u8 cnt)

void MapVRAM_CD(u32 bank, u8 cnt)
{
cnt &= 0x9F;

u8 oldcnt = VRAMCNT[bank];
VRAMCNT[bank] = cnt;

Expand Down Expand Up @@ -671,6 +675,8 @@ void MapVRAM_CD(u32 bank, u8 cnt)

void MapVRAM_E(u32 bank, u8 cnt)
{
cnt &= 0x87;

u8 oldcnt = VRAMCNT[bank];
VRAMCNT[bank] = cnt;

Expand Down Expand Up @@ -733,6 +739,8 @@ void MapVRAM_E(u32 bank, u8 cnt)

void MapVRAM_FG(u32 bank, u8 cnt)
{
cnt &= 0x9F;

u8 oldcnt = VRAMCNT[bank];
VRAMCNT[bank] = cnt;

Expand Down Expand Up @@ -831,6 +839,8 @@ void MapVRAM_FG(u32 bank, u8 cnt)

void MapVRAM_H(u32 bank, u8 cnt)
{
cnt &= 0x83;

u8 oldcnt = VRAMCNT[bank];
VRAMCNT[bank] = cnt;

Expand Down Expand Up @@ -891,6 +901,8 @@ void MapVRAM_H(u32 bank, u8 cnt)

void MapVRAM_I(u32 bank, u8 cnt)
{
cnt &= 0x83;

u8 oldcnt = VRAMCNT[bank];
VRAMCNT[bank] = cnt;

Expand Down

0 comments on commit 0feed13

Please sign in to comment.