public void loadRam() throws Exception {
		//   if (username == null) throw new Exception("No username provided");

		String params = "";
		String strUrl = url.toString();
		int questionPos = strUrl.indexOf("?");
		if (questionPos != -1) {
			params = "&" + strUrl.substring(questionPos + 1, strUrl.length());
		}

		System.out.println("Params: (" + url + ") " + params);

		url = new URL(url.getProtocol(), url.getHost(), url.getPort(), url.getFile() + "?user=" + URLEncoder.encode(username) + params);

		HttpURLConnection conn = (HttpURLConnection) url.openConnection();

		conn.setRequestMethod("POST");
		conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
		conn.setDoOutput(true);
		conn.setDoInput(true);

		conn.connect();

		DataOutputStream printout = new DataOutputStream(conn.getOutputStream());


		String content = "gamename=" + URLEncoder.encode(cart.getCartName()) + "&romname=" + URLEncoder.encode(cart.getRomFilename());

		//   System.out.println(content);

		printout.writeBytes(content);
		printout.flush ();
		printout.close ();

		conn.disconnect();

		DataInputStream input = new DataInputStream (conn.getInputStream());
		String str;
		str = input.readLine();

		// No save
		if (str.equals("NOSAVERAM")) {
			throw new NoSaveDataException("");
		}

		// General error
		if (str.startsWith("ERROR")) {
			throw new Exception(str);
		}


		int pos = 0;
		try {
			for (int r = 0; r < cart.getBatteryRamSize(); r++) {
				String sub = str.substring(r * 2, r * 2 + 2);
				int val = Integer.valueOf(sub, 16).intValue();
				cart.ram[r] = (byte) val;
			}
		} catch (Exception e) {
			throw e;
		}
		cpu.reset();
	}