VBM Bitmap Viewer version 1.10 [November 13, 1993]
I have improved upon the "vbm" bitmap viewer program I released recently
for the C128 with 64K of VDC video RAM. The old program displayed 640x480
monochrome graphics by having the processor "manually" flip back and forth
between the even and odd display fields. The new program, thanks to VDC
register values provided by Fred Bowen of Commodore, displays 640x492
monochrome graphics with no display maintenance required from the CPU.
I have also improved the prototype demo for this display mode, which is
temporarily (until someone shuts me down) available via anonymous FTP from
host "ccnga.uwaterloo.ca" in file "/pub/cbm/vbm110.uua". Included in that
UUarchive file is "vbm" which is the BASIC driver program, "vbmlib.bin"
which is the machine language support for the graphics-intensive stuff, and
"toucan.bm", which is a demonstration bitmap image to view. The image is
of the tropical bird with a big beak, and it is dithered in black and white
from an 8-bit GIF file.
Also available in that directory is "vbmlib.s" which is the Buddy assembler
source code for the machine la uage support package for the "vbm" driver,
"team.bm" and "warbird.bm", which are larger dithered bitmap images to view,
and "bm.c", discussed below. The assembler source includes all of the
register settings required to activate the 640x492 interlaced monochrome
bitmap graphics mode.
When you start the "vbm" program, it will display the toucan image and then
wait for you to press a key. Pressing "Q" will return you to BASIC.
Pressing any of the cursor keys will scroll the image a quarter-screen in
the rection you press. Pressing the HOME key will return you to the
"home" position of the image. Pressing the SPACE BAR or RETURN key will
cause the next image in the wrap-around "slide show" to be viewed. The
images in the slide show have to be entered in to DATA statements at the
end of the "vbm" program. For example, the toucan image is defined as:
1000 DATA 0,0,"TOUCAN.BM
The first number of the data statement gives the left margin of the "home"
viewing position in multiples of eight pixel columns, he second number
gives the top margin in single pixel rows, and the third field gives the
name of the bitmap file to view. You can add as many new "slides" as you
wish. The sentinel slide entry is on line 9999.
The ".bm" format has been improved slightly to include a 4-byte header to
identify the type of file it is. The ".bm" format is basically a binary
representation of the ".xbm" format for X-windows bitmaps, where ".xbm"
gives its data in C code format. The "bm.c" file from the FTP site is a C
pr ram that will convert a file from ".xbm" format to ".bm" format. So,
all you need to view any arbitrary GIF or JPEG file on your 128 is a
program like Unix's "xv" to convert the image into ".xbm" format, and then
convert that into ".bm" format. The new viewer will let you scroll around
in images larger than 640x492, so you don't have to cut larger images like
you used to. The maximum image size that "vbm" will now handle is
2040x65535.
Eh? E-mail me if you don't have FTP access.
Keep on Hackin'!
-C ig Bruce
csbruce@ccnga.uwaterloo.ca
"Everything from ACE to ZED!"
-----=-----
crc32a = 1795672384 for "vbm"
crc32a = 3355235778 for "vbmlib.bin"
crc32a = 434840598 for "toucan.bm"