| 1673 | } |
| 1674 | |
| 1675 | static void CopySprites(uint8 *target) { |
| 1676 | uint8 *P = target; |
| 1677 | |
| 1678 | if (!spork) return; |
| 1679 | spork = 0; |
| 1680 | |
| 1681 | if (!rendersprites) return; //User asked to not display sprites. |
| 1682 | |
| 1683 | if(!SpriteON) return; |
| 1684 | |
| 1685 | int start=8; |
| 1686 | if(PPU[1] & 0x04) |
| 1687 | start = 0; |
| 1688 | |
| 1689 | for(int i=start;i<256;i++) |
| 1690 | { |
| 1691 | uint8 t = sprlinebuf[i]; |
| 1692 | if(!(t&0x80)) |
| 1693 | if (!(t & 0x40) || (P[i] & 0x40)) // Normal sprite || behind bg sprite |
| 1694 | P[i] = t; |
| 1695 | } |
| 1696 | } |
| 1697 | |
| 1698 | void FCEUPPU_SetVideoSystem(int w) { |
| 1699 | if (w) { |