Пример #1
0
 internal int UpdateAddresses(int address, CustomAsmBankConfig bankConfig)
 {
     Config.RomAddress = address;
     Config.Length     = AreaBytes.Length;
     Config.RamAddress = address - bankConfig.GetRomStartAddress() + bankConfig.GetRamStartAddress();
     return(Config.Length);
 }
Пример #2
0
 public void Load(BinaryData data, CustomAsmBankConfig bankConfig)
 {
     if (Config.RomAddress != -1 && Config.Length > 0)
     {
         data.Position = Config.RomAddress;
         AreaBytes     = data.Read(Config.Length);
     }
     else
     {
         AreaBytes = new byte[] { }
     };
 }
Пример #3
0
 public CustomAsmBank(CustomAsmBankConfig config)
 {
     Config = config;
 }
Пример #4
0
 public int Save(BinaryData data, int address, CustomAsmBankConfig bankConfig)
 {
     data.Position = address;
     data.Write(AreaBytes);
     return(UpdateAddresses(address, bankConfig));
 }