Beispiel #1
0
 public DisplayProcessorBase(ImlacSystem system)
 {
     _system  = system;
     _mem     = _system.Memory;
     _dtStack = new Stack <ushort>(8);
     InitializeCache();
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            _startupArgs = args;

            _console     = new SDLConsole(0.5f);
            _imlacSystem = new ImlacSystem();
            _imlacSystem.AttachConsole(_console);
            _imlacSystem.Reset();

            _state = SystemExecutionState.Debugging;

            Console.CancelKeyPress += new ConsoleCancelEventHandler(OnBreak);

            PrintHerald();

            //
            // Start the debugger / execution thread
            //
            _debuggerThread = new System.Threading.Thread(new System.Threading.ThreadStart(DebuggerThread));
            _debuggerThread.Start();

            //
            // Show the display; this will return when the display window is closed.
            //
            _console.Show();

            //
            // Kill the system if it's still running.
            //
            _debuggerThread.Abort();
        }
Beispiel #3
0
        public Processor(ImlacSystem system)
        {
            _system = system;
            _mem    = _system.Memory;

            _iotDispatch = new IIOTDevice[0x200];   // 9 bits of IOT instructions

            Reset();
            InitializeCache();
        }
Beispiel #4
0
        public SDLConsole(ImlacSystem system, float scaleFactor)
        {
            if (scaleFactor <= 0)
            {
                throw new ArgumentOutOfRangeException("scaleFactor");
            }

            _system = system;

            _scaleFactor       = scaleFactor;
            _throttleFramerate = true;

            _lock           = new ReaderWriterLockSlim();
            _keyLatchedLock = new ReaderWriterLockSlim();
            _syncEvent      = new AutoResetEvent(false);

            _frame = 0;

            try
            {
                _frameTimer = new FrameTimer(40);
            }
            catch
            {
                // Unable to initialize frame timer, we will not be able
                // to throttle execution.
                _frameTimer = null;
            }

            _fullScreen = false;

            _displayList      = new List <Vector>(_displayListSize);
            _displayListIndex = 0;

            //
            // Prepopulate the display list with Vectors.  Only those used in the current frame are
            // actually rendered, we prepopulate the list to prevent having to cons up new ones
            // constantly.
            //
            for (int i = 0; i < _displayListSize; i++)
            {
                _displayList.Add(new Vector(DrawingMode.Off, 0, 0, 0, 0));
            }

            BuildKeyMappings();
        }
Beispiel #5
0
 public PDS4DisplayProcessor(ImlacSystem system) : base(system)
 {
 }
Beispiel #6
0
 public Memory(ImlacSystem system)
 {
     _system = system;
     SetMemorySize(0x2000);
 }