Ejemplo n.º 1
0
        public ROMInfo(string title, string gameID, byte version, uint crc1, uint crc2, uint dmaTableOffset)
        {
            Title          = title;
            GameID         = gameID;
            Version        = version;
            CRC1           = crc1;
            CRC2           = crc2;
            DMATableOffset = dmaTableOffset;

            //Double check the DMA if it's invalid
            if (dmaTableOffset == 0x0)
            {
                DMATableOffset = StarFoxRomInfo.GetDMATableOffset(GameID, Version);
            }
        }
Ejemplo n.º 2
0
        private void SetRomInfo(uint dmaTableOffset = 0x0)
        {
            string title   = System.Text.Encoding.UTF8.GetString(_romData, 32, 20);
            string gameID  = System.Text.Encoding.UTF8.GetString(_romData, 59, 4);
            byte   version = _romData[63];

            uint endian = ToolSettings.ReadUInt(_romData, 0);

            ROMEndianness = StarFoxRomInfo.GetEndianness(endian);

            uint crc1 = ToolSettings.ReadUInt(_romData, 16, ROMEndianness);
            uint crc2 = ToolSettings.ReadUInt(_romData, 20, ROMEndianness);

            if (dmaTableOffset == 0x0)
            {
                dmaTableOffset = StarFoxRomInfo.GetDMATableOffset(gameID, version);
            }

            //To be discovered: will this need to be changed to also change the CRC values??? Or can I leave them untouched?
            Info = new ROMInfo(title, gameID, version, crc1, crc2, dmaTableOffset);

            IsValidRom = StarFoxRomInfo.IsValidVersion(Info);
        }