Example #1
0
        /// <summary>
        /// Load a character set from disk
        /// </summary>
        /// <param name="Filename">data file with character glyphs</param>
        /// <param name="Vram">array to store glyph data</param>
        /// <param name="StartAddress">starting address in array</param>
        /// <param name="newCharSize">Size of glyhphs (8x8 or 8x16)</param>
        public void Load(string Filename, int Offset, BasicMemory Vram, int StartAddress, SizeCodes newCharSize)
        {
            this.StartAddress  = StartAddress;
            this.CharSize      = newCharSize;
            this.CharacterData = Vram;

            try
            {
                byte[] d = global::System.IO.File.ReadAllBytes(Filename);
                Vram.Load(d, Offset, StartAddress, d.Length - Offset);
            }
            catch (Exception ex)
            {
                SystemLog.WriteLine(SystemLog.SeverityCodes.Recoverable, "Error in CharacteSet.Load\r\n" + ex.Message + "Filename:" + Filename);
            }
        }
Example #2
0
        /// <summary>
        /// Load a character set from disk
        /// </summary>
        /// <param name="Filename">data file with character glyphs</param>
        /// <param name="Vram">array to store glyph data</param>
        /// <param name="StartAddress">starting address in array</param>
        /// <param name="newCharSize">Size of glyhphs (8x8 or 8x16)</param>
        public void Load(string Filename, int Offset, int StartAddress, SizeCodes newCharSize)
        {
            this.StartAddress = StartAddress;
            this.CharSize     = newCharSize;
            //this.CharacterData = Vram;

            try
            {
                byte[] d = File.ReadAllBytes(Filename);
                //Vram.Load(d, Offset, StartAddress, d.Length - Offset);
                FoenixSystem.Current.MemoryManager.CopyToMemory(d, Offset, StartAddress, d.Length - Offset);
            }
            catch (Exception ex)
            {
                SystemLog.WriteLine(SystemLog.SeverityCodes.Recoverable, "Error in CharacteSet.Load\r\n" + ex.Message + "Filename:" + Filename);
            }
        }