// Path: javatari/src/org/javatari/utils/Terminator.java
// public final class Terminator {
// 
// 	public static void terminate() {
// 		if (Room.currentRoom() != null) Room.currentRoom().exit();
// 		throw new IllegalStateException("Emulator terminated");
// 	}
// 	
// }


import java.awt.event.KeyEvent;
import java.io.InputStream;
import java.security.AccessControlException;
import java.util.Properties;
import java.util.prefs.Preferences;
import java.util.regex.Pattern;
import org.javatari.utils.Terminator;

		JOY_P1_YAXIS_SIGNAL    = DEFAULT_JOY_AXIS_SIGNAL;
		JOY_P1_PAD_AXIS        = DEFAULT_JOY_PAD_AXIS;
		JOY_P1_PAD_AXIS_SIGNAL = DEFAULT_JOY_AXIS_SIGNAL;
		JOY_P1_BUTTON          = DEFAULT_JOY_BUTTON;
		JOY_P1_BUTTON2         = DEFAULT_JOY_BUTTON2;
		JOY_P1_SELECT          = DEFAULT_JOY_SELECT;
		JOY_P1_RESET           = DEFAULT_JOY_RESET;
		JOY_P1_PAUSE           = DEFAULT_JOY_PAUSE;
		JOY_P1_FAST_SPPED      = DEFAULT_JOY_FAST_SPPED;
		JOY_P1_DEADZONE        = DEFAULT_JOY_DEADZONE;
		JOY_P1_PADDLE_CENTER   = DEFAULT_JOY_PADDLE_CENTER;
		JOY_P1_PADDLE_SENS     = DEFAULT_JOY_PADDLE_SENS;		
	}

	private static void parseMainArg(String[] args) {
		for (String arg : args)
			if (!arg.startsWith("-")) {
				mainArg = arg;
				return;
			}
	}

	private static void parseOptions(String[] args) {
		for (String arg : args) {
			if (!arg.startsWith("-")) continue;
			String opt = arg.substring(1);
			Pattern p = Pattern.compile("=");
			String[] params = p.split(opt);
			if (params == null || params.length != 2 || params[0].isEmpty() || params[1].isEmpty()) {
				System.out.println("Invalid option format: " + arg);

// Path: javatari/src/org/javatari/utils/Terminator.java
// public final class Terminator {
// 
// 	public static void terminate() {
// 		if (Room.currentRoom() != null) Room.currentRoom().exit();
// 		throw new IllegalStateException("Emulator terminated");
// 	}
// 	
// }


// Path: javatari/src/org/javatari/parameters/Parameters.java
import java.awt.event.KeyEvent;
import java.io.InputStream;
import java.security.AccessControlException;
import java.util.Properties;
import java.util.prefs.Preferences;
import java.util.regex.Pattern;
import org.javatari.utils.Terminator;

		JOY_P1_YAXIS_SIGNAL    = DEFAULT_JOY_AXIS_SIGNAL;
		JOY_P1_PAD_AXIS        = DEFAULT_JOY_PAD_AXIS;
		JOY_P1_PAD_AXIS_SIGNAL = DEFAULT_JOY_AXIS_SIGNAL;
		JOY_P1_BUTTON          = DEFAULT_JOY_BUTTON;
		JOY_P1_BUTTON2         = DEFAULT_JOY_BUTTON2;
		JOY_P1_SELECT          = DEFAULT_JOY_SELECT;
		JOY_P1_RESET           = DEFAULT_JOY_RESET;
		JOY_P1_PAUSE           = DEFAULT_JOY_PAUSE;
		JOY_P1_FAST_SPPED      = DEFAULT_JOY_FAST_SPPED;
		JOY_P1_DEADZONE        = DEFAULT_JOY_DEADZONE;
		JOY_P1_PADDLE_CENTER   = DEFAULT_JOY_PADDLE_CENTER;
		JOY_P1_PADDLE_SENS     = DEFAULT_JOY_PADDLE_SENS;		
	}

	private static void parseMainArg(String[] args) {
		for (String arg : args)
			if (!arg.startsWith("-")) {
				mainArg = arg;
				return;
			}
	}

	private static void parseOptions(String[] args) {
		for (String arg : args) {
			if (!arg.startsWith("-")) continue;
			String opt = arg.substring(1);
			Pattern p = Pattern.compile("=");
			String[] params = p.split(opt);
			if (params == null || params.length != 2 || params[0].isEmpty() || params[1].isEmpty()) {
				System.out.println("Invalid option format: " + arg);

				Terminator.terminate();
