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: why is 31hz sometime interlaced ?  (Read 2329 times)

0 Members and 1 Guest are viewing this topic.

codecrank

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 60
  • Last login:August 04, 2017, 08:47:39 pm
why is 31hz sometime interlaced ?
« on: April 01, 2010, 01:26:26 pm »
Just curious... When the PC boots up, my j-pac takes received a VGA 31 Khz signal, but when windows switch resolution to 640x480 ( with modlines set by Soft15Khz ) , it's now receiving a 15 Khz signal.  But 15000 / 480 = 31khz

I understand that for this to happen @ 15 Khz, SOMETHING has to interlace it.

what is that SOMETHING ? the video card driver ? and how does it know to interlace ?

 ???

thanks !

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: why is 31hz sometime interlaced ?
« Reply #1 on: April 01, 2010, 02:27:25 pm »
When you install Soft15kHz, it tells the system to interlace 640x480 for you to bring it down to 15k and make it compatible with CGA arcade monitors.  If you don't like that (i.e. your monitor is capable of progressive at that resolution), I think Soft15k has an "install 31k" option that should remove the interlace from it, though I've never tested it.  With the ArcadeVGA, I believe you install the "trisync" patch or something like that.

Also, your math is not proper.  If you want to find the horizontal scanrate given the number of lines (you have to include blanked lines, too), you need to know the vertical refresh rate.  525 lines/frame * 60 frames/sec = 31.5kHz (640x480 has ~525 total lines of which ~45 are blank or used for vertical retrace).  Just track the units.

Your math results in a VERTICAL FRAME rate of 31.25Hz (not kHz!) which is half the actual refresh (field) rate since each frame only contains half the total lines (plus then the additional blank lines, hence some error that brings it down closer to 60Hz field rate or 30Hz frame rate).

codecrank

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 60
  • Last login:August 04, 2017, 08:47:39 pm
Re: why is 31hz sometime interlaced ?
« Reply #2 on: April 01, 2010, 04:37:23 pm »
Thanks for the reply . Yeah I mixed up vertical and horizontal refresh. sorry. btw I have a CGA monitor.

ok so if I understand, since in progressive mode there is no "field" ,

525 lines/frame * 60 frames/sec = 31.5kHz

and in interlaced mode, which has 2 field per frames

525 lines/frame * 30 frames/sec = 15.75 KHz
or
252.6 lines/field * 60 field/sec = 15.75 Khz

Humm. isn't this the same as a NTSC tv signal ?

furthermore, if I look at a neogeo games, they're all  "320x224"  59.185606Hz

224 lines/frame *  59.185606 frame/sec = 13257.575744  ( out of range, my K7000 only supports 15.1 - 16.8 kHz horizontal scan rates )

did the neo-geo hardware ( and mame driver ) also add blank lines ? because there is no way that the vertical retrace can account for all those "missing lines"

Also, what causes the human eye to experience the "buzzing" effect of an interlaced image ( versus a stable image when in progressive mode )  ? the interlacing of odd and even lines, or dropped frame rate ?

This is fascinating, anyone has some good technical reading material to suggest ?

 :cheers:
« Last Edit: April 01, 2010, 05:58:11 pm by codecrank »

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: why is 31hz sometime interlaced ?
« Reply #3 on: April 01, 2010, 05:53:54 pm »
All video outputs have some blank lines.  It's required for the CRT to have time to steer the vertical deflection signal back up to the top once it's hit the bottom (this is the "vertical sync time".  It also leaves some room around the edges of the picture since geometry tends to get sketchy around the edges (this is the "vertical blanking interval").  There's also some blank time at the beginning and end of each line surrounding horizontal sync (these are the "porches").  So yes, the Neo-Geo outputs some blank lines.  It probably has a total of ~280 lines, but I'm sure someone will quote me the exact number.  Most video hardware has this as a programmable number.

The Neo-Geo you mention would have about 29 blank lines total.  Some are at the top; some are at the bottom, and some are used for refresh.  That's not unreasonable at all.  NTSC has more.

As for your noticing that you get the exact same timings as NTSC, there's a reason for that.  I don't remember if VGA has EXACTLY 525 lines, so I just pulled the number for NTSC out of my butt :).  However, it's somewhere close to there.  VGA was originally based upon NTSC with the interlace removed.  ATSC 480p is the same way.  There are some subtle differences, but they're all pretty close.

As for the buzzing effect, it has to do with the fact that only half the screen (every other line) is refreshed at a time.  Hence, there are two decay cycles on the phosphors happening out of sync with each other.  This causes it to look like it's "jittering" up and down a little bit and also gives some people nausea or a headache  since the flicker rate of each of those cycles is a low 30Hz (well, 29.97 for color NTSC since they fudged the numbers to make color work).

I'm sure there's plenty of reading out there.  I've been tempted to make a condensed guide some time, including sample HDL code for a simple video controller you can put on an FPGA or similar (heck, they'll fit on some larger CPLDs - it's only a few registers, some counters, and some comparators to generate all the signals).  Just add framebuffer RAM and a DAC of some sort.  Basically, there's no real magic.  It only takes a few numbers to fully define a video signal in terms of timings: progressive/interlace, frame/field rate, lines per frame/field, blank lines top/bottom, vertical sync width, horizontal front/back porch, and horizontal sync width.  Everything else can be calculated from those.

If you have a CGA only monitor, then 640x480 HAS to be interlaced to get it down to 15kHz.  If you can do VGA, then you can do progressive at 31.5kHz.
« Last Edit: April 02, 2010, 12:08:32 am by MonMotha »

SailorSat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1238
  • Last login:Yesterday at 12:13:59 pm
    • For Amusement Only e.V.
Re: why is 31hz sometime interlaced ?
« Reply #4 on: April 03, 2010, 09:35:43 am »
Neogeo may only show 224 lines, but still outputs 262 lines per frame, just the blanking is different.

As for Interlace... Well that depends on the image.
If you take a simple "one line black - one line white" image, you will see a flickering image, as you get 30 frames of pure black, and 30 frames of pure white on your screen.
If you rotate that image by 90° (1 ROW white, 1 ROW black) you won't see any flicker at all as the field basically look the same.

The higher the constrast between two lines, the more "flicker" you will notice.

« Last Edit: April 03, 2010, 09:41:08 am by SailorSat »
I do all that stuff even without a Joystick ;)
Soft-15kHz, cabMAME, For Amusement Only e.V.


codecrank

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 60
  • Last login:August 04, 2017, 08:47:39 pm
Re: why is 31hz sometime interlaced ?
« Reply #5 on: April 05, 2010, 01:24:15 am »
Thanks for the explanations, guys !