Beispiel #1
0
 protected void PokeByte(byte val)
 {
     if (_domain.Size == 0)
     {
         _domain.PokeByte(_address, val);
     }
     else
     {
         _domain.PokeByte(_address % _domain.Size, val);
     }
 }
Beispiel #2
0
 public void PokeByte(long addr, byte val)
 {
     if (addr <= MD.Size - 1)
     {
         MD.PokeByte(addr, val);
     }
 }
        public override void Apply()
        {
            if (!IsEnabled)
            {
                return;
            }

            try
            {
                MemoryDomain md = RTC_MemoryZones.getDomain(Domain);

                if (md == null || md.PokeByte == null)
                {
                    return;
                }

                switch (Type)
                {
                case BlastByteType.SET:
                    md.PokeByte(Address, (byte)Value);
                    break;

                case BlastByteType.ADD:
                    md.PokeByte(Address, (byte)(md.PeekByte(Address) + Value));
                    break;

                case BlastByteType.SUBSTRACT:
                    md.PokeByte(Address, (byte)(md.PeekByte(Address) - Value));
                    break;

                case BlastByteType.NONE:
                    return;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("The BlastByte apply() function threw up. \n" +
                                "This is not a BizHawk error so you should probably send a screenshot of this to the devs\n\n" +
                                ex.ToString());
                return;
            }
        }
Beispiel #4
0
 public override void PokeByte(long address, byte value)
 {
     if (md == null)
     {
         RTC_Core.SendCommandToBizhawk(new RTC_Command(CommandType.REMOTE_DOMAIN_POKEBYTE)
         {
             objectValue = new object[] { name, address, value }
         });
     }
     else
     {
         md.PokeByte(address, value);
     }
 }
Beispiel #5
0
        public static bool CanPoke(this MemoryDomain d)
        {
            if (!d.Writable)
            {
                return(false);
            }

            try
            {
                d.PokeByte(0, d.PeekByte(0));
            }
            catch (NotImplementedException)
            {
                return(false);
            }

            return(true);
        }
 public override void PokeByte(long addr, byte val)
 {
     _m.PokeByte(addr, val);
 }
Beispiel #7
0
 protected void PokeByte(byte val)
 {
     _domain.PokeByte(_address % _domain.Size, val);
 }