Exemple #1
0
		public override byte ReadPrg(int addr)
		{
			byte ret;
			int offs = addr & 0x1fff;
			int bank = PRGGetBank(addr, out var ram);

			if (ram)
				ret = ReadWRAMActual(bank, offs);
			else
				ret = Rom[bank << 13 | offs];
			if (addr < 0x4000)
				audio.ReadROMTrigger(ret);
			return ret;
		}
Exemple #2
0
        public override byte ReadPRG(int addr)
        {
            byte ret;
            int  offs = addr & 0x1fff;
            int  bank = PRGGetBank(addr, out var ram);

            if (ram)
            {
                ret = ReadWRAMActual(bank, offs);
            }
            else
            {
                ret = ROM[bank << 13 | offs];
            }
            if (addr < 0x4000)
            {
                audio.ReadROMTrigger(ret);
            }
            return(ret);
        }