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: Some pretty heavy duty MAME HLSL changes incoming  (Read 23717 times)

0 Members and 1 Guest are viewing this topic.

u-man

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 87
  • Last login:November 29, 2023, 05:57:09 am
  • I want to build my own arcade controls!
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #40 on: August 07, 2015, 10:10:15 am »
And I give a ---gosh-darn--- ---steaming pile of meadow muffin---, if you prefer Lotte over HLSL, as Lotte is GLSL and you will have problems with correct V-Sync and Tearing in general. Not to mention Vector Games, with nö options at all.
« Last Edit: August 07, 2015, 10:14:20 am by u-man »
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."

dmckean

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 729
  • Last login:January 13, 2024, 08:50:41 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #41 on: August 19, 2015, 08:27:38 pm »
And I give a ---gosh-darn--- ---steaming pile of meadow muffin---, if you prefer Lotte over HLSL, as Lotte is GLSL and you will have problems with correct V-Sync and Tearing in general. Not to mention Vector Games, with nö options at all.

It's not that of a big deal, just force it externally in the driver. A D3D version of the Lottes shader would be great though. I know it's not an accurate it representation of a CRT but it fixes the look of pixel art, is pretty convincing and I think that's what most people want anyway.

I've been playing MAME .163 and the HLSL Vector options getting Tac/Scan working for my cab and I'm now pretty impressed with the new glow code. It's really nice. I wish the ridiculously high default value of 500 for Vector Attenuation Length Limit could be fixed. Somewhere between 25-80 would be much more appropriate. It's hard to tell what the effect even does when it's set that high.

Can whoever did these changes add a realistic flicker effect for Vector games? Would robbing the code from RobeeJ's vector diff be that hard? Vector games look a lot more convincing with that flicker and it's why I'm using vector diff over HLSL on my cab. I'm only using HLSL for Tac/Scan because Tac/Scan crashes on MAME .144.

Eventually I think the Vector code needs a lot of changes. It'll never look like the real thing until MAME tracks the amount of time each line/dot is being drawn in each frame. Without that you can't get the super bright dots/lines in B&W vector games. It'd also be nice to do a shadow mask for color vector games.

epetti

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 344
  • Last login:September 14, 2023, 10:15:20 pm
  • I want to build my own arcade controls!
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #42 on: October 12, 2015, 01:45:49 pm »
Now that there's pretty good default settings in MAME. Are you still finding a need to do a lot of per game ini tweaking based on the system and the monitor that it used in the original arcades? I know posts in other forums from older versions of MAME definitely emphasized heavily needing per game (or bios) ini files, not just for resolutions but to get gamma and color settings feeling correct for the game. Didn't know if that was still as much of an issue?

Also, I'm starting to setup my HLSL settings. I have a 20" 1600x1200 LCD monitor. At this point, what HLSL settings are specifically resolution dependent on a person's monitor that need adjustment from the defaults?

lamprey

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 636
  • Last login:January 17, 2019, 07:03:11 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #43 on: October 14, 2015, 01:21:07 pm »
Now that there's pretty good default settings in MAME. Are you still finding a need to do a lot of per game ini tweaking based on the system and the monitor that it used in the original arcades? I know posts in other forums from older versions of MAME definitely emphasized heavily needing per game (or bios) ini files, not just for resolutions but to get gamma and color settings feeling correct for the game. Didn't know if that was still as much of an issue?

Also, I'm starting to setup my HLSL settings. I have a 20" 1600x1200 LCD monitor. At this point, what HLSL settings are specifically resolution dependent on a person's monitor that need adjustment from the defaults?
Obviously, you can tweak all that you want. But, realistically, for raster games, you just need to figure out which mask you want to use (shadow, slot, aperture) and set the shadow_mask_x/y_count and shadow_mask_u/vsize appropriately. Additionally, you'll probably want to up the percale value to something greater than 6 too.

u-man

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 87
  • Last login:November 29, 2023, 05:57:09 am
  • I want to build my own arcade controls!
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #44 on: November 02, 2015, 06:50:07 am »
And I give a ---gosh-darn--- ---steaming pile of meadow muffin---, if you prefer Lotte over HLSL, as Lotte is GLSL and you will have problems with correct V-Sync and Tearing in general. Not to mention Vector Games, with nö options at all.

It's not that of a big deal, just force it externally in the driver. A D3D version of the Lottes shader would be great though. I know it's not an accurate it representation of a CRT but it fixes the look of pixel art, is pretty convincing and I think that's what most people want anyway.

I've been playing MAME .163 and the HLSL Vector options getting Tac/Scan working for my cab and I'm now pretty impressed with the new glow code. It's really nice. I wish the ridiculously high default value of 500 for Vector Attenuation Length Limit could be fixed. Somewhere between 25-80 would be much more appropriate. It's hard to tell what the effect even does when it's set that high.

Can whoever did these changes add a realistic flicker effect for Vector games? Would robbing the code from RobeeJ's vector diff be that hard? Vector games look a lot more convincing with that flicker and it's why I'm using vector diff over HLSL on my cab. I'm only using HLSL for Tac/Scan because Tac/Scan crashes on MAME .144.

Eventually I think the Vector code needs a lot of changes. It'll never look like the real thing until MAME tracks the amount of time each line/dot is being drawn in each frame. Without that you can't get the super bright dots/lines in B&W vector games. It'd also be nice to do a shadow mask for color vector games.

Well i guess your prayers where heard :D ...  Jezze did huge improvements for vector games, and nearly everything you said is covered by HLSL now...
Timing for each frame, will be a ridiculous amount of work... i personally dont see this happening for the next (maybe) years, but everything else you said is done :D .... and we will improve it further, once a plan is build for future improvements... be patient ;) .
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."

epetti

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 344
  • Last login:September 14, 2023, 10:15:20 pm
  • I want to build my own arcade controls!
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #45 on: November 02, 2015, 12:03:44 pm »
I was reading the release notes. How much will upgrading from 0.165 to 0.167 mess up existing settings? I was seeing things like separate bloom settings now being gone. Will all ini files including per game ones need to be tweaked to account for the changes?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #46 on: November 02, 2015, 07:58:50 pm »
You can use vector.ini and raster.ini.... so copy the relevant bits into those files. 

dmckean

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 729
  • Last login:January 13, 2024, 08:50:41 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #47 on: March 06, 2016, 02:23:17 am »
Well i guess your prayers where heard :D ...  Jezze did huge improvements for vector games, and nearly everything you said is covered by HLSL now...
Timing for each frame, will be a ridiculous amount of work... i personally dont see this happening for the next (maybe) years, but everything else you said is done :D .... and we will improve it further, once a plan is build for future improvements... be patient ;) .

All this certainly didn't go unnoticed by me. Vector games look better than ever. And I know timing for each frame will be impossibly hard, but it's the only way we're going to get B&W vectors behaving like the real thing.

I wish I could contribute, but I'm no help.

B2K24

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 216
  • Last login:May 10, 2023, 09:33:05 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #48 on: March 06, 2016, 03:41:16 am »
Speaking of vector and other presets. Jezze has been kind enough to add presets to his repo ---> https://github.com/ImJezze/mame/tree/master/ini

I'm also pretty happy with what I'm using at the moment mostly taken from Jezze's settings ---> http://pastebin.com/kUGFXkNV

Key seems to be correct balance of screen brightness, contrast, and gamma depending on machine like nes, snes, or game.

Richardgregory

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 360
  • Last login:November 17, 2021, 01:15:10 pm
  • I want to build my own arcade controls!
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #49 on: March 09, 2016, 12:51:26 pm »
Where can I get Jezze's shader for HLSL?  Or any excellent shader for that matter. 

Appreciate any help.


Richardgregory

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 360
  • Last login:November 17, 2021, 01:15:10 pm
  • I want to build my own arcade controls!
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #50 on: March 09, 2016, 12:52:58 pm »
Lotte's shader is only for GLSL correct?

dmckean

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 729
  • Last login:January 13, 2024, 08:50:41 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #51 on: March 09, 2016, 05:06:31 pm »
Jezze's work is in the newer versions of MAME. The Lotte's shader is only for GLSL.

B2K24

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 216
  • Last login:May 10, 2023, 09:33:05 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #52 on: March 09, 2016, 07:09:42 pm »
Where can I get Jezze's shader for HLSL?  Or any excellent shader for that matter. 

Appreciate any help.

Latest official MAME is your best bet because it will contain all the work he is doing and it will have the correct .fx files

Richardgregory

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 360
  • Last login:November 17, 2021, 01:15:10 pm
  • I want to build my own arcade controls!
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #53 on: March 09, 2016, 10:50:25 pm »
I tried the settings as below, but I'm finding the screen way too dark even when adjusting the brightness and contrast.  How can I make it brighter?  Not sure what setting in HLSL will do that.



Speaking of vector and other presets. Jezze has been kind enough to add presets to his repo ---> https://github.com/ImJezze/mame/tree/master/ini

I'm also pretty happy with what I'm using at the moment mostly taken from Jezze's settings ---> http://pastebin.com/kUGFXkNV

Key seems to be correct balance of screen brightness, contrast, and gamma depending on machine like nes, snes, or game.

B2K24

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 216
  • Last login:May 10, 2023, 09:33:05 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #54 on: March 10, 2016, 12:35:56 am »
Are you talking about a vector game or raster game?

You could try cranking up the Gamma or Bloom Scale settings.

B2K24

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 216
  • Last login:May 10, 2023, 09:33:05 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #55 on: March 18, 2016, 02:55:57 am »
A very big update and very nice work by Jezze :)

https://github.com/mamedev/mame/pull/724

For those that Don't or can't compile GIT then you can expect these in the next release

Game Boy preset -->


Game Boy Advance preset -->


Vector preset -->


Quote

This is quite a big update that mainly changes the size used for render targets and re-introduces the correct usage of texture coordinates instead screen coordinates by the shaders.

Refactored render targets

    HLSL now uses NPOT sized render targets (this breaks the compatibility with graphics cards based on R300/R400/NV30, anno 2005 and older)
    HLSL render targets now have the exact size of the screen
    removed HLSL pre-scale factor
    improved overall performance (based on the previously required pre-scale factor, you might notice a 5-50% speed-up depending on your graphics card, more if you used a higher pre-scale factor)
    improved shadow mask quality (pixel-perfect) in screen-mode
    HLSL now uses a sharp bi-linear interpolation to pre-scale textures to screen size, based on [Themaister's] implementation
    added proper texture coordinates to vector screen quad
    removed ./hlsl/artwork_support folder (the default shaders supports artworks again)
    known issue: cocktail mode for vector screen looks wrong

Improved scanline simulation

    changed the amount of scanline darkness, a setting of 1.0 now becomes fully black (to get the same result as before half your current setting)
    added scanline variation, which makes the scanline height dependent on the brightness of the underlying color
    the amount of the scanline brightness and overdrive now depends on the scanline darkness
    renamed 'Scanline Screen Height' to 'Scanline Screen Scale' and 'Scanline Indiv. Height' to 'Scanline Height'

Refactored bloom

    fixed dimensions of bloom targets, which results in a much better alignment especially for games with very low resolution (therefore current bloom settings might look a little less intense than before)
    reduced blur width for raster screen
    added usage of shadow u/v option for source tile mode

HLSL presets

    added general presets for raster and vector screens
    added example presets for Game Boy (monochrome LCD) and Game Boy Advance (color LCD)
    options are now reset to loaded preset when game is closed

MAME Testers #06144: Fixed infinite loop

    fixed infinite loop while building slider list, when more than one window was created

p.s. The fix for #06144 is more of a workaround, because it doesn't achieve the intended functionality, but at least the application does not freeze anymore

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1471
  • Last login:April 22, 2024, 03:17:30 am
  • retro maniac
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #56 on: March 18, 2016, 03:30:21 am »
That very nice. On 4K monitor vector will be almost 100% auntentic :)

dmckean

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 729
  • Last login:January 13, 2024, 08:50:41 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #57 on: March 18, 2016, 12:08:58 pm »
Now they need to rewrite the way vacuum fluorescent displays games are handled in MAME so we can get those to glow too. Right now they use static artwork files.

cmoses

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 718
  • Last login:July 27, 2023, 05:19:00 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #58 on: March 18, 2016, 12:51:53 pm »
Looking forward to these changes in the next version of mame.


Sent from my iPad using Tapatalk

Nocturnaloner

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 212
  • Last login:May 05, 2016, 12:39:53 pm
  • AARRRRcade!
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #59 on: March 18, 2016, 08:01:53 pm »
I have a really dumb, basic question that's probably been answered a million times:  In what order do .ini files take precedence, and are they additive?  In other words, can I put my controller settings in mame.ini with no hlsl settings,  then only my appropriate hlsl settings in raster.ini and vector.ini and nothing else in those files?

B2K24

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 216
  • Last login:May 10, 2023, 09:33:05 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #60 on: March 18, 2016, 09:00:17 pm »
The specific ini files override what's in mame.ini and anything inserted at command line trumps the both of those.

Nocturnaloner

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 212
  • Last login:May 05, 2016, 12:39:53 pm
  • AARRRRcade!
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #61 on: March 18, 2016, 09:20:32 pm »
The specific ini files override what's in mame.ini and anything inserted at command line trumps the both of those.

That makes sense.  What if my control settings are in mame.ini, and my hlsl settings are in vector.ini.  If I start a vector game, will my control settings revert to default if there are none in vector.ini?

B2K24

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 216
  • Last login:May 10, 2023, 09:33:05 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #62 on: March 18, 2016, 10:37:58 pm »
The specific ini files override what's in mame.ini and anything inserted at command line trumps the both of those.

That makes sense.  What if my control settings are in mame.ini, and my hlsl settings are in vector.ini.  If I start a vector game, will my control settings revert to default if there are none in vector.ini?

No. It will still use what's set in mame.ini


Nocturnaloner

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 212
  • Last login:May 05, 2016, 12:39:53 pm
  • AARRRRcade!
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #63 on: March 18, 2016, 10:40:20 pm »
The specific ini files override what's in mame.ini and anything inserted at command line trumps the both of those.

That makes sense.  What if my control settings are in mame.ini, and my hlsl settings are in vector.ini.  If I start a vector game, will my control settings revert to default if there are none in vector.ini?

No. It will still use what's set in mame.ini

Got it.  Thanks!

u-man

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 87
  • Last login:November 29, 2023, 05:57:09 am
  • I want to build my own arcade controls!
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #64 on: March 21, 2016, 07:07:59 am »
That very nice. On 4K monitor vector will be almost 100% auntentic :)
I wouldnt go that far, as this update will not change much for Vector-games. This update will mainly improve Performance, as the prescale factors are automatically calculated and some functions for older cards are cutoff, that prevented improved Performance on newer cards.

Scanlines will behave much more like the real ones. Darker areas will have thinner scanlines and brighter areas will have bigger scanlines. We examined this phenomenon on Real scanlines and Jezze did a good job implementing this fact.

So these two things and the initial presets are the main points of this update.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1471
  • Last login:April 22, 2024, 03:17:30 am
  • retro maniac
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #65 on: March 21, 2016, 10:06:15 am »
I'm not planning to buy 4k monitor anytime soon. We will see in future how effects will progress. After all we now have BGFX that could have much more possibilities than HLSL.

Josef1975

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 21
  • Last login:July 09, 2021, 06:01:15 am
    • MY ARCADE CABINET
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #66 on: April 02, 2016, 01:12:20 pm »
after upgrade to mame 0.172 I  lost monitor curvature in my hlsl preset.
curvature is set to 0.3 (as before theupgrade).
someone can help me or post new mame hlsl preset to try?
(the look of my games has changed a bit now an without curvature so I want to try new presets)
thanks!

edit: solved...
need to modify also raster.ini instead of mame.ini
« Last Edit: April 02, 2016, 03:41:03 pm by Josef1975 »

B2K24

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 216
  • Last login:May 10, 2023, 09:33:05 pm
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #67 on: April 02, 2016, 03:55:45 pm »
after upgrade to mame 0.172 I  lost monitor curvature in my hlsl preset.
curvature is set to 0.3 (as before theupgrade).
someone can help me or post new mame hlsl preset to try?
(the look of my games has changed a bit now an without curvature so I want to try new presets)
thanks!

backup your old mame.ini (in case it's needed for something) and execute mame64-cc

After doing that open mame.ini that was just created (not your backup) and you'll notice
Code: [Select]
inipath                   .;ini;ini/presets
In your mame folder of 172 you should notice a presets folder (MAME\ini\presets) these will take effect when you have HLSL enabled

I would recommend opening the raster.ini and making these changes

Code: [Select]
defocus                   0.8,0.0
saturation                1.20
floor                     0.0,0.0,0.0
phosphor_life             0.0,0.0,0.0
bloom_scale               0.20

In mame.ini I also changed gamma to 0.9




Nocturnaloner

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 212
  • Last login:May 05, 2016, 12:39:53 pm
  • AARRRRcade!
Re: Some pretty heavy duty MAME HLSL changes incoming
« Reply #68 on: April 03, 2016, 02:54:04 am »
Starting with a completely fresh .0172 install, turning on HLSL gives no filtering or slider controls.  I selected Direct3D video, and turned off bicubic filtering.  Any suggestions?