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: HLSL  (Read 4230 times)

0 Members and 1 Guest are viewing this topic.

EssexMame

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 472
  • Last login:July 22, 2025, 11:52:28 am
  • Mame Weekender
HLSL
« on: November 04, 2013, 08:21:07 am »
Hi,

I have hlsl enabled which gives me an attractive scanline look. However, on the PC I am now using it slows considerably. Galaga can't run better than 80% with frame skipping.

The H/ware isn't great - Intel 965 chipset so it's pretty much as low as you can go I think to have Direct X9.0c required for HLSL.

Are there any basic settings that would give scanlines with HLSL without such a drastic slowing?


BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9272
  • Last login:July 24, 2025, 02:05:45 pm
  • ...
Re: HLSL
« Reply #1 on: November 04, 2013, 09:01:25 am »
I'm just now digging into the details of setting up HLSL.  Still learning, but one important thing that I learned recently is that PREscale is scaling that is done by the cpu before it is sent to the graphics card.  So raising the prescale makes a lot more work for the processor, not the gpu.

Most of the classics ran fine on my system with the prescale set really high (which makes it sharper), but Popeye, Galaga, & Frogger slowed to a crawl.
I looked them up and it turns out that they all have discrete audio filters emulated which makes them more demanding on the processor than other games from the same era.

Not sure what your prescale is set to now, but lower it until the game runs at 100%.
If it's already at 0, then you just don't have enough oomph to run hlsl on those games.
You can make an individual ini file for those particular gameswith hlsl turned off.
(or make the individual ini files with a lower prescale, so other games are still sharp)
That way you can still have it in other games.

EDIT: to further elaborate, say the original game ran at 320x240 and you are running your monitor at 640x480.
There is no point in having prescale set to anymore than 2.  Likewise for higher resolutions. 
No point in scaling it larger than your monitor can display.
« Last Edit: November 04, 2013, 09:07:01 am by BadMouth »

WakiMiko

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 317
  • Last login:January 04, 2019, 03:17:46 pm
Re: HLSL
« Reply #2 on: November 04, 2013, 10:41:48 am »
You can use "effect" (in mame.ini) to overlay a png file for a simple scanline effect. You won't get all the fancy HLSL effects, but it won't slow your system to a crawl.


Ctrl+F for "effect" in http://www.mamedev.org/source/docs/config.txt.html .

The following pngs worked pretty well for me: http://arcadereplay.santoro.com/2012/04/02/388/

EssexMame

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 472
  • Last login:July 22, 2025, 11:52:28 am
  • Mame Weekender
Re: HLSL
« Reply #3 on: November 06, 2013, 07:41:49 am »
Thanks both!

My monitor is 1600x1200 so I think I could use a hefty prescale for that. I'll look at my prescale settings though - perhaps I can do something there. For a 320x240 game that could use a prescale of 5 and would be (slightly at least) blurry with lower settings?

Does anyone know which other HLSL settings are hefty on CPU and/or GPU? Perhaps I just need to not use these, or lower the settings, for it to work - it is the old classics I'm running after all (up to Street Fighter).

I also have the audio sampling high - perhaps lowering this makes a big difference alongside HLSL? I think I've seen the audio sampling makes a big difference particularly in later mame versions (0.148 (or am I 149?)) - as you mention for Galaga.

I probably need to go back to defaults for all mame.ini settings (and remove the config .ini files too) and start again! Setting the prescale at least to 5 (max) or less depending on the game resolution in each individual case. I'm only running 50 games or so - not too arduous to tweak each separately as needed.

EMDB

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 865
  • Last login:September 05, 2023, 09:18:51 am
  • Project RetroCade
Re: HLSL
« Reply #4 on: November 06, 2013, 07:53:32 am »
You can also use a reasonably cheap hardware solution: the mini-SLG scan lines generator (http://forum.arcadecontrols.com/index.php/topic,128970.0.html). Its the black thingy in the picture below. I only had a DVI output so I first had to convert that to VGA.



The appearance is a bit hard to capture with a camera but it gives an impression:

 

 

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9272
  • Last login:July 24, 2025, 02:05:45 pm
  • ...
Re: HLSL
« Reply #5 on: November 06, 2013, 08:38:40 am »
My monitor is 1600x1200 so I think I could use a hefty prescale for that. I'll look at my prescale settings though - perhaps I can do something there. For a 320x240 game that could use a prescale of 5 and would be (slightly at least) blurry with lower settings?

Ond's settings for his 1600x1200 monitor (and Ond does stuff right): http://forum.arcadecontrols.com/index.php/topic,133382.msg1373492.html#msg1373492

I personally don't like the phosphor blur, so I have it turned down to .05 which is probably not much different than having it set to zero.
I was originally upset because I thought my LCD was a blurry mess, but it was the HLSL settings.
« Last Edit: November 06, 2013, 08:42:33 am by BadMouth »

EssexMame

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 472
  • Last login:July 22, 2025, 11:52:28 am
  • Mame Weekender
Re: HLSL
« Reply #6 on: November 07, 2013, 06:12:02 am »
I've recreated mame.ini to default (-cc) and removed all files from ini directory. With OND's settings - Pacman looks great but it is running 16% (with no autoskip). My original settings didn't differ much but these also run at around 16% for PacMan.

My PC does have dual CPU. Only 1.6Ghz each but there is probably some settings to improve this - but not sure I'll get to 100% for anything slightly more strenuous than PacMan! It's fine without HLSL on.

So, probably a H/W solution (as above) or the "effect" solution which I'll experiment with now. Shame really, I liked HLSL but I guess that's for my next version!

Haze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1296
  • Last login:October 04, 2023, 08:30:02 am
  • I want to build my own arcade controls!
    • MAME Development Blog
Re: HLSL
« Reply #7 on: November 07, 2013, 12:21:26 pm »
HLSL effects are 100% done on the video card, the CPU doesn't matter (except if you use the sw prescale as mentioned, but afaik the HLSL prescale is video card too, but obviously doubling the resolution == 4x the pixel work for the card)

if pacman is 16% with HLSL and 4000% without it, then the problem is your video card, or lack of ;-)
« Last Edit: November 07, 2013, 12:23:52 pm by Haze »

EssexMame

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 472
  • Last login:July 22, 2025, 11:52:28 am
  • Mame Weekender
Re: HLSL
« Reply #8 on: November 08, 2013, 11:58:36 am »
Thanks Haze,

Yeah I always understood it to be the video card. It's not great - onboard 965 (GMA 3000?) so cr4p. However, it does run it (does have direct x 9.0c) and what I was trying to get to was the settings less intensive on the GPU.

Do you know what settings will bring me crashing down to 16% and which will see me closer to 100%? I just want a simple scanline look.

EMDB

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 865
  • Last login:September 05, 2023, 09:18:51 am
  • Project RetroCade
Re: HLSL
« Reply #9 on: November 08, 2013, 12:54:39 pm »
Thanks Haze,

Yeah I always understood it to be the video card. It's not great - onboard 965 (GMA 3000?) so cr4p. However, it does run it (does have direct x 9.0c) and what I was trying to get to was the settings less intensive on the GPU.

Do you know what settings will bring me crashing down to 16% and which will see me closer to 100%? I just want a simple scanline look.
Disable HLSL and use effect=scanlines or one of the other overlays...

WakiMiko

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 317
  • Last login:January 04, 2019, 03:17:46 pm
Re: HLSL
« Reply #10 on: November 09, 2013, 12:37:12 pm »
Thanks Haze,

Yeah I always understood it to be the video card. It's not great - onboard 965 (GMA 3000?) so cr4p. However, it does run it (does have direct x 9.0c) and what I was trying to get to was the settings less intensive on the GPU.

Do you know what settings will bring me crashing down to 16% and which will see me closer to 100%? I just want a simple scanline look.


Did you even read my post?

You can use "effect" (in mame.ini) to overlay a png file for a simple scanline effect. You won't get all the fancy HLSL effects, but it won't slow your system to a crawl.


Ctrl+F for "effect" in http://www.mamedev.org/source/docs/config.txt.html .

The following pngs worked pretty well for me: http://arcadereplay.santoro.com/2012/04/02/388/

EssexMame

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 472
  • Last login:July 22, 2025, 11:52:28 am
  • Mame Weekender
Re: HLSL
« Reply #11 on: November 11, 2013, 05:45:00 am »
Yes, thanks Haze, that is what I will be trying (or a hardware option)

I just think HLSL looks better and if I could reduce the slowdown by having just a few less-intensive options I thought it might still work - hence "Do you know what settings will bring me crashing down to 16% and which will see me closer to 100%?"

Tafoid

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 238
  • Last login:February 12, 2025, 04:47:22 am
  • Emulation Devotee
    • MAMELOAD TNG (Front-End)
Re: HLSL
« Reply #12 on: November 11, 2013, 09:55:42 pm »
Yes, thanks Haze, that is what I will be trying (or a hardware option)

I just think HLSL looks better and if I could reduce the slowdown by having just a few less-intensive options I thought it might still work - hence "Do you know what settings will bring me crashing down to 16% and which will see me closer to 100%?"

When I had a computer with a less than stellar Geforce 6100 onboard, I found that playing in a smaller -window helped speed.  Lower resolutions/switchres works as well, but you do have a trade off on quality.  If you are reluctant to spend some money on a video card upgrade, that's the best you are going to do and still play games at decent speeds with HLSL.

EssexMame

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 472
  • Last login:July 22, 2025, 11:52:28 am
  • Mame Weekender
Re: HLSL
« Reply #13 on: November 18, 2013, 07:47:40 am »
I've set it up using effect rgb_kb.png and I'm happy enough with how it looks. It's not as good as HLSL though it does soften the image to make it look better on an LCD screen (IMHO) and is slightly more subtle than HLSL for scanlines - I like it enough to keep it on (and where I can't have HLSL anyway!)

Thanks for your help Haze.