--- a/advance/linux/vfb.c
+++ b/advance/linux/vfb.c
@@ -268,7 +268,7 @@
 	var->height = 0;
 	var->width = 0;
 	var->accel_flags = FB_ACCEL_NONE;
-	var->pixclock = (unsigned)(1000000000000LL / pixelclock);
+	var->pixclock = pixelclock;
 	var->left_margin = ht - hre;
 	var->right_margin = hrs - hde;
 	var->upper_margin = vt - vre;
@@ -587,9 +587,8 @@
 		goto err_close;
 	}
 
-	fb_state.flags = VIDEO_DRIVER_FLAGS_MODE_PALETTE8 | VIDEO_DRIVER_FLAGS_MODE_BGR15 | VIDEO_DRIVER_FLAGS_MODE_BGR16 | VIDEO_DRIVER_FLAGS_MODE_BGR24 | VIDEO_DRIVER_FLAGS_MODE_BGR32
-		| VIDEO_DRIVER_FLAGS_PROGRAMMABLE_ALL
-		| VIDEO_DRIVER_FLAGS_OUTPUT_FULLSCREEN;
+	fb_state.flags = VIDEO_DRIVER_FLAGS_MODE_PALETTE8 | VIDEO_DRIVER_FLAGS_MODE_BGR16 | VIDEO_DRIVER_FLAGS_MODE_BGR24 | VIDEO_DRIVER_FLAGS_MODE_BGR32
+		| VIDEO_DRIVER_FLAGS_OUTPUT_WINDOW;
 
 	if (fb_detect() != 0) {
 		goto err_close;
@@ -1120,14 +1119,10 @@
 {
 	assert(fb_is_active());
 
-	if (crtc_is_fake(crtc)) {
-		error_nolog_set("Not programmable modes are not supported.\n");
+	if (!crtc_is_fake(crtc)) {
 		return -1;
 	}
 
-	if (video_mode_generate_check("fb", fb_flags(), 8, 2048, crtc, flags)!=0)
-		return -1;
-
 	mode->crtc = *crtc;
 	mode->index = flags & MODE_FLAGS_INDEX_MASK;

--- a/advance/osd/frame.c
+++ b/advance/osd/frame.c
@@ -1298,9 +1299,9 @@
 		best_vclock = context->state.game_fps;
 
 		video_init_crtc_make_fake(context, "generate", best_size_x, best_size_y);
+		video_init_crtc_make_fake(context, "generate-double-y", best_size_x, best_size_2y);
+		video_init_crtc_make_fake(context, "generate-double-x", best_size_2x, best_size_y);
 		video_init_crtc_make_fake(context, "generate-double", best_size_2x, best_size_2y);
-		video_init_crtc_make_fake(context, "generate-triple", best_size_3x, best_size_3y);
-		video_init_crtc_make_fake(context, "generate-quad", best_size_4x, best_size_4y);
 	} else {
 		unsigned long long factor_x;
 		unsigned long long factor_y;
--- a/advance/osd/frame.c
+++ b/advance/osd/frame.c
@@ -2425,6 +2425,7 @@ void advance_video_mode_preinit(struct advance_video_context* context, struct ma
 	}
 	log_std(("emu:video: suggested debugger size %dx%d\n", option->debug_width, option->debug_height));
 
+#if 0
 	/* set the vector game size */
 	if (mame_is_game_vector(option->game)) {
 		unsigned mode_size_x;
@@ -2484,6 +2485,7 @@ void advance_video_mode_preinit(struct advance_video_context* context, struct ma
 		option->vector_width = 0;
 		option->vector_height = 0;
 	}
+#endif
 }
 
 /**
--- a/advance/osd/glue.c
+++ b/advance/osd/glue.c
@@ -2866,6 +2866,9 @@ adv_error mame_init(struct advance_context* context)
 	conf_float_register_limit_default(context->cfg, "display_gamma", 0.5, 2.0, 1.0);
 	conf_float_register_limit_default(context->cfg, "display_brightness", 0.1, 10.0, 1.0);
 
+	conf_int_register_default(context->cfg, "display_width", 640);
+	conf_int_register_default(context->cfg, "display_height", 480);
+
 	conf_bool_register_default(context->cfg, "misc_cheat", 0);
 	conf_string_register_default(context->cfg, "misc_languagefile", "english.lng");
 	conf_string_register_default(context->cfg, "misc_cheatfile", "cheat.dat");
@@ -2915,6 +2918,8 @@ adv_error mame_config_load(adv_conf* cfg_context, struct mame_option* option)
 
 	option->gamma = conf_float_get_default(cfg_context, "display_gamma");
 	option->brightness = conf_float_get_default(cfg_context, "display_brightness");
+	option->vector_width = conf_int_get_default(cfg_context, "display_width");
+	option->vector_height = conf_int_get_default(cfg_context, "display_height");
 
 	option->cheat_flag = conf_bool_get_default(cfg_context, "misc_cheat");