Beispiel #1
0
        private void AddWatch(BaseSimState simState)
        {
            var toplist = new Dictionary <int, Dictionary <ulong, object> >();

            for (int size = 8; size <= 64; size = size * 2)
            {
                var list = new Dictionary <ulong, object>();

                foreach (var entry in watches)
                {
                    if (entry.Size == size)
                    {
                        switch (size)
                        {
                        case 8: list.Add(entry.Address, SimCPU.Read8(entry.Address)); break;

                        case 16: list.Add(entry.Address, SimCPU.Read16(entry.Address)); break;

                        case 32: list.Add(entry.Address, SimCPU.Read32(entry.Address)); break;

                        //case 64: list.Add(entry.Address, SimCPU.Read64(entry.Address)); break;
                        default: break;
                        }
                    }
                }

                toplist.Add(size, list);
            }

            simState.StoreValue("WatchValues", toplist);
        }