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)); }
public PPUStateMachine(PixelProcessingUnitContext context) { _context = context; _states = new Dictionary <System.Type, IPixelProcessingUnitState>(); CreatePixelProcessingUnitStates(context); TransitionTo <OamScanState>(); }
public OamScanState(PixelProcessingUnitContext context, PPUStateMachine stateMachine) : base(context, stateMachine) { }
public PixelWritingState(PixelProcessingUnitContext context, PPUStateMachine stateMachine) : base(context, stateMachine) { }
public PixelProcessingUnit(IRandomAccessMemory mainMemory, Logger logger) { _logger = logger; _context = new PixelProcessingUnitContext(mainMemory); }