I got it partially working on Windows.
There's a segfault that needs fixing:
        if( emulator!=NULL ) {
			int i;
			struct config_param *prev_param = NULL;
			const int num_params = 4;
			const char *params[] = { "-nowindow", "-skip_gameinfo", "-switchres", "-joystick" };
            struct config_param *param;
			emulator->id = 0;
			strncpy( emulator->name, "mame", CONFIG_NAME_LENGTH );
			strncpy( emulator->display_name, "MAME", CONFIG_NAME_LENGTH );
			strncpy( emulator->executable, "mame", CONFIG_FILE_NAME_LENGTH );
			strncpy( emulator->display_name, "MAME", CONFIG_NAME_LENGTH );
            emulator->params=NULL;
            emulator->next=NULL; // <------- Add this
			for( i = num_params-1 ; i >= 0 ; i-- )
            {
                param = malloc( sizeof(struct config_emulator) );
                if( param!=NULL ) {
					strncpy( param->name, params[i], CONFIG_PARAM_LENGTH ); 
Therer are a couple of other segfaults that happen when the game list is empty.
I'm not sure how to generate game lists.