home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
pmfo002a.zip
/
pmfoed.INF
(
.txt
)
< prev
Wrap
OS/2 Help File
|
1999-08-24
|
229KB
|
541 lines
ΓòÉΓòÉΓòÉ 1. License ΓòÉΓòÉΓòÉ
Free for personal non-commercial use.
BigVic & Kolosoft Group still owns the source code, the executable is
completely public domain. Any person or company can use it for internal
non-commercial use, software installation or distribution, backup, etc.
The Program is supplied "AS IS" without any warranty of any kind, either
expressed or implied, including, but not limited to, the implied warranties of
merchantability and fitness for a particular purpose.
ΓòÉΓòÉΓòÉ 2. Inroduction ΓòÉΓòÉΓòÉ
The Display Font Editor is used for editing a lot of display fonts:
o in an image of ROM-BIOS of the video adapters,
o in any program which loads the fonts into the video adapter (e.g. cyrillic
support in DOS - UNISCR, ENHFONT, KEYRUS and others),
o in the video drivers (or the support files) of the operating system, which
are used for full screen fonts building (e.g. VIOTBL.DCP for OS/2),
The fonts include a lot of sign images (256 ASCII symbols) for representing
the signs on the screen. Usually the fonts are:
o 8 x 8
o 8 x 14
o 8 x 16
For example: the font 8x16 from VIOTBL.DCP (OS/2 Warp 3.0 rus) for code page
866:
For high resolution mode the following fonts are used:
o 9 x 8
o 9 x 14
o 9 x 16
These fonts include the images only for some signs of the ASCII table.
For example: the font 9x16 from VIOTBL.DCP (OS/2 Warp 3.0 rus) for code page
866:
ΓòÉΓòÉΓòÉ 3. Distribution Kit Content ΓòÉΓòÉΓòÉ
finst.cmd 2324 31-12-98 12:31a - install procedure
funinst.cmd 1074 31-12-98 12:31a - deinstall procedure
pmfoed.exe 44165 24-08-99 08:24a - Display Font Editor v0.02
pmfoed.inf 228516 24-08-99 08:24a - reference
cf.exe 18930 31-12-98 12:31a - Change Font v0.01 utility
cf.c 5492 31-12-98 12:31a - Change Font v0.01 source text
finsfl.ico 4026 31-12-98 12:31a - folder icon
funinst.ico 4026 31-12-98 12:31a - Uninstall object icon
pmfoed.ico 3344 31-12-98 12:31a - Display Font Editor icon
08x08.866 2048 31-12-98 12:31a - font 8x8 CP866
08x14.866 3584 31-12-98 12:31a - font 8x14 CP866
08x16.866 4096 31-12-98 12:31a - font 8x16 CP866
08x16.koi 4096 31-12-98 12:31a - font 8x16 CP878
08x16.win 4096 31-12-98 12:31a - font 8x16 CP1251
ΓòÉΓòÉΓòÉ 4. How install/deinstall ΓòÉΓòÉΓòÉ
Installation:
1. create the directory (e.g. C:\PMFOED) for Display Font Editor,
2. copy all files from the distribution kit into this directory (or unpack
archives),
3. execute finst.cmd.
The installation procedure will create the Display Font Editor folder on the
WorkPlaceShell(WPS).
Deinstallation:
1. open Display Font Editor folder,
2. select Uninstall object,
3. double-click on Uninstall object icon.
ΓòÉΓòÉΓòÉ 5. The Display Font Editor in action ΓòÉΓòÉΓòÉ
The Display Font Editor for OS/2 is very simple for using. For more information
see:
o Command line parameters
o Main window and menu
o Control keys
o Editing of signs
o Example of ROM-BIOS preparing
ΓòÉΓòÉΓòÉ 5.1. Command line parameters ΓòÉΓòÉΓòÉ
The Display Font Editor saves the last window position and the file history to
profile. You can also define a file name, font parameters and window position
with command line parameters.
Syntax:
pmfoed [<file>] [-f:<font>] [-o:<offset>] [-x:<X>] [-y:<Y>] [-h|-?]
<file> the name of the editing file
<font> the font size (8/14/16), default: 8
<offset> the offset of the font from begin of the file,
default: 0
<X> <Y> the initial screen position of the window (left bottom
corner)
-h -? short help
Parameters may be placed in the command line in free order.
Example:
pmfoed
pmfoed C:\ROM\TRIDENT\t9000.rom
pmfoed C:\ROM\TRIDENT\t9000.rom -f:16 -o:26330
pmfoed -f:16 -o:26330 C:\ROM\TRIDENT\t9000.rom
pmfoed -x:100 -y:100
The Display Font Editor window:
ΓòÉΓòÉΓòÉ 5.2. Main window and menu ΓòÉΓòÉΓòÉ
The main window is very simple.
Notice that the sign images are placed in the table per columns
(traditionally). For example, the sign for codepoint 0x4A will be located
crossing the column 4 and the row A.
Menu has the items:
o File
- Open
- Save
- Save as...
- Load Font - read from font file (2048/3584/4096 bytes)
- Unload Font - write into font file (2048/3584/4096 bytes)
- Exit
- <the file history> - full file name for last 5 files
o Options
- View - font placing and sizing parameters (not VIOTBL)
- VIOTBL - font placing and sizing parameters (VIOTBL)
- Font Conversion - cyrillic font conversion
- ROM Addressing - ROM addressing scheme conversion
- ROM Checksum - check, calculate and write ROM checksum
o Help
- About...
ΓòÉΓòÉΓòÉ 5.2.1. View ΓòÉΓòÉΓòÉ
(see also Control keys)
Many manufacturers (but not all) use in the video adapters main fonts
(8x8/14/16) and additional fonts (9x14/16). The signs from 9xN fonts replace
the signs from 8xN fonts when the output is directed to the screen. The 8xN and
9xN fonts may contain a lot of different signs. Usually the 9xN font is placed
immediately after appropriate 8xN font (but exceptions exist). One have to edit
8xN fonts and appropriate 9xN fonts (VIOTBL.DCP, too).
Next information from the author of the VioFntCh
Dmitry Kuminov (Dmik)
dmik@sch79.alien.ru
The 9x14 and 9x16 fonts use all 8 bits of the byte for representing the
sign. This allows to show the wide signs more visible. The spaces
between signs are created by the hardware (9th dot). If the sign is the
pseudographic sign (codepoint from 0xC0 to 0xDF), then the 9th dot doubles
right dot (bit 0) in image, else 9th dot is zero (background color). The
signs which are not found in the 9xN font are taken from the 8xN font.
(see also VIOTBL)
ΓòÉΓòÉΓòÉ 5.2.2. VIOTBL ΓòÉΓòÉΓòÉ
(see also Control keys)
Next information from the author of the VioFntCh
Dmitry Kuminov (Dmik)
dmik@sch79.alien.ru
The VIOTBL.DCP file format (due to Dmik's opinion):
ΓöîΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéoffsΓöélenΓöé description Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé 00 Γöé w Γöé main header length Γöé
Γöé 02 Γöé ? Γöé main header Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé ?? Γöé ? Γöé font 1 header Γöé table 1
Γöé ?? Γöé ? Γöé font 1 image Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé ?? Γöé ? Γöé font 2 header Γöé table 2
Γöé ?? Γöé ? Γöé font 2 image Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
: : : :
Γö£ΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé ?? Γöé ? Γöé font N header Γöé table N
Γöé ?? Γöé ? Γöé font N image Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
The font header format:
ΓöîΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéoffsΓöélenΓöé description Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé 00 Γöé w Γöé table length (header + font) Γöé
Γöé 02 Γöé w Γöé 18h (header length?) Γöé
Γöé 04 Γöé w Γöé code page Γöé
Γöé 06 Γöé d Γöé for 8xN fonts: 0h, for 9xN: 30000h Γöé
Γöé 0A Γöé b Γöé width of sign in pixels Γöé
Γöé 0B Γöé b Γöé height of sign (bytes per symbol) Γöé
Γöé 0C Γöé b Γöé for 8xN fonts: 0h, for 9xN: width of sign appropriated 8xN Γöé
Γöé 0D Γöé b Γöé for 8xN fonts: 0h, for 9xN: height of sign appropriated 8xN Γöé
Γöé 0E Γöé w Γöé 18h Γöé
Γöé 10 Γöé w Γöé font length Γöé
Γöé 12 Γöé w Γöé number of signs in the font Γöé
Γöé 14 Γöé w Γöé codepoint of first sign Γöé
Γöé 16 Γöé w Γöé codepoint of last sign Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
The fonts 8xN, which contain the images of all 256 symbols of ASCII,
consist of the sequences of the byte groups (256 groups). Every byte
group represents the image of the single ASCII symbol in the codepoint
in increasing order.
The group size (8, 14 or 16 bytes) is defined by the font size N
(the height of the sign). For 9xN fonts, which contain only some sign
images, the size of these groups is increased by 1 byte (N+1 bytes).
The first byte in these groups contains the codepoint of the ASCII symbol.
ΓòÉΓòÉΓòÉ 5.2.3. Font Conversion ΓòÉΓòÉΓòÉ
The font conversion functions use DCplus.DLL from DC User Pack. Search it on
the following sites:
Evgeny Kotsuba http://g23.relcom.ru/g23/9749/dc
Joseph L. Shrago http://www.fcn.ru/~joseph
Russian Underground/2 http://merlin.itep.ru
http://www.os2.spb.ru
http://www.os2.msk.ru
ΓòÉΓòÉΓòÉ 5.2.4. ROM Addressing ΓòÉΓòÉΓòÉ
The manufacturers of the video adapters can use a free addressing scheme of the
ROM chip. The physical address lines may be not appropiate logical address
lines. But usually two schemes are used (notice that each address line supports
one address bit and that in following examples 512Kbit ROM are used; the line F
is missing for 256Kbit ROM; the lines F and E are missing for 128Kbit ROM;
etc.):
o consecutive (direct) addressing scheme, when the physical address lines
appropriate logical address lines fully. The address line 0 sevices the low
address bit and other address lines sevice appropriate address bits in
increasing order. The logical address is created from physical address lines
in order FEDCBA9876543210,
o interleaving (interbanking, alternating) addressing scheme, when the address
line 0 sevices the high address bit, the address line 1 sevices the low
address bit and other address lines sevice appropriate address bits in
increasing order. The logical address is created from physical address lines
in order 0FEDCBA987654321.
The interleaving addressing scheme was used in old adapters, when ROM-BIOS
were placed on two chips. But it is still used in some adapters with one-chips
ROM-BIOS.
The Display Font Editor supportes two addressing schemes - consecutive and
interleaving 1 : 2. For work with any other addressing scheme You should use
third-party routines.
ΓòÉΓòÉΓòÉ 5.2.5. ROM Checksum ΓòÉΓòÉΓòÉ
Usually ROM-BIOS use the inverse chechsum (for self-control), which is saved in
the last byte.
Exist two methods to calculate and control CS (checksum).
Let BIOS has N byte size (from 0 to N-1).
1. (normal method)
Calculate CS: (at first the byte N-1 is equal 0)
sum all bytes from 0 to N-1
and write inverse CS to byte N-1.
Control CS: sum all bytes from 0 to N-1
and check equal 0 (if it is equal 0, then it is Ok!)
2. (abnormal method, e.g. some Tridents)
Calculate CS: (at first the bytes K and N-1 are equal 0 (0<K<N-1))
sum all bytes from 0 to N-1
and write inverse CS to byte K.
Control CS: sum all bytes from 0 to N-1
and check equal byte N-1 (if it is equal, then it is Ok!)
The byte N-1 should be always equal zero.
If the original checksum isn't equal zero, then You can write the new checksum
into the last byte.
If the original checksum is equal zero, then the manufacturer can use the
abnormal method. In this case the real byte, which contains the checksum, can't
be found without disassembling of the BIOS code. You can use the following way:
o select any uncommon sign in the font, which isn't often used(e.g. 8x8),
o write inverse checksum into an empty row of this sign image (byte with value
0x00),
o the sign image will be wrong, but it is almost inconspicuously,
o or do it with any sign in 8x14/16 fonts, which will be used instead the sign
of the 9x14/16 fonts.
ΓòÉΓòÉΓòÉ 5.3. Control keys ΓòÉΓòÉΓòÉ
9xN font processing:
- open the 9xN font window
Change font size:
- 8x8 - 8x14 - 8x16
Note: (*) not available for the 9xN font window
Change code page:
- previous - next
Note: (*) not available for the 9xN font window
Note: (**) available only for VIOTBL files
Moveming in the file:
- to left/right stepping of the row of the file by 1 byte
(i.e. by one line of sign image)
- to top/bottom stepping the column of file by 8/14/16 bytes
(i.e. by one sign of 8xN font)
- to begin/end of file by 128/224/256 bytes
(i.e. by one column of 8xN font)
- to top/end of file by 2048/3584/4096 bytes
(i.e. by one 8xN font)
ΓòÉΓòÉΓòÉ 5.4. Editing of signs ΓòÉΓòÉΓòÉ
Click with the LEFT mouse button on the sign image
and edit it in the sign editor window.
You can edit 9xN font signs as well as 8xN font signs.
Double-click with RIGHT mouse button on the sign image to clear it.
Use the RIGHT mouse button (drag-and-drop) for copying the sign to another
place inside 8xN/9xN window or from 8xN to 9xN window.
Use the LEFT mouse button (drag-and-drop) for exchange the signs into 8xN
window or exchange and move the signs into 9xN window (exclude the reserved
codepoint).
Sorry, You can't use drag-and-drop from/to another application.
ΓòÉΓòÉΓòÉ 5.5. Example of ROM-BIOS preparing ΓòÉΓòÉΓòÉ
Example:
prepare ROM-BIOS of the videoadapter (Trident TVGA-9000) and replace original
fonts by cyrillic fonts (codepage 866).
1. Read the content of the ROM and write it to a file (e.g. t9000.rom).
2. Start Display Font Editor and open this file (File -> Open):
3. Check the ROM addressing scheme (Options -> ROM Addressing):
The Display Font Editor recognizes two addressing schemes - consecutive
and interleaving (alternating, stratifing). This ROM has the interleaving
addressing scheme.
Execute the conversion (further use of the consecutive addressing ROM
image).
4. Check the ROM checksum (Options -> ROM Checksum):
The ROM checksum is equal zero. Sometimes the checksum should always
equal zero. Remember it (see also ROM Checksum).
5. Select the 8x8 font (see also Control keys):
and modify it (edit with the Sign Editor or load the font from existing
file File -> Load Font):
6. Select and modify the 8x14 font:
7. Check the 9xN font. Default: this font is placed just after the 8xN font
(see also View). Press F9:
Ok, the 9x14 font exists and is placed default (no need to select it).
Modify the signs (codepage 866):
8. Select and modify the 8x16 font:
And 9x16 font:
9. Check the ROM checksum (Options -> ROM Checksum):
Don't write the checksum into the ROM image (see the note for the original
checksum). The inverse checksum should be written into any sign image.
Lets use the sign from 8x8 font.
10. Go back to 8x8 font:
Select the sign:
Modify it by placing the inverse checksum into the empty image line (note
that hexadecimal 0xEA appears as binary 1110 1010):
Save this sign:
The sign image is wrong, but it is almost inconspicuously.
11. Check the ROM checksum (Options -> ROM Checksum) again:
and be sure that the current checksum is equal the calculated checksum.
12. Restore the interleaving ROM addressing scheme (Options -> ROM Addressing
and Make conversion):
13. Save this ROM image into file (File -> Save or File -> Save As...).
14. This file may now be written to the ROM chip
ΓòÉΓòÉΓòÉ 6. Change Font utility ΓòÉΓòÉΓòÉ
The Change Font utility is included into the distribution kit of the source
programs. This utility allows to load the font from the file in an OS/2
fullscreen session.
Syntax:
cf [<file>|-h|-?]
without parameters, only show status
<file> name of font file
-h -? short help
Example:
cf
cf C:\FONT\8x16.win
cf 8x16.koi
cf -?
ΓòÉΓòÉΓòÉ 7. History ΓòÉΓòÉΓòÉ
v0.01 30.03.98 (03:30)
Initial version (only russian).
v0.02 24.08.99 (08:24)
New:
- 9xN font processing
- special VIOTBL processing
- cyrillic fonts conversion
- operating with sign ("drag-and-drop")
- profile
- file history
- command line parameters
- Change Font utility
- english version
Changing:
- drag-pointer for sign
- new sign editor
- new painting for font window
ΓòÉΓòÉΓòÉ 8. What is unsupported. ΓòÉΓòÉΓòÉ
Sorry, but don't available:
o the context help,
o the drag-and-drop operations from/to another application.
ΓòÉΓòÉΓòÉ 9. About ΓòÉΓòÉΓòÉ
We appreciate that You have choosen our products.
Send your notes, gratitudes, beer and unnecessary money to the addresses:
E-mail: root@water.karelia.su
BigVic & Kolosoft Group
We sale the source program of Display Font Editor (but only for studying).
E-mail us...
And of course we thank:
Evgeny Kotsuba laser.nictl@g23.relcom.ru
http://g23.relcom.ru/g23/9749/dc
Joseph L. Shrago joseph@fcn.ru
http://www.fcn.ru/~joseph
Dmitry Kuminov dmik@sch79.alien.ru
Oleg Deribas Oleg.Deribas@f13.n461.z2.fidonet.org
Gerhard Arnecke Gerhard.Arnecke@ike.fzk.de
and Russian Underground/2 (RU/2) team
http://merlin.itep.ru
http://www.os2.spb.ru
http://www.os2.msk.ru