Notes to use openGL Rastersynchronization under X11 
(both Xaw and Gnome)

ATTENTION:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
To get full retro experience with synchronization to the vertrical
raster retrace messing with X11 modelines (resolution and refresh
frequencies) is necessary. 
This description is a suggestion - 
Follow this instructions at your own risk!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

The development is tested on a fairly up-to-date system (2006-12)
under Ubuntu Linux (6.10) featuring Xorg Xserver 7.1.1. and mesa
openGL including HW support (NVIDIA driver) supporting glx version 1.4
supplying GLX_SGI_video_sync.
It is assumed that this works also on other systems supporting the
required extensions.

Preconditions:
- openGl extension GLX_SGI_video_sync in your X11 setup.
  The availability of the extension is checked at startup.
  
- XRandR extension to switch proper modes (50Hz/100Hz/150Hz) is preferrable
  Proper modelines in your /etc/X11/xorg.conf must be present.
  If your systems lacks 50 or 100Hz modes you might try using
  `gtf' (typcally shipped with Xorg, xserver) - see related man page. 
  You might need to add the output such as:
    # 800x600 @ 50.00 Hz (GTF) hsync: 30.90 kHz; pclk: 31.15 MHz
    Modeline "800x600_50.00"  31.15  800 824 904 1008  600 601 604 618 -HSync +Vsync
  to you Monitor Section of /etc/X11/xorg.conf and add the resolution
  to the `Screen' section.

  Sometimes some consistency checks within the display driver drop
  this resolutions again.
  To drop e.g. the autodetection features in the NVIDIA driver you
  might add `Option "UseEDID" "FALSE"' in section `Device'. 

  XRandR cannot cope properly with the DynamicTwinView feature of the
  proprietary nvidia driver. You might need 
    Option 	   "DynamicTwinView" "False" 
  to get proper results (in Screen or Device section of you xorg.conf).

  ATTENTION: Disabling such features might allow X11 to access your HW
  in a way that it gets damaged! You are at your own risk!

Usage: 
Enable fullscreen (not necessary, but makes sense):
- choose your preferred resolution/refresh XRandR Resolutions and 
  enable XRandR as fullscreen device
- Activate fullscreen with `Alt-D'.

- choose `OpenGL Rastersynchronization' in the
  video chip menu (VIC-II Settings, VIC Setting, etc.)
- to get synchronized video output even on a non-aligned frequency
  (e.g. when you cannot install a proper modeline supporting a 50 or
  100Hz frequency) then try:
  - disable sound output
  - set refresh rate to 1/1
  - set max speed to `no limit'.
  of course emulation speed then is driven by the video refresh rate
  (and might be significant faster) and sound output is disabled. 

Todo:
- integrate in vsync properly
- Decide whether to drop non-aligned frequencies (i.e. not multiple of
  50Hz)
- fix Xaw fullscreen enabling.
- introduce in other emulators (not only x64).
- handle double size fullscreen mode
