示例#1
0
 private void CreatePixelProcessingUnitStates(PixelProcessingUnitContext context)
 {
     _states.Add(typeof(HBlankState), new HBlankState(context, this));
     _states.Add(typeof(VBlankState), new VBlankState(context, this));
     _states.Add(typeof(PixelWritingState), new PixelWritingState(context, this));
     _states.Add(typeof(OamScanState), new OamScanState(context, this));
 }
示例#2
0
        public PPUStateMachine(PixelProcessingUnitContext context)
        {
            _context = context;
            _states  = new Dictionary <System.Type, IPixelProcessingUnitState>();

            CreatePixelProcessingUnitStates(context);
            TransitionTo <OamScanState>();
        }
示例#3
0
 public OamScanState(PixelProcessingUnitContext context, PPUStateMachine stateMachine)
     : base(context, stateMachine)
 {
 }
示例#4
0
 public PixelWritingState(PixelProcessingUnitContext context, PPUStateMachine stateMachine)
     : base(context, stateMachine)
 {
 }
示例#5
0
        public PixelProcessingUnit(IRandomAccessMemory mainMemory, Logger logger)
        {
            _logger = logger;

            _context = new PixelProcessingUnitContext(mainMemory);
        }