I can only go by my own MAME configs, but I’m sure they’re not much different.
Setup your main core config, I will use MAME as a example. In my MAME config I have the following set
core_specific_config = “false” auto_overrides_enable = “true”
I then make a specific config for a type of MAME game, for example - Vertical games, and Horizontal games. I will, for a vertical game, load in centipede, make sure it lines up with the tv overlay, make other adjustments to suit that game(Aspect, scaling, etc…), then finally write a new config in the main menu. This will give me, for example, a config called mame_libretro1.cfg. There is already my mame_libretro.cfg, so a1 is added to the name. I then rename that config, mame_libretro1.cfg, to the name of the rom I’ve just used - centipede - the rom is centiped, the config is now centiped.cfg. Now when I load centipede into MAME all my custom settings are now loaded, along with the correct overlay.
I can also edit the line
video_shader = “:\shaders\centiped.cgp”
so I can have custom shader settings as well. Just name the shader the same, centiped.cgp.
With the Playstation, just make sure your ISOs are not really long named and with weird characters in, and do the same thing. Again, for example, I have all 3 crash bandicoot games on my HD, named crash1.iso, crash2.iso, crash3.iso. I just name my custom playstation config to crash1.cfg, and any shaders to crash1.cgp.
Hope that helps in any way.