Previous 15994 Revisions Next

r8284 Thursday 17th June, 2010 at 07:27:25 UTC by Fabio Priuli
[NES] added hardwired mirroring handling to UNIF & PCB code
[src/mess/machine]nes.c nes_pcb.c nes_unif.c

src/mess/machine/nes_pcb.c
r8283r8284
578578   { "BMC-70IN1",           UNSUPPORTED_BOARD },   // mapper 236?
579579   { "BMC-70IN1B",          UNSUPPORTED_BOARD },   // mapper 236?
580580   { "BMC-SUPERHIK-KOF",    UNSUPPORTED_BOARD },// mapper 251
581   { "BMC-POWERJOY",    UNSUPPORTED_BOARD },// mapper 126
581582// are there dumps of games with these boards?
582583   { "WAIXING-I",        UNSUPPORTED_BOARD }, // [supported by NEStopia - we need more info]
583584   { "WAIXING-J",        UNSUPPORTED_BOARD }, // [supported by NEStopia - we need more info]
r8283r8284
16031604         LOG_MMC(("MMC5 mid RAM bank select: %02x\n", data & 0x07));
16041605         // FIXME: a few Koei games have both WRAM & BWRAM but here we don't support this (yet)
16051606         if (state->battery)
1606            state->prg_bank[4] = state->battery_bank5_start + (data & 0x07);
1607            wram_bank(space->machine, data, NES_BATTERY);
16071608         else
1608            state->prg_bank[4] = state->prgram_bank5_start + (data & 0x07);
1609         memory_set_bank(space->machine, "bank5", state->prg_bank[4]);
1610         //wram_bank(space->machine, data & 0x07, NES_WRAM);
1609            wram_bank(space->machine, data, NES_WRAM);
16111610         break;
16121611         
16131612      case 0x1014: /* $5114 */
src/mess/machine/nes.c
r8283r8284
578578         }
579579
580580         state->hard_mirroring = local_options & 0x01;
581//         printf("%d\n", state->hard_mirroring);
581582         state->battery = local_options & 0x02;
582583         state->trainer = local_options & 0x04;
583584         state->four_screen_vram = local_options & 0x08;
r8283r8284
10501051      state->ce_mask = 0;
10511052      state->ce_state = 0;
10521053
1054      /* Check for mirroring */
1055      // FIXME: this is hacky. it would be better to include these in some feature attribute
1056      if (image_get_software_region(image, "mirror") != NULL)
1057      {
1058         int value = image_get_software_region_length(image, "mirror");
1059         if (value == 2)
1060            state->hard_mirroring = 0;
1061         if (value == 4)
1062            state->hard_mirroring = 1;
1063      }
10531064      /* Check for pins */
10541065      // FIXME: this is hacky. it would be better to include these in some feature attribute
10551066      if (image_get_software_region(image, "pin26") != NULL)
src/mess/machine/nes_unif.c
r8283r8284
4646enum
4747{
4848   NT_X = 0,
49   NT_HORZ,   // not hardwired, horizontal at start
50   NT_VERT,   // not hardwired, vertical at start
49   NT_HORZ,
50   NT_VERT,
5151   NT_Y,
5252   NT_1SCREEN,
5353   NT_4SCR_2K,
r8283r8284
167167         break;
168168      case STD_UXROM:   // mapper 2
169169      case STD_UN1ROM:   // mapper 94
170         prg32(machine, 0);
170         prg16_89ab(machine, 0);
171         prg16_cdef(machine, state->prg_chunks - 1);
171172         break;
172173      case UXROM_CC:   // mapper 180
173174         prg32(machine, 0);
r8283r8284
12651266   state->battery = unif_board->nvwram;   // we should implement battery banks based on the size of this...
12661267   state->battery_size = NES_BATTERY_SIZE; // FIXME: we should allow for smaller battery!
12671268   state->prg_ram = unif_board->wram;   // we should implement WRAM banks based on the size of this...
1268   // state->hard_mirroring = unif_board->nt;
12691269   state->four_screen_vram = (unif_board->nt == NT_4SCR_2K || unif_board->nt == NT_4SCR_4K) ? 1 : 0;
12701270
1271   if (unif_board->nt == NT_VERT)
1272      state->hard_mirroring = 1;
1273   else if (unif_board->nt == NT_HORZ)
1274      state->hard_mirroring = 0;
1275
12711276   if (unif_board->chrram <= CHRRAM_8)
12721277      state->vram_chunks = 1;
12731278   else if (unif_board->chrram == CHRRAM_16)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team