示例#1
0
        public SmsEmulator()
        {
            _cart = new Cartridge();
            _breakpointHandler = new BreakpointHandler(_cart);
            _cpu = new Z80Cpu(_breakpointHandler);
            _cpu.InstructionRan += new System.EventHandler<InstructionAdvice.CpuEventArgs>(_cpu_InstructionRan);
            _cpu.IsRecentHistoryEnabled = false;

            _ri = new ReferenceImplementation();            
            _ram = new Ram();
            _vdp = new VideoDisplayProcessor();
            _gamepads = new GamepadPorts();

            IInteruptManager interuptManager = new InteruptManager();
            IPortManager portManager = new PortManager();
            IAddressManager addressManager = new AddressManager(new CacheManager(_cpu.Data));

            _systemBus = new SystemBus(interuptManager, addressManager, portManager);
            _componentManager = new ComponentManager(interuptManager, addressManager, portManager);
        }
 public BreakpointHandler(Cartridge cartridge)
 {
     _cartridge = cartridge;
     _breakpoints = new Dictionary<Int32, Breakpoint>();
     interuptProgram = new Byte[1000];
 }