Previous 199869 Revisions Next

r27520 Friday 7th February, 2014 at 08:42:07 UTC by Fabio Priuli
(MESS) nes: added support for PRG-only PCB (aka Mapper 218) which uses NT-RAM
as CHR-RAM, used by nocash's game Magic Floor. [Fabio Priuli]
[src/mess/machine]nes_nxrom.c

trunk/src/mess/machine/nes_nxrom.c
r27519r27520
556556 
557557 iNES: mapper 218
558558 
559 In MESS: Not Supported.
559 In MESS: Supported.
560560 
561561 -------------------------------------------------*/
562562
563563WRITE8_MEMBER(nes_nochr_device::chr_w)
564564{
565   int bank = offset >> 10;
566   m_nt_access[bank & 0x03][offset & 0x3ff] = data;
565   int mirr = get_mirroring();
566   if (mirr == PPU_MIRROR_HIGH)
567      m_ciram[offset & 0x3ff + 0x000] = data;
568   else if (mirr == PPU_MIRROR_LOW)
569      m_ciram[offset & 0x3ff + 0x400] = data;
570   else
571      m_ciram[offset & 0x7ff] = data;   // not sure here, since there is no software to test...
567572}
568573
569574READ8_MEMBER(nes_nochr_device::chr_r)
570575{
571   int bank = offset >> 10;
572   return m_nt_access[bank & 0x03][offset & 0x3ff];
576   int mirr = get_mirroring();
577   if (mirr == PPU_MIRROR_HIGH)
578      return m_ciram[offset & 0x3ff + 0x000];
579   else if (mirr == PPU_MIRROR_LOW)
580      return m_ciram[offset & 0x3ff + 0x400];
581   else
582      return m_ciram[offset & 0x7ff];   // not sure here, since there is no software to test...
573583}

Previous 199869 Revisions Next


© 1997-2024 The MAME Team