fix Uchuu Keibitai SDF in oldppu (broken in r3360)
This commit is contained in:
parent
bb5cd1527d
commit
9ff8ecb856
|
@ -122,25 +122,25 @@ uint8* MMC5BGVRAMADR(uint32 A)
|
||||||
{
|
{
|
||||||
if(Sprite16)
|
if(Sprite16)
|
||||||
{
|
{
|
||||||
bool isPattern = !!PPUON;
|
bool isPattern = PPUON;
|
||||||
if (newppu && ppuphase == PPUPHASE_OBJ && isPattern)
|
if (ppuphase == PPUPHASE_OBJ && isPattern)
|
||||||
return &ABANKS[(A) >> 10][(A)];
|
return &ABANKS[(A) >> 10][(A)];
|
||||||
if (newppu && ppuphase == PPUPHASE_BG && isPattern)
|
if (ppuphase == PPUPHASE_BG && isPattern)
|
||||||
return &BBANKS[(A) >> 10][(A)];
|
return &BBANKS[(A) >> 10][(A)];
|
||||||
else if(mmc5ABMode == 0)
|
else if(mmc5ABMode == 0)
|
||||||
return &ABANKS[(A) >> 10][(A)];
|
return &ABANKS[(A) >> 10][(A)];
|
||||||
else
|
else
|
||||||
return &BBANKS[(A) >> 10][(A)];
|
return &BBANKS[(A) >> 10][(A)];
|
||||||
}
|
}
|
||||||
else return &ABANKS[(A) >> 10][(A)];
|
else return &ABANKS[(A) >> 10][(A)];;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Sprite16) {
|
if (!Sprite16) {
|
||||||
if (mmc5ABMode == 0)
|
if (mmc5ABMode == 0)
|
||||||
return MMC5SPRVRAMADR(A);
|
return &ABANKS[(A) >> 10][(A)];
|
||||||
else
|
else
|
||||||
return &MMC5BGVPage[(A) >> 10][(A)];
|
return &BBANKS[(A) >> 10][(A)];
|
||||||
} else return &MMC5BGVPage[(A) >> 10][(A)];
|
} else return &BBANKS[(A) >> 10][(A)];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mmc5_PPUWrite(uint32 A, uint8 V) {
|
static void mmc5_PPUWrite(uint32 A, uint8 V) {
|
||||||
|
|
|
@ -374,7 +374,7 @@ uint8 UPALRAM[0x03];//for 0x4/0x8/0xC addresses in palette, the ones in
|
||||||
#define MMC5SPRVRAMADR(V) &MMC5SPRVPage[(V) >> 10][(V)]
|
#define MMC5SPRVRAMADR(V) &MMC5SPRVPage[(V) >> 10][(V)]
|
||||||
#define VRAMADR(V) &VPage[(V) >> 10][(V)]
|
#define VRAMADR(V) &VPage[(V) >> 10][(V)]
|
||||||
|
|
||||||
extern uint8* MMC5BGVRAMADR(uint32 A);
|
uint8* MMC5BGVRAMADR(uint32 A);
|
||||||
|
|
||||||
//this duplicates logic which is embedded in the ppu rendering code
|
//this duplicates logic which is embedded in the ppu rendering code
|
||||||
//which figures out where to get CHR data from depending on various hack modes
|
//which figures out where to get CHR data from depending on various hack modes
|
||||||
|
@ -770,7 +770,7 @@ static DECLFR(A2007) {
|
||||||
|
|
||||||
if (debug_loggingCD)
|
if (debug_loggingCD)
|
||||||
LogAddress = GetCHRAddress(tmp);
|
LogAddress = GetCHRAddress(tmp);
|
||||||
if(MMC5Hack)
|
if(MMC5Hack && newppu)
|
||||||
VRAMBuffer = *MMC5BGVRAMADR(tmp);
|
VRAMBuffer = *MMC5BGVRAMADR(tmp);
|
||||||
else
|
else
|
||||||
VRAMBuffer = VPage[tmp >> 10][tmp];
|
VRAMBuffer = VPage[tmp >> 10][tmp];
|
||||||
|
|
Loading…
Reference in New Issue