public void runToNextWalkFrame(int excuseFrames) throws CapturedByRotatoException {
		int startSteps = curGb.stepCount;
		// forward to first possible input frame
		while(true) {
			Util.runToFirstDifference(0, dir, Metric.DOWN_JOY);
			State s = curGb.newState();

			int add2 = Util.runToAddressNoLimit(0, dir, curGb.pokemon.doPlayerMovementFuncAddress, curGb.pokemon.printLetterDelayJoypadAddress);
			if(add2 == curGb.pokemon.printLetterDelayJoypadAddress)
				throw new CapturedByRotatoException();
			curGb.restore(s);

			int add = curGb.step(dir, curGb.pokemon.doPlayerMovementFuncAddress);
			curGb.restore(s);
			if(add != 0) {
				//System.out.println("found walk input frame ("+steps+")");
				break;
			}
			if(excuseFrames-- <= 0)
				System.out.println("INFO: WalkStep: found non-walk input frame ("+(curGb.stepCount - startSteps)+")");
			curGb.step();
		}
	}