コード例 #1
0
        public MemoryMappedChip(ushort capacityBytes, ushort startAddress)
        {
            cells = new byte[capacityBytes];

            if (startAddress == 0x4000)
            {
                Address = new PartialAddressBusConnector(14);
            }
            else if (startAddress == 0x8000)
            {
                Address = new PartialAddressBusConnector(15);
            }
            else
            {
                throw new NotSupportedException();
            }
            Data = new  BusConnector <byte>();
        }
コード例 #2
0
        public DualAccessMemoryMappedChip(ushort capacityBytes, ushort startAddress)
        {
            cells = new byte[capacityBytes];

            if (startAddress == 0x4000)
            {
                AddressInput1 = new PartialAddressBusConnector(14);
                AddressInput2 = new PartialAddressBusConnector(14);
            }
            else if (startAddress == 0x8000)
            {
                AddressInput1 = new PartialAddressBusConnector(15);
                AddressInput2 = new PartialAddressBusConnector(15);
            }
            else
            {
                throw new NotSupportedException();
            }
            DataInput1 = new BusConnector<byte>();
            DataInput2 = new BusConnector<byte>();
        }