Ejemplo n.º 1
0
        public void Given_UInt32s(params uint[] opcodes)
        {
            byte[] bytes  = new byte[opcodes.Length * 4];
            var    mem    = Architecture.CreateMemoryArea(LoadAddress, bytes);
            var    writer = Architecture.CreateImageWriter(mem, mem.BaseAddress);

            foreach (uint opcode in opcodes)
            {
                writer.WriteUInt32(opcode);
            }
            this.mem = mem;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates the Amiga absolute memory map.
        /// </summary>
        /// <returns>
        /// ...which is trivial on the Amiga since the only known address
        /// is the pointer at 0x00000004 that points to the ExecBase.
        /// </returns>
        public override SegmentMap CreateAbsoluteMemoryMap()
        {
            EnsureTypeLibraries(base.PlatformIdentifier);
            var segmentMap = new SegmentMap(
                Address.Ptr32(0),
                new ImageSegment(
                    "interrupts",
                    Architecture.CreateMemoryArea(Address.Ptr32(0), new byte[0x100]),
                    AccessMode.Read));

            //$TODO: once we're guaranteed the correct Kickstart version
            // has been loaded, we can execute the below.
            //imageMap.AddItemWithSize(
            //    Address.Ptr32(4),
            //    new ImageMapItem(4)
            //    {
            //        DataType = new Pointer(Metadata.Types["ExecBase"], 4)
            //    });
            return(segmentMap);
        }
Ejemplo n.º 3
0
        public void Given_OctalBytes(string octalBytes)
        {
            var bytes = BytePattern.FromHexBytes(octalBytes).ToArray();

            this.mem = Architecture.CreateMemoryArea(LoadAddress, bytes);
        }
Ejemplo n.º 4
0
 protected void Given_Bytes(params byte[] bytes)
 {
     this.mem = Architecture.CreateMemoryArea(LoadAddress, bytes);
 }
Ejemplo n.º 5
0
        public void Given_OctalBytes(string octalBytes)
        {
            var bytes = OctalStringToBytes(octalBytes);

            this.mem = Architecture.CreateMemoryArea(LoadAddress, bytes);
        }
Ejemplo n.º 6
0
        public void Given_HexString(string hexbytes)
        {
            var bytes = BytePattern.FromHexBytes(hexbytes);

            this.mem = Architecture.CreateMemoryArea(LoadAddress, bytes);
        }