示例#1
0
        public void WriteMemoryDump(ulong StartAddress, ulong EndAddress, string OutputFile)
        {
            FileStream f = File.Open(OutputFile, FileMode.Create);

            if (EndAddress > StartAddress)
            {
                for (ulong i = StartAddress; i < EndAddress; i++)
                {
                    f.WriteByte(mch.GetByte(i));
                }
            }

            f.Close();
        }
示例#2
0
        private void refresh()
        {
            char character;

            char[]   line;
            char[][] lines = new char[25][];
            uint     offset;

            while (true)
            {
                for (uint i = 0; i < 25; i++)
                {
                    offset = (i * 80) + 0x000B8000;
                    line   = new char[80];

                    for (uint j = 0; j < 80; j++)
                    {
                        character = (char)mch.GetByte(offset + j);
                        if ((character >= 0x20) && (character <= 0x7e))
                        {
                            line[j] = character;
                        }
                        else
                        {
                            line[j] = (char)0x20;
                        }
                    }
                    lines[i] = line;
                }

                string screen_chars = "";
                foreach (char[] l in lines)
                {
                    screen_chars += new string(l) + "\n";
                }

                textModeScreen.Text = screen_chars;
                Thread.Sleep(16);
            }
        }