mirror of https://github.com/stella-emu/stella.git
made correct aspect ratio a permanent setting
added hotkey for correct aspect ratio updated docs
This commit is contained in:
parent
2464094694
commit
7fa2db712b
|
@ -51,7 +51,7 @@
|
|||
|
||||
* Added another oddball TIA glitch option for delayed background color.
|
||||
|
||||
* Added option to disable aspect correct scaling.
|
||||
* Added option to disable aspect ratio correct scaling.
|
||||
|
||||
* Replaced "Re-disassemble" with "Disassemble @ current line" in debugger.
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 3.1 KiB |
|
@ -1394,6 +1394,11 @@
|
|||
<td>Alt + PageUp</td>
|
||||
<td>Cmd-Fn + Up arrow</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Toggle aspect ratio correct scaling</td>
|
||||
<td>Control + c</td>
|
||||
<td>Control + c</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><i>Decrease</i> vertical display size</td>
|
||||
<td>Shift-Alt + PageUp</td>
|
||||
|
@ -2286,7 +2291,7 @@
|
|||
|
||||
<tr>
|
||||
<td><pre>-tia.correct_aspect <1|0></pre></td>
|
||||
<td>Enable aspect correct scaling.</td>
|
||||
<td>Enable aspect ratio correct scaling.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
@ -3048,16 +3053,18 @@
|
|||
<td valign="top">
|
||||
<table border="1" cellpadding="4">
|
||||
<tr><th>Item</th><th>Brief description</th><th>For more information,<br>see <a href="#CommandLine">Command Line</a></th></tr>
|
||||
<tr><td>Renderer</td><td>Use specified rendering mode</td><td>-video</td></tr>
|
||||
<tr><td>Interpolation</td><td>Enable interpolation of the TIA image</td><td>-tia.inter</td></tr>
|
||||
<tr><td>Zoom</td><td>Zoom level of the TIA image</td><td>-tia.zoom</td></tr>
|
||||
<tr><td>Renderer</td><td>Use specified rendering mode.</td><td>-video</td></tr>
|
||||
<tr><td>Interpolation</td><td>Enable interpolation of the TIA image.</td><td>-tia.inter</td></tr>
|
||||
<tr><td>Zoom</td><td>Adjust the zoom level of the TIA image</td><td>-tia.zoom</td></tr>
|
||||
<tr><td>Fullscreen</td><td>Self-explanatory - Note that colors may slightly change.
|
||||
This depends on the OS and renderer used.</td><td>-fullscreen</td></tr>
|
||||
<tr><td>Stretch</td><td>In fullscreen mode, completely fill screen with the TIA image.</td><td>-tia.fs_stretch</td></tr>
|
||||
<tr><td>Adapt display...</td><td>In fullscreen mode, adapt the display's refresh rate to the game's frame rate to minimize judder.
|
||||
</br>Note: Not available for macOS.</td><td>-tia.fs_refresh</td></tr>
|
||||
<tr><td>Overscan</td><td>In fullscreen mode, add overscan to the TIA image</td><td>-tia.fs_overscan</td></tr>
|
||||
<tr><td>V-Size adjust</td><td>Adjust height of the TIA image</td><td>-tia.vsizeadjust</td></tr>
|
||||
<tr><td>Overscan</td><td>In fullscreen mode, add overscan to the TIA image.</td><td>-tia.fs_overscan</td></tr>
|
||||
<tr><td>Correct aspect ratio</td><td>Enable aspect ratio correct scaling.
|
||||
</br>Note: Creates a cleaner looking TIA image when disabled (like z26 and old versions of Stella) vs. a correctly emulated aspect ratio when enabled.</td><td>-tia.correct_aspect</td></tr>
|
||||
<tr><td>V-Size adjust</td><td>Adjust the height of the TIA image.</td><td>-tia.vsizeadjust</td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -470,6 +470,7 @@ PhysicalKeyboardHandler::EventMappingArray PhysicalKeyboardHandler::DefaultCommo
|
|||
{Event::VCenterIncrease, KBDK_PAGEDOWN, MOD3},
|
||||
{Event::VSizeAdjustDecrease, KBDK_PAGEDOWN, KBDM_SHIFT | MOD3},
|
||||
{Event::VSizeAdjustIncrease, KBDK_PAGEUP, KBDM_SHIFT | MOD3},
|
||||
{Event::ToggleCorrectAspectRatio, KBDK_C, KBDM_CTRL},
|
||||
{Event::VolumeDecrease, KBDK_LEFTBRACKET, MOD3},
|
||||
{Event::VolumeIncrease, KBDK_RIGHTBRACKET, MOD3},
|
||||
{Event::SoundToggle, KBDK_RIGHTBRACKET, KBDM_CTRL},
|
||||
|
|
|
@ -623,7 +623,7 @@ FBInitStatus Console::initializeVideo(bool full)
|
|||
if(full)
|
||||
{
|
||||
uInt32 width, height;
|
||||
if (myOSystem.settings().getBool("tia.correct_aspect")) {
|
||||
if (!myOSystem.settings().getBool("tia.correct_aspect")) {
|
||||
width = 2 * myTIA->width();
|
||||
height = myTIA->height();
|
||||
} else {
|
||||
|
@ -737,6 +737,22 @@ void Console::changeVSizeAdjust(int direction)
|
|||
myOSystem.frameBuffer().showMessage("V-Size", val.str(), newAdjustVSize, -5, 5);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Console::toggleCorrectAspectRatio(bool toggle)
|
||||
{
|
||||
bool enabled = myOSystem.settings().getBool("tia.correct_aspect");
|
||||
|
||||
if(toggle)
|
||||
{
|
||||
enabled = !enabled;
|
||||
myOSystem.settings().setValue("tia.correct_aspect", enabled);
|
||||
initializeVideo();
|
||||
}
|
||||
const string message = string("Correct aspect ratio ") + (enabled ? "enabled" : "disabled");
|
||||
|
||||
myOSystem.frameBuffer().showMessage(message);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Console::setTIAProperties()
|
||||
{
|
||||
|
|
|
@ -276,6 +276,11 @@ class Console : public Serializable, public ConsoleIO
|
|||
*/
|
||||
void changeVSizeAdjust(int direction = +1);
|
||||
|
||||
/**
|
||||
Toggle the aspect ratio correction.
|
||||
*/
|
||||
void toggleCorrectAspectRatio(bool toggle = true);
|
||||
|
||||
/**
|
||||
Returns the current framerate.
|
||||
*/
|
||||
|
|
|
@ -134,6 +134,8 @@ class Event
|
|||
JoystickThreeUp, JoystickThreeDown, JoystickThreeLeft, JoystickThreeRight,
|
||||
JoystickThreeFire,
|
||||
|
||||
ToggleCorrectAspectRatio,
|
||||
|
||||
LastType
|
||||
};
|
||||
|
||||
|
|
|
@ -419,6 +419,7 @@ AdjustFunction EventHandler::getAdjustSetting(AdjustSetting setting)
|
|||
std::bind(&FrameBuffer::changeOverscan, &myOSystem.frameBuffer(), _1),
|
||||
std::bind(&Console::selectFormat, &myOSystem.console(), _1),
|
||||
std::bind(&Console::changeVerticalCenter, &myOSystem.console(), _1),
|
||||
std::bind(&Console::toggleCorrectAspectRatio, &myOSystem.console(), _1),
|
||||
std::bind(&Console::changeVSizeAdjust, &myOSystem.console(), _1),
|
||||
// Palette adjustables
|
||||
std::bind(&PaletteHandler::cyclePalette, &myOSystem.frameBuffer().tiaSurface().paletteHandler(), _1),
|
||||
|
@ -780,7 +781,6 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
|||
myAdjustActive = true;
|
||||
}
|
||||
return;
|
||||
|
||||
case Event::VSizeAdjustDecrease:
|
||||
if(pressed)
|
||||
{
|
||||
|
@ -799,6 +799,15 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
|||
}
|
||||
return;
|
||||
|
||||
case Event::ToggleCorrectAspectRatio:
|
||||
if(pressed && !repeated)
|
||||
{
|
||||
myOSystem.console().toggleCorrectAspectRatio();
|
||||
myAdjustSetting = AdjustSetting::ASPECT_RATIO;
|
||||
myAdjustActive = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case Event::PaletteDecrease:
|
||||
if (pressed && !repeated)
|
||||
{
|
||||
|
@ -2573,6 +2582,7 @@ EventHandler::EmulActionList EventHandler::ourEmulActionList = { {
|
|||
{ Event::OverscanIncrease, "Increase overscan in fullscreen mode", "" },
|
||||
{ Event::VidmodeDecrease, "Previous zoom level", "" },
|
||||
{ Event::VidmodeIncrease, "Next zoom level", "" },
|
||||
{ Event::ToggleCorrectAspectRatio,"Toggle correct aspect ratio", "" },
|
||||
{ Event::VSizeAdjustDecrease, "Decrease vertical display size", "" },
|
||||
{ Event::VSizeAdjustIncrease, "Increase vertical display size", "" },
|
||||
{ Event::VCenterDecrease, "Move display up", "" },
|
||||
|
@ -2725,7 +2735,7 @@ const Event::EventSet EventHandler::AudioVideoEvents = {
|
|||
Event::OverscanDecrease, Event::OverscanIncrease,
|
||||
Event::FormatDecrease, Event::FormatIncrease,
|
||||
Event::VCenterDecrease, Event::VCenterIncrease,
|
||||
Event::VSizeAdjustDecrease, Event::VSizeAdjustIncrease,
|
||||
Event::VSizeAdjustDecrease, Event::VSizeAdjustIncrease, Event::ToggleCorrectAspectRatio,
|
||||
Event::PaletteDecrease, Event::PaletteIncrease,
|
||||
Event::PreviousPaletteAttribute, Event::NextPaletteAttribute,
|
||||
Event::PaletteAttributeDecrease, Event::PaletteAttributeIncrease,
|
||||
|
|
|
@ -406,6 +406,7 @@ class EventHandler
|
|||
OVERSCAN,
|
||||
TVFORMAT,
|
||||
VCENTER,
|
||||
ASPECT_RATIO,
|
||||
VSIZE,
|
||||
// Palette adjustables
|
||||
PALETTE,
|
||||
|
@ -559,7 +560,7 @@ class EventHandler
|
|||
#else
|
||||
REFRESH_SIZE = 0,
|
||||
#endif
|
||||
EMUL_ACTIONLIST_SIZE = 174 + PNG_SIZE + COMBO_SIZE + REFRESH_SIZE,
|
||||
EMUL_ACTIONLIST_SIZE = 175 + PNG_SIZE + COMBO_SIZE + REFRESH_SIZE,
|
||||
MENU_ACTIONLIST_SIZE = 18
|
||||
;
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ Settings::Settings()
|
|||
setPermanent("tia.fs_overscan", "0");
|
||||
setPermanent("tia.vsizeadjust", 0);
|
||||
setPermanent("tia.dbgcolors", "roygpb");
|
||||
setTemporary("tia.correct_aspect", "true");
|
||||
setPermanent("tia.correct_aspect", "true");
|
||||
// Palette options
|
||||
setPermanent("palette", PaletteHandler::SETTING_STANDARD);
|
||||
setPermanent("pal.phase_ntsc", "26.2");
|
||||
|
@ -454,7 +454,7 @@ void Settings::usage() const
|
|||
<< " -tia.fs_overscan <0-10> Add overscan to TIA image in fullscreen mode\n"
|
||||
<< " -tia.dbgcolors <string> Debug colors to use for each object (see manual\n"
|
||||
<< " for description)\n"
|
||||
<< " -tia.correct_aspect <1|0> Enable aspect correct scaling\n"
|
||||
<< " -tia.correct_aspect <1|0> Enable aspect ratio correct scaling\n"
|
||||
<< endl
|
||||
<< " -tv.filter <0-5> Set TV effects off (0) or to specified mode\n"
|
||||
<< " (1-5)\n"
|
||||
|
|
|
@ -127,8 +127,9 @@ void VideoAudioDialog::addDisplayTab()
|
|||
|
||||
// TIA interpolation
|
||||
myTIAInterpolate = new CheckboxWidget(myTab, _font, xpos, ypos + 1, "Interpolation ");
|
||||
wid.push_back(myTIAInterpolate); ypos += lineHeight + VGAP * 4;
|
||||
wid.push_back(myTIAInterpolate);
|
||||
|
||||
ypos += lineHeight + VGAP * 4;
|
||||
// TIA zoom levels (will be dynamically filled later)
|
||||
myTIAZoom = new SliderWidget(myTab, _font, xpos, ypos - 1, swidth, lineHeight,
|
||||
"Zoom ", lwidth, 0, fontWidth * 4, "%");
|
||||
|
@ -162,6 +163,11 @@ void VideoAudioDialog::addDisplayTab()
|
|||
myTVOverscan->setTickmarkIntervals(2);
|
||||
wid.push_back(myTVOverscan);
|
||||
|
||||
// Aspect ratio correction
|
||||
ypos += lineHeight + VGAP * 4;
|
||||
myCorrectAspect = new CheckboxWidget(myTab, _font, xpos, ypos + 1, "Correct aspect ratio");
|
||||
wid.push_back(myUseStretch);
|
||||
|
||||
// Vertical size
|
||||
ypos += lineHeight + VGAP;
|
||||
myVSizeAdjust =
|
||||
|
@ -171,7 +177,6 @@ void VideoAudioDialog::addDisplayTab()
|
|||
myVSizeAdjust->setTickmarkIntervals(2);
|
||||
wid.push_back(myVSizeAdjust);
|
||||
|
||||
|
||||
// Add items for tab 0
|
||||
addToFocusList(wid, myTab, tabID);
|
||||
}
|
||||
|
@ -494,6 +499,9 @@ void VideoAudioDialog::loadConfig()
|
|||
myTVOverscan->setValue(instance().settings().getInt("tia.fs_overscan"));
|
||||
handleFullScreenChange();
|
||||
|
||||
// Aspect ratio correction
|
||||
myCorrectAspect->setState(instance().settings().getBool("tia.correct_aspect"));
|
||||
|
||||
// Aspect ratio setting (NTSC and PAL)
|
||||
myVSizeAdjust->setValue(instance().settings().getInt("tia.vsizeadjust"));
|
||||
|
||||
|
@ -616,6 +624,9 @@ void VideoAudioDialog::saveConfig()
|
|||
// TIA zoom levels
|
||||
instance().settings().setValue("tia.zoom", myTIAZoom->getValue() / 100.0);
|
||||
|
||||
// Aspect ratio correction
|
||||
instance().settings().setValue("tia.correct_aspect", myCorrectAspect->getState());
|
||||
|
||||
// Aspect ratio setting (NTSC and PAL)
|
||||
const int oldAdjust = instance().settings().getInt("tia.vsizeadjust");
|
||||
const int newAdjust = myVSizeAdjust->getValue();
|
||||
|
@ -729,6 +740,7 @@ void VideoAudioDialog::setDefaults()
|
|||
#endif
|
||||
myTVOverscan->setValue(0);
|
||||
myTIAZoom->setValue(300);
|
||||
myCorrectAspect->setState(true);
|
||||
myVSizeAdjust->setValue(0);
|
||||
|
||||
handleFullScreenChange();
|
||||
|
|
|
@ -75,6 +75,7 @@ class VideoAudioDialog : public Dialog
|
|||
SliderWidget* myTVOverscan{nullptr};
|
||||
CheckboxWidget* myRefreshAdapt{nullptr};
|
||||
SliderWidget* myTIAZoom{nullptr};
|
||||
CheckboxWidget* myCorrectAspect{nullptr};
|
||||
SliderWidget* myVSizeAdjust{nullptr};
|
||||
|
||||
// TV effects adjustables (custom mode)
|
||||
|
|
Loading…
Reference in New Issue