Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            // Console Initialization
            Display.Text.TextDisplay.Setup();

            Interpreter.Memory       memory  = new Interpreter.Memory(0x1000);
            Display.Text.TextDisplay display = new Display.Text.TextDisplay(memory);

            // Launch Execute Thread
            Thread executeThread = new Thread(new ParameterizedThreadStart(ExecuteThread));

            executeThread.Start(memory);

            // alive.asm
            memory.Set(0x600, new List <byte> {
                0xa9, 0xf, 0x85, 0x0, 0x85, 0x1, 0xa5, 0xfe, 0x29, 0x3, 0xc9, 0x0, 0xf0, 0x2f, 0xc9, 0x1, 0xf0, 0x30, 0xc9, 0x2, 0xf0, 0x22, 0xc6, 0x1, 0xa5, 0x1, 0x29, 0x1f, 0xa, 0xaa, 0xbd, 0x47, 0x6, 0x85, 0x2, 0xe8, 0xbd, 0x47, 0x6, 0x85, 0x3, 0xa5, 0x0, 0x29, 0x1f, 0xa8, 0xb1, 0x2, 0xaa, 0xe8, 0x8a, 0x91, 0x2, 0x4c, 0x6, 0x6, 0xe6, 0x1, 0x4c, 0x18, 0x6, 0xc6, 0x0, 0x4c, 0x18, 0x6, 0xe6, 0x0, 0x4c, 0x18, 0x6, 0x0, 0x2, 0x20, 0x2, 0x40, 0x2, 0x60, 0x2, 0x80, 0x2, 0xa0, 0x2, 0xc0, 0x2, 0xe0, 0x2, 0x0, 0x3, 0x20, 0x3, 0x40, 0x3, 0x60, 0x3, 0x80, 0x3, 0xa0, 0x3, 0xc0, 0x3, 0xe0, 0x3, 0x0, 0x4, 0x20, 0x4, 0x40, 0x4, 0x60, 0x4, 0x80, 0x4, 0xa0, 0x4, 0xc0, 0x4, 0xe0, 0x4, 0x0, 0x5, 0x20, 0x5, 0x40, 0x5, 0x60, 0x5, 0x80, 0x5, 0xa0, 0x5, 0xc0, 0x5, 0xe0, 0x5
            });

            // disco.asm
            //memory.Set(0x600, new List<byte> { 0xe8, 0x8a, 0x99, 0x0, 0x2, 0x99, 0x0, 0x3, 0x99, 0x0, 0x4, 0x99, 0x0, 0x5, 0xc8, 0x98, 0xc5, 0x10, 0xd0, 0x4, 0xc8, 0x4c, 0x0, 0x6, 0xc8, 0xc8, 0xc8, 0xc8, 0x4c, 0x0, 0x6 });

            for (; ;)
            {
                display.Render();
                if (Interpreter.DisplaySettings.LimitGraphicsSpeed)
                {
                    Thread.Sleep(1000 / Interpreter.DisplaySettings.RenderFrequency);
                }
            }
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            // Console Initialization
            Display.Text.TextDisplay.Setup();

            Interpreter.Memory memory = new Interpreter.Memory(0x1000);
            Display.Text.TextDisplay display = new Display.Text.TextDisplay(memory);

            // Launch Execute Thread
            Thread executeThread = new Thread(new ParameterizedThreadStart(ExecuteThread));
            executeThread.Start(memory);

            // alive.asm
            memory.Set(0x600, new List<byte> { 0xa9, 0xf, 0x85, 0x0, 0x85, 0x1, 0xa5, 0xfe, 0x29, 0x3, 0xc9, 0x0, 0xf0, 0x2f, 0xc9, 0x1, 0xf0, 0x30, 0xc9, 0x2, 0xf0, 0x22, 0xc6, 0x1, 0xa5, 0x1, 0x29, 0x1f, 0xa, 0xaa, 0xbd, 0x47, 0x6, 0x85, 0x2, 0xe8, 0xbd, 0x47, 0x6, 0x85, 0x3, 0xa5, 0x0, 0x29, 0x1f, 0xa8, 0xb1, 0x2, 0xaa, 0xe8, 0x8a, 0x91, 0x2, 0x4c, 0x6, 0x6, 0xe6, 0x1, 0x4c, 0x18, 0x6, 0xc6, 0x0, 0x4c, 0x18, 0x6, 0xe6, 0x0, 0x4c, 0x18, 0x6, 0x0, 0x2, 0x20, 0x2, 0x40, 0x2, 0x60, 0x2, 0x80, 0x2, 0xa0, 0x2, 0xc0, 0x2, 0xe0, 0x2, 0x0, 0x3, 0x20, 0x3, 0x40, 0x3, 0x60, 0x3, 0x80, 0x3, 0xa0, 0x3, 0xc0, 0x3, 0xe0, 0x3, 0x0, 0x4, 0x20, 0x4, 0x40, 0x4, 0x60, 0x4, 0x80, 0x4, 0xa0, 0x4, 0xc0, 0x4, 0xe0, 0x4, 0x0, 0x5, 0x20, 0x5, 0x40, 0x5, 0x60, 0x5, 0x80, 0x5, 0xa0, 0x5, 0xc0, 0x5, 0xe0, 0x5 });

            // disco.asm
            //memory.Set(0x600, new List<byte> { 0xe8, 0x8a, 0x99, 0x0, 0x2, 0x99, 0x0, 0x3, 0x99, 0x0, 0x4, 0x99, 0x0, 0x5, 0xc8, 0x98, 0xc5, 0x10, 0xd0, 0x4, 0xc8, 0x4c, 0x0, 0x6, 0xc8, 0xc8, 0xc8, 0xc8, 0x4c, 0x0, 0x6 });

            for (; ; )
            {
                display.Render();
                if (Interpreter.DisplaySettings.LimitGraphicsSpeed)
                    Thread.Sleep(1000 / Interpreter.DisplaySettings.RenderFrequency);
            }
        }