Exemple #1
0
 public gb(string ROM)
 {
     using (MemoryStream memoryStream = new MemoryStream()) {
         File.Open(ROM, FileMode.Open).CopyTo(memoryStream);
         romData = memoryStream.ToArray();
     }
     CPU = new gbCPU(romData);
 }
Exemple #2
0
    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));
    }
Exemple #3
0
 public gbLCD(gbCPU cpu)
 {
     cpu.memory.memoryRaw[SCANLINE_MEM] = 0;
     current_time = SCANLINE_TIME;
     this.cpu     = cpu;
 }