45 : accuracySetting(commandController,
46 "accuracy",
"rendering accuracy",
Accuracy::PIXEL,
49 {
"line", Accuracy::LINE},
50 {
"pixel", Accuracy::PIXEL}})
52 , deinterlaceSetting(commandController,
53 "deinterlace",
"deinterlacing on/off",
true)
55 , deflickerSetting(commandController,
56 "deflicker",
"deflicker on/off",
false)
58 , maxFrameSkipSetting(commandController,
59 "maxframeskip",
"set the max amount of frameskip", 3, 0, 100)
61 , minFrameSkipSetting(commandController,
62 "minframeskip",
"set the min amount of frameskip", 0, 0, 100)
64 , fullScreenSetting(commandController,
65 "fullscreen",
"full screen display on/off",
false)
67 , gammaSetting(commandController,
"gamma",
68 "amount of gamma correction: low is dark, high is bright",
71 , brightnessSetting(commandController,
"brightness",
72 "brightness video setting: "
73 "0 is normal, lower is darker, higher is brighter",
75 , contrastSetting(commandController,
"contrast",
76 "contrast video setting: "
77 "0 is normal, lower is less contrast, higher is more contrast",
80 , colorMatrixSetting(commandController,
82 "3x3 matrix to transform MSX RGB to host RGB, see manual for details",
83 "{ 1 0 0 } { 0 1 0 } { 0 0 1 }")
85 , glowSetting(commandController,
86 "glow",
"amount of afterglow effect: 0 = none, 100 = lots",
89 , noiseSetting(commandController,
90 "noise",
"amount of noise to add to the frame",
93 , rendererSetting(commandController,
94 "renderer",
"rendering back-end used to display the MSX screen",
95 RendererID::SDLGL_PP, getRendererMap(), Setting::Save::NO)
97 , horizontalBlurSetting(commandController,
98 "blur",
"amount of horizontal blur effect: 0 = none, 100 = full",
101 , scaleAlgorithmSetting(
102 commandController,
"scale_algorithm",
"scale algorithm",
103 ScaleAlgorithm::SIMPLE, getScalerMap())
105 , scaleFactorSetting(commandController,
106 "scale_factor",
"scale factor",
109 , scanlineAlphaSetting(commandController,
110 "scanline",
"amount of scanline effect: 0 = none, 100 = full",
113 , limitSpritesSetting(commandController,
114 "limitsprites",
"limit number of sprites per line "
115 "(on for realism, off to reduce sprite flashing)",
true)
117 , disableSpritesSetting(commandController,
118 "disablesprites",
"disable sprite rendering",
119 false, Setting::Save::NO)
121 , cmdTimingSetting(commandController,
122 "cmdtiming",
"VDP command timing",
false,
123 EnumSetting<bool>::Map{{
"real",
false}, {
"broken",
true}},
126 , tooFastAccessSetting(commandController,
127 "too_fast_vram_access",
128 "Should too fast VDP VRAM access be correctly emulated.\n"
129 "Possible values are:\n"
130 " real -> too fast accesses are dropped\n"
131 " ignore -> access speed is ignored, all accesses are executed",
133 EnumSetting<bool>::Map{{
"real",
false }, {
"ignore",
true}},
136 , displayDeformSetting(
138 "display_deform",
"Display deform", DisplayDeform::NORMAL,
139 EnumSetting<DisplayDeform>::Map{
140 {
"normal", DisplayDeform::NORMAL},
141 {
"3d", DisplayDeform::_3D}})
143 , vSyncSetting(commandController,
144 "vsync",
"Synchronize page flip with the host screen vertical sync:\n"
145 " on -> flip on host vsync: avoids tearing\n"
146 " off -> immediate flip: might be more fluent when host framerate"
147 " (typically 60Hz) differs from MSX framerate (50 or 60Hz).\n",
153 , horizontalStretchSetting(commandController,
154 "horizontal_stretch",
155 "Amount of horizontal stretch: this many MSX pixels will be "
156 "stretched over the complete width of the output screen.\n"
157 " 320 = no stretch (large borders)\n"
158 " 288 = a bit more than all border pixels\n"
159 " 284 = all border pixels\n"
160 " 280 = a bit less than all border pixels\n"
162 " 256 = max stretch (no border visible at all)\n"
163 " good values are 272 or 280\n",
166 , pointerHideDelaySetting(commandController,
167 "pointer_hide_delay",
168 "number of seconds after which the mouse pointer is hidden in the openMSX "
169 "window; negative = no hiding, 0 = immediately",
172 , interleaveBlackFrameSetting(commandController,
173 "interleave_black_frame",
174 "Insert a black frame in between each normal MSX frame. "
175 "Useful on (100Hz+) lightboost enabled monitors to reduce "
176 "motion blur and double frame artifacts.",
179 brightnessSetting.attach(*
this);
180 contrastSetting .attach(*
this);
181 updateBrightnessAndContrast();
183 auto& interp = commandController.getInterpreter();
184 colorMatrixSetting.setChecker([
this, &interp](
const TclObject& newValue) {
186 parseColorMatrix(interp, newValue);
187 }
catch (CommandException& e) {
188 throw CommandException(
189 "Invalid color matrix: ",
e.getMessage());
193 parseColorMatrix(interp, colorMatrixSetting.getValue());
194 }
catch (MSXException& e) {
195 std::cerr <<
e.getMessage() <<
'\n';
199 rendererSetting.setEnum(RendererID::UNINITIALIZED);
200 rendererSetting.setChecker([
this](
const TclObject& newValue) {
201 if (newValue.getString() ==
"uninitialized") {
202 throw CommandException(
"can't set special value 'uninitialized'");
205 (
void)rendererSetting.fromStringBase(newValue.getString());