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