Exemplo n.º 1
0
 public SystemBus(IInteruptManager interuptManager, IAddressManager addressManager, IPortManager portManager)
 {
     _interuptManager = interuptManager;
     _addressManager = addressManager;
     _portManager = portManager;
     _watchList = new List<Int32>();
 }
Exemplo n.º 2
0
 public Z80Model(System.Windows.Forms.Form d, int size)
 {
     if (size == 128)
         memoryManager = new Z80MemoryManager128K();
     else
         memoryManager = new Z80MemoryManager48KFlat();
     portManager = new Z80PortManager();
     videoRenderer = new VideoRenderer(d);
 }
Exemplo n.º 3
0
 public ComponentManager(
     IInteruptManager interuptManager,
     IAddressManager addressManager,
     IPortManager portManager
     )
 {
     _runDelegates = new Dictionary<IRunnableSystemComponent, RunDelegate>();
     _interuptManager = interuptManager;
     _addressManager = addressManager;
     _portManager = portManager;
     _components = new List<ISystemComponent>();
 }
Exemplo n.º 4
0
 public Z80Model(System.Windows.Forms.Form d, int size)
 {
     if (size == 128)
     {
         memoryManager = new Z80MemoryManager128K();
     }
     else
     {
         memoryManager = new Z80MemoryManager48KFlat();
     }
     portManager   = new Z80PortManager();
     videoRenderer = new VideoRenderer(d);
 }
        private readonly int[][][] _rgbArray; //bank, channel, rgb values

        #endregion Fields

        #region Constructors

        //TODO:refactor to allow variable lengths for each chain
        public RgbManager(IPortManager portManager, int numBanks, int numChannels)
        {
            _portManager = portManager;
            _numBanks = numBanks;
            _numChannels = numChannels;

            _rgbArray = new int[_numBanks][][];

            for (int bank = 0; bank < _rgbArray.Length; bank++)
            {
                _rgbArray[bank] = new int[_numChannels][];
                for (int channel = 0; channel < _rgbArray[bank].Length; channel++)
                {
                    _rgbArray[bank][channel] = new int[3];
                }
            }
        }
Exemplo n.º 6
0
 public void RegisterPortAddresses(IPortManager portManager)
 {
     portManager.RegisterWritePort(0x7F, Write);
 }
Exemplo n.º 7
0
 public void RegisterPortAddresses(IPortManager portManager)
 {
     portManager.RegisterWritePort(0xF0, value => value = 1);
     portManager.RegisterWritePort(0xF1, value => value = 1);
     portManager.RegisterPort(0xF2, value => value = 1, () => 0xFF);
 }
 public void RegisterPortAddresses(IPortManager portManager)
 {
     portManager.RegisterPort(0xBF, WriteAddressPort, ReadAddressPort);
     portManager.RegisterPort(0xBE, WriteVRamPort, ReadVRamPort);
 }
Exemplo n.º 9
0
 public void RegisterPortAddresses(IPortManager portManager)
 {
     portManager.RegisterPort(0xDE, Write, Read);
     portManager.RegisterPort(0xDF, Write, Read);
     portManager.RegisterWritePort(0x3E, Write);
 }
Exemplo n.º 10
0
 public void RegisterPortAddresses(IPortManager portManager)
 {
     portManager.RegisterWritePort(0x3F, WriteNationalisation);
     portManager.RegisterPort(0xDC, WriteGamepadPort1, ReadGamepadPort1);
     portManager.RegisterPort(0xDD, WriteGamepadPort2, ReadGamepadPort2);
 }