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: R-Type resolution/refresh rate  (Read 8300 times)

0 Members and 1 Guest are viewing this topic.

powruser

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:March 30, 2014, 06:13:00 pm
R-Type resolution/refresh rate
« on: March 29, 2014, 07:38:15 am »
R-Type arcade runs at a higher resolution than most standard resolution arcade games (384x256) and has a refresh rate of 55 Hz. Why did they choose to go with 55 Hz instead of the standard 60 Hz? Is it because the monitor wouldn't be able to do the higher than normal resolution at a full 60 Hz? Was always curious about this.

rCadeGaming

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1256
  • Last login:April 13, 2025, 12:14:40 pm
  • Just call me Rob!
Re: R-Type resolution/refresh rate
« Reply #1 on: March 29, 2014, 12:15:57 pm »
Yes, basically.  A standard arcade monitor (15kHz/CGA) is designed for a horizontal frequency of around 15,750Hz.  At 60Hz, this means you often run around 262 total lines.

262 lines per frame * 60 frames per second = 15,720 lines per second = 15,720Hz horizontal frequency

224p and 240p games often run this way.  Only 224-240 active lines per frame leaves plenty of extra lines in each frame.  Allowing the CRT to scan a few blank lines in between each frame gives it time for the vertical sync pulse to take place.  This is called the vertical blanking interval.

For example, let's say a CRT is displaying 240p at 60Hz vertical, 15,720Hz horizontal.  It literally scans each line in order from left to right, top to bottom, directing an electron beam to draw onto the front of the screen.  After scanning the 240 active lines, the CRT will scan a few blank lines, also known as the vertical front porch.  Then the vertical sync pulse will take place, causing the electron beam to jump back to the top of the screen so it can scan the next frame. 

Whipping an electron beam to the top of a large monitor at nearly instantaneous speed is somewhat "violent."  The electron beam will be wobbling for a bit afterward, so it scans a few more blank lines at the top of the screen (vertical back porch), giving it time to settle back to a steady path.  If you create a video timing with too few lines in the vertical back porch, you will see a warped/distorted effect at the top left of the screen because the electron has begun scanning active video before it has had time to settle down.

So, in our example there will be 22 lines left over for the blanking intervals (262 total - 240 active).  You can see that if we allocate 11 lines to the front porch and 11 lines to the back porch, the picture will be centered.  If we allocate only 6 lines to the front porch (below the active lines) and 16 lines to the back porch (above), the picture will shifted down.

Similarly, there is a horizontal blanking interval, consisting of a few blank pixels after the active pixels in each line (horizontal front porch), and a few blank pixels before the active pixels in the next line (horizontal back porch).  This allows time for the horizontal sync pulse to take place, causing the electron beam to jump back to the left side of the screen after scanning each line.

Now, if we want to display 256 active lines, there will only be 6 left if we're running at 60Hz vertical, 15,720Hz horizontal (262 total - 256 active).  That's not too many to allocate to the vertical blanking interval, which could cause some problems.  Running at 55Hz vertical, 15,720Hz horizontal results in about 286 total lines, giving you more room to work with.

286 lines per frame * 55 frames per second = 15,730 lines per second = 15,730Hz horizontal frequency

I don't know precisely how many total lines the R-Type PCB actually used off the top of my head, but that is the gist of it.  Different 15kHz CRT's have different tolerances for how far you can deviate from 15,750Hz before losing sync.  It could be up to +-1000Hz, but some CRT's are pickier than others, so the standard practice is to stay as close to 15,750Hz as possible.  If a different number of total lines are needed, it is accomplished by varying vertical frequency, and leaving horizontal frequency relatively constant.


powruser

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:March 30, 2014, 06:13:00 pm
Re: R-Type resolution/refresh rate
« Reply #2 on: March 30, 2014, 08:36:55 am »
Wow, thanks for the extremely detailed response! Very helpful and informative.

I wonder... Since 60 Hz vertical and 15 KHz horizontal affords around 240 usable lines... I wonder if a standard resolution arcade monitor would be able to do 480p if the vertical sync was lowered to 30 Hz?

rCadeGaming

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1256
  • Last login:April 13, 2025, 12:14:40 pm
  • Just call me Rob!
Re: R-Type resolution/refresh rate
« Reply #3 on: March 30, 2014, 01:06:53 pm »
Mathematically, yes, you have the right idea, but it wouldn't actually work for a few reasons.

Although 15kHz CRT's do generally have a proportionally wider range of frequencies they will sync to vertically than horizontally, it would still be hard to find one that goes all the way down to 30Hz.  I deal more with using 15kHz CRT TV's as arcade monitors (a standard definition CRT TV can rival the quality of a traditional 15kHz arcade monitor when set up correctly), and the most flexible TV I have found could maintain sync down to only about 45Hz.  My guess is that most arcade monitors would be similar, but someone else would have to confirm this.  Anyhow, that TV was more flexible because it seemed to be a multi-standard chassis designed to also work with PAL signals (50Hz).  Typical TV's in the US are only designed for NTSC (60Hz), so they usually have trouble maintaining sync below 56 or 55Hz.  Every CRT is a little different in terms of both horizontal and vertical range, but I doubt you could find anything that would work at 30Hz.  Many CRT's will also have problems maintaining sync above a certain number of total lines, regardless of the frequencies.  The TV's I'm using now (NTSC-only, not the multi-standard) loses sync above about 285 total lines.

If you could get it to sync, actually being able to see the whole picture that's being scanned would be a problem too.  Horizontal position, vertical position, and horizontal size can all be manipulated easily by adjusting timing values; total lines, total pixels, positioning of the active picture with the blanking intervals, horizontal and vertical frequency, etc.  Vertical size can not.  It is determined primarily by the vertical size adjustment of the TV or monitor itself.  You generally want to set up a CRT for use with MAME to display somewhere between 224-256 lines because that's mainly the range used by 15kHz games (this will result in 448-512 lines visible when viewing interlaced sources).  Assuming you actually got a CRT to sync to 480p@30Hz, you'd then have to increase the vertical size to double its normal setting, which will probably be beyond the range of adjustment.

One important thing to note is that interlaced resolutions are sometimes listed as around 30Hz because they are referring to the number of frames completed per second.  In interlaced video, each full frame is composed of two fields.  First, all the odd lines are drawn from top to bottom in one field, then all the even lines are drawn in the next field.  The fields are offset so they line up in between each other.  Your mind generally perceives this as a continuous picture, but there are still some problems perceivable to the naked eye, like flickering, and interlace feathering due to moving objects being in two different places between the odd and even fields of a single frame.  Regardless, when you see an interlaced resolution listed as 30Hz or something similar, it means 30 full frames are completed each second, but the CRT is actually scanning 60 fields per second; it's still running at 60Hz.  You could argue that it's just semantics, but in my opinion it's incorrect to list vertical frequency that way.  So if you see something listed as around 30Hz, just double it to find the true vertical frequency.

If this stuff is interesting to you, check out the second link in my signature.  It's centered around using TV's for native resolutions in MAME, but the info there could be used to get native resolutions from any CRT, and there is a lot about how analog video and CRT's work in general.  There are a lot of resources available on analog video and CRT's on the web, but not a lot that is written with gaming applications in mind.
« Last Edit: April 12, 2014, 03:13:51 pm by rCadeGaming »