コード例 #1
0
ファイル: MemoryControlBlock.cs プロジェクト: gregdivis/Aeon
        /// <summary>
        /// Writes the values of the memory control block to emulated memory.
        /// </summary>
        /// <param name="memory">Emulated memory where block will be written.</param>
        public void Write(PhysicalMemory memory)
        {
            memory.SetByte(this.Segment, 0, this.IsLast ? (byte)0x5A : (byte)0x4D);
            memory.SetUInt16(this.Segment, 1, this.PspSegment);
            memory.SetUInt16(this.Segment, 3, this.Length);

            // These are just to clear the name area to make sure it is padded with nulls.
            memory.SetUInt32(this.Segment, 8, 0);
            memory.SetUInt32(this.Segment, 12, 0);

            memory.SetString(this.Segment, 8, this.ImageName, false);
        }