public Form1()
 {
     CheckForIllegalCrossThreadCalls = false;
     InitializeComponent();
     //Cartridge test2 = new Cartridge("C:\\Pokemon.gb");
     GameSharkCode test = new GameSharkCode("018908C0");
     cpu = GBZ80.getInstance();
     cpu.cart = new Cartridge("C:\\Pokemon.gb");
     Thread clock = new Thread(tick);
     clock.Start();
     //while (run)
     //{
         //cpu.RunCycle();
     //}
 }
 public static GBZ80 getInstance()
 {
     if (singleton == null)
     {
         singleton = new GBZ80();
     }
     return singleton;
 }