コード例 #1
0
        public static long Write <AddressT, DataT>(this Memory <AddressT, DataT> memory, byte[] buffer)
            where AddressT : BusData, new()
            where DataT : BusData, new()
        {
            var writer = new MemoryWriter <AddressT, DataT>(memory);

            return(writer.CopyFrom(CreateBinaryReader(buffer)));
        }
コード例 #2
0
        public static MemoryRam <BusData16, BusData8> NewRam(byte[] buffer)
        {
            var mem = new MemoryRam <BusData16, BusData8>();

            if (buffer != null)
            {
                var writer = new MemoryWriter <BusData16, BusData8>(mem);
                writer.CopyFrom(CreateBinaryReader(buffer));
            }

            return(mem);
        }