B2K24 |
MAME @ 15 kHz Sony Trinitron CRT user
|
|
|
Reged: 10/25/10
|
Posts: 2663
|
|
|
Send PM
|
|
|
MAME 0.172 bgfx
#352051 - 03/28/16 03:57 AM
|
|
|
I wanted to show off just a fraction of what's possible with bgfx which will be available when 0.172 releases in just a few days.
A couple days ago I watched Firehawke's streaming some nes games using MAME while showing off what's possible using bgfx and -bgfx_screen_chains hlsl
Be sure to consult the docs which have quite a lot of information
http://docs.mamedev.org/advanced/bgfx.html
So we start off by launching MAME using the nes softlist using game Mega Man 2 as an example while using video mode bgfx.
Code:
mame64 nes megaman2u -numscreens 1 -video bgfx -bgfx_screen_chains hlsl
By default the Enable Adjustments is set to off so you'll want to switch it to On.
http://imgur.com/lLSHTZO
Other options I decided to change are as followed which you have the option of changing with the sliders by going into Tab/Slider Controls
Code:
Screen Brightness 0.900 Screen Contrast 0.850 Screen Gamma 0.850 Color Saturation 1.30 Scanline Amount 0.00 Hum Bar Amount 0.05 Signal Exponent, Red 0.80 Signal Exponent, Green 0.80 Signal Exponent, Blue 0.80 Rounded Corner Amount 0.20 Vignetting Amount 0.12 Reflection Amount 0.18
*the above is in no way meant to be final or permanent. It's just me messing around while playing some games and can be customized to your exact liking*
Also, keep in mind whatever you may set in sliders will be lost when you close MAME.
Here's some pics of the final result after you're up and running.
http://imgur.com/zJ1jJzY
http://imgur.com/ERivPDA
http://imgur.com/qWQKru6
^^^ The line you see is the vertical moving Hum Bar which I really like but it can be changed in sliders if needed.
http://imgur.com/6lTJqsS
Have fun with it and enjoy ![](//www.mameworld.info/ubbthreads/images/graemlins/smile.gif)
Special thanks to MooglyGuy as none of this would be possible without his work and Firehawke for advice on getting this up and running.
|
|
|
Dullaron |
Diablo III - Dunard #1884
|
|
|
Reged: 07/22/05
|
Posts: 6125
|
Loc: Fort Worth, Tx
|
|
Send PM
|
|
|
Re: MAME 0.172 bgfx
[Re: B2K24]
#352055 - 03/28/16 05:09 AM
|
|
|
Look real on the Mega Man and Super Mario Bros. The last two snapshots. One of those TV without the scanlines bulb.
|
W11 Home 64-bit + Nobara OS / AMD Radeon RX 5700 XT / AMD Ryzen 7 3700X 8-Core 3.59 GHz / RAM 64 GB
|
|
|
Re: MAME 0.172 bgfx
[Re: B2K24]
#352057 - 03/28/16 09:52 AM
|
|
|
|
B2K24 |
MAME @ 15 kHz Sony Trinitron CRT user
|
|
|
Reged: 10/25/10
|
Posts: 2663
|
|
|
Send PM
|
|
|
Re: MAME 0.172 bgfx
[Re: B2K24]
#352097 - 03/29/16 04:39 AM
|
|
|
|
B2K24 |
MAME @ 15 kHz Sony Trinitron CRT user
|
|
|
Reged: 10/25/10
|
Posts: 2663
|
|
|
Send PM
|
|
|
Re: MAME 0.172 bgfx
[Re: B2K24]
#352205 - 03/31/16 02:04 AM
|
|
|
|
|
Re: MAME 0.172 bgfx
[Re: RetroRepair]
#352213 - 03/31/16 03:49 AM
|
|
|
This is the beginning towards that road, as well as various other features that are in the works. BGFX will allow all of this to be done across all our supported platforms from one code base, as compared to separated HLSL/GLSL efforts.
|
---
Try checking the MAME manual at http://docs.mamedev.org
|
|
|
Re: MAME 0.172 bgfx
[Re: Firehawke]
#352218 - 03/31/16 05:02 AM
|
|
|
Found an error in the docs:
bgfx_shadow_mask
This specifies the shadow mask effect PNG file. By default this is shadow-mask.png
Actually, the default is slot-mask.png
|
|
|
|
Re: MAME 0.172 bgfx
[Re: Vaughan]
#352223 - 03/31/16 08:44 AM
|
|
|
Confirmed and fixed. There were some changes basically up to the last hours but most everything should be correct.
|
---
Try checking the MAME manual at http://docs.mamedev.org
|
|
|
Re: MAME 0.172 bgfx
[Re: Vaughan]
#352253 - 03/31/16 07:33 PM
|
|
|
I must admit - substituting as I do for the idiot factor - that I find this thread a little confusing. (No surprises there).
I install .172.
I load say.... Alien Syndrome.... I get a display that mimics the original monitor. I'd say it does it better than .171 ever did, but I'm no expert.
There's no need to mess with "Enable Adjustments is set to off so you'll want to switch it to On". In fact, there is no such option I can see.
In order to get things to work correctly, I have to have BGFX, HLSL, and GLSL turned on. Turn them both off, set video to Auto, and you get the usual, non-effect - game.
So when do you get the "Enable Adjustments" option? Or am I just missing it somehow?
|
|
|
B2K24 |
MAME @ 15 kHz Sony Trinitron CRT user
|
|
|
Reged: 10/25/10
|
Posts: 2663
|
|
|
Send PM
|
|
|
Re: MAME 0.172 bgfx
[Re: Vaughan]
#352256 - 03/31/16 07:56 PM
|
|
|
execute in command-line mame64 aliensyn -video bgfx -bgfx_screen_chains hlsl
Then you TAB into Slider controls and you have the option of Enabling Adjustments or Enabling NTSC or even both simultaneously.
|
|
|
|
Re: MAME 0.172 bgfx
[Re: B2K24]
#352261 - 03/31/16 08:45 PM
|
|
|
Is there no way to do it from the UI?
Yes I can use a command-line, I grew up on them (sadly), but I'll never understand why anyone would run Mame from it in 2016....
EDIT: The command works as you outline..... but as I say, is this not available from the UI?
|
|
|
|
Re: MAME 0.172 bgfx
[Re: Vaughan]
#352265 - 03/31/16 10:03 PM
|
|
|
Well things like the video mode aren't meant to be changed all the time. I guess the UI could let you pick the shader chain, but that only applies to the bgfx video system which is brand new. So that stuff isn't in the UI (and might not ever be). If you like the bgfx mode and hlsl shader chain then set:
Code:
video bgfx bgfx_screen_chains hlsl
in mame.ini
You can then enable/disable options through the sliders once MAME is started up. Or edit the defaults in the hlsl.json to match your preferences (although you should probably make a copy of hlsl.json and make your changes to the copy).
> Is there no way to do it from the UI? > > Yes I can use a command-line, I grew up on them (sadly), but I'll never understand > why anyone would run Mame from it in 2016.... > > EDIT: The command works as you outline..... but as I say, is this not available from > the UI?
|
|
|
|
Re: MAME 0.172 bgfx
[Re: SoltanGris42]
#352268 - 03/31/16 10:38 PM
|
|
|
Thanks for the reply.
With respect, the video mode can be changed "all the time" within the UI, you simply set the default to whatever you want.
So making it default to BGFX is possible - but what I don't get is that menu option when I do so.
I might be off-the-wall here, but I'd have thought that now a UI is built in, its feature set would mirror anything done from the command-line. They ought to go hand-in-hand. Why would they let them diverge? Isn't this the very essence of having a built in UI?
I realize people get upset when I write such things, but it just seems to me to be absurd to expect, in 2016, people to use the command line. It's not a lack of expertise in executing code from the CMD Prompt that is the issue, it's just old school for no reason. It's horribly inefficient.
Just my 2 cents.
EDIT: I just checked MAMEUIFX64 for .171, and under "Open GL Shaders" it allows you to choose various groups of shadows..... it's the kind of thing I'd of thought belonged in the Mame UI.......
|
|
|
B2K24 |
MAME @ 15 kHz Sony Trinitron CRT user
|
|
|
Reged: 10/25/10
|
Posts: 2663
|
|
|
Send PM
|
|
|
Re: MAME 0.172 bgfx
[Re: Vaughan]
#352270 - 03/31/16 11:33 PM
|
|
|
|
Dullaron |
Diablo III - Dunard #1884
|
|
|
Reged: 07/22/05
|
Posts: 6125
|
Loc: Fort Worth, Tx
|
|
Send PM
|
|
|
|
Darius doesn't have 3 screens support for the bgfx? Showing only one works. I don't know how get the other 2 screens to work with the bgfx.
Anyway I did some twinkling on this one screen.
Red Convergence X 0.0
Green Convergence Y 0.0
Scanline Amount 0.0
Shadow Mask Amount 0.0
Smooth Boarder Amount 0.02 (Using this because of the boarder was cutting off all the around of the screen. A little cut off won't hurt. I think 0.05 is too much. That just me thinking.)
Reflection Amount 0.0
Anyway I removed the scanlines on this because those can't shrink down any farther as it is. Look better without it anyway. Probably doesn't have this on the real machine. (I found out that Popeye doesn't have those lines. Sharp screen. Like a cell cartoon.)
By the way. If you try using the bgfx on Ms.Pac-Man then you have to flip the screen on it side. Only way get the scanlines fix.
What I think about the bgfx. Pretty good. I just love it.
[ATTACHED IMAGE - CLICK FOR FULL SIZE]
|
W11 Home 64-bit + Nobara OS / AMD Radeon RX 5700 XT / AMD Ryzen 7 3700X 8-Core 3.59 GHz / RAM 64 GB
|
|
|
Re: MAME 0.172 bgfx
[Re: B2K24]
#352275 - 04/01/16 03:16 AM
|
|
|
> Look at the configure options then Display options. > > It's there > > http://imgur.com/EEt1mBI
Stay with me, I know I can sometimes appear very very dumb......
I can set BGFX as the default Video Mode in the UI - but that doesn't seem to allow me to change the option in-game as you outlined earlier.
In other words you can't change the "Enable Adjustments" option in-game.
Or am I missing it through stupidity?
|
|
|
|
Re: MAME 0.172 bgfx
[Re: Dullaron]
#352276 - 04/01/16 03:43 AM
|
|
|
|
Dullaron |
Diablo III - Dunard #1884
|
|
|
Reged: 07/22/05
|
Posts: 6125
|
Loc: Fort Worth, Tx
|
|
Send PM
|
|
|
Re: MAME 0.172 bgfx
[Re: Firehawke]
#352278 - 04/01/16 04:22 AM
|
|
|
> See http://docs.mamedev.org/advanced/bgfx.html for how to specify multiple screen and > multiple display entries for BGFX.
Got it. bgfx_screen_chains hlsl,hlsl,hlsl
and book marked.
I notice that the first screen have that scrolling going up line while the rest of the screens doesn't show that at all. Check that out on your end. I haven't find anything on the page to get all three to do that.
|
W11 Home 64-bit + Nobara OS / AMD Radeon RX 5700 XT / AMD Ryzen 7 3700X 8-Core 3.59 GHz / RAM 64 GB
|
|
|
Re: MAME 0.172 bgfx
[Re: Vaughan]
#352283 - 04/01/16 07:38 AM
|
|
|
> Thanks for the reply. > > With respect, the video mode can be changed "all the time" within the UI, you simply > set the default to whatever you want. > > So making it default to BGFX is possible - but what I don't get is that menu option > when I do so. > > I might be off-the-wall here, but I'd have thought that now a UI is built in, its > feature set would mirror anything done from the command-line. They ought to go > hand-in-hand. Why would they let them diverge? Isn't this the very essence of having > a built in UI? > > I realize people get upset when I write such things, but it just seems to me to be > absurd to expect, in 2016, people to use the command line. It's not a lack of > expertise in executing code from the CMD Prompt that is the issue, it's just old > school for no reason. It's horribly inefficient. > > Just my 2 cents. > > EDIT: I just checked MAMEUIFX64 for .171, and under "Open GL Shaders" it allows you > to choose various groups of shadows..... it's the kind of thing I'd of thought > belonged in the Mame UI.......
I don't disagree. But you have to understand that bgfx showed up in the master branch on git a week ago. And MooglyGuy has only written the hlsl shader chain so far (well also an unfiltered shader chain and a bilinear filtering chain). So there aren't really other "effects" yet to choose from.
Even this week, he has been changing the way basic features work...specifying render target sizes, etc. And then having to edit all the json shader files to match. And fixing the NTSC filter. He really did a great job just getting a fully functioning system up and running in time for 0.172.
So it's not like people are disagreeing with you about having options in the UI. It's just that there hasn't been time for that to happen yet. The command line options barely exist right now!
My bet is that once we have shader chains implementing some more effects (like scale2x, hqx, etc) and those are shipped with MAME, that UI options for selecting the shader will appear. But that's just my guess.
Also, BTW, I think there was a little confusion in the earlier conversation. The hlsl shader chain has a number of sliders to control the effects. One of the sliders is simply "Enable Adjustments". So in order to see that you must have already loaded a game with the "hlsl" shader chain. Only then will you have the "Enable Adjustments" slider. It's not a general "enable my bgfx shader" thing. It's just an option in that particular shader chain that shows up once that specific shader: "hlsl" is already loaded and running. So if you loaded some other effect you wouldn't see a "Enable Adjustments" slider at all. Even if you were running BGFX and a shader you wouldn't necessarily have the slider. So you're right that there is really very little ui side support for all this stuff right now. And none at all for selecting a specific bgfx shader chain right now.
|
|
|
B2K24 |
MAME @ 15 kHz Sony Trinitron CRT user
|
|
|
Reged: 10/25/10
|
Posts: 2663
|
|
|
Send PM
|
|
|
Re: MAME 0.172 bgfx
[Re: Vaughan]
#352284 - 04/01/16 08:08 AM
|
|
|
> Stay with me, I know I can sometimes appear very very dumb...... > > I can set BGFX as the default Video Mode in the UI - but that doesn't seem to allow > me to change the option in-game as you outlined earlier. > > In other words you can't change the "Enable Adjustments" option in-game. > > Or am I missing it through stupidity?
For those using bgfx and not liking the fact you need to turn on Adjustments everytime you launch MAME, there's a way you can change the defaulted behavior for that.
Simply navigate to *MAME\bgfx\chains* and open hlsl.json with notepad ++ or equivalent and find line 58
change "default": 0, to "default": 1, and then Enable Adjustments is always turned on as long as your video mode is set to bgfx
|
|
|
|
Re: MAME 0.172 bgfx
[Re: SoltanGris42]
#352290 - 04/01/16 12:11 PM
|
|
|
You are right SoltanGris42. MooglyGuy did a very good job here and i am aware that this is just the beginning of very nice things to come, like arbitrary shader passes, save/load-able configs etc. etc. Considering what BGFX will deliver/ is capable of, i am very excited about it. Nearly the whole HLSL system (with sliders !!) is ported and only phosphor life and bloom is missing.
I think Vaughan has missed to configure his mame.ini properly:
Code:
# # OSD VIDEO OPTIONS # video bgfx
# # BGFX POST-PROCESSING OPTIONS # bgfx_path bgfx bgfx_backend auto bgfx_debug 0 bgfx_screen_chains hlsl bgfx_shadow_mask slot-mask.png
once he did this, he will have that "Enable Adjustments" slider, he is looking for when TAB is pressed and Sliders picked. The commandline will become obsolete too .
Edited by uman (04/01/16 12:12 PM)
|
|
|
|
Re: MAME 0.172 bgfx
[Re: uman]
#352291 - 04/01/16 02:29 PM
|
|
|
> this is just the beginning of very nice things to come, like arbitrary shader passes
Um, what? That's already in there. It's the whole way the HLSL shader works. I'm not sure you're the best person to be dispensing advice on the BGFX shader system if you don't even understand that much of it.
|
|
|
Dullaron |
Diablo III - Dunard #1884
|
|
|
Reged: 07/22/05
|
Posts: 6125
|
Loc: Fort Worth, Tx
|
|
Send PM
|
|
|
Re: MAME 0.172 bgfx
[Re: uman]
#352292 - 04/01/16 02:31 PM
|
|
|
> You are right SoltanGris42. MooglyGuy did a very good job here and i am aware that > this is just the beginning of very nice things to come, like arbitrary shader passes, > save/load-able configs etc. etc. > Considering what BGFX will deliver/ is capable of, i am very excited about it. Nearly > the whole HLSL system (with sliders !!) is ported and only phosphor life and bloom is > missing. > > I think Vaughan has missed to configure his mame.ini properly: > # > # OSD VIDEO OPTIONS > # > video bgfx > > # > # BGFX POST-PROCESSING OPTIONS > # > bgfx_path bgfx > bgfx_backend auto > bgfx_debug 0 > bgfx_screen_chains hlsl > bgfx_shadow_mask slot-mask.png > once he did this, he will have that "Enable Adjustments" slider, he is looking for > when TAB is pressed and Sliders picked. The commandline will become obsolete too .
I'm hoping that he will add those settings in the mame.ini in the future because the settings right now can't be saved. Only way saving the settings is to edit it from the shader files which I don't mind doing.
Edit the file from here at MAME\bgfx\chains. Make back up before change it.
|
W11 Home 64-bit + Nobara OS / AMD Radeon RX 5700 XT / AMD Ryzen 7 3700X 8-Core 3.59 GHz / RAM 64 GB
|
|
|
Re: MAME 0.172 bgfx
[Re: Dullaron]
#352300 - 04/01/16 05:56 PM
|
|
|
Uman's post fixed it - my INI file had a different setting in "bgfx_screen_chains".
And the earlier post about development cycles is helpful too. I suppose features will take a while to graduate to the UI.
It's all good now.
|
|
|
|
Re: MAME 0.172 bgfx
[Re: MooglyGuy]
#352302 - 04/01/16 06:02 PM
|
|
|
> Um, what? That's already in there. It's the whole way the HLSL shader works. I'm not > sure you're the best person to be dispensing advice on the BGFX shader system if you > don't even understand that much of it.
And? what do you expect? release was two days ago and i am back from my holidays yesterday. I never looked into BGFX before, as there where no examples until now, but yes you are still right, i am not the best person. My noob-skills, will hopefully be enough for some shader conversions and i dont think i will ever write a shader from scratch on my own. Satisfied now?
|
|
|
|
Re: MAME 0.172 bgfx
[Re: uman]
#352311 - 04/01/16 08:37 PM
|
|
|
> > Um, what? That's already in there. It's the whole way the HLSL shader works. I'm > not > > sure you're the best person to be dispensing advice on the BGFX shader system if > you > > don't even understand that much of it. > > And? what do you expect? release was two days ago and i am back from my holidays > yesterday. I never looked into BGFX before, as there where no examples until now, but > yes you are still right, i am not the best person. My noob-skills, will hopefully be > enough for some shader conversions and i dont think i will ever write a shader from > scratch on my own. Satisfied now?
Well you should take a look at the json files that are included now!
You can specify a bunch of render targets in the json. You can set each one to be a specific custom size, or a multiple of the input, or the size of the screen. Then each shader can take as inputs any number of those textures and output to whichever target you want to. And since each effect/pass is independent, you'll be able to mix and match shader effects once more of them exist. It's really, really nice. It's hard to think of an effect that you couldn't do now in the new system. I guess the only thing you can't do is read in your own textures and do stuff with them. But maybe I'm wrong. And that's not something you'd need very often anyway.
|
|
|
|
Re: MAME 0.172 bgfx
[Re: uman]
#352320 - 04/02/16 01:09 AM
|
|
|
> > Um, what? That's already in there. It's the whole way the HLSL shader works. I'm > not > > sure you're the best person to be dispensing advice on the BGFX shader system if > you > > don't even understand that much of it. > > And? what do you expect? release was two days ago and i am back from my holidays > yesterday. I never looked into BGFX before, as there where no examples until now, but > yes you are still right, i am not the best person. My noob-skills, will hopefully be > enough for some shader conversions and i dont think i will ever write a shader from > scratch on my own. Satisfied now?
So, just to make sure, at no point did you say to yourself, "I haven't had time to familiarize myself with the BGFX system, so I should probably hold off on giving people advice about it until I've had time to understand it"? Because, if so, all the sarcasm in the world can't save you from your own bad decisions.
|
|
|
|
Re: MAME 0.172 bgfx
[Re: MooglyGuy]
#352326 - 04/02/16 11:24 AM
|
|
|
Whats the problem Sir? My advice did solved the issue for Vaughan. I maked a compliment. I agreed that i am not the best person to answer questions about BGFX.
I dont see bad decisions
|
|
|
|
Re: MAME 0.172 bgfx
[Re: Dullaron]
#352345 - 04/02/16 10:23 PM
|
|
|
> ...I did some twinkling...
~~~...and now we know just what you are.~~~~
Couldn't resist.
|
|
|
|
Re: MAME 0.172 bgfx
[Re: Vaughan]
#352346 - 04/02/16 10:30 PM
|
|
|
> I suppose features will take a while to graduate to the UI.
Um. Ya-ahh.
|
|
|
|
Re: MAME 0.172 bgfx
[Re: B2K24]
#352371 - 04/03/16 08:25 AM
|
|
|
Will HLSL and BGFX work with the Mame64.exe?
I tried running HLSL with Direct3D video, and no adjustment sliders are available for the HLSL options, and no filtering seems to be taking place. I tried running with BGFX video, and Mame64 crashed immediately.
|
|
|
B2K24 |
MAME @ 15 kHz Sony Trinitron CRT user
|
|
|
Reged: 10/25/10
|
Posts: 2663
|
|
|
Send PM
|
|
|
Re: MAME 0.172 bgfx
[Re: Nocturnaloner]
#352372 - 04/03/16 09:13 AM
|
|
|
> Will HLSL and BGFX work with the Mame64.exe? > > I tried running HLSL with Direct3D video, and no adjustment sliders are available for > the HLSL options, and no filtering seems to be taking place. I tried running with > BGFX video, and Mame64 crashed immediately.
They both work just fine assuming you've got the latest release setup correctly.
Go here and download the appropriate binary.
Extract it into an empty directory and you'll need to create a fresh mame.ini by executing (mame64 -cc) or (mame -cc)
Set rompath in your freshly created mame.ini
Other than that and telling MAME exactly what you want it to do that's all there is to setting it up from scratch.
If you need further help or encounter more problems consider starting a new thread and there's official DOCS as well.
|
|
|
|
Re: MAME 0.172 bgfx
[Re: B2K24]
#352424 - 04/04/16 04:58 AM
|
|
|
> > Will HLSL and BGFX work with the Mame64.exe? > > > > I tried running HLSL with Direct3D video, and no adjustment sliders are available > for > > the HLSL options, and no filtering seems to be taking place. I tried running with > > BGFX video, and Mame64 crashed immediately. > > They both work just fine assuming you've got the latest release setup correctly. > > Go here and download the appropriate binary. > > Extract it into an empty directory and you'll need to create a fresh mame.ini by > executing (mame64 -cc) or (mame -cc) > > Set rompath in your freshly created mame.ini > > Other than that and telling MAME exactly what you want it to do that's all there is > to setting it up from scratch. > > If you need further help or encounter more problems consider starting a new thread > and there's official DOCS as well.
Ok, I've done all that, and still no filtering, new thread here: http://www.mameworld.info/ubbthreads/sho...part=1&vc=1
|
|
|
|
I see Dx 9.0c on the horizon...... (nt)
[Re: Nocturnaloner]
#352605 - 04/06/16 10:52 PM
|
|
|
|