ViewMAX DBCS video driver: SDJVG9.VGA
=====================================

  This zipfile contains reverse-engineered source code (based on the GEM/3 
driver source tree) for the ViewMAX video driver SDJVG9.VGA.

  To build the driver, run mk.bat.

  The unique feature of SDJVG9 is that when run under DOS/V, it supports 
output in double-byte character sets such as Shift-JIS. Here is how it 
does it:

* At startup, SDJVG9 calls INT 15h/AX=5000h to get the address of the DOS/V 
  'read font' function. If this is present, it sets a 'supports DBCS' flag 
   on the system font.

* Also at startup, it uses INT 21h/AX=6507h to get the DBCS lead byte table.
  When a string is passed to any of the text output functions, if a DBCS font 
  is in use and the DBCS lead byte table is loaded, the code checks for DBCS 
  lead/trail bytes in the string passed to it, and combines each pair into a 
  16-bit character ID.

  (Since the v_gtext API passes each character as a 16-bit word, you might 
  expect lead/trail bytes to be combined into a single character ID before 
  they get passed to v_gtext(). Not so.)

* When drawing a character, SDJVG9 checks to see if the character ID is above 
  256. If so, it calls the DOS/V 'read font' function to get that character's 
  bitmap, and instructs the drawing code to draw 16 pixels from offset 0 of 
  that bitmap, rather than 8 pixels from the system font bitmap at a given 
  offset.

* There are similar checks in the optimised monospaced text drawing code, 
  allowing characters to be 8 or 16 pixels wide.

A number of functions not used by ViewMAX have been replaced by no-ops:

* Marker drawing: v_pmarker, vsm_type, vsm_height, vsm_color, vqm_attr
* General drawing primitives: v_bar, v_arc, v_pieslice, v_circle, v_ellipse etc.
* Support for loadable fonts: dt_loadfont, dt_unloadfont
* Text queries: vqt_attr, dqt_extent, dqt_width, dqt_name, dqt_fontinfo, 
                dqt_just
* Line / fill queries: vql_attr, vqf_attr

