public void run() {
	  // Autostart from disk/prg
	  autoText = getParameter("autostartCode");
	  autostartDisk = getParameter("autostartDisk");
	  if (autostartDisk != null) {
	    autostartProgram = getParameter("autostartPGM");
	    if (autostartProgram == null) {
	      autostartProgram = getParameter("autostartProgram");
	    }
	  } else {
	    autostartProgram = getParameter("autostartPGM");
	    autostartID = getParameterAsInt("autostartProgram", -1);
	  }

	  defaultStick = getParameterAsInt("joystick", 0);
	  soundOn = getParameterAsInt("soundOn", 1);

	  if (getParameterAsInt("extendedKeyboard", 0) != 0) {
	    screen.setKeyboardEmulation(true);
	    System.out.println("Extended keyboard emulation on!");
	  }

	  loadGamesList();

	  screen.setSoundOn(soundOn == 1);
	  screen.setStick(defaultStick == 0);
	  if (autostartDisk != null) {
	    if (autostartProgram != null) {
	      loadGame(autostartDisk, autostartProgram);
	    } else {
	      insertDisk(autostartDisk);
              waitForKernal();
	      enterText(autoText);
	    }
	  } else if (autostartProgram != null) {
	    System.out.println("Autostart program:" + autostartProgram);
	    if (files != null && autostartProgram.equals("random")) {
	      int randomId = (int) (Math.random() * (files.size() / 2));
	      loadGame(randomId);
	    } else {
	      loadPGM(autostartProgram);
	    }
	  }
	  if (autostartID != -1) {
	    System.out.println("AutostartID: " + autostartID);
	    loadGame(autostartID);
	  }
	  started = true;
	}