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 mostly involving mmc5. this might be incomplete.
| 400 | //mostly involving mmc5. |
| 401 | //this might be incomplete. |
| 402 | uint8* FCEUPPU_GetCHR(uint32 vadr, uint32 refreshaddr) { |
| 403 | if (MMC5Hack) { |
| 404 | if (MMC5HackCHRMode == 1) { |
| 405 | uint8 *C = MMC5HackVROMPTR; |
| 406 | C += (((MMC5HackExNTARAMPtr[refreshaddr & 0x3ff]) & 0x3f & MMC5HackVROMMask) << 12) + (vadr & 0xfff); |
| 407 | C += (MMC50x5130 & 0x3) << 18; //11-jun-2009 for kuja_killer |
| 408 | return C; |
| 409 | } else { |
| 410 | return MMC5BGVRAMADR(vadr); |
| 411 | } |
| 412 | } else return VRAMADR(vadr); |
| 413 | } |
| 414 | |
| 415 | //likewise for ATTR |
| 416 | int FCEUPPU_GetAttr(int ntnum, int xt, int yt) { |
no test coverage detected