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 --- Bug Reports --- Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: How does scaling work?  (Read 1590 times)

0 Members and 1 Guest are viewing this topic.

mamenewb100

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 187
  • Last login:September 18, 2016, 04:25:34 am
How does scaling work?
« on: July 23, 2012, 07:05:38 am »
I have an interesting question about scaling 15 Khz to 31 Khz and how GroovyMame handles it. My understanding is that it is taking an arcade resolution like 300x220 and doubling the scan lines to 600x440. If I understand this correctly, since the resolution is being doubled the scan lines are half the thickness of the original, basically making it look like 220P when it is really 440i? Giving the illusion of a lower res image by cramming twice as much stuff in the same area?

Next question is does Groovymame need to use two modeline resolutions to accomplish this? I'm assuming if it can't find an exact 300x220 res that it will find the closest modeline available and double it. But then if your next closest modeline is 640x480, it will just stretch the pixels to fill the gap? If you had something closer to 600x440 would it use that instead?
« Last Edit: July 23, 2012, 07:46:23 am by mamenewb100 »
Life is a Game and we are all being Played.

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6790
  • Last login:Today at 01:41:43 am
  • Quote me with care
Re: How does scaling work?
« Reply #1 on: July 23, 2012, 08:16:14 am »
Hi mamenewb100,

Well the thickness of the scanlines cannot be controlled by software, it's something that is inherent to the monitor. So a high resolution monitor (31 KHz) has thinner scanlines, as it has to draw the double amount of lines in the same space.

So yes, basically what you do is to draw two scanlines for each one from the original resolution. This produces a typical "blocky" effect as compared to the real low resolution display, but it's not too bad provided you don't stretch things.

GroovyMAME scaling is, i.e.: 320 x 224p (15 kHz) -> 640 x 448p (31 kHz)

Notice we shouldn't really need to scale xres, just yres is relevant for frequency matters, but we do it because most people would get uneasy if we just scaled in one direction (I mean using 320 x 448p in this sample would look *exactly* the same).

Now, how this is done depends on the OS. In Linux we can create resolutions on the fly. So we just calculate the scaled modeline whatever it is and create it, that's all.

In Windows we can't create resolutions on the fly, so chances are the resulting scaled resolution won't be available. That's why we need to precalculate a table with all the required scaled resolutions, install it, and have it ready to use. Unfortunately we can't do this with the AVGA, so it will need to grab the closest resolution and possibly stretch things, it's somewhat unpredictable and that's why the results tend to suck when scaling.
« Last Edit: July 23, 2012, 12:50:32 pm by Calamity »
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead or pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

mamenewb100

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 187
  • Last login:September 18, 2016, 04:25:34 am
Re: How does scaling work?
« Reply #2 on: July 23, 2012, 11:57:21 am »
Thanks for the explanation. Since I don't want to settle for a low res game blown up 100% of it's original size... you guys have convinced me to ditch the AVGA. I only wan't to make sure that my next ATI card is perfectly compatible, so I don't go through this mess again.
Life is a Game and we are all being Played.

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6790
  • Last login:Today at 01:41:43 am
  • Quote me with care
Re: How does scaling work?
« Reply #3 on: July 23, 2012, 06:00:08 pm »
Well, that limitation of the AVGA only applies to Windows. In GroovyArcade Linux it's unlimited.

It's a shame that we couldn't figure out the odd resolution issue during boot...
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead or pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

mamenewb100

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 187
  • Last login:September 18, 2016, 04:25:34 am
Re: How does scaling work?
« Reply #4 on: July 23, 2012, 10:39:44 pm »
Well, that limitation of the AVGA only applies to Windows. In GroovyArcade Linux it's unlimited.

It's a shame that we couldn't figure out the odd resolution issue during boot...
HUH? Are you teasing me again? Are you saying that you can add any modeline for use with AVGA or modify anything you want, like a regular ATI card in Linux?

P.S. I finally did get the SOB to display. ;D
Life is a Game and we are all being Played.

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6790
  • Last login:Today at 01:41:43 am
  • Quote me with care
Re: How does scaling work?
« Reply #5 on: July 24, 2012, 03:52:09 am »
HUH? Are you teasing me again? Are you saying that you can add any modeline for use with AVGA or modify anything you want, like a regular ATI card in Linux?

Of course! Why did you think that I suggested Linux in the first place?
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead or pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi