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: Mame CRT simulation overlays  (Read 6578 times)

0 Members and 1 Guest are viewing this topic.

Blanka

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2248
  • Last login:January 25, 2018, 03:19:28 pm
Mame CRT simulation overlays
« on: April 25, 2008, 11:25:26 am »
I am quite satisfied by the results of OpenGL overlays to simulate phosphor dots and scanlines on high-res PC displays. But one thing puzzles me. I cannot find an implementation of Mame that scales the overlay to the actual game resolution. So Pacman has 1.8 scanline per pixel for example, or even 2.3 scanlines per pixel on a 1600x1200 screen. Does anybody know an implementation of Mame that scales overlays correctly to the real pixel-size of the running game? I like to have each blocky Pacman pixel that is actual 5x5 pixels on a 1600x1200 screen overlaid with a 5x5 pixels OpenGL mask. And when pacman is on a 1024x768 screen, and scales up tot 3x3 pixel blocks, the OpenGL overlay should be scaled to 3x3 pixels as well. In the implementations that I know (MacMame and Mame OSX), the overlay size is relative to the screen size, and not to the game size. So a portrait 1600x1200 screen in MacMame has 400 vertical scanlines, and a portrait 1280x1024 screen has 320 scanlines. Yet with PacMan, they both should show 288 scanlines!

Are there any MAME developers here that can improve this in future builds?

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: Mame CRT simulation overlays
« Reply #1 on: April 25, 2008, 04:18:36 pm »
OpenGL?  Which version of mame are you using?  SDLMAME?  (The official mame uses directX.)

As for the number of scanlines, sounds like the png you're using is 4 pixels tall.  I'm not sure if you'd like the results if mame scaled the screen effects; from 4 to 5.555555 at 1600x1200(p) and from 4 to 4.444444 at 1280x1024(p) for pacman.  This means a very fuzzy scanline, IMO nothing like what it looks like now.

One way to get your 288 scanlines today is make your own png file with 288 scanlines and use it as a overlay.  Mame does scale overlays, so you'll get to see how mame auto-scaling the scanline effects would look.  (The problem, of course, is you'd need a different overlay for each of the different resolutions.)  The other way is to run mame at a resolution that's an integer multiple of 288 (I know, not possible for most cards, but possible for other games with different resolutions).

Please note I don't use the effects feature, so I could be way off. ;D


IMO we'll have to wait until monitors get in the 250 to 300 dpi range before worrying about scaling the scanlines (current monitors run around 85 - 100 dpi, while laptops usually run higher about 100-150 dpi).  Far too ugly until then.  (I've wanted 300 dpi monitors even since I tried using "WYSIWYG" editors, and not seeing on the monitor what I was getting off the college 300 dpi laser printer, back in the early 1990's; I think I still have a looong time to wait though. :()
Robin
Knowledge is Power

Blanka

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2248
  • Last login:January 25, 2018, 03:19:28 pm
Re: Mame CRT simulation overlays
« Reply #2 on: April 26, 2008, 02:40:30 am »
You are right about added fuzz with scaling I guess. So maybe it should be split in two. One overlay with the scanlines, that scales (and thus does not suffer from some scaling) and one overlay that deals with the tridot/trinitron simulation, and stays at 4x4 all the time. In a way a true monitor works like that too.
I use MacMame and MameOSX. MacMame stopped being developed (but it still runs the real oldies perfect), but it had a great implementation of OpenGL overlays,. MameOSX took another aproach of adding very weird CoreImage Effects instead of re-use the OpenGL overlay folder of now death MacMame. So in MameOSX you can warp your Mame screen on a rotating cube, add halo's to everything, use a iTunes mirror image and strange stuff like that, but plain good CRT emulation is gone.