public static int runToAddressLimit(int baseKeys, int startKeys,
      int stepLimit, int... addresses) {
    if (!curGb.onFrameBoundaries) {
      int add = curGb.step(0, addresses);
      if (add != 0)
        return add;
    }
    int steps = 0;
    while (steps < stepLimit) {
      int add = curGb.step(steps == 0 ? startKeys : baseKeys, addresses);
      if (add != 0)
        return add;
      steps++;
    }
    return 0;
  }