Example #1
0
        public void WriteToRom(RomIO rom)
        {
            if (rom is null)
            {
                throw new ArgumentNullException(nameof(rom));
            }

            rom.WriteInt24(Address, Value);
        }
Example #2
0
        public void WriteToRom(RomIO rom)
        {
            if (rom is null)
            {
                throw new ArgumentNullException(nameof(rom));
            }

            rom.WriteBytes(_bytes, Address, CrossBanks);
        }
Example #3
0
        public Int24Reference(RomIO rom, int address)
        {
            if (rom is null)
            {
                throw new ArgumentNullException(nameof(rom));
            }

            Address = address;
            Value   = rom.ReadInt24(address);
        }
Example #4
0
        public ArrayReference(
            RomIO rom,
            int address,
            int count,
            bool crossBanks = true)
        {
            if (rom is null)
            {
                throw new ArgumentNullException(nameof(rom));
            }

            Address    = address;
            CrossBanks = crossBanks;

            _bytes = rom.ReadBytes(address, count, crossBanks);
            Bytes  = new Collection <byte>(_bytes);
        }
Example #5
0
 public AllStarsRomFile(string path)
 {
     Path        = path ?? throw new ArgumentNullException(nameof(path));
     Rom         = new RomIO(File.ReadAllBytes(path));
     Smb1RomData = new Smb1.RomData(Rom);
 }