public static void run(RomInfo romL, RomInfo romR, DualGbSegment segment) {

    Gb.loadGambatte(2);

    // load roms
    Gameboy gbL = new Gameboy(romL, 0, true);
    Gameboy gbR = new Gameboy(romR, 1, true);
    DualGbHelper.initDualGb(gbL, gbR);

    // init inital state
    StateBuffer initalBufferL = new StateBuffer();
    initalBufferL.addState(gbL.createState());
    StateBuffer initalBufferR = new StateBuffer();
    initalBufferR.addState(gbR.createState());
    DualGbState state = new DualGbState(gbL, gbR, initalBufferL, initalBufferR);

    long start = System.currentTimeMillis();

    // execute
    state = segment.execute(state);

    // save movie
    BizhawkMovie.exportMovie(state, "test");

    printStepCounts(state);

    System.out.println("Time: " +(System.currentTimeMillis()-start));
    System.out.println("Re-records: "+gbL.rerecordCount + " + " + gbR.rerecordCount);

    try {
      Thread.sleep(2000);
    } catch (InterruptedException e) {}

    for(State s : state.stateBufferL.getStates()) {
      gbL.restore(s);
      gbL.steps(1000);
    }
    for(State s : state.stateBufferR.getStates()) {
      gbR.restore(s);
      gbR.steps(1000);
    }

    try {
      Thread.sleep(2000);
    } catch (InterruptedException e) {}
  }