Previous 15994 Revisions Next

r1546 Saturday 19th January, 2008 at 19:15:59 UTC by Wilbert Pol
[NES] Added support for mapper 43.
[docs]messnew.txt
[src/mess/machine]nes_mmc.c

src/mess/machine/nes_mmc.c
r1545r1546
28662866   }
28672867}
28682868
2869static WRITE8_HANDLER( mapper43_w )
2870{
2871   int      bank = ( ( ( offset >> 8 ) & 0x03 ) * 0x20 ) + ( offset & 0x1F );
2872
2873   LOG_MMC(("mapper43_w, offset: %04x, data: %02x\n", offset, data));
2874
2875   ppu2c0x_set_mirroring( 0, ( offset & 0x2000 ) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT );
2876
2877   if ( offset & 0x0800 )
2878   {
2879      if ( offset & 0x1000 )
2880      {
2881         if ( bank * 2 >= nes.prg_chunks )
2882         {
2883            memory_set_bankptr( 3, nes.wram );
2884            memory_set_bankptr( 4, nes.wram );
2885         }
2886         else
2887         {
2888            LOG_MMC(("mapper43_w, selecting upper 16KB bank of #%02x\n", bank));
2889            prg16_cdef( 2 * bank + 1 );
2890         }
2891      }
2892      else
2893      {
2894         if ( bank * 2 >= nes.prg_chunks )
2895         {
2896            memory_set_bankptr( 1, nes.wram );
2897            memory_set_bankptr( 2, nes.wram );
2898         }
2899         else
2900         {
2901            LOG_MMC(("mapper43_w, selecting lower 16KB bank of #%02x\n", bank));
2902            prg16_89ab( 2 * bank );
2903         }
2904      }
2905   }
2906   else
2907   {
2908      if ( bank * 2 >= nes.prg_chunks ) {
2909         memory_set_bankptr (1, nes.wram );
2910         memory_set_bankptr (2, nes.wram );
2911         memory_set_bankptr (3, nes.wram );
2912         memory_set_bankptr (4, nes.wram );
2913      }
2914      else
2915      {
2916         LOG_MMC(("mapper43_w, selecting 32KB bank #%02x\n", bank));
2917         prg32( bank );
2918      }
2919   }
2920}
2921
28692922static WRITE8_HANDLER( mapper64_m_w )
28702923{
28712924   logerror("mapper64_m_w, offset: %04x, data: %02x\n", offset, data);
r1545r1546
43434396         /* Switch in the last 32KB */
43444397         prg32( 0xFF );
43454398         break;
4399      case 43:
4400         prg32(0);
4401         memset( nes.wram, 0x2000, 0xFF );
4402         break;
43464403      case 70:
43474404//      case 86:
43484405         prg16_89ab (nes.prg_chunks-2);
r1545r1546
44814538   { 40, "SMB2j (bootleg)",      NULL, NULL, NULL, mapper40_w, NULL, NULL, mapper40_irq },
44824539   { 41, "Caltron 6-in-1",         NULL, NULL, mapper41_m_w, mapper41_w, NULL, NULL, NULL },
44834540   { 42, "Mario Baby",            NULL, NULL, NULL, mapper42_w, NULL, NULL, NULL },
4541   { 43, "150-in-1",            NULL, NULL, NULL, mapper43_w, NULL, NULL, NULL },
44844542   { 64, "Tengen",               NULL, NULL, mapper64_m_w, mapper64_w, NULL, NULL, mapper4_irq },
44854543   { 65, "Irem H3001",            NULL, NULL, NULL, mapper65_w, NULL, NULL, irem_irq },
44864544   { 66, "74161/32 Jaleco",      NULL, NULL, NULL, mapper66_w, NULL, NULL, NULL },
docs/messnew.txt
r1545r1546
2020  instead of dip switches and updated it to use the default black and white
2121  palette.  [Dirk Best]
2222
23- [NES] Added support for mapper 42.  [Wilbert Pol]
23- [NES] Added support for mappers 42, 43.  [Wilbert Pol]
2424
2525- [ORIC] Fixed tape loading.  (bug #241) [Wilbert Pol]
2626

Previous 15994 Revisions Next


© 1998-2018 The MESS Team