Exemplo n.º 1
0
 /// <summary>
 /// Signs that the device has been attached to the Spectrum virtual machine
 /// </summary>
 public void OnAttachedToVm(ISpectrumVm hostVm)
 {
     HostVm        = hostVm;
     _cpu          = hostVm.Cpu;
     _screenDevice = hostVm.ScreenDevice;
     _memory       = new byte[0x10000];
 }
Exemplo n.º 2
0
 /// <summary>
 /// Signs that the device has been attached to the Spectrum virtual machine
 /// </summary>
 public override void OnAttachedToVm(ISpectrumVm hostVm)
 {
     base.OnAttachedToVm(hostVm);
     _cpu              = hostVm?.Cpu;
     _screenDevice     = hostVm?.ScreenDevice;
     _currentSlot3Bank = 0;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Signs that the device has been attached to the Spectrum virtual machine
 /// </summary>
 public override void OnAttachedToVm(ISpectrumVm hostVm)
 {
     base.OnAttachedToVm(hostVm);
     _screenDevice   = hostVm.ScreenDevice;
     _beeperDevice   = hostVm.BeeperDevice;
     _keyboardDevice = hostVm.KeyboardDevice;
     _tapeDevice     = hostVm.TapeDevice;
 }
 /// <summary>
 /// Signs that the device has been attached to the Spectrum virtual machine
 /// </summary>
 public override void OnAttachedToVm(ISpectrumVm hostVm)
 {
     base.OnAttachedToVm(hostVm);
     _cpu          = hostVm?.Cpu;
     _screenDevice = hostVm?.ScreenDevice;
     _slots        = new[]
     {
         0, 5, 2, 0
     };
     SpecialMode = false;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Signs that the device has been attached to the Spectrum virtual machine
 /// </summary>
 public virtual void OnAttachedToVm(ISpectrumVm hostVm)
 {
     HostVm       = hostVm;
     Cpu          = hostVm.Cpu;
     ScreenDevice = hostVm.ScreenDevice;
     foreach (var handler in Handlers)
     {
         handler.OnAttachedToVm(hostVm);
         handler.Reset();
     }
 }
Exemplo n.º 6
0
        public ScreenBitmap(IScreenDevice screenDevice)
        {
            _screenDevice = screenDevice;
            var config = screenDevice.ScreenConfiguration;

            _height           = config.ScreenLines;
            _width            = config.ScreenWidth;
            _displayHeight    = config.DisplayLines;
            _displayWidth     = config.DisplayWidth;
            _borderTopLines   = config.BorderTopLines;
            _borderLeftPixels = config.BorderLeftPixels;
        }
Exemplo n.º 7
0
 /// <summary>
 /// Signs that the device has been attached to the Spectrum virtual machine
 /// </summary>
 public override void OnAttachedToVm(ISpectrumVm hostVm)
 {
     base.OnAttachedToVm(hostVm);
     _isUla3           = hostVm.UlaIssue == "3";
     _cpu              = hostVm.Cpu;
     _screenDevice     = hostVm.ScreenDevice;
     _beeperDevice     = hostVm.BeeperDevice;
     _keyboardDevice   = hostVm.KeyboardDevice;
     _tapeDevice       = hostVm.TapeDevice;
     _bit3LastValue    = true;
     _bit4LastValue    = true;
     _bit4ChangedFrom0 = 0;
     _bit4ChangedFrom1 = 0;
 }
Exemplo n.º 8
0
        /// <summary>
        /// Signs that the device has been attached to the Spectrum virtual machine
        /// </summary>
        public void OnAttachedToVm(ISpectrumVm hostVm)
        {
            HostVm        = hostVm;
            _cpu          = hostVm?.Cpu;
            _screenDevice = hostVm?.ScreenDevice;

            // --- Create the ROM pages
            _romPage0 = new byte[PAGE_LENGTH];
            _romPage1 = new byte[PAGE_LENGTH];

            _ramBanks = new byte[8][];
            // --- Create RAM pages
            for (var i = 0; i < 8; i++)
            {
                _ramBanks[i] = new byte[PAGE_LENGTH];
            }

            _currentRomPage   = _romPage0;
            _currentSlot3Bank = 0;
        }
 /// <summary>
 /// Signs that the device has been attached to the Spectrum virtual machine
 /// </summary>
 public virtual void OnAttachedToVm(ISpectrumVm hostVm)
 {
     HostVm       = hostVm;
     Cpu          = hostVm?.Cpu;
     ScreenDevice = hostVm?.ScreenDevice;
 }
Exemplo n.º 10
0
 public ScreenRenderingTable(IScreenDevice screenDevice)
 {
     _screenDevice = screenDevice;
 }
Exemplo n.º 11
0
 /// <summary>
 /// Signs that the device has been attached to the Spectrum virtual machine
 /// </summary>
 public override void OnAttachedToVm(ISpectrumVm hostVm)
 {
     base.OnAttachedToVm(hostVm);
     _screenDevice = hostVm.ScreenDevice;
     _memoryDevice = hostVm.MemoryDevice as SpectrumP3MemoryDevice;
 }