Columns


CUG New Releases

PTMID, WildFile, and Two Graphics Libraries

Victor R. Volkman


Victor R. Volkman received a BS in Computer Science from Michigan Technological University. He has been a frequent contributor to C/C++ Users Journal since 1987. He is currently employed as Senior Analyst at H.C.I.A. of Ann Arbor, Michigan. He can be reached by dial-in at the HAL 9000 BBS (313) 663-4173 or by Usenet mail to sysop@hal9k.com.

New Acquisitions

CUG #432A: PTMID - MIDI to MOD/MTM

Andrew Scott (Mosman Park, Australia) submits his PTMID music conversion utility. PTMID takes General MIDI files (format 0 or 1) and converts them to Protracker MOD files or Multitracker MTM files. As you may know, MIDI files are industry standard, but need some sort of sequencer to be played. This is because a MIDI file can specify a near-infinite number of simultaneous notes (though about 20 is a standard maximum). Protracker files are four-channel files (though six, eight, or more can be supported), but include a bank of digitized instruments. The digitized instruments allow reasonable quality sound to be produced given limited hardware. Multitracker files are similar to MOD files and support up to 32 simultaneous notes. PTMID version 0.3 (released on 07/18/94) is immediately available on CUG Library volume #432.

The CUG Library distribution includes an MS-DOS executable as well as complete source code in ANSI C. The source can be recompiled using Borland C 2.0 (or later). The makefile builds a small memory model program, though other models may be possible. The documentation appears in the form of a six-page UNIX man file. You'll need some background in digital music to get the best results from the code. PTMID is distributed with a license reminiscent of the GNU Public License. Specifically, you may not resell the program, all redistributions must include PTMID source, and anything built using the PTMID source must include a notice that parts are derived from it.

CUG #432B: WildFile Regular Expressions

John Kercheval (Seattle, WA) contributes his WildFile library that provides UNIX-shell-style wildcarding in MS-DOS executables. Wildcarding means the ability to take a description like "foo*.c" and return a list of matching filenames (e.g. foobar.c, foofoo.c, etc.). By default, MS-DOS programs can accept the support for arbitrary string ("*") and single character ("?") wildcarding if they use the INT 21h service functions FindFirst and FindNext. WildFile starts with this level of support and adds on regular expressions using pattern primitives such as positive closure ("+"), character range ("[ ]"), and character negation ("!" or "^"). WildFile v1.20 (as released on 01/07/92) is immediately available on CUG Library volume #432.

Here are some examples of valid WildFile expressions and results:

Expression     Result
"*t*"          would match to the filenames test.doc, wet.goo, 
               itsy.bib, foo.tic, etc.
"th?[a-eg]."   would match to any file without an extension,
               whose first two letters were "th", with any third
               letter and whose last letter was a,b,c,d,e or g. 
               (ie. thug, thod, thud, etc.)
"*"            would match all filenames.
"f[!a-1]o*"    would match foo*.* but not fao*.* through flo*.*
WildFile documentation consists mainly of a series of concatenated release notes for versions 1.00 through 1.20. WildFile has been developed and compiled using both MicroSoft C V6.00A and Borland C++ 2.00. Kercheval has generously dedicated WildFile to the public domain.

CUG #433: SVGACC MS-DOS Graphics Library

Stephen L. Balkum and Daniel A. Sill (Zephyr Software, Austin, TX) submit their MS-DOS real-mode SVGA graphics library for MSC, Borland C, and Symantec C/C++. SVGACC provides an easy interface to the high resolution/high color video modes of the newer SVGA video cards. Recall that no true standard for VGA video cards has appeared above the 320x200x256 resolution. Instead, each video card manufacturer has implemented a slightly different method to access these high resolution/high color video modes. SVGACC automatically identifies the video card and its installed memory. Users may write graphics programs that will work on most any SVGA card without writing specific versions for each individual SVGA card. Over 100 functions support sprite animation, drawing primitives, fills, 3-D views and much more. SVGACC is written in 100% assembly language and uses 80386 32-bit registers for the best possible speed. SVGACC version 2.1 (as released on 05/09/94) is immediately available as CUG volume #433

SVGACC specifically supports the following SuperVGA graphics cards:

The maximum resolution depends on the video card, its installed memory, and monitor. Most VGA video cards support the 320x200x256 and 640x400x256 video modes. You'll need 512Kb of video memory to use the 640x480x256 and 800x600x256 video modes, 1Mb to use the 1024x768x256 video mode, and 2Mb to use the 1280x1024x256 video mode.

The SVGACC documentation consists of the comprehensive Reference Manual (270 pages). The Reference Manual primarily provides detailed descriptions of each of the more than 100 SVGACC library functions. Each entry includes a function prototype, descriptions of input and output parameters, usage notes, see-also, and detailed example code fragments. An appendix provides complete wiring schematics for standard PC analog joystick ports.

Since SVGACC is marketed as shareware, you must register with Zephyr Software after a 30-day evaluation period. Registration is only $35 for the first copy and $5 for upgrades. Registration entitles you to unlimited runtime distribution rights. Registered users also receive several other benefits:

Source code for SVGACC is not available in any release.

CUG #434: XYZ++ 3-D Graphics

Nicholas Centanni (Los Gatos, CA) submits his 3-D graphics class library for Borland C++ 3.1 (and later). XYZ++ is a comprehensive package of optimized C++ classes for both floating-point and fixed-point 3D graphics. XYZ++ is shipped with the following 3D mathematics classes:

Viewer — Performs all 3D calculations to define a scene
Vect — A small vector mathematics class used by both the Viewer and Light classes
d_Light — A surface shading calculator (double values)
f_Light — A surface shading calculator (fixed-point)

In addition, the DOS BGI programs use their own group of classes:

Graphics — A BGI-specific high-level graphics class
Panel — Classes for building GUI control panels
Mouse — A complete graphical mouse support class
Keyboard — An extended-keyboard support class
Timer — A simple high-resolution timer class
Scene — A demonstration of packaging XYZ++ with the supplied Graphics class

XYZ++ version 2.0 object code (as released on 07/21/94) is immediately available as CUG volume #434.

The XYZ++ package is divided into two distinct segments. The first is a group of classes which only perform 3D mathematics, without reference to, or dependence on, any specific method of graphics output. The second segment deals with the output and display of graphics using Borland's BGI drivers, but without any specific reference to 3D mathematics.

The system is segmented in this way to allow developers to cleanly replace the supplied graphics classes with those of their own, without disturbing the 3D mathematics functionality of the package. Developers can then easily connect the system to any graphics library, or graphics engine they wish to use.

XYZ++ documentation consists of a 40-page ASCII Reference Manual. The manual defines and reviews many 3-D concepts, though you may need some additional study if this is your first 3-D application.

Since XYZ++ is marketed as shareware, you must register with its author after a 30-day evaluation period. Registration is only $47 and entitles you to full source code as well as unlimited runtime distribution rights. Registered users also receive several other benefits: