Author Topic: Setup Mame to Look Retro Feel with Bezel and angle of screen  (Read 4328 times)

0 Members and 1 Guest are viewing this topic.

Offline francoisadt

  • Full Member
  • *
  • Posts: 61
    • Awards
Setup Mame to Look Retro Feel with Bezel and angle of screen
« on: March 22, 2020, 11:56:03 am »
Hi Gamers

Those that play on MAME and even do have a MAME cabinet can setup your screen angle to be TILTED so that
the screen look like a RETRO screen.

Attached: MameDkongRetro.jpg


MameDkongJnrRetro.jpg


MameDkong3Retro.jpg


Files in MameArtworkSetup.zip:
====================
Copy the Mame Artwork file in your Mame\Artwork folder which must the same name of your game. (in zip file as dkong.zip)

Copy attached bgfx_chain in your Mame\bgfx\chains folder and unzip

Copy attached ini.zip in your Mame\ini folder and unzip

The trick is setting the crt_geom files in the "bgfx\chains" folder.

in INI folder each game must have its own ini file to point to the crt_geom file to be used.

dkong.ini:
======

#
# OSD VIDEO OPTIONS
#
video                     bgfx
numscreens                1
window                    1
maximize                  1
waitvsync                 0
syncrefresh               0
monitorprovider           auto

#
# BGFX POST-PROCESSING OPTIONS
#
bgfx_path                 bgfx
bgfx_backend              auto
bgfx_debug                0
bgfx_screen_chains        crt-geom_dkong
bgfx_shadow_mask          slot-mask.png
bgfx_lut                 
bgfx_avi_name             auto


CRT_GEOM_DKONG File:
==================
{
    "name": "CRT-geom",
    "author": "cgwg",
    "sliders": [
        { "type": "float",
          "name": "aperture_strength",
          "text": "Shadow mask strength",
          "default":  0.4,
          "max"    :  1.0,
          "min"    :  0.0,
          "step"   :  0.05,
          "format": "%1.2f",
          "screen": "raster" },
        { "type": "float",
          "name": "curvature",
          "text": "Enable curvature",
          "default":  1.0,
          "max"    :  1.0,
          "min"    :  0.0,
          "step"   :  1.0,
          "format": "%1.0f",
          "screen": "raster" },
        { "type": "float",
          "name": "R",
          "text": "Radius of curvature",
          "default":  3.5,
          "max"    : 10.0,
          "min"    :  0.5,
          "step"   :  0.1,
          "format": "%1.1f",
          "screen": "raster" },
        { "type": "float",
          "name": "d",
          "text": "Distance to screen",
          "default":  4.0,
          "max"    : 10.0,
          "min"    :  0.1,
          "step"   :  0.1,
          "format": "%1.1f",
          "screen": "raster" },
   { "type": "vec2",
     "name": "angle",
     "text": "Tilt ",
     "default": [ 0.90, 0.0 ],
     "max"    : [ 1.0, 1.0 ],
     "min"    : [-1.0,-1.0 ],
     "step"   : 0.01,
     "format": "%1.2f",
     "screen": "raster" },
        { "type": "float",
          "name": "cornersize",
          "text": "Rounded corner size",
          "default":  0.01,
          "max"    :  0.10,
          "min"    :  0.00,
          "step"   :  0.01,
          "format": "%1.2f",
          "screen": "raster" },
        { "type": "float",
          "name": "cornersmooth",
          "text": "Border smoothness",
          "default":  1000,
          "max"    :  2000,
          "min"    :  100,
          "step"   :  100,
          "format": "%1.0f",
          "screen": "raster" },
   { "type": "vec2",
     "name": "overscan",
     "text": "Overscan ",
     "default": [ 1.0, 1.0 ],
     "max"    : [ 1.2, 1.2 ],
     "min"    : [ 0.8, 0.8 ],
     "step"   : 0.02,
     "format": "%1.2f",
     "screen": "raster" },
        { "type": "float",
          "name": "CRTgamma",
          "text": "Gamma of simulated CRT",
          "default":  2.4,
          "max"    :  4.0,
          "min"    :  0.7,
          "step"   :  0.05,
          "format": "%1.2f",
          "screen": "raster" },
        { "type": "float",
          "name": "monitorgamma",
          "text": "Gamma of output display",
          "default":  2.2,
          "max"    :  4.0,
          "min"    :  0.7,
          "step"   :  0.05,
          "format": "%1.2f",
          "screen": "raster" },
   { "type": "vec2",
     "name": "aspect",
     "text": "Aspect ratio ",
     "default": [ 1.0, 0.75 ],
     "max"    : [ 1.0, 1.0 ],
     "min"    : [ 0.3, 0.3 ],
     "step"   : 0.01,
     "format": "%1.2f",
     "screen": "raster" }
    ],
   "targets": [
   
   ],
   "passes": [
      {
         "effect": "crt-geom/crt-geom",
         "applytint": true,
         "name": "CRT",
         "uniforms": [
             { "uniform": "curvature",   "slider": "curvature" },
             { "uniform": "R",           "slider": "R" },
             { "uniform": "d",           "slider": "d" },
             { "uniform": "angle",       "slider": "angle" },
             { "uniform": "cornersize",  "slider": "cornersize" },
             { "uniform": "cornersmooth","slider": "cornersmooth" },
             { "uniform": "overscan",    "slider": "overscan" },
             { "uniform": "aspect",      "slider": "aspect" },
             { "uniform": "CRTgamma",    "slider": "CRTgamma" },
             { "uniform": "monitorgamma","slider": "monitorgamma" },
            { "uniform": "aperture_strength",    "slider": "aperture_strength" }
         ],
         
         "input": [
             { "sampler": "mpass_texture", "target": "screen" },
             { "sampler": "mask_texture", "texture": "bgfx/chains/crt-geom/aperture_1_2_bgr.png", "selection": "Shadow mask" }
         ],

         "output": "output"
      }
   ]
}



Member for 10 Years

Offline francoisadt

  • Full Member
  • *
  • Posts: 61
    • Awards
Re: Setup Mame to Look Retro Feel with Bezel and angle of screen
« Reply #1 on: March 22, 2020, 12:05:04 pm »
More here attached for pacman/mspacman.

crt_geom :
crt-geom_mspacman.json in MAME\BGFX\CHAIN

ini:
mspacman.ini in MAME\INI

Artwork:
mspacman.zip in MAME\Artwork

Forget to mention you have to set your MAME.ini file in MAME\MAME.ini

#
# BGFX POST-PROCESSING OPTIONS
#
bgfx_path                 bgfx
bgfx_backend              auto
bgfx_debug                0
bgfx_screen_chains        crt-geom-deluxe
bgfx_shadow_mask          slot-mask.png
bgfx_lut                 
bgfx_avi_name             auto







Member for 10 Years

Offline Esoteric_rt

  • New Member
  • *
  • Posts: 1
    • Awards
Re: Setup Mame to Look Retro Feel with Bezel and angle of screen
« Reply #2 on: April 08, 2020, 06:17:32 pm »
Thanks for the tip, I'll use this in my new build DK cabinet :-)
Member for 4 Years

Offline francoisadt

  • Full Member
  • *
  • Posts: 61
    • Awards
Re: Setup Mame to Look Retro Feel with Bezel and angle of screen
« Reply #3 on: April 26, 2020, 01:16:32 pm »
I have tested out the angle, and and the tilt is too high.

Change the tilt to:

     "text": "Tilt ",
     "default": [ -0.20, 0.0 ],
     "max"    : [ 1.0, 1.0 ],
     "min"    : [-1.0,-1.0 ],
     "step"   : 0.01,


Also did some playing around with the curvature and the edges to have round corners, like a glass panel:


{
    "name": "CRT-geom",
    "author": "cgwg",
    "sliders": [
        { "type": "float",
          "name": "aperture_strength",
          "text": "Shadow mask strength",
          "default":  0.4,
          "max"    :  1.0,
          "min"    :  0.0,
          "step"   :  0.05,
          "format": "%1.2f",
          "screen": "raster" },
        { "type": "float",
          "name": "curvature",
          "text": "Enable curvature",
          "default":  1.0,
          "max"    :  1.0,
          "min"    :  0.5,
          "step"   :  1.0,
          "format": "%1.0f",
          "screen": "raster" },
        { "type": "float",
          "name": "R",
          "text": "Radius of curvature",
          "default":  5.0,
          "max"    : 5.0,
          "min"    :  0.5,
          "step"   :  0.1,
          "format": "%1.1f",
          "screen": "raster" },
        { "type": "float",
          "name": "d",
          "text": "Distance to screen",
          "default":  1.0,
          "max"    : 2.0,
          "min"    :  0.1,
          "step"   :  0.1,
          "format": "%1.1f",
          "screen": "raster" },
   { "type": "vec2",
     "name": "angle",
     "text": "Tilt ",
     "default": [ -0.20, 0.0 ],
     "max"    : [ 1.0, 1.0 ],
     "min"    : [-1.0,-1.0 ],
     "step"   : 0.01,
     "format": "%1.2f",
     "screen": "raster" },
        { "type": "float",
          "name": "cornersize",
          "text": "Rounded corner size",
          "default":  0.10,
          "max"    :  0.10,
          "min"    :  0.00,
          "step"   :  0.01,
          "format": "%1.2f",
          "screen": "raster" },
        { "type": "float",
          "name": "cornersmooth",
          "text": "Border smoothness",
          "default":  2000,
          "max"    :  2000,
          "min"    :  100,
          "step"   :  100,
          "format": "%1.0f",
          "screen": "raster" },
   { "type": "vec2",
     "name": "overscan",
     "text": "Overscan ",
     "default": [ 1.0, 1.0 ],
     "max"    : [ 1.2, 1.2 ],
     "min"    : [ 0.8, 0.8 ],
     "step"   : 0.02,
     "format": "%1.2f",
     "screen": "raster" },
        { "type": "float",
          "name": "CRTgamma",
          "text": "Gamma of simulated CRT",
          "default":  4.0,
          "max"    :  4.0,
          "min"    :  0.7,
          "step"   :  0.05,
          "format": "%1.2f",
          "screen": "raster" },
        { "type": "float",
          "name": "monitorgamma",
          "text": "Gamma of output display",
          "default":  4.0,
          "max"    :  4.0,
          "min"    :  0.7,
          "step"   :  0.05,
          "format": "%1.2f",
          "screen": "raster" },
   { "type": "vec2",
     "name": "aspect",
     "text": "Aspect ratio ",
     "default": [ 1.0, 0.57 ],
     "max"    : [ 1.0, 1.0 ],
     "min"    : [ 0.3, 0.3 ],
     "step"   : 0.01,
     "format": "%1.2f",
     "screen": "raster" }
    ],
   "targets": [
   
   ],
   "passes": [
      {
         "effect": "crt-geom/crt-geom",
         "applytint": true,
         "name": "CRT",
         "uniforms": [
             { "uniform": "curvature",   "slider": "curvature" },
             { "uniform": "R",           "slider": "R" },
             { "uniform": "d",           "slider": "d" },
             { "uniform": "angle",       "slider": "angle" },
             { "uniform": "cornersize",  "slider": "cornersize" },
             { "uniform": "cornersmooth","slider": "cornersmooth" },
             { "uniform": "overscan",    "slider": "overscan" },
             { "uniform": "aspect",      "slider": "aspect" },
             { "uniform": "CRTgamma",    "slider": "CRTgamma" },
             { "uniform": "monitorgamma","slider": "monitorgamma" },
            { "uniform": "aperture_strength",    "slider": "aperture_strength" }
         ],
         
         "input": [
             { "sampler": "mpass_texture", "target": "screen" },
             { "sampler": "mask_texture", "texture": "bgfx/chains/crt-geom/aperture_1_2_bgr.png", "selection": "Shadow mask" }
         ],

         "output": "output"
      }
   ]
}


Member for 10 Years

Offline McBee

  • New Member
  • *
  • Posts: 17
  • Matt McBride
    • Awards
Re: Setup Mame to Look Retro Feel with Bezel and angle of screen
« Reply #4 on: October 04, 2020, 08:04:32 am »
I'm going to try this today. The concept is great if it works well.
Member for 4 Years

Offline francoisadt

  • Full Member
  • *
  • Posts: 61
    • Awards
Re: Setup Mame to Look Retro Feel with Bezel and angle of screen
« Reply #5 on: October 04, 2020, 03:19:59 pm »
Play around with the "depth"; size of the screen.

I did some changes again later but have to find which folder I did store it; after multiple different configuration copies exist.

Once found I will repost.

Let me know what your experiences are playing it like this; when retro feel are enabled.
Member for 10 Years

Offline McBee

  • New Member
  • *
  • Posts: 17
  • Matt McBride
    • Awards
Re: Setup Mame to Look Retro Feel with Bezel and angle of screen
« Reply #6 on: October 07, 2020, 12:26:36 pm »
I got sidetracked and did not get a chance to play around with this over the weekend.  My problem is that it has been so long since I have played on a real cabinet (I have an upright multi-cade running MAME) that I would likely not know if the angle was correct.
Member for 4 Years