Ejemplo n.º 1
0
        /// <summary>
        /// Constructs a
        /// <see cref="DynamicTable.Entry"/> for the atrribute phase of a
        /// bidirectional screen load.
        /// </summary>
        /// <param name='attrLine'>
        /// The attribute line, numbered from zero.
        /// </param>
        /// <param name='backwards'>
        /// Set if the block is to be loaded backwards.
        /// </param>
        /// <param name='change'>
        /// Set if the load direction is to be changed before loading the block.
        /// </param>
        /// <returns>
        /// The <see cref="DynamicTable.Entry"/> instance.
        /// </returns>
        private static DynamicTable.Entry MakeBidiEntry
            (byte attrLine, bool backwards = false, bool change = false)
        {
            int address = 0x5800 + (attrLine * 32);

            if (backwards)
            {
                address += 31;
            }

            var entry = new DynamicTable.Entry((ushort)address, 32, change);

            return(entry);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructs a
        /// <see cref="DynamicTable.Entry"/> for the pixmap phase of a
        /// bidirectional screen load.
        /// </summary>
        /// <param name='third'>
        /// The third of the screen, numbered from zero.
        /// </param>
        /// <param name='line'>
        /// The pixel line within the third, numbered from zero.
        /// </param>
        /// <param name='backwards'>
        /// Set if the block is to be loaded backwards.
        /// </param>
        /// <param name='change'>
        /// Set if the load direction is to be changed before loading the block.
        /// </param>
        private static DynamicTable.Entry MakeBidiEntry
            (byte third, byte line, bool backwards = false, bool change = false)
        {
            int address = 16384 + (third * 2048);

            address += (line * 256);
            if (backwards)
            {
                address += 255;
            }

            var entry = new DynamicTable.Entry((ushort)address, 256, change);

            return(entry);
        }