From 22646e2307cd5e0ee5118d46b3fefdc87f9856bc Mon Sep 17 00:00:00 2001 From: Thomas Jentzsch Date: Sat, 6 Nov 2021 13:17:52 +0100 Subject: [PATCH] enhanced effects info for PNG snapshots --- docs/index.html | 16 ++++++++-------- src/common/PhosphorHandler.hxx | 2 +- src/emucore/TIASurface.cxx | 12 ++++++++---- src/emucore/TIASurface.hxx | 3 +++ 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/docs/index.html b/docs/index.html index 73496e16c..ba14615a9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1544,22 +1544,22 @@ Cmd + 4 - Decrease scanline intensity + Decrease scanlines intensity Shift-Alt + 5 Shift-Cmd + 5 - Increase scanline intensity + Increase scanlines intensity Alt + 5 Cmd + 5 - Switch to previous scanline mask + Switch to previous scanlines mask Shift-Alt + 6 Shift-Cmd + 6 - Switch to next scanline mask + Switch to next scanlines mask Alt + 6 Cmd + 6 @@ -2970,13 +2970,13 @@
-tv.scanlines <0 - 100>
- Set TV effects scanline intensity, where 0 means completely off. + Set TV effects scanlines intensity, where 0 means completely off.
Note: No scanlines in 1x mode snapshots
-tv.scanmask <standard|thin|pixel|aperture|mame>
- Set the scanline mask. + Set the scanlines mask.
Note: All masks (except 'standard') work better at higher zoom levels. @@ -3796,9 +3796,9 @@ Phosphor for all ROMsEnable phosphor mode for all ROMs-tv.phosphor Blend (phosphor)Blend level to use in phosphor mode for all ROMs (needs to be manually adjusted for your particular hardware)-tv.phosblend - Scanline intensitySets scanline black-level intensity.
+ (Scanlines) IntensitySets scanlines black-level intensity.
Note: No scanlines in 1x mode snapshots-tv.scanlines - (Scanline) MaskSets the scanline mask.
+ (Scanlines) MaskSets the scanlines mask.
Note: All masks (except 'standard') work better at higher zoom levels-tv.scanmask Clone RGBCopy 'RGB' attributes to 'Custom' TV mode sliders  Clone S-VideoCopy 'S-Video' attributes to 'Custom' TV mode sliders  diff --git a/src/common/PhosphorHandler.hxx b/src/common/PhosphorHandler.hxx index 7b5d57077..a6642b350 100644 --- a/src/common/PhosphorHandler.hxx +++ b/src/common/PhosphorHandler.hxx @@ -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; diff --git a/src/emucore/TIASurface.cxx b/src/emucore/TIASurface.cxx index a65af447a..2c0048849 100644 --- a/src/emucore/TIASurface.cxx +++ b/src/emucore/TIASurface.cxx @@ -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(); } diff --git a/src/emucore/TIASurface.hxx b/src/emucore/TIASurface.hxx index c9f3772ef..697036e42 100644 --- a/src/emucore/TIASurface.hxx +++ b/src/emucore/TIASurface.hxx @@ -243,6 +243,9 @@ class TIASurface // RGB frame buffer PhosphorHandler myPhosphorHandler; + // Phosphor blend + int myPBlend{0}; + std::array myRGBFramebuffer; std::array