reverted some of previous hacks fixed newppu crash... seems something with mmc5 in oldppu is wrong now...

This commit is contained in:
CaH4e3 2018-02-18 12:52:07 +00:00
parent fbece4b5e8
commit 5d7d99a3d9
2 changed files with 3 additions and 16 deletions

View File

@ -433,12 +433,7 @@ unsigned int cdloggerVideoDataSize = 0;
int GetCHRAddress(int A) { int GetCHRAddress(int A) {
if (cdloggerVideoDataSize) { if (cdloggerVideoDataSize) {
// int result = &VPage[A >> 10][A] - CHRptr[0]; int result = &VPage[A >> 10][A] - CHRptr[0];
int result;
if(MMC5Hack)
result = MMC5BGVRAMADR(A) - CHRptr[0];
else
result = &VPage[A >> 10][A] - CHRptr[0];
if ((result >= 0) && (result < (int)cdloggerVideoDataSize)) if ((result >= 0) && (result < (int)cdloggerVideoDataSize))
return result; return result;
} else } else
@ -1428,12 +1423,10 @@ static void FetchSpriteData(void) {
C = VRAMADR(vadr); C = VRAMADR(vadr);
if (SpriteON) if (SpriteON)
// RENDER_LOG(vadr);
RENDER_LOGP(C); RENDER_LOGP(C);
dst.ca[0] = C[0]; dst.ca[0] = C[0];
if (SpriteON) if (SpriteON)
// RENDER_LOG(vadr + 8); RENDER_LOGP(C + 8);
RENDER_LOGP(C+8);
dst.ca[1] = C[8]; dst.ca[1] = C[8];
dst.x = spr->x; dst.x = spr->x;
dst.atr = spr->atr; dst.atr = spr->atr;
@ -1482,7 +1475,6 @@ static void FetchSpriteData(void) {
else else
C = VRAMADR(vadr); C = VRAMADR(vadr);
if (SpriteON) if (SpriteON)
// RENDER_LOG(vadr);
RENDER_LOGP(C); RENDER_LOGP(C);
dst.ca[0] = C[0]; dst.ca[0] = C[0];
if (ns < 8) { if (ns < 8) {
@ -1490,8 +1482,7 @@ static void FetchSpriteData(void) {
PPU_hook(vadr); PPU_hook(vadr);
} }
if (SpriteON) if (SpriteON)
// RENDER_LOG(vadr + 8); RENDER_LOGP(C + 8);
RENDER_LOGP(C+8);
dst.ca[1] = C[8]; dst.ca[1] = C[8];
dst.x = spr->x; dst.x = spr->x;
dst.atr = spr->atr; dst.atr = spr->atr;

View File

@ -89,24 +89,20 @@ pshift[1] <<= 8;
#ifdef PPU_BGFETCH #ifdef PPU_BGFETCH
if (RefreshAddr & 1) { if (RefreshAddr & 1) {
if(ScreenON) if(ScreenON)
// RENDER_LOG(vadr + 8);
RENDER_LOGP(C + 8); RENDER_LOGP(C + 8);
pshift[0] |= C[8]; pshift[0] |= C[8];
pshift[1] |= C[8]; pshift[1] |= C[8];
} else { } else {
if(ScreenON) if(ScreenON)
// RENDER_LOG(vadr);
RENDER_LOGP(C); RENDER_LOGP(C);
pshift[0] |= C[0]; pshift[0] |= C[0];
pshift[1] |= C[0]; pshift[1] |= C[0];
} }
#else #else
if(ScreenON) if(ScreenON)
// RENDER_LOG(vadr);
RENDER_LOGP(C); RENDER_LOGP(C);
pshift[0] |= C[0]; pshift[0] |= C[0];
if(ScreenON) if(ScreenON)
// RENDER_LOG(vadr + 8);
RENDER_LOGP(C + 8); RENDER_LOGP(C + 8);
pshift[1] |= C[8]; pshift[1] |= C[8];
#endif #endif