CPPREP v1.0

Copyright John Elliott, 6 August 2006
Parts copyright 2003, 2004 Eric Auer

Introduction
~~~~~~~~~~~~

CPPREP is a replacement for the codepage preparation functions of MODE.COM.
It supports the following extra features:

* Multiple codepage sources - each codepage can come from a different file.

* Multiple file formats supported - standard CPI, DRFONT CPI, Windows NT CPI,
 FreeDOS CPX, PSF1, PSF2 and raw files.

* Multiple DISPLAY.SYS versions supported -- MS/PC/DR DOS and FreeDOS.

Syntax
~~~~~~
CPPREP { options } codepage=file{+file...} codepage=file{+file...}

  For example, the command

CPPREP 437=C:\DOS\EGA.CPI 850=C:\DOS\EGA.CPI

  is exactly equivalent to

MODE CON CP PREPARE=((437,850) C:\DOS\EGA.CPI

  However, with CPPREP it's possible to do something like this:

CPPREP 437=C:\DOS\EGA.CPI 819=ISO8859.CPX 999=CUSTOM16.PSF+CUSTOM08.PSF

  which loads codepage 437 from EGA.CPI, 819 from ISO8859.CPX and 999 from
a couple of PSF files (one providing 8x16 characters, the other providing
8x8 characters).

  The options are:

-Dfile  Instead of sending the selected codepages to DISPLAY.SYS, write
       them to the specified file in CPI format. If you do not have 
       DISPLAY.SYS loaded, then you must include this option. 

-E  Produce codepages for the "EGA" device (for EGA/VGA hardware). This is the 
    default behaviour and so this option is never necessary.

-L  Produce codepages for the "LCD" device (IBM Convertible LCD). Only 8x8 
    fonts will be included.

-V  Verbose output - each file will be described as it is read in.
 
Font scaling
~~~~~~~~~~~~
  An EGA/VGA codepage has three font sizes - 8x8, 8x14 and 8x16. If you load
a codepage and do not specify all sizes - for example

CPPREP 437=MYFONT16.BIN

  then the other sizes will be generated from those that are present. The 
algorithm used is not particularly clever so it's preferable to supply 
actual fonts in the required sizes:

CPPREP 437=MYFONT16.BIN+MYFONT14.BIN+MYFONT08.BIN

On importing files
~~~~~~~~~~~~~~~~~~
  If a codepage is being loaded from a CPI file, then the specified page is
searched for in that file and used if present. 
  When reading other file formats (PSF and raw) the first 256 characters are
copied into the codepage. The PSF unicode directory (if present) is ignored.
