Exemplo n.º 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);
 }
Exemplo n.º 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[] { }
     };
 }
Exemplo n.º 3
0
 public CustomAsmBank(CustomAsmBankConfig config)
 {
     Config = config;
 }
Exemplo n.º 4
0
 public int Save(BinaryData data, int address, CustomAsmBankConfig bankConfig)
 {
     data.Position = address;
     data.Write(AreaBytes);
     return(UpdateAddresses(address, bankConfig));
 }