Previous 15994 Revisions Next

r15310 Thursday 24th May, 2012 at 20:11:33 UTC by Fabio Priuli
nes.c: fixed emulation of DAOU306 pcb needed by Janggun ui Adeul. [Fabio Priuli]
[src/mess/machine]nes_pcb.c

src/mess/machine/nes_pcb.c
r15309r15310
60976097
60986098 In MESS: Supported.
60996099
6100 Notes: Metal Force and Buzz & Waldog only use the the first
6101 4 regs and no mirroring. Janggun ui Adeul uses all features
6102
61006103 *************************************************************/
61016104
61026105static WRITE8_HANDLER( daou306_w )
61036106{
6107   nes_state *state = space->machine().driver_data<nes_state>();
61046108   LOG_MMC(("daou306_w, offset: %04x, data: %02x\n", offset, data));
6109   int reg = BIT(offset, 2) ? 8 : 0;
61056110
61066111   switch (offset)
61076112   {
61086113      case 0x4000:
6109         chr1_0(space->machine(), data, CHRROM);
6114      case 0x4004:
6115         state->m_mmc_reg[reg + 0] = data;
6116         chr1_0(space->machine(), state->m_mmc_reg[0] | (state->m_mmc_reg[8] << 8), CHRROM);
61106117         break;
61116118      case 0x4001:
6112         chr1_1(space->machine(), data, CHRROM);
6119      case 0x4005:
6120         state->m_mmc_reg[reg + 1] = data;
6121         chr1_1(space->machine(), state->m_mmc_reg[1] | (state->m_mmc_reg[9] << 8), CHRROM);
61136122         break;
61146123      case 0x4002:
6115         chr1_2(space->machine(), data, CHRROM);
6124      case 0x4006:
6125         state->m_mmc_reg[reg + 2] = data;
6126         chr1_2(space->machine(), state->m_mmc_reg[2] | (state->m_mmc_reg[10] << 8), CHRROM);
61166127         break;
61176128      case 0x4003:
6118         chr1_3(space->machine(), data, CHRROM);
6129      case 0x4007:
6130         state->m_mmc_reg[reg + 3] = data;
6131         chr1_3(space->machine(), state->m_mmc_reg[3] | (state->m_mmc_reg[11] << 8), CHRROM);
61196132         break;
61206133      case 0x4008:
6121         chr1_4(space->machine(), data, CHRROM);
6134      case 0x400c:
6135         state->m_mmc_reg[reg + 4] = data;
6136         chr1_4(space->machine(), state->m_mmc_reg[4] | (state->m_mmc_reg[12] << 8), CHRROM);
61226137         break;
61236138      case 0x4009:
6124         chr1_5(space->machine(), data, CHRROM);
6139      case 0x400d:
6140         state->m_mmc_reg[reg + 5] = data;
6141         chr1_5(space->machine(), state->m_mmc_reg[5] | (state->m_mmc_reg[13] << 8), CHRROM);
61256142         break;
61266143      case 0x400a:
6127         chr1_6(space->machine(), data, CHRROM);
6144      case 0x400e:
6145         state->m_mmc_reg[reg + 6] = data;
6146         chr1_6(space->machine(), state->m_mmc_reg[6] | (state->m_mmc_reg[14] << 8), CHRROM);
61286147         break;
61296148      case 0x400b:
6130         chr1_7(space->machine(), data, CHRROM);
6149      case 0x400f:
6150         state->m_mmc_reg[reg + 7] = data;
6151         chr1_7(space->machine(), state->m_mmc_reg[7] | (state->m_mmc_reg[15] << 8), CHRROM);
61316152         break;
61326153      case 0x4010:
61336154         prg16_89ab(space->machine(), data);
61346155         break;
6156      case 0x4014:
6157         if (data & 1)
6158            set_nt_mirroring(space->machine(), PPU_MIRROR_HORZ);
6159         else
6160            set_nt_mirroring(space->machine(), PPU_MIRROR_VERT);
6161         break;
61356162   }
61366163}
61376164

Previous 15994 Revisions Next


© 1998-2018 The MESS Team