Page 1 of 1
Genesis Core Interpolation Between Frames?
Posted: Sat Feb 10, 2024 8:05 pm
by n0p
(I'm using Genesis core only, as my addons for DE10-Nano are still on the way)
To start, i'm quite impressed with the quality of the emulation. Everything works like it should.
I never had a chance to play Samurai Shodown on real hardware, so i don't really know how it should look like.
But every emulation has in-game shadows blinking.
Long time ago i was working on Genesis Plus and made a frame-interpolation scaler, that basically draws interpolated picture from previous and current frame.
Code is very simple - we take previous pixel, p_old, current - p_current, do (p_old+p_current)>>1, store p_current to p_old.
Here's what it looks like: https://www.youtube.com/watch?v=2e2vff28jyU&t=74s
Can this kind of scaler be implemented (even potentionally)?
Re: Genesis Core Interpolation Between Frames?
Posted: Sun Feb 11, 2024 10:18 am
by LamerDeluxe
I know that the Gameboy Advance and Lynx cores have it (I requested three frame blending for the latter one and Robert kindly added it). I would expect it to be possible, unless it is somehow tricky for CRT display oriented systems.
Re: Genesis Core Interpolation Between Frames?
Posted: Sun Feb 11, 2024 11:10 am
by Armakuni
The shadows blink on the Nuked-MD Megadrive core too which is based on the original chip decaps, So possibly is the same on original hardware too
Re: Genesis Core Interpolation Between Frames?
Posted: Sun Feb 11, 2024 12:19 pm
by n0p
Armakuni wrote: ↑Sun Feb 11, 2024 11:10 am
The shadows blink on the Nuked-MD Megadrive core too which is based on the original chip decaps, So possibly is the same on original hardware too
True, but i might suggest that blinking shadows implementation expects some postglowing from CRT luminophore thus appearing as grayed area.
Re: Genesis Core Interpolation Between Frames?
Posted: Sun Feb 11, 2024 1:55 pm
by Armakuni
n0p wrote: ↑Sun Feb 11, 2024 12:19 pm
Armakuni wrote: ↑Sun Feb 11, 2024 11:10 am
The shadows blink on the Nuked-MD Megadrive core too which is based on the original chip decaps, So possibly is the same on original hardware too
True, but i might suggest that blinking shadows implementation expects some postglowing from CRT luminophore thus appearing as grayed area.
I just tried it a CRT and the result is the same, so it is just the game (i would even say the flicker looks worse on a CRT)
Re: Genesis Core Interpolation Between Frames?
Posted: Sun Feb 11, 2024 2:12 pm
by LamerDeluxe
Armakuni wrote: ↑Sun Feb 11, 2024 1:55 pm
n0p wrote: ↑Sun Feb 11, 2024 12:19 pm
Armakuni wrote: ↑Sun Feb 11, 2024 11:10 am
The shadows blink on the Nuked-MD Megadrive core too which is based on the original chip decaps, So possibly is the same on original hardware too
True, but i might suggest that blinking shadows implementation expects some postglowing from CRT luminophore thus appearing as grayed area.
I just tried it a CRT and the result is the same, so it is just the game (i would even say the flicker looks worse on a CRT)
Confirmed on my 1084 monitor, pretty annoying blinking effect. They should have alternated the dithering effect on the shadow, that would have looked a lot better.
Re: Genesis Core Interpolation Between Frames?
Posted: Sun Feb 11, 2024 6:54 pm
by n0p
Thanks guys!
Just connected to old EIZO LCD display via DVI-HDMI convertor and it looks much better than on new TV.
https://youtu.be/0oMJRhOtaTU
Re: Genesis Core Interpolation Between Frames?
Posted: Sun Feb 11, 2024 8:02 pm
by LamerDeluxe
Wow, odd how that looks better than on a CRT.
Re: Genesis Core Interpolation Between Frames?
Posted: Sun Feb 11, 2024 9:02 pm
by n0p
40ms response time (from specs for Eizo L985EX) does that magic
I couldn't find any reliable info on old phosphors, except it looks like correct name of the effect is "afterglow".
So correct algo should be somewhat like: if new pixel is brighter, apply it immediately, if brightness is lower - apply some afterglow formula.
I wish i remember better - could old TV have the bigger afterglow effect, and computer monitor less, using a better phosphor composition?
Re: Genesis Core Interpolation Between Frames?
Posted: Tue Feb 13, 2024 9:08 am
by n0p
LamerDeluxe wrote: ↑Sun Feb 11, 2024 10:18 am
I know that the Gameboy Advance and Lynx cores have it (I requested three frame blending for the latter one and Robert kindly added it). I would expect it to be possible, unless it is somehow tricky for CRT display oriented systems.
Found the commit, feature is called flickerblend there
https://github.com/MiSTer-devel/AtariLy ... 8e80ec6da1
Re: Genesis Core Interpolation Between Frames?
Posted: Tue Feb 13, 2024 9:21 am
by LamerDeluxe
n0p wrote: ↑Tue Feb 13, 2024 9:08 am
LamerDeluxe wrote: ↑Sun Feb 11, 2024 10:18 am
I know that the Gameboy Advance and Lynx cores have it (I requested three frame blending for the latter one and Robert kindly added it). I would expect it to be possible, unless it is somehow tricky for CRT display oriented systems.
Found the commit, feature is called flickerblend there
https://github.com/MiSTer-devel/AtariLy ... 8e80ec6da1
It is mostly just done by averaging frames, so each pixel color is an average of current and previous colors.
Re: Genesis Core Interpolation Between Frames?
Posted: Tue Feb 13, 2024 9:32 am
by n0p
Yes, 2 frame flickerblend is exactly what's needed (for a start )
I wrote this code for Genesis Plus, but that's C. It will take some time to understand and study Verilog.
Code: Select all
void RenderLine_X1S2_Buffer (uint8 *src, int line, int offset, uint32 *table, int length)
{
PRE_X1_32_BUF;
do {
uint32 p1 = table[*src++];
uint32 p2 = *inCache;
*inCache++ = p1;
p1 = (p1+p2)>>1;
*outWrite++ = p1;
} while (--length);
}
Re: Genesis Core Interpolation Between Frames?
Posted: Tue Feb 13, 2024 2:21 pm
by Chris23235
n0p wrote: ↑Sun Feb 11, 2024 9:02 pm
I wish i remember better - could old TV have the bigger afterglow effect, and computer monitor less, using a better phosphor composition?
In general the afterglow effect on a consumer TV and an 1980s RGB monitor was more of less similar. But in the 1990s when VGA monitors with higher refresh rates became the norm the afterglow was weaker due to improved materials (it became necessary because 120Hz with the afterglow strength of a 60Hz consumer TV would have looked terrible).