# This file started as a cross between the results of XConfigurator and
# xf86config. This worked, but lacked a modeline for the 1024x600 mode
# that the display actually wants. Fortunately, Hideki ASAZU of Japan,
# asa@sslab.sony.co.jp, made a file for a Portege 300 with the same
# LCD display and the Chips & Techonology 65554 chip (Pikachu uses the
# 65555). I merged that data here.
#

# **********************************************************************
# Files section.  This allows default font and rgb paths to be set
# **********************************************************************

Section "Files"

# The location of the RGB database.  Note, this is the name of the
# file minus the extension (like ".txt" or ".db").  There is normally
# no need to change the default.

    RgbPath	"/usr/X11R6/lib/X11/rgb"

# Multiple FontPath entries are allowed (they are concatenated together)
# By default, Red Hat 6.0 and later now use a font server independent of
# the X server to render fonts.

   FontPath   "/usr/X11R6/lib/X11/fonts/local/,/usr/X11R6/lib/X11/fonts/misc/:unscaled,/usr/X11R6/lib/X11/fonts/75dpi/:unscaled,/usr/X11R6/lib/X11/fonts/100dpi/:unscaled,/usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/URW/,/usr/X11R6/lib/X11/fonts/Speedo/,/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/X11R6/lib/X11/fonts/100dpi/"


EndSection

# **********************************************************************
# Module section -- this is an optional section which is used to specify
# which dynamically loadable modules to load.  Dynamically loadable
# modules are currently supported only for Linux ELF, FreeBSD 2.x
# and NetBSD 1.x.  Currently, dynamically loadable modules are used
# only for some extended input (XInput) device drivers.
# **********************************************************************
#
# Section "Module"
#
# This loads the module for the Joystick driver
#
# Load "xf86Jstk.so"
# 
# EndSection

# **********************************************************************
# Server flags section.
# **********************************************************************

Section "ServerFlags"

# Uncomment this to cause a core dump at the spot where a signal is 
# received.  This may leave the console in an unusable state, but may
# provide a better stack trace in the core dump to aid in debugging

#    NoTrapSignals

# Uncomment this to disable the <Crtl><Alt><BS> server abort sequence
# This allows clients to receive this key event.

#    DontZap

# Uncomment this to disable the <Crtl><Alt><KP_+>/<KP_-> mode switching
# sequences.  This allows clients to receive these key events.

#    DontZoom

# Uncomment this to disable tuning with the xvidtune client. With
# it the client can still run and fetch card and monitor attributes,
# but it will not be allowed to change them. If it tries it will
# receive a protocol error.

#       DisableVidModeExtension

# Uncomment this to enable the use of a non-local xvidtune client. 

#       AllowNonLocalXvidtune

# Uncomment this to disable dynamically modifying the input device
# (mouse and keyboard) settings. 

#       DisableModInDev

# Uncomment this to enable the use of a non-local client to
# change the keyboard or mouse settings (currently only xset).

#       AllowNonLocalModInDev

EndSection

# **********************************************************************
# Input devices
# **********************************************************************

# **********************************************************************
# Keyboard section
# **********************************************************************

Section "Keyboard"

    Protocol	"Standard"
    AutoRepeat	500 5
    XkbKeymap   "xfree86(us)"

EndSection

# **********************************************************************
# Pointer section
# **********************************************************************

Section "Pointer"
    Protocol        "PS/2"
    Device          "/dev/psaux"
    BaudRate        1200
    Emulate3Buttons
#    Emulate3Timeout 50
    Resolution      100
EndSection

# **********************************************************************
# Xinput section -- this is optional and is required only if you
# are using extended input devices.  This is for example only.  Refer
# to the XF86Config man page for a description of the options.
# **********************************************************************
#
Section "Xinput"
#
# The Mouse Subsection contains the same type of entries as the
# standard Pointer Section (see above), with the addition of the
# DeviceName entry.
#
    SubSection "Mouse"
        Port        "/dev/ttyS0"
        DeviceName  "Second Mouse"
        Protocol    "MouseManPlusPS/2"
        BaudRate  1200
        SampleRate   60
#allow two mouses at the same time
        AlwaysCore
        Emulate3Buttons
    EndSubSection
EndSection


# **********************************************************************
# Monitor section
# **********************************************************************

# Any number of monitor sections may be present

Section "Monitor"

    Identifier  "PortegeLCD"
    VendorName  "Toshiba"
    ModelName   "Portege 320CT"

# HorizSync is in kHz unless units are specified.
    HorizSync   31.5 - 75.0
# Hideki's values:
#    HorizSync       30-64

# VertRefresh is in Hz unless units are specified.
#    VertRefresh 60 - 75
# Hideki's values:
    VertRefresh     40-100

# 640x400 @ 70 Hz, 31.5 kHz hsync
Modeline "640x400"     25.175 640  664  760  800   400  409  411  450
# 640x480 @ 60 Hz, 31.5 kHz hsync
Modeline "640x480"     25.175 640  664  760  800   480  491  493  525

# Hideki's values:
Modeline "640x480"     28.3   640  664  760  800   480  491  493  525

# 800x600 @ 56 Hz, 35.15 kHz hsync
ModeLine "800x600"     36     800  824  896 1024   600  601  603  625
# 1024x768 @ 87 Hz interlaced, 35.5 kHz hsync
Modeline "1024x768"    44.9  1024 1048 1208 1264   768  776  784  817 Interlace

# 640x400 @ 85 Hz, 37.86 kHz hsync
Modeline "640x400"     31.5   640  672 736   832   400  401  404  445 -HSync +VSync
# 640x480 @ 72 Hz, 36.5 kHz hsync
Modeline "640x480"     31.5   640  680  720  864   480  488  491  521
# 640x480 @ 75 Hz, 37.50 kHz hsync
ModeLine  "640x480"    31.5   640  656  720  840   480  481  484  500 -HSync -VSync

# Hideki's values:
ModeLine "800x600"     40.0   800  872  928 1000   600  603  619  630
# 800x600 @ 60 Hz, 37.8 kHz hsync
#Modeline "800x600"     40     800  840  968 1056   600  601  605  628 +hsync +vsync

# 640x480 @ 85 Hz, 43.27 kHz hsync
Modeline "640x480"     36     640  696  752  832   480  481  484  509 -HSync -VSync
# 1152x864 @ 89 Hz interlaced, 44 kHz hsync
ModeLine "1152x864"    65    1152 1168 1384 1480   864  865  875  985 Interlace

# 800x600 @ 72 Hz, 48.0 kHz hsync
Modeline "800x600"     50     800  856  976 1040   600  637  643  666 +hsync +vsync

# Hideki's values:
ModeLine "1024x600"	50.0  1024 1104 1176 1248   600  603  619  630

# 1024x768 @ 60 Hz, 48.4 kHz hsync
Modeline "1024x768"    65    1024 1032 1176 1344   768  771  777  806 -hsync -vsync

# 640x480 @ 100 Hz, 53.01 kHz hsync
Modeline "640x480"     45.8   640  672  768  864   480  488  494  530 -HSync -VSync
# 1152x864 @ 60 Hz, 53.5 kHz hsync
Modeline  "1152x864"   89.9  1152 1216 1472 1680   864  868  876  892 -HSync -VSync
# 800x600 @ 85 Hz, 55.84 kHz hsync
Modeline  "800x600"    60.75  800  864  928 1088   600  616  621  657 -HSync -VSync

# 1024x768 @ 70 Hz, 56.5 kHz hsync
Modeline "1024x768"    75    1024 1048 1184 1328   768  771  777  806 -hsync -vsync
# 1280x1024 @ 87 Hz interlaced, 51 kHz hsync
Modeline "1280x1024"   80    1280 1296 1512 1568  1024 1025 1037 1165 Interlace

# 800x600 @ 100 Hz, 64.02 kHz hsync
Modeline  "800x600"    69.65  800  864  928 1088   600  604  610  640 -HSync -VSync
# 1024x768 @ 76 Hz, 62.5 kHz hsync
Modeline "1024x768"    85    1024 1032 1152 1360   768  784  787  823
# 1152x864 @ 70 Hz, 62.4 kHz hsync
Modeline  "1152x864"   92    1152 1208 1368 1474   864  865  875  895
# 1280x1024 @ 61 Hz, 64.2 kHz hsync
Modeline "1280x1024"  110    1280 1328 1512 1712  1024 1025 1028 1054

# 1024x768 @ 85 Hz, 70.24 kHz hsync
Modeline "1024x768"   98.9  1024 1056 1216 1408   768 782 788 822 -HSync -VSync
# 1152x864 @ 78 Hz, 70.8 kHz hsync
Modeline "1152x864"   110   1152 1240 1324 1552   864  864  876  908

# 1280x1024 @ 70 Hz, 74.59 kHz hsync
Modeline "1280x1024"  126.5 1280 1312 1472 1696  1024 1032 1040 1068 -HSync -VSync
# 1600x1200 @ 60Hz, 75.00 kHz hsync
Modeline "1600x1200"  162   1600 1664 1856 2160  1200 1201 1204 1250 +HSync +VSync
# 1152x864 @ 84 Hz, 76.0 kHz hsync
Modeline "1152x864"   135    1152 1464 1592 1776   864  864  876  908

# 1280x1024 @ 74 Hz, 78.85 kHz hsync
Modeline "1280x1024"  135    1280 1312 1456 1712  1024 1027 1030 1064

# 1024x768 @ 100Hz, 80.21 kHz hsync
Modeline "1024x768"   115.5  1024 1056 1248 1440  768  771  781  802 -HSync -VSync
# 1280x1024 @ 76 Hz, 81.13 kHz hsync
Modeline "1280x1024"  135    1280 1312 1416 1664  1024 1027 1030 1064

# 1600x1200 @ 70 Hz, 87.50 kHz hsync
Modeline "1600x1200"  189    1600 1664 1856 2160  1200 1201 1204 1250 -HSync -VSync
# 1152x864 @ 100 Hz, 89.62 kHz hsync
Modeline "1152x864"   137.65 1152 1184 1312 1536   864  866  885  902 -HSync -VSync
# 1280x1024 @ 85 Hz, 91.15 kHz hsync
Modeline "1280x1024"  157.5  1280 1344 1504 1728  1024 1025 1028 1072 +HSync +VSync
# 1600x1200 @ 75 Hz, 93.75 kHz hsync
Modeline "1600x1200"  202.5  1600 1664 1856 2160  1200 1201 1204 1250 +HSync +VSync
# 1600x1200 @ 85 Hz, 105.77 kHz hsync
Modeline "1600x1200"  220    1600 1616 1808 2080  1200 1204 1207 1244 +HSync +VSync
# 1280x1024 @ 100 Hz, 107.16 kHz hsync
Modeline "1280x1024"  181.75 1280 1312 1440 1696  1024 1031 1046 1072 -HSync -VSync

# 1800x1440 @ 64Hz, 96.15 kHz hsync 
ModeLine "1800X1440"  230    1800 1896 2088 2392 1440 1441 1444 1490 +HSync +VSync
# 1800x1440 @ 70Hz, 104.52 kHz hsync 
ModeLine "1800X1440"  250    1800 1896 2088 2392 1440 1441 1444 1490 +HSync +VSync

# 512x384 @ 78 Hz, 31.50 kHz hsync
Modeline "512x384"    20.160 512  528  592  640   384  385  388  404 -HSync -VSync
# 512x384 @ 85 Hz, 34.38 kHz hsync
Modeline "512x384"    22     512  528  592  640   384  385  388  404 -HSync -VSync

EndSection


# **********************************************************************
# Graphics device section
# **********************************************************************

# Any number of graphics device sections may be present

# Device configured by xf86config:

Section "Device"
    Identifier  "CT65555"
    VendorName  "Chips & Technologies"
    BoardName   "CT65555"
    #VideoRam    2048
# Option "noaccel"
# Option "no_bitblt"
# Option "xaa_no_color_exp"
# Option "xaa_benchmark"
# Option "hw_cursor"
# Option "sync_on_green"
# Option "fast_dram"
# Option "use_vclk1"
# Textclockfreq 25.175
# Option "nolinear"
# MemBase 0x03b00000
# Device section for C&T cards.
# Option "suspend_hack"
# Option "STN"

# Hideki enables no_stretch
# Option "no_stretch"

# Option "no_center"
# Option "use_modeline"
# Option "fix_panel_size"
# videoram 512
    # Insert Clocks lines here if appropriate
EndSection

# **********************************************************************
# Screen sections
# **********************************************************************

# The Colour SVGA server

Section "Screen"
    Driver      "svga"
    Device      "CT65555"
    Monitor     "PortegeLCD"
    DefaultColorDepth 16
# FM
#    DefaultColorDepth 8
    Subsection "Display"
        Depth       16
#FM
#        Depth       8
        Modes       "1024x600" "800x600" "640x480" "1024x768"
#        ViewPort    0 0
        # Use Virtual 320 200 for Generic VGA
    EndSubsection
#    Subsection "Display"
#        Depth       15
#        Modes       "1024x600" "800x600" "640x480"
##        ViewPort    0 0
#    EndSubsection
#    Subsection "Display"
#        Depth       16
#        Modes       "1024x600" "800x600" "640x480"
##        ViewPort    0 0
#    EndSubsection
#    Subsection "Display"
#        Depth       24
#        Modes       "1024x600" "800x600" "640x480"
##        ViewPort    0 0
#    EndSubsection
    Subsection "Display"
        Depth       32
        Modes       "1024x600" "800x600" "640x480"
#        ViewPort    0 0
    EndSubsection
EndSection


