Previous 15994 Revisions Next

r5155 Sunday 5th July, 2009 at 13:59:40 UTC by Nathan Woods
[NES] Fixed mappers #88, #193, added mappers #107, #154. [Heretical One]
[docs]messnew.txt
[src/mess/machine]nes_mmc.c

src/mess/machine/nes_mmc.c
r5154r5155
8282
8383static int mapper41_chr, mapper41_reg2;
8484
85static int mapper154_reg;
86
8587static int mapper45_data[4], mapper45_cmd;
8688
8789static int mapper64_data[0x10], mapper64_cmd;
r5154r5155
42464248
42474249   /* ??? */
42484250}
4251static WRITE8_HANDLER( mapper107_w )
4252{
4253   prg32(space, data>>1);
4254   chr8(space->machine, data);
4255}
42494256
42504257static WRITE8_HANDLER( mapper112_w )
42514258{
r5154r5155
43404347   /* Switch 32k prg bank */
43414348   prg32 (space, data & 0x07);
43424349}
4350static WRITE8_HANDLER( mapper154_w )
4351{
4352   nes_state *state = space->machine->driver_data;
4353
4354   switch(offset&1)
4355   {
4356   case 0:
4357      {
4358         (data&0x40)?ppu2c0x_set_mirroring(state->ppu,PPU_MIRROR_HIGH):ppu2c0x_set_mirroring(state->ppu,PPU_MIRROR_LOW);
4359         mapper154_reg=data&7;
4360         break;
4361      }
4362   case 1:
4363      {
4364         switch(mapper154_reg)
4365         {
4366            case 0:chr2_0(space->machine,(data)>>1);break;
4367            case 1:chr2_2(space->machine,(data)>>1);break;
4368            case 2:chr1_4(space->machine,(data)|0x40);break;
4369            case 3:chr1_5(space->machine,(data)|0x40);break;
4370            case 4:chr1_6(space->machine,(data)|0x40);break;
4371            case 5:chr1_7(space->machine,(data)|0x40);break;
4372            case 6:prg8_89(space,data);break;
4373            case 7:prg8_ab(space,data);break;
4374
4375         }
4376         break;
4377      }
4378   }
4379}
4380static WRITE8_HANDLER( mapper88_w )
4381{
4382   switch(offset&0x8001)
4383   {
4384   case 0x8000:
4385      {
4386         //(data&0x40)?ppu2c0x_set_mirroring(state->ppu,PPU_MIRROR_HIGH):ppu2c0x_set_mirroring(state->ppu,PPU_MIRROR_LOW);
4387         mapper154_reg=data&7;
4388         break;
4389      }
4390   case 0x8001:
4391      {
4392         switch(mapper154_reg)
4393         {
4394            case 0:chr2_0(space->machine,(data&0x3F)>>1);break;
4395            case 1:chr2_2(space->machine,(data&0x3F)>>1);break;
4396            case 2:chr1_4(space->machine,(data&0x3F)|0x40);break;
4397            case 3:chr1_5(space->machine,(data&0x3F)|0x40);break;
4398            case 4:chr1_6(space->machine,(data&0x3F)|0x40);break;
4399            case 5:chr1_7(space->machine,(data&0x3F)|0x40);break;
4400            case 6:prg8_89(space,data);break;
4401            case 7:prg8_ab(space,data);break;
4402
4403         }
4404         break;
4405      }
4406   }
4407}
43434408static WRITE8_HANDLER( mapper180_w )
43444409{
43454410   LOG_MMC(("* Mapper 180 switch, data: %02x\n", data));
r5154r5155
44494514      chr2_6( space->machine, data >> 1 );
44504515      break;
44514516   case 3:
4452      prg16_89ab( space, data );
4517      prg8_89(space, data);
44534518      break;
44544519   }
44554520}
r5154r5155
53085373         prg16_89ab( space, nes.prg_chunks-1 );
53095374         prg16_cdef( space, nes.prg_chunks-1 );
53105375         break;
5376      case 107:
53115377      case 113:
53125378      case 133:
53135379         prg32(space, 0);
r5154r5155
53175383      case 144:
53185384         prg32(space, 0);
53195385         break;
5386      case 154:
5387      case 88:
5388         prg16_89ab (space, nes.prg_chunks-2);
5389         prg16_cdef (space, nes.prg_chunks-1);
5390         break;
5391
53205392      case 180:
53215393         prg16_89ab(space, 0);
53225394         prg16_cdef(space, 0);
r5154r5155
53315403         break;
53325404      case 193:
53335405         prg32( space, ( nes.prg_chunks - 1 ) >> 1 );
5406         ppu2c0x_set_mirroring(state->ppu, PPU_MIRROR_VERT);
53345407         break;
53355408      case 200:
53365409         prg16_89ab( space, nes.prg_chunks - 1 );
r5154r5155
54595532   { 85, "Konami VRC 7",         NULL, NULL, NULL, konami_vrc7_w, NULL, NULL, konami_irq },
54605533   { 86, "Jaleco Early Mapper 2",   NULL, NULL, NULL, mapper86_w, NULL, NULL, NULL },
54615534   { 87, "74161/32 VROM sw-a",      NULL, NULL, mapper87_m_w, NULL, NULL, NULL, NULL },
5462   { 88, "Namco 118",            NULL, NULL, NULL, mapper4_w, NULL, NULL, mapper4_irq },
5535   { 88, "Namco 118",            NULL, NULL, NULL, mapper88_w, NULL, NULL, NULL },
54635536   { 89, "Sunsoft Early",         NULL, NULL, NULL, mapper89_w, NULL, NULL, NULL },
54645537// 90 - pirate mapper
54655538   { 91, "HK-SF3 (bootleg)",      NULL, NULL, mapper91_m_w, NULL, NULL, NULL, NULL },
r5154r5155
54725545// 99 - vs. system
54735546// 100 - images hacked to work with nesticle
54745547   { 101, "?? LS161",            NULL, NULL, mapper101_m_w, mapper101_w, NULL, NULL, NULL },
5548   { 107, "Magic Dragon",         NULL, NULL, NULL, mapper107_w, NULL, NULL, NULL },
54755549   { 112, "Asper",               NULL, NULL, NULL, mapper112_w, NULL, NULL, NULL },
54765550   { 113, "Sachen/Hacker/Nina",   mapper113_l_w, NULL, NULL, NULL, NULL, NULL, NULL },
54775551   { 118, "MMC3?",               NULL, NULL, NULL, mapper118_w, NULL, NULL, mapper4_irq },
r5154r5155
54795553   { 133, "Sachen",            mapper133_l_w, NULL, NULL, NULL, NULL, NULL, NULL },
54805554   { 140, "Jaleco",                        NULL, NULL, mapper_140_m_w, NULL, NULL, NULL, NULL },
54815555   { 144, "AGCI 50282",         NULL, NULL, NULL, mapper144_w, NULL, NULL, NULL }, //Death Race only
5556   { 154, "Devil Man",            NULL, NULL, NULL, mapper154_w, NULL, NULL, NULL },
54825557   { 180, "Nihon Bussan - PRG HI",   NULL, NULL, NULL, mapper180_w, NULL, NULL, NULL },
54835558   { 182, "Super games",         NULL, NULL, NULL, mapper182_w, NULL, NULL, mapper182_irq },
54845559   { 184, "Sunsoft VROM/4K",      NULL, NULL, mapper184_m_w, NULL, NULL, NULL, NULL },
docs/messnew.txt
r5154r5155
4848
4949- [MC1000] System is now basically working. [Curt Coder]
5050
51- [NES] Fixed mappers #88, #193, added mappers #107, #154.  [Heretical One]
52
5153- [PC] Renamed bondwell to bw230. [Curt Coder]
5254
5355- [SEGA CD] Split up sets and added new dumps. [Justin Kerk, TmEE]

Previous 15994 Revisions Next


© 1998-2018 The MESS Team