Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: GroovyMAME True Scanline Filter Mod  (Read 4426 times)

0 Members and 1 Guest are viewing this topic.

oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 268
  • Last login:December 08, 2023, 02:31:38 pm
  • Mame forever.
    • https://github.com/oomek
GroovyMAME True Scanline Filter Mod
« on: December 17, 2016, 06:09:29 pm »
I would like to share something I've been recently working on.

Since MAME was released I've never been satisfied of how the scanline effect looks. Without filtering its blocky, with filter applied it's a blurry mess. Filtering totally destroys contrast and dithering.

So I started to closely analysing the screenshots and I figured out how to decrapify the scanline effect.

Here are some zoomed in GIFS for you to take a look and judge for yourself.




 




As you can see my mod reduces that pixel bleed to the line above. It's now spot on the line, with a little glow around. Single pixels are not blocks with gradient anymore but actual dots.

Here is the link to the PSD file with full screenshots if you would like to take a closer look.
https://mega.nz/#!X1k2WDbQ!7QiG2E8hZqXso1y5UQ8XZSa1D7yl2CKVfUqw3xO3Qck

Disclaimer: This mod works only on LCDs and CRTs running games with integer scaling of 2 or super resolution in X and integer scale of 2 in Y. In uneven scaling the mod will not make any difference. I'm not releasing my build yet as I still need to tie it up to all the ini switches.

So far It's working fine and it's attached to F5 key, but If you nicely ask Calamity maybe he will add it to the future builds of GroovyMAME.
« Last Edit: December 17, 2016, 06:49:03 pm by oomek »

schmerzkaufen

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 791
  • Last login:October 03, 2023, 02:27:31 pm
  • Multiple Electronic Machine Emulator
Re: GroovyMAME True Scanline Filter Mod
« Reply #1 on: December 18, 2016, 07:49:49 am »
Very interesting. I've been bothered with the overkillness of the HLSL and CRT_geom shaders lately, which I can never really bring to achieve the clarity I seek for using with LCD's.

I used to do something similar to your thing using integer + filter + prescale 2* + png files (the latter fitting the integers I desire on my 1080p display, relative to the source) but I've noticed that 'solution' has a tendency to break integer scale by a few lines and therefore kill the correct alignment.
Add to this 320x240 already suffers from a scaling/tearing bug in this situation and it ends up showing a real mess.

So what exactly is different with your mod ? Did you manage to cut or reduce the vertical interpolation so it at least won't break the vertical integer ?
Thanks.

(* note I only do this in D3D/D3D9ex because BGFX doesn't allow setting prescale, afaik)

oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 268
  • Last login:December 08, 2023, 02:31:38 pm
  • Mame forever.
    • https://github.com/oomek
Re: GroovyMAME True Scanline Filter Mod
« Reply #2 on: December 18, 2016, 09:20:02 am »
I use only native effect in ini, no hlsl, bgfx ---smurf-poo---. What I do is set effect to scanline.png or some custom made with less scanline intensity, intscalex and intscaley to 2 and intoverscan 1 if you do not have crtemudriver installed to make more games compatible with 640x480 and switch gpu scaling in the drivers to on as scaling on tv adds a frame of latency for all sources which are not 1080p. I looks very nice with that setup.

smurf-poo :D i wasn't aware that this forum have swearing filter :)
BuII Cr@p test, eat this autocorrect :D
« Last Edit: December 18, 2016, 09:25:39 am by oomek »

schmerzkaufen

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 791
  • Last login:October 03, 2023, 02:27:31 pm
  • Multiple Electronic Machine Emulator
Re: GroovyMAME True Scanline Filter Mod
« Reply #3 on: December 19, 2016, 06:52:30 am »
I use only native effect in ini, no hlsl, bgfx ---smurf-poo---. What I do is set effect to scanline.png or some custom made with less scanline intensity, intscalex and intscaley to 2 and intoverscan 1 if you do not have crtemudriver installed to make more games compatible with 640x480 and switch gpu scaling in the drivers to on as scaling on tv adds a frame of latency for all sources which are not 1080p.
Sorry but I don't quite understand what you did.  ???
Is there a point in using intscale and intoverscan together ? Isn't there one of the settings taking priority ?
Also why the reference to 640x480 resolution and switching ?

oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 268
  • Last login:December 08, 2023, 02:31:38 pm
  • Mame forever.
    • https://github.com/oomek
Re: GroovyMAME True Scanline Filter Mod
« Reply #4 on: December 21, 2016, 03:44:28 pm »
I use only native effect in ini, no hlsl, bgfx ---smurf-poo---. What I do is set effect to scanline.png or some custom made with less scanline intensity, intscalex and intscaley to 2 and intoverscan 1 if you do not have crtemudriver installed to make more games compatible with 640x480 and switch gpu scaling in the drivers to on as scaling on tv adds a frame of latency for all sources which are not 1080p.
Sorry but I don't quite understand what you did.  ???
Is there a point in using intscale and intoverscan together ? Isn't there one of the settings taking priority ?
Also why the reference to 640x480 resolution and switching ?

640x480 is just an example. Resolution needs to be doubled in Y by integer value, that's it. Then I scale it using GPU Scale option to fill the 1080p on my LCD. Intoverscan was a temporary solution for games with height bigger than 240px as I do not run modified drivers atm.
I'm trying to figure out the best way to run games on LCD and using EDID resolutions ive managed to create
1920x448
1920x480
etc
But the main problem I have now is with GPU scaling on Win10 what I have described in my other topic.
http://forum.arcadecontrols.com/index.php/topic,152696.0.html

isamu

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 807
  • Last login:April 14, 2024, 08:15:07 pm
  • I'm a llama!
Re: GroovyMAME True Scanline Filter Mod
« Reply #5 on: December 23, 2016, 04:47:15 am »
Nice!

edomatic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 43
  • Last login:September 08, 2023, 12:09:10 pm
  • I want to build my own arcade controls!
Re: GroovyMAME True Scanline Filter Mod
« Reply #6 on: February 19, 2018, 03:55:32 pm »
Hi oomek,

I know i am necrobumping this thread but.did anything come out of this for you?
I am asking as i am interrested in this too, it would be great to know if there is a way to reduce the "harshness" of the scanlines on some games using some tweaking method in mame.ini or game.ini
Please let me know if you have a workable solution for this!

thanks

Ed

oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 268
  • Last login:December 08, 2023, 02:31:38 pm
  • Mame forever.
    • https://github.com/oomek
Re: GroovyMAME True Scanline Filter Mod
« Reply #7 on: February 19, 2018, 05:59:28 pm »
To be completely honest, I’ve abadonned this as I moved to the fixed res hlsl solution and I’m fine with it. I have still got the diffs for that idea if you are still interested.

edomatic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 43
  • Last login:September 08, 2023, 12:09:10 pm
  • I want to build my own arcade controls!
Re: GroovyMAME True Scanline Filter Mod
« Reply #8 on: February 20, 2018, 02:26:24 am »
Hi oomek,

first of thanks for the reply mate, i think in the case of HLSL doh..i am ---fouled up beyond all recognition---..as i am on ubuntu here
The only way i got close is by setting video to opengl, then enabling bilinear (glsl)  and setting the resolution for f.i. shadow warriors to the double res in the case of shadow warrior 512x448  ( a game that suffers a lot from pixelation on my old sega astro city, like any game in that res really (256x224))
only then it looked "smooth" but at the cost of scanlines (which i absolutely love on most other games hail Calamity!  :applaud:

Games like shadow dancer, chuka taisen, double dragon..they all have this "problem" when running in native res..mostly the 256x224 games so to speak

I feel in my old bones that there must be another approach to dealing with this issue? We just gotta ninja this!  8)

You are one of the first i read that actually acknowledges that it is indeed an issue, albeit an esthetic one for sure but nonetheless..