예제 #1
0
 /// <summary>
 /// Clear text screen.
 /// </summary>
 public override void Clear()
 {
     TextScreenHelpers.Debug("Clearing screen with value ");
     TextScreenHelpers.DebugNumber(mTextClearCellValue);
     IO.Memory.Fill(mTextClearCellValue);
     mBackgroundClearCellValue = mTextClearCellValue;
 }
예제 #2
0
 /// <summary>
 /// Creat new instance of the <see cref="TextScreen"/> class.
 /// </summary>
 public TextScreen()
 {
     mRAM = IO.Memory.Bytes;
     // Set the Console default colors: White foreground on Black background, the default value of mClearCellValue is set there too as it is linked with the Color
     SetColors(ConsoleColor.White, ConsoleColor.Black);
     mBackgroundClearCellValue = mTextClearCellValue;
     mRow2Addr   = (uint)(Cols * 2);
     mScrollSize = (uint)(Cols * (Rows - 1) * 2);
     SetCursorSize(mCursorSize);
     SetCursorVisible(mCursorVisible);
     TextScreenHelpers.Debug("End of TextScreen..ctor");
 }
예제 #3
0
 public override void SetCursorSize(int value)
 {
     mCursorSize = value;
     TextScreenHelpers.Debug("Changing cursor size to", value, "%");
     // We need to transform value from a percentage to a value from 15 to 0
     value = 16 - ((16 * value) / 100);
     // This is the case in which value is in reality 1% and a for a truncation error we get 16 (invalid value) 
     if (value >= 16)
         value = 15;
     TextScreenHelpers.Debug("verticalSize is", value);
     // Cursor Vertical Size Register here a value between 0x00 and 0x0F must be set with 0x00 meaning maximum size and 0x0F minimum
     IO.Idx3.Byte = 0x0A;
     IO.Data3.Byte = (byte)value;
     // Cursor Horizontal Size Register we set it to 0x0F (100%) as a security measure is probably so already
     IO.Idx3.Byte = 0x0B;
     IO.Data3.Byte = 0x0F;
 }
예제 #4
0
    public TextScreen() {

      if (this is TextScreen)
      {
        TextScreenHelpers.Debug("this is TextScreen");
      }
      else
      {
        TextScreenHelpers.Debug("ERROR: This is not of type TextScreen!");
      }
      mRAM = IO.Memory.Bytes;
      // Set the Console default colors: White foreground on Black background, the default value of mClearCellValue is set there too as it is linked with the Color
      SetColors(ConsoleColor.White, ConsoleColor.Black);
      mRow2Addr = (UInt32)(Cols * 2);
      mScrollSize = (UInt32)(Cols * (Rows - 1) * 2);
      SetCursorSize(mCursorSize);
      SetCursorVisible(mCursorVisible);
      TextScreenHelpers.Debug("End of TextScreen..ctor");
    }