Пример #1
0
        public Chip8Ppu(Chip8Platform platform)
        {
            this.platform = platform;

            /* Display design *
             * ╔══════════════════════════════════════════════════════════════╗ Addr  Op
             * ║                                                              ║ #FFFF $FFFF
             * ║                                                              ║ #FFFF $FFFF
             * ║                                                              ║ #FFFF $FFFF
             * ║                                                              ║ #FFFF $FFFF
             * ║                                                              ║ #FFFF $FFFF
             * ║                                                              ║ #FFFF $FFFF
             * ║                   Display 64x32 (64c, 16r)                   ║ #FFFF $FFFF
             * ║                                                              ║ #FFFF $FFFF
             * ║                                                              ║ #FFFF $FFFF
             * ║                                                              ║ #FFFF $FFFF
             * ║                                                              ║ #FFFF $FFFF
             * ║                                                              ║ #FFFF $FFFF
             * ║                                                              ║ #FFFF $FFFF
             * ║                                                              ║ #FFFF $FFFF
             * ╚══════════════════════════════════════════════════════════════╝ #FFFF $FFFF
             * V0 $FF   V4 $FF   V8 $FF   VC $FF   A  #FFFF
             * V1 $FF   V5 $FF   V9 $FF   VD $FF   PC #FFFF
             * V2 $FF   V6 $FF   VA $FF   VE $FF
             * V3 $FF   V7 $FF   VB $FF   VF $FF   SP #FFFF
             */
            Console.SetWindowSize(80, 25);
            Console.CursorVisible = false;
        }
Пример #2
0
        public static void Main(string[] args)
        {
            var romImage = LoadRom(args[0]);
            var platform = new Chip8Platform(romImage);

            while (true)
            {
                platform.Cycle();
            }
        }
Пример #3
0
 public Chip8Cpu(Chip8Platform platform)
 {
     this.platform     = platform;
     this.memoryhandle = platform.ram.Pin();
     inputTask         = Task.Factory.StartNew(InputLoop);
 }