newppu: fix mappers that used PPU_hook, a truly haphazard system. I am calling PPU_hook far more often than the old ppu for these games, but i would expect the PPU_hook handlers to be resilient against that.
This commit is contained in:
parent
6411ba535a
commit
72eab717f5
|
@ -401,6 +401,8 @@ int FCEUPPU_GetAttr(int ntnum, int xt, int yt) {
|
|||
inline void FFCEUX_PPUWrite_Default(uint32 A, uint8 V) {
|
||||
uint32 tmp = A;
|
||||
|
||||
if(PPU_hook) PPU_hook(A);
|
||||
|
||||
if(tmp<0x2000)
|
||||
{
|
||||
if(PPUCHRRAM&(1<<(tmp>>10)))
|
||||
|
@ -429,6 +431,8 @@ inline void FFCEUX_PPUWrite_Default(uint32 A, uint8 V) {
|
|||
uint8 FASTCALL FFCEUX_PPURead_Default(uint32 A) {
|
||||
uint32 tmp = A;
|
||||
|
||||
if(PPU_hook) PPU_hook(A);
|
||||
|
||||
if(tmp<0x2000)
|
||||
{
|
||||
return VPage[tmp>>10][tmp];
|
||||
|
|
|
@ -27,6 +27,8 @@ uint8* FCEUPPU_GetCHR(uint32 vadr, uint32 refreshaddr);
|
|||
void PPU_ResetHooks();
|
||||
extern uint8 (FASTCALL *FFCEUX_PPURead)(uint32 A);
|
||||
extern void (*FFCEUX_PPUWrite)(uint32 A, uint8 V);
|
||||
extern uint8 FASTCALL FFCEUX_PPURead_Default(uint32 A);
|
||||
void FFCEUX_PPUWrite_Default(uint32 A, uint8 V);
|
||||
|
||||
extern int scanline;
|
||||
extern uint8 PPU[4];
|
||||
|
|
Loading…
Reference in New Issue