public static void load_ini(String path) throws IOException {
        try (BufferedReader br = new BufferedReader(new FileReader(path))) {
            String line;
            String section = null;
            while ((line = br.readLine()) != null) {
                Matcher m = _section.matcher(line);
                if (m.matches()) {
                    section = m.group(1).trim();
                } else if (section != null) {
                    m = _keyValue.matcher(line);
                    if (m.matches()) {
                        String key = m.group(1).trim();
                        String value = m.group(2).trim();
                        Map< String, String> kv = _entries.get(section);
                        if (kv == null) {
                            _entries.put(section, kv = new HashMap<>());
                        }
                        kv.put(key, value);
                    }
                }
            }
        }
    }
    /*TODO*////* from main() */
    /*TODO*///extern int ignorecfg;
    /*TODO*///
    /*TODO*////* from video.c */
    /*TODO*///extern int frameskip,autoframeskip;
    /*TODO*///extern int scanlines, use_tweaked, video_sync, wait_vsync, use_triplebuf;
    /*TODO*///extern int stretch, use_mmx, use_dirty;
    /*TODO*///extern int vgafreq, always_synced, skiplines, skipcolumns;
    /*TODO*///extern float osd_gamma_correction;
    /*TODO*///extern int gfx_mode, gfx_width, gfx_height;
    /*TODO*///
    /*TODO*///extern int monitor_type;
    /*TODO*///
    /*TODO*///extern unsigned char tw224x288_h, tw224x288_v;
    /*TODO*///extern unsigned char tw240x256_h, tw240x256_v;
    /*TODO*///extern unsigned char tw256x240_h, tw256x240_v;
    /*TODO*///extern unsigned char tw256x256_h, tw256x256_v;
    /*TODO*///extern unsigned char tw256x256_hor_h, tw256x256_hor_v;
    /*TODO*///extern unsigned char tw288x224_h, tw288x224_v;
    /*TODO*///extern unsigned char tw240x320_h, tw240x320_v;
    /*TODO*///extern unsigned char tw320x240_h, tw320x240_v;
    /*TODO*///extern unsigned char tw336x240_h, tw336x240_v;
    /*TODO*///extern unsigned char tw384x224_h, tw384x224_v;
    /*TODO*///extern unsigned char tw384x240_h, tw384x240_v;
    /*TODO*///extern unsigned char tw384x256_h, tw384x256_v;
    /*TODO*///extern unsigned char tw400x256_h, tw400x256_v;
    /*TODO*///
    /*TODO*///
    /*TODO*////* Tweak values for 15.75KHz arcade/ntsc/pal modes */
    /*TODO*////* from video.c */
    /*TODO*///extern unsigned char tw224x288arc_h, tw224x288arc_v, tw288x224arc_h, tw288x224arc_v;
    /*TODO*///extern unsigned char tw256x256arc_h, tw256x256arc_v, tw256x240arc_h, tw256x240arc_v;
    /*TODO*///extern unsigned char tw320x240arc_h, tw320x240arc_v, tw320x256arc_h, tw320x256arc_v;
    /*TODO*///extern unsigned char tw352x240arc_h, tw352x240arc_v, tw352x256arc_h, tw352x256arc_v;
    /*TODO*///extern unsigned char tw368x224arc_h, tw368x224arc_v;
    /*TODO*///extern unsigned char tw368x240arc_h, tw368x240arc_v, tw368x256arc_h, tw368x256arc_v;
    /*TODO*///extern unsigned char tw512x224arc_h, tw512x224arc_v, tw512x256arc_h, tw512x256arc_v;
    /*TODO*///extern unsigned char tw512x448arc_h, tw512x448arc_v, tw512x512arc_h, tw512x512arc_v;
    /*TODO*///extern unsigned char tw640x480arc_h, tw640x480arc_v;
    /*TODO*///
    /*TODO*///
    /*TODO*////* from sound.c */
    /*TODO*///extern int soundcard, usestereo,attenuation;
    /*TODO*///
    /*TODO*////* from input.c */
    /*TODO*///extern int use_mouse, joystick, use_hotrod;
    /*TODO*///
    /*TODO*////* from cheat.c */
    /*TODO*///extern char *cheatfile;
    /*TODO*///
    /*TODO*////* from datafile.c */
    /*TODO*///extern char *history_filename,*mameinfo_filename;
    /*TODO*///
    /*TODO*////* from fileio.c */
    /*TODO*///void decompose_rom_sample_path (char *rompath, char *samplepath);
    /*TODO*///extern char *nvdir, *hidir, *cfgdir, *inpdir, *stadir, *memcarddir;
    /*TODO*///extern char *artworkdir, *screenshotdir, *alternate_name;
    /*TODO*///
    /*TODO*///#ifdef MESS
    /*TODO*////* path to the CRC database files */
    /*TODO*///char *crcdir;
    /*TODO*///#endif
    /*TODO*///
    /*TODO*////* from video.c, for centering tweaked modes */
    /*TODO*///extern int center_x;
    /*TODO*///extern int center_y;
    /*TODO*///
    /*TODO*////*from video.c flag for 15.75KHz modes (req. for 15.75KHz Arcade Monitor Modes)*/
    /*TODO*///extern int arcade_mode;
    /*TODO*///
    /*TODO*////*from svga15kh.c flag to allow delay for odd/even fields for interlaced displays (req. for 15.75KHz Arcade Monitor Modes)*/
    /*TODO*///extern int wait_interlace;
    /*TODO*///
    /*TODO*///static int mame_argc;
    /*TODO*///static char **mame_argv;
    /*TODO*///static int game;
    /*TODO*///char *rompath, *samplepath;
    /*TODO*///
    /*TODO*///struct { char *name; int id; } joy_table[] =
    /*TODO*///{
    /*TODO*///	{ "none",               JOY_TYPE_NONE },
    /*TODO*///	{ "auto",               JOY_TYPE_AUTODETECT },
    /*TODO*///	{ "standard",           JOY_TYPE_STANDARD },
    /*TODO*///	{ "dual",               JOY_TYPE_2PADS },
    /*TODO*///	{ "4button",            JOY_TYPE_4BUTTON },
    /*TODO*///	{ "6button",            JOY_TYPE_6BUTTON },
    /*TODO*///	{ "8button",            JOY_TYPE_8BUTTON },
    /*TODO*///	{ "fspro",              JOY_TYPE_FSPRO },
    /*TODO*///	{ "wingex",             JOY_TYPE_WINGEX },
    /*TODO*///	{ "sidewinder",         JOY_TYPE_SIDEWINDER },
    /*TODO*///	{ "gamepadpro",         JOY_TYPE_GAMEPAD_PRO },
    /*TODO*///	{ "grip",               JOY_TYPE_GRIP },
    /*TODO*///	{ "grip4",              JOY_TYPE_GRIP4 },
    /*TODO*///	{ "sneslpt1",           JOY_TYPE_SNESPAD_LPT1 },
    /*TODO*///	{ "sneslpt2",           JOY_TYPE_SNESPAD_LPT2 },
    /*TODO*///	{ "sneslpt3",           JOY_TYPE_SNESPAD_LPT3 },
    /*TODO*///	{ "psxlpt1",            JOY_TYPE_PSXPAD_LPT1 },
    /*TODO*///	{ "psxlpt2",            JOY_TYPE_PSXPAD_LPT2 },
    /*TODO*///	{ "psxlpt3",            JOY_TYPE_PSXPAD_LPT3 },
    /*TODO*///	{ "n64lpt1",            JOY_TYPE_N64PAD_LPT1 },
    /*TODO*///	{ "n64lpt2",            JOY_TYPE_N64PAD_LPT2 },
    /*TODO*///	{ "n64lpt3",            JOY_TYPE_N64PAD_LPT3 },
    /*TODO*///	{ "wingwarrior",        JOY_TYPE_WINGWARRIOR },
    /*TODO*///	{ "segaisa",            JOY_TYPE_IFSEGA_ISA },
    /*TODO*///	{ "segapci",            JOY_TYPE_IFSEGA_PCI },
    /*TODO*///	{ 0, 0 }
    /*TODO*///} ;
    /*TODO*///
    /*TODO*///
    /*TODO*///
    /*TODO*////* monitor type */
    /*TODO*///struct { char *name; int id; } monitor_table[] =
    /*TODO*///{
    /*TODO*///	{ "standard",   MONITOR_TYPE_STANDARD},
    /*TODO*///	{ "ntsc",       MONITOR_TYPE_NTSC},
    /*TODO*///	{ "pal",                MONITOR_TYPE_PAL},
    /*TODO*///	{ "arcade",             MONITOR_TYPE_ARCADE},
    /*TODO*///	{ NULL, NULL }
    /*TODO*///} ;
    /*TODO*///
    /*TODO*///
    /*TODO*////*
    /*TODO*/// * gets some boolean config value.
    /*TODO*/// * 0 = false, >0 = true, <0 = auto
    /*TODO*/// * the shortcut can only be used on the commandline
    /*TODO*/// */
    /*TODO*///static int get_bool (char *section, char *option, char *shortcut, int def)
    /*TODO*///{
    /*TODO*///	char *yesnoauto;
    /*TODO*///	int res, i;
    /*TODO*///
    /*TODO*///	res = def;
    /*TODO*///
    /*TODO*///	if (ignorecfg) goto cmdline;
    /*TODO*///
    /*TODO*///	/* look into mame.cfg, [section] */
    /*TODO*///	if (def == 0)
    /*TODO*///		yesnoauto = get_config_string(section, option, "no");
    /*TODO*///	else if (def > 0)
    /*TODO*///		yesnoauto = get_config_string(section, option, "yes");
    /*TODO*///	else /* def < 0 */
    /*TODO*///		yesnoauto = get_config_string(section, option, "auto");
    /*TODO*///
    /*TODO*///	/* if the option doesn't exist in the cfgfile, create it */
    /*TODO*///	if (get_config_string(section, option, "#") == "#")
    /*TODO*///		set_config_string(section, option, yesnoauto);
    /*TODO*///
    /*TODO*///	/* look into mame.cfg, [gamename] */
    /*TODO*///	yesnoauto = get_config_string((char *)drivers[game]->name, option, yesnoauto);
    /*TODO*///
    /*TODO*///	/* also take numerical values instead of "yes", "no" and "auto" */
    /*TODO*///	if      (stricmp(yesnoauto, "no"  ) == 0) res = 0;
    /*TODO*///	else if (stricmp(yesnoauto, "yes" ) == 0) res = 1;
    /*TODO*///	else if (stricmp(yesnoauto, "auto") == 0) res = -1;
    /*TODO*///	else    res = atoi (yesnoauto);
    /*TODO*///
    /*TODO*///cmdline:
    /*TODO*///	/* check the commandline */
    /*TODO*///	for (i = 1; i < mame_argc; i++)
    /*TODO*///	{
    /*TODO*///		if (mame_argv[i][0] != '-') continue;
    /*TODO*///		/* look for "-option" */
    /*TODO*///		if (stricmp(&mame_argv[i][1], option) == 0)
    /*TODO*///			res = 1;
    /*TODO*///		/* look for "-shortcut" */
    /*TODO*///		if (shortcut && (stricmp(&mame_argv[i][1], shortcut) == 0))
    /*TODO*///			res = 1;
    /*TODO*///		/* look for "-nooption" */
    /*TODO*///		if (strnicmp(&mame_argv[i][1], "no", 2) == 0)
    /*TODO*///		{
    /*TODO*///			if (stricmp(&mame_argv[i][3], option) == 0)
    /*TODO*///				res = 0;
    /*TODO*///			if (shortcut && (stricmp(&mame_argv[i][3], shortcut) == 0))
    /*TODO*///				res = 0;
    /*TODO*///		}
    /*TODO*///		/* look for "-autooption" */
    /*TODO*///		if (strnicmp(&mame_argv[i][1], "auto", 4) == 0)
    /*TODO*///		{
    /*TODO*///			if (stricmp(&mame_argv[i][5], option) == 0)
    /*TODO*///				res = -1;
    /*TODO*///			if (shortcut && (stricmp(&mame_argv[i][5], shortcut) == 0))
    /*TODO*///				res = -1;
    /*TODO*///		}
    /*TODO*///	}
    /*TODO*///	return res;
    /*TODO*///}