private boolean loadProgram(String disk, String name) {
    boolean em1541 = require1541;
    if (disk.startsWith("@")) {
      disk = disk.substring(1);
      em1541 = true;
    }
    if (disk != currentDisk) {
      URL url = getResource(disk);
      currentDisk = disk;
      disk = disk.toLowerCase();

      if (disk.endsWith(".d64")) {
	if (!reader.readDiskFromURL(url))
	  System.out.println("Status: problem while loading disk");
      } else if (disk.endsWith(".t64")) {
	if (!reader.readTapeFromURL(url))
	  System.out.println("Status: problem while loading tape");
      } else if (disk.endsWith(".prg") || disk.endsWith(".p00")) {
	if (!reader.readPGM(url, -1))
	  System.out.println("Status: problem while loading pgm");
	else System.out.println("Status: loaded " + disk);
	// Already read into memory!!!
	return false;
      }
    }

    if (em1541) {
      System.out.println("Loading with C1541 emulation...");
      enterText("load \"" + name + "\",8~");
      enterText("run~");
      return true;
    } else {
      for (int i = name.length(); i<16; i++)
	name = name + " ";
      if (reader.readFile(name) != null)
	System.out.println("Status: loaded " + name);
      else
	System.out.println("Status: error while loading " + name);
      return false;
    }
  }