public GraphicsAdapter(int basePort, int baseMemAddress, InterruptController pic, string characterRomPath) { _basePort = basePort; _baseMemAddress = baseMemAddress; _pic = pic; _screen = new WriteableBitmap(ScreenWidth, ScreenHeight, 96, 96, PixelFormats.Bgr32, null); _bytesPerPixel = _screen.Format.BitsPerPixel / 8; // two planes with 64k bytes each _memory = new byte[0x20000]; _charRom = File.ReadAllBytes(characterRomPath); MemUtils.RandomFill(_memory); }
public MemoryMapper(int ramSizeKb) { _ram = new byte[ramSizeKb * 1024]; MemUtils.RandomFill(_ram); }