public gb(string ROM) { using (MemoryStream memoryStream = new MemoryStream()) { File.Open(ROM, FileMode.Open).CopyTo(memoryStream); romData = memoryStream.ToArray(); } CPU = new gbCPU(romData); }
public bool LCDEnabled(gbCPU cpu) { if (cpu == null) { throw new ArgumentNullException(nameof(cpu)); } return(gbCPU.GetBit(cpu.memory[LCD_CONTROL], (int)LCD_CONTROL_BITS.DisplayEnable)); }
public gbLCD(gbCPU cpu) { cpu.memory.memoryRaw[SCANLINE_MEM] = 0; current_time = SCANLINE_TIME; this.cpu = cpu; }