Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
08636 Interface Minor Always May 11, 2023, 17:26 May 12, 2023, 22:10
Tester ICEknight View Status Public Platform MAME (Official Binary)
Assigned To Resolution Open OS Windows 10/11 (64-bit)
Status [?] Confirmed Driver
Version 0.254 Fixed in Version Build 64-bit
Fixed in Git Commit Github Pull Request #
Summary 08636: Last used Screen Effect not saved if set to "none"
Description The last used Screen Effect gets always saved for next session, but this doesn't work when "none" is selected.
This is a problem for systems with a very low resolution (Dream 6800, Tamagotchi, etc), which look better without any shaders or filtering applied.
Steps To Reproduce -Load any system.
-Select "none" as Screen Effect in the Sliders menu.
-Exit and reload same system.
-Screen Effect will revert to the default in mame.ini.
Additional Information Reverting to the default in mame.ini can be already done by pressing the Del key, so having this by design would have no benefits.

Note that selecting "Unfiltered" does work as desired, though I've been told that the effect is not exactly the same as "none".
Github Commit
Flags
Regression Version
Affected Sets / Systems
Attached Files
 
Relationships
There are no relationship linked to this issue.
Notes
8
User avatar
No.21435
Robbbert
Moderator
May 12, 2023, 02:24
Insufficient information.

When I run d6800 and bring up the sliders, there's no screen effect slider.

Please specify which video mode you're using, and the screen chains or whatever.
User avatar
No.21436
Balthier
Tester
May 12, 2023, 04:29
edited on: May 12, 2023, 05:02
Pretty sure he means `-bgfx_screen_chains none` just by what he said about shaders and filtering, that's what the slider says anyway "window 0, screen 0 effect", and I see it when running d6800:
https://imgur.com/FsWf7TV

Not for nothin, but if he means it doesn't save to the cfg file then isn't this the intended behavior anyway? "None" means "no effect" as in no shader, so why would/should it save anything? The new way the shader settings get saved is confusing anyway. I have a raster.ini with the chains set to none just so I don't have clutter in the configs, and if I recall the reason I did that was because I couldn't seem to find a way to make it not save to cfgs across the board anymore. I'm one of those who didn't care about the sliders not saving.
User avatar
No.21438
ICEknight
Tester
May 12, 2023, 11:06
Yeah, I mean the Window x Screen y Effect z slider.

> "None" means "no effect" as in no shader, so why would/should it save anything?
Well... same as it will save if you have anything else turned off.
User avatar
No.21441
Robbbert
Moderator
May 12, 2023, 11:53
edited on: May 12, 2023, 11:55
By using bgfx I can confirm this - if set to "none" the entry in the cfg is removed, so falling back to what's in the ini chain.

It could be by design though - the devs will have to decide.

My default is "unfiltered" - it looks identical to "none", and keeps the cfg entry. All the other filters look dreadful on d6800.

When talking about video things you must always specify your video mode - I use d3d unless you say otherwise. I'm not going to try guesswork.
User avatar
No.21444
Balthier
Tester
May 12, 2023, 20:16
edited on: May 12, 2023, 20:29
"Unfiltered" isn't the same as "None", and it's an extra thing that adds to processing. All of the shaders add too much overhead compared to d3d hlsl IMHO, which is why I set it to none,none,none to cover any dual screens too.

Gonna add this discovery here as I don't know if it should be split off, but it is directly related. As I said before, I have a raster.ini located in the top of the ini directory, not the usual presets path. My mame.ini is like this:

inipath .;ini;ini/1_custom
bgfx_screen_chains

So I have the path order set up and chains is blank like a fresh ini would have.
I changed the raster.ini to have just this line:
`bgfx_screen_chains default,default,default`

I ran sf2ceuc as a test. Here's the sf2ceuc.cfg as an example, it has a stored "default" shader setting:
<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
    <system name="sf2ceuc">
        <bgfx>
            <window index="0">
                <screen index="0" chain="default" />
            </window>
        </bgfx>
        <counters>
            <coins index="0" number="1" />
        </counters>
        <input>
            <port tag=":DSWB" type="DIPSWITCH" mask="7" defvalue="4" value="0" />
        </input>
    </system>
</mameconfig>

Now, when I manually edit the raster.ini to be 'bgfx_screen_chains none,none,none' like I mentioned in the other post, and run the game again, I get a nice wall of errors in the console:
-----------------------------------------------------
Exception at EIP=00007ff66250cddc (bgfx_chain_entry::setup_view(texture_manager&, int, unsigned short, unsigned short, int, unsigned short&, unsigned short&) const+0x03dc): ACCESS VIOLATION
While attempting to read memory at 0000000000000000
-----------------------------------------------------
RAX=0000000000000000 RBX=000001e4668ee2f0 RCX=0000000000000000 RDX=000001d8155eec50
RSI=0000000c56d18bd0 RDI=0000000c56d18bf0 RBP=0000000c56d18c00 RSP=0000000c56d18b50
 R8=0000000000000006 R9=0000000c56d18bf0 R10=0000000000000006 R11=000000000000000f
R12=000001e459b861e0 R13=0000000000000000 R14=0000000000000000 R15=0000000c56d18bc0
-----------------------------------------------------
Stack crawl:
  0000000c56d18c90: 00007ff66250cddc (luaopen_lfs+0xa0bd5c)
  0000000c56d18db0: 00007ff66250d1fc (luaopen_lfs+0xa0c17c)
  0000000c56d18ec0: 00007ff6623f86d8 (luaopen_lfs+0x8f7658)
  0000000c56d18f40: 00007ff661fc16b2 (luaopen_lfs+0x4c0632)
  0000000c56d18fe0: 00007ff661fc1839 (luaopen_lfs+0x4c07b9)
  0000000c56d19130: 00007ff6617f11d2 (renderer_bgfx::draw(int)+0x0422)
  0000000c56d19190: 00007ff65d9d47f3 (win_window_info::draw_video_contents(HDC__*, bool)+0x0063)
  0000000c56d19290: 00007ff65d9d5e1b (win_window_info::video_window_proc(HWND__*, unsigned int, unsigned long long, long long)+0x017b)
  0000000c56d192c0: 00007ff65d9d67b9 (winwindow_video_window_proc_ui(HWND__*, unsigned int, unsigned long long, long long)+0x0009)
  0000000c56d19450: 00007ff88241e858 (CallWindowProcW+0x03f8)
  0000000c56d194f0: 00007ff88241de1b (SendMessageW+0x086b)
  0000000c56d19540: 00007ff88241d68a (SendMessageW+0x00da)
  0000000c56d19590: 00007ff65d9d4a41 (win_window_info::update()+0x01e1)
  0000000c56d195d0: 00007ff65d9e05aa (windows_osd_interface::update(bool)+0x003a)
  0000000c56d19660: 00007ff65daabdab (video_manager::frame_update(bool)+0x00ab)
  0000000c56d196d0: 00007ff65a4413b3 (screen_device::vblank_begin(int)+0x0233)
  0000000c56d19740: 00007ff65a4690fb (device_scheduler::timeslice()+0x014b)
  0000000c56d198a0: 00007ff65a46625f (running_machine::run(bool)+0x01bf)
  0000000c56d1edc0: 00007ff65d9bb6bb (mame_machine_manager::execute()+0x020b)
  0000000c56d1f1a0: 00007ff66175290f (cli_frontend::start_execution(mame_machine_manager*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)+0x03cf)
  0000000c56d1f460: 00007ff661752f1d (cli_frontend::execute(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)+0x004d)
  0000000c56d1f4c0: 00007ff65d9b5d39 (emulator_info::start_frontend(emu_options&, osd_interface&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)+0x0029)
  0000000c56d1f880: 00007ff6629a1b73 (luaopen_lfs+0xea0af3)
  0000000c56d1f950: 00007ff655af13b1 (__tmainCRTStartup+0x0231)
  0000000c56d1f980: 00007ff655af14e6 (mainCRTStartup+0x0016)
  0000000c56d1f9b0: 00007ff8819b7614 (BaseThreadInitThunk+0x0014)
  0000000c56d1fa30: 00007ff8833a26a1 (RtlUserThreadStart+0x0021)

Seems pretty broken to me, and after testing through a cps1.ini in source folder, and sf2ce.ini/sf2ceuc.ini in the other folder, it looks like raster.ini is the only one that throws the errors, although maybe I should test with a horizontal.ini too. Also cuavas said over at git: "Remove the bgfx_screen_chains from your INI files if you want it to remember the screen chains you choose with sliders. It assumes that if you have it set in an INI file or on the command line, you actually want it to apply." link: https://github.com/mamedev/mame/issues/10859#issuecomment-1430228949

I always took that to mean that if I put a setting in the ini file, as long as it is not the mame.ini, that the setting will take effect BUT NOT GET SAVED TO CFG. This is the beef I have with mame right now, a basic lack of a global switch for bgfx. I don't use the shaders much, like very little, and I always set everything in the mame.ini or raster/vector.ini just like with d3d hlsl, because I always use the exact same setting for everything. The way it is now, you have to manually edit hundreds or even thousands of files just to do ONE very basic thing. Never was a problem using d3d. I also know I'm not the only one that feels this way: https://old.reddit.com/r/MAME/comments/13af1m7/why_is_mame_now_saving_onthefly_volume_and_bgfx/?sort=old

To be absolutely clear here, if someone wants to use a global value set in some high priority ini file, then it shouldn't need to save to every cfg the exact same thing. Saving the sliders is nice, yes, but some people don't want the cfg clutter or "noise".
User avatar
No.21445
ICEknight
Tester
May 12, 2023, 20:42
edited on: May 12, 2023, 20:42
...I don't think that last part is related to this report, but maybe this:
<screen index="0" chain="your_chain_here" />
should disappear from the system's cfg file if it's the same as the default in mame.ini (as in, go to the Window/Screen/Effect slider and press Del).

In any case, please make a separate report for it, it's off-topic in this one.
User avatar
No.21446
Balthier
Tester
May 12, 2023, 21:15
Don't think it's off-topic at all. When the error happened it didn't save the "none" setting either, it was still at "default" in the cfg file. Your title says "Last used Screen Effect not saved if set to "none"". So um what, "boss"?
User avatar
No.21447
ICEknight
Tester
May 12, 2023, 22:10
(Sigh)