Esempio n. 1
0
        /// <summary>
        /// Write the <see cref="MiscConfig"/> hash bytes without overwriting other parts of the structure.
        /// </summary>
        /// <param name="hash">Hash bytes</param>
        public void WriteMiscHash(byte[] hash)
        {
            var bytes = ReadWriteUtils.CopyBytes(hash, 0x10);
            var addr  = this["MISC_CONFIG"];

            ReadWriteUtils.WriteToROM((int)(addr + 8), bytes);
        }
Esempio n. 2
0
        /// <summary>
        /// Get a <see cref="MiscConfigStruct"/> representation.
        /// </summary>
        /// <param name="version">Structure version</param>
        /// <returns>Configuration structure</returns>
        public override IAsmConfigStruct ToStruct(uint version)
        {
            var hash = ReadWriteUtils.CopyBytes(this.Hash, 0x10);

            return(new MiscConfigStruct
            {
                Version = version,
                Hash = hash,
                Flags = this.Flags.ToInt(),
            });
        }