C64Lib.Core.MOS6569.graphics_access C# (CSharp) Method

graphics_access() public method

public graphics_access ( ) : void
return void
        void graphics_access()
        {
            if (display_state)
            {
                UInt16 adr;
                if ((ctrl1 & 0x20) != 0)
                    // Bitmap
                    adr = (UInt16)(((vc & 0x03ff) << 3) | bitmap_base | rc);
                else
                    // Text
                    adr = (UInt16)((matrix_line[ml_index] << 3) | char_base | rc);

                if ((ctrl1 & 0x40) != 0)
                    // ECM
                    adr &= 0xf9ff;
                gfx_data = read_byte(adr);
                char_data = matrix_line[ml_index];
                color_data = color_line[ml_index];
                ml_index++;
                vc++;

            }
            else
            {
                // Display is off
                gfx_data = read_byte((UInt16)((ctrl1 & 0x40) != 0 ? 0x39ff : 0x3fff));
                char_data = color_data = 0;
            }
        }