| 52 | } |
| 53 | |
| 54 | static void MMC1PRG(void) { |
| 55 | uint8 offs_16banks = DRegs[1] & 0x10; |
| 56 | uint8 prg_reg = DRegs[3] & 0xF; |
| 57 | |
| 58 | setprg8r(0x10, 0x6000, DRegs[1] & 3); |
| 59 | |
| 60 | switch (DRegs[0] & 0xC) { |
| 61 | case 0xC: |
| 62 | setprg16(0x8000, (prg_reg + offs_16banks)); |
| 63 | setprg16(0xC000, 0xF + offs_16banks); |
| 64 | break; |
| 65 | case 0x8: |
| 66 | setprg16(0xC000, (prg_reg + offs_16banks)); |
| 67 | setprg16(0x8000, offs_16banks); |
| 68 | break; |
| 69 | case 0x0: |
| 70 | case 0x4: |
| 71 | setprg16(0x8000, ((prg_reg & ~1) + offs_16banks)); |
| 72 | setprg16(0xc000, ((prg_reg & ~1) + offs_16banks + 1)); |
| 73 | break; |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | static void MMC1MIRROR(void) { |
| 78 | switch (DRegs[0] & 3) { |
no test coverage detected