public void write(UInt32 value) { UInt32 newvalue = BitConverter.ToUInt32(GBRegs.data, (int)address); UInt32 filter = ~((((UInt32)Math.Pow(2, msb + 1)) - 1) - (((UInt32)Math.Pow(2, lsb)) - 1)); newvalue = newvalue & filter; newvalue |= value << lsb; GBReg_common.write_reg(newvalue, this); }
public void mask(UInt32 mask) { UInt32 value = BitConverter.ToUInt32(GBRegs.data, (int)address); GBReg_common.write_reg(value & mask, this); }