enhanced effects info for PNG snapshots

This commit is contained in:
Thomas Jentzsch 2021-11-06 13:17:52 +01:00
parent bc4a9aebe6
commit bd5899c183
4 changed files with 20 additions and 13 deletions

View File

@ -1544,22 +1544,22 @@
<td>Cmd + 4</td>
</tr>
<tr>
<td><i>Decrease</i> scanline intensity</td>
<td><i>Decrease</i> scanlines intensity</td>
<td>Shift-Alt + 5</td>
<td>Shift-Cmd + 5</td>
</tr>
<tr>
<td><i>Increase</i> scanline intensity</td>
<td><i>Increase</i> scanlines intensity</td>
<td>Alt + 5</td>
<td>Cmd + 5</td>
</tr>
<tr>
<td>Switch to <i>previous</i> scanline mask</td>
<td>Switch to <i>previous</i> scanlines mask</td>
<td>Shift-Alt + 6</td>
<td>Shift-Cmd + 6</td>
</tr>
<tr>
<td>Switch to <i>next</i> scanline mask</td>
<td>Switch to <i>next</i> scanlines mask</td>
<td>Alt + 6</td>
<td>Cmd + 6</td>
</tr>
@ -2970,13 +2970,13 @@
<tr>
<td><pre>-tv.scanlines &lt;0 - 100&gt;</pre></td>
<td>Set TV effects scanline intensity, where 0 means completely off.
<td>Set TV effects scanlines intensity, where 0 means completely off.
</br>Note: No scanlines in 1x mode snapshots</td>
</tr>
<tr>
<td><pre>-tv.scanmask &lt;standard|thin|pixel|aperture|mame&gt;</pre></td>
<td>Set the scanline mask.
<td>Set the scanlines mask.
</br>Note: All masks (except 'standard') work better at higher zoom levels.</td>
</tr>
@ -3796,9 +3796,9 @@
<tr><td>Phosphor for all ROMs</td><td>Enable phosphor mode for all ROMs</td><td>-tv.phosphor</td></tr>
<tr><td>Blend (phosphor)</td><td>Blend level to use in phosphor mode for all ROMs
(needs to be manually adjusted for your particular hardware)</td><td>-tv.phosblend</td></tr>
<tr><td>Scanline intensity</td><td>Sets scanline black-level intensity.</br>
<tr><td>(Scanlines) Intensity</td><td>Sets scanlines black-level intensity.</br>
Note: No scanlines in 1x mode snapshots</td><td>-tv.scanlines</td></tr>
<tr><td>(Scanline) Mask</td><td>Sets the scanline mask.</br>
<tr><td>(Scanlines) Mask</td><td>Sets the scanlines mask.</br>
Note: All masks (except 'standard') work better at higher zoom levels</td><td>-tv.scanmask</td></tr>
<tr><td>Clone RGB</td><td>Copy 'RGB' attributes to 'Custom' TV mode sliders</td><td>&nbsp;</td></tr>
<tr><td>Clone S-Video</td><td>Copy 'S-Video' attributes to 'Custom' TV mode sliders</td><td>&nbsp;</td></tr>

View File

@ -57,7 +57,7 @@ class PhosphorHandler
bool myUsePhosphor{false};
// Amount to blend when using phosphor effect
float myPhosphorPercent{0.60F};
float myPhosphorPercent{0.50F};
// Precalculated averaged phosphor colors
using PhosphorLUT = BSPF::array2D<uInt8, kColor, kColor>;

View File

@ -325,6 +325,7 @@ void TIASurface::enablePhosphor(bool enable, int blend)
{
if(myPhosphorHandler.initialize(enable, blend))
{
myPBlend = blend;
myFilter = Filter(enable ? uInt8(myFilter) | 0x01 : uInt8(myFilter) & 0x10);
myRGBFramebuffer.fill(0);
}
@ -487,18 +488,21 @@ string TIASurface::effectsInfo() const
buf << "Disabled, normal mode";
break;
case Filter::Phosphor:
buf << "Disabled, phosphor mode";
buf << "Disabled, phosphor=" << myPBlend;
break;
case Filter::BlarggNormal:
buf << myNTSCFilter.getPreset() << ", scanlines=" << attr.blendalpha;
buf << myNTSCFilter.getPreset();
break;
case Filter::BlarggPhosphor:
buf << myNTSCFilter.getPreset() << ", phosphor, scanlines=" << attr.blendalpha;
buf << myNTSCFilter.getPreset() << ", phosphor=" << myPBlend;
break;
}
if(attr.blendalpha)
buf << ", scanlines=" << attr.blendalpha
<< "/" << myOSystem.settings().getString("tv.scanmask");
buf << ", inter=" << (myOSystem.settings().getBool("tia.inter") ? "enabled" : "disabled");
buf << ", aspect correction=" << (correctAspect() ? "enabled" : "disabled");
buf << ", palette=" << myOSystem.settings().getString("palette");
return buf.str();
}

View File

@ -243,6 +243,9 @@ class TIASurface
// RGB frame buffer
PhosphorHandler myPhosphorHandler;
// Phosphor blend
int myPBlend{0};
std::array<uInt32, AtariNTSC::outWidth(TIAConstants::frameBufferWidth) *
TIAConstants::frameBufferHeight> myRGBFramebuffer;
std::array<uInt32, AtariNTSC::outWidth(TIAConstants::frameBufferWidth) *