close gaps in VRAM mapping

This commit is contained in:
Arisotura 2022-04-09 19:40:35 +02:00
parent 86f725f2f2
commit 0feed13cc4
1 changed files with 12 additions and 0 deletions

View File

@ -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;
@ -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;
@ -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;
@ -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;
@ -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;
@ -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;