public T64Drive(IEC iec, string filepath)
     : base(iec)
 {
 }
        byte[] error_info = new byte[683];	        // Sector error information (1 byte/sector)

        #endregion


        #region public methods

        // TODO
        public D64Drive(IEC iec, string fileName, Stream fileStream)
            : base(iec)
        {
            the_file = null;

            Ready = false;
            _originalD64FileName = fileName;

            for (int i = 0; i < chan_mode.Length - 1; i++)
            {
                chan_mode[i] = ChannelMode.CHMOD_FREE;
            }
            chan_mode[15] = ChannelMode.CHMOD_COMMAND;

            // Open .d64 file
            open_close_d64_file(fileName, fileStream);

            if (the_file != null)
            {
                // Allocate 1541 RAM
                //ram = new BytePtr(0x800);
                //unsafe
                //{
                
                _bamPointer = _ram.NewBytePointer(_ram.BamStartIndex);
                
                //bam = new Bam(_ram.Read(_ram.BamStartIndex, 256));

                // TODO: Will need to copy BAM to 1541 memory or do something else to make
                // sure that is mapped in there.

                    //bam = (BAM*)(ram.Pointer + 0x700);
                //}

                Reset();

                Ready = true;
            }
        }