# xhomer.cfg: Configuration file for the Xhomer DEC PRO 350 emulator

# ********************************************************************
# Initial X-windows screen mode:
#
# There are two options:
#
# 1. window   (normal windowed mode)
# 2. full     (full-screen mode, using DGA X-extensions)
# ********************************************************************

screen = window

#screen = full

# ********************************************************************
# Initial window position, when in "window" mode:
#
# Note that these coordinates are passed to the window manager as
# hints.  Whether these settings are effective depends on the window
# manager configuration.
# ********************************************************************

window_position = 128, 420

# ********************************************************************
# Screen vertical scale factor:
#
# The Pro's visible screen is 1024 x 240 pixels.  Vertical stretching
# of the image is likely required, for it to look reasonable.
# Stretching is accomplished by inserting blank (black) lines.  A
# scale factor of 1 would cause no stretching to be performed.  A
# factor of 2 would result in a 1024 x 480 window, etc..  The scale
# factor is set independently for "window" and "full" modes.
# ********************************************************************

window_scale = 2

full_scale = 3

# ********************************************************************
# Gamma correction factor:
#
# Some monitors, such as the the real Pro's color monitor, may require
# the image to be gamma-corrected.  For most PC monitors, this is not
# necessary.  Gamma correction is specified as an integer equal to ten
# times the desired gamma value.  For a gamma of 1.0 (for most
# monitors), specify a value of 10.  A value of 22 seems to work well
# on the real Pro's color monitor.
#
# Before being displayed, pixel components (red, green and blue) are
# individually scaled to be in the 0.0 to 1.0 range, then gamma-
# corrected, as follows:
#
# comp_gamma_corrected = comp_pre_correction ^ (10.0/screen_gamma)
# ********************************************************************

screen_gamma = 10

# ********************************************************************
# X-windows private colormap (color-indexed modes only):
#
# Turn this on to use a private colormap in color-indexed X-windows
# display modes.  (These are typically 8-bit modes)  Valid values are
# "on" and "off."  Turning this option off will cause the emulator to
# share a colormap with other running X-windows applications, which
# could potentially lead to an inability to allocate needed colors.
# ********************************************************************

pcm = on

# ********************************************************************
# Number of DGA framebuffers:
#
# This determines the number of framebuffers that the X-windows
# fullscreen driver (DGA) allocates, and must be in the range of
# 0 to 3.  Having two framebuffers allows accelerated text scrolling
# in fullscreen mode.  Having three framebuffers, additionally, allows
# for smooth glitch-free transitions when turning the simulator
# control menu on and off in fullscreen mode.  Specifying 0 will cause
# the emulator to auto-detect the number of available frame buffers.
# ********************************************************************

framebuffers = 0

# ********************************************************************
# Serial devices:
#
# Up to four "serial" devices may be defined.  These should correspond
# to physical devices present in the host operating system.  This
# support was written for the Linux serial port driver (/dev/ttyS*),
# but other devices may work, as well.  It has been tested to work
# with the Linux parallel port driver, with one exception.  This
# driver (/dev/lp) does not seem to support write buffer occupancy
# reporting.  Consequently, a workaround must be enabled.  See
# the "lp_workaround" variable below.  Also, Linux pseudo terminals
# (/dev/ptys*) have been known to work.
# ********************************************************************

serial0 = /dev/tty00
serial1 = /dev/lpt0
serial2 = /dev/tty01
serial3 = /dev/tty02

# ********************************************************************
# Pseudo devices:
#
# Three different pseudo devices exist.  At most one instance of each
# may be used.  They are as follows:
#
# 1. lk201
#
#    This is an emulation of a DEC lk201 keyboard, using the X-windows
#    keyboard device.
#
# 2. digipad
#
#    This is an emulation of a Digipad digitizing tablet, using the
#    X-windows pointer (mouse) device.
#
# 3. la50
#
#    This is a Sixel graphics-to-PCL converter.  It converts the
#    printed graphics output generated by a Pro to HP PCL format.
#    The output of this converter needs to be directed to a physical
#    serial device, using the "la50" variable.  Additionally, the
#    PCL print density should be set with the "la50_dpi" variable.
# ********************************************************************

la50 = serial1
la50_dpi = 300

# ********************************************************************
# Keyboard device:
#
# This sets the physical keyboard device to be used by the emulator.
# Normally, this should be set to "lk201," such that the normal
# X-windows keyboard may be used.  However, it is also possible to
# connect a real lk201 keyboard to a PC serial port, and use that,
# instead.  A custom serial cable must be fabricated, and power must
# be supplied to the lk201.  In this case the "kb" variable should
# be set to the appropriate serial device.
# ********************************************************************

kb = lk201
#kb = serial2

# ********************************************************************
# Printer device:
#
# This defines which physical device is connected to the Pro's printer
# port.  A direct assignment to one of the serial devices (serial0..3)
# may be made.  Or, as in the following configuration, the printer
# port may be connected to the "la50" pseudo-device, which, in this
# example, is connected to "serial1," which, in turn, is defined to
# be "/dev/lp0."  So, in this example, Sixel-graphics printed by the
# emulated Pro could be printed on an HP PCL printer connected to
# /dev/lp0.
# ********************************************************************

ptr = null
#ptr = la50
#ptr = serial1

# ********************************************************************
# Communications device:
#
# This defines which physical device is connected to the Pro's
# communications port.
# ********************************************************************

com = null
#com = serial3
#com = digipad

# ********************************************************************
# Hard disk image file directory:
#
# This specifies the directory in which hard disk image files are
# located.  It can be an absolute path.  Or, if a relative path is
# specified, it must be relative to the directory xhomer was run
# from.  "./" is the default path, if none is specified.
# ********************************************************************

rd_dir = ..

# ********************************************************************
# Floppy disk image file directory:
#
# Similar to the previous option, this specifies the location of RX50
# floppy disk images.  "./" is the default.
# ********************************************************************

rx_dir = ../PRODISKS

# ********************************************************************
# Hard disk image file:
#
# This is the name of the file containing the hard disk image.  This
# file must exist in the location pointed to by the "rd_dir" variable.
# At the present, only a single hard disk is supported.
#
# The number of heads, cylinders and sectors may be forced by
# specifying these parameters (in that order), separated by commas,
# after the image file name.
#
# The file size must equal heads*cylinders*sectors*512 (in bytes).
# A mismatch will cause an error.
#
# The emulator auto-detects the following hard disk geometries. based
# on file size:
#
# Filesize    Heads  Cylinders  Sectors  Disk type
# --------    -----  ---------  -------  ---------
#  5,013,504  4      153        16       RD50 5M
#  5,326,848  4      153        17       RD50 5M
# 10,027,008  4      306        16       RD51 10M
# 10,653,696  4      306        17       RD51 10M
# 20,152,320  4      615        16       RD31 21M
# 21,411,840  4      615        17       RD31 21M
# 33,554,432  8      512        16       RD52 36M
# 35,651,584  8      512        17       RD52 36M
# 40,304,640  6      820        16       RD32 43M
# 42,823,680  6      820        17       RD32 43M
# 67,108,864  8      1024       16       RD53 71M
# 71,303,168  8      1024       17       RD53 71M
#
# Note that all real Pro disks seem to have 17 sectors.  However,
# neither P/OS nor Venix seems ever to access the 17th sector.  So,
# to save disk space, one may optionally use the 16-sector formats
# listed above.
#
# "pos32.rd" is the default image file name, if none is specified.
# ********************************************************************

rd0 = pos32.rd
#rd0 = pos32.rd, 8, 1024, 16
#rd0 = venix2.rd
#rd0 = rt11v53.rd

# ********************************************************************
# Floppy disk image files:
#
# Initial image files may be specified for up to two RX50 floppy
# drives.  These files should be 409,600 bytes in size.  Note that
# floppy image files may be detached and attached in real-time through
# the emulator's control menu (accessed by pressing ctrl-F1).
# ********************************************************************

#rx0 = POS32/PROSCAN.dsk

#rx1 = POS32/PROBRU.dsk

# ********************************************************************
# Force the year value in the real-time clock:
#
# The Pro's real-time clock returns a year in the range of 0 to 99.
# Venix is unhappy with year values outside the range of 70 to 99 and
# RT-11 5.3 is unhappy with values outside the range of 73 to 99.  Both
# refuse to take any of the time parameters from the real-time clock,
# in this case.  The following variable allows a year value to be
# specified, which will override the year value that the emulator
# obtains from the host system.  If a value between 70 and 99 is
# specified, then, at least, the time of day will be correct in Venix.
# And, the same goes for RT-11, if a value between 73 and 99 is
# specified.
# ********************************************************************

#force_year = 99

# ********************************************************************
# Maintenance mode:
#
# Setting the following to "on" simulates shorting pins 8 and 9 on the
# printer port.  This causes the Pro to activate the maintenance
# terminal interface.  (This is needed when installing 2.9 BSD from
# the installation floppy)
# ********************************************************************

#maint_mode = on
maint_mode = off

# ********************************************************************
# Timer interrupt throttling:
#
# Setting the following to "on" will cause the emulator to throttle
# interrupts from the periodic interrupt source.  If the emulator is
# falling behind real-time operation, the interrupt rate will be
# increased.  If the Pro operating system has not serviced the previous
# interrupt by the time the next one is due, the emulator will delay
# generation of periodic interrupts, until the Pro operating system
# has caught up.  While the emulation itself is slightly less accurate
# in this mode, the real-time clock is more likely to maintain
# accurate time, especially on host systems which are too slow to
# achieve real-time Pro performance.  NOTE:  This is an EXPERIMENTAL
# feature.  Its affect on Pro operating systems is not fully understood.
# ********************************************************************

#int_throttle = on
int_throttle = off

# ********************************************************************
# BUG WORKAROUNDS:
#
# The following options turn on workarounds for various bugs in
# X-servers, C-libraries and parallel port drivers
# ********************************************************************

# ********************************************************************
# #9 DGA bug workarounds:
#
# When used in DGA mode (full-screen), the #9 X-server has a number of
# bugs.  Turning the "nine_workaround" variable on installs a number
# of workarounds for these problems.  This option is specific to the
# #9 X-server.
# ********************************************************************

#nine_workaround = on
nine_workaround = off

# ********************************************************************
# libc workaround:
#
# Turn the following workaround on only if running on a pre-glibc-2.0
# system.  The workaround prevents crashes during DGA-to-windowed mode
# switches.
# ********************************************************************

#libc_workaround = on
libc_workaround = off

# ********************************************************************
# Linux parallel port driver workaround:
#
# Turn this workaround on if one of the emulator's serial ports is
# connected to a Linux parallel port device (/dev/lp).  See the
# description above for "serial devices."  Using this workaround with
# real serial devices will cause transmit buffer overruns.
#
# Note that this workaround is somewhat crude.  When enabled, it
# applies to all serial devices (serial0..3), not just those with
# parallel ports connected.
# ********************************************************************

#lp_workaround = on
lp_workaround = off
