Example #1
0
        public bool CheckCRC()
        {
            uint[] crcs = new uint[2];
            if (N64Sums.GetChecksum(crcs, GetAsBytes()))
                return (crcs[0] == _headerDMA.CRC1) && (crcs[1] == _headerDMA.CRC2);

            return false;
        }
Example #2
0
        public bool FixCRC()
        {
            if (!IsROMLoaded)
                return false;

            //Only apply crc fix to the full rom data container, not to the separated dma table data container
            uint[] crcs = new uint[2];

            if (N64Sums.GetChecksum(crcs, GetAsBytes()))
            {
                _headerDMA.CRC1 = crcs[0];
                _headerDMA.CRC2 = crcs[1];

                HasGoodChecksum = true;

                RomUpdated(RomUpdateType.CRCFixed);

                return true;
            }
            return false;
        }