/// <summary> /// Initializes a new instance of the <see cref="VGAConsole"/> class. /// </summary> public VGAConsole(DisplayForm dislayForm) { ioBase = StandardIOBase; baseAddress = StandardAddressBase; width = 80; height = 27; //cursorX = 0; //cursorY = 0; cursorPosition = 0; lastCommand = 0; font = new Font("Lucida Console", 9, FontStyle.Regular); fontWidth = (int)font.SizeInPoints; fontHeight = (int)font.SizeInPoints + 5; palette = Mosa.DeviceSystem.ColorPalette.CreateStandard16ColorPalette(); this.dislayForm = dislayForm; dislayForm.SetSize(fontWidth * width + 12, fontHeight * height + 10); MemoryDispatch.RegisterMemory(baseAddress, StandardMemorySize, 2, Read8, Write8); Initialize(); }
/// <summary> /// Initializes a new instance of the <see cref="RAMChip"/> class. /// </summary> public RAMChip(uint addressBase, uint size) { this.addressBase = addressBase; memory = new byte[size]; MemoryDispatch.RegisterMemory(addressBase, size, 1, Read8, Write8); }