Beispiel #1
0
        /// <summary>
        /// Code 0x6X. Decompresses data and writes to VU memory.
        /// </summary>
        /// <param name="elements"></param>
        /// <returns></returns>
        public VifCodeStreamBuilder Unpack(int address, dynamic elements)
        {
            Address = address;
            Debug.Assert(Address % 8 == 0);
            var packet = new VifPacket(Address / 8, elements, true);

            mTags.Add(packet);
            return(this);
        }
Beispiel #2
0
        /// <summary>
        /// Code 0x6X. Decompresses data and writes to VU memory.
        /// </summary>
        /// <param name="elements"></param>
        /// <returns></returns>
        public VifCodeStreamBuilder Unpack(dynamic elements)
        {
            Debug.Assert(Address % 8 == 0);
            var packet = new VifPacket(Address / 8, elements, false);

            //var unpackedSize = ( packet.Count * AlignmentHelper.Align( packet.ElementCount * packet.ElementSize, 16 ) ) * usedNodeCount;
            //mAddress += unpackedSize;

            Address += 0xC0;
            if (Address > 0x240)
            {
                Address = 0;
            }

            mTags.Add(packet);
            return(this);
        }