Gem
aboutgem.png

I maintain all my Digital Research GEM / HackyGUI stuff on my Dragonthorn wiki at http://dragonthorn.wikidot.com/gem as well as my personal webspace at http://web.newsguy.com/rubyred A screenshot of the GEM desktop converted to a PNG with full compression still looks great and only takes up 9 kilobytes of webspace, as opposed to 48K for a BMP/GIF or 148K for a JPG. The images on my GEM are screenshots in the GEM format, converted to PNGs. The Newsguy site presents the images in full size, while the Wiki still ends up adding compression to allow the sidebar to be displayed. I have assembled the site brick-by-brick and it presents a more or less complete picture of GEM.

Because I want people to find my new site on Google, even though it is no longer affiliated with Google via Blogger, I'm adding a meta tag in the header that reads like this:

< meta name="description" content="Hacky GUI is based on GEM, an open source Graphical User Interface from Digital Research bundled with Free DOS" />


1stGuide

1stguide.png

1STGUIDE.APP is a German shareware file viewer which was designed for the Atari ST computer with support for viewing graphic files such as .PNG, .JPG, and .MPGs but this is not the case for the PC version, which displays only text files and image files native to GEM.

Actually, any file can be opened in 1stGuide, but binaries such as .EXE or .APP are rendered as garbage, albeit with the "MZ" header that flags it as an executable. Application .RSC files are rendered as full pull-down menus and pop-up windows. They don't work without their associated applications, but it is a good way to survey all of the options of a GEM application.

Ctrl-A pops up a dialog in 1stGuide to set preferences, but it is entirely in German. Another nag with 1stGuide is that the file selection dialog only appears when the program is launched, and there is no option to select another file to view. The user must close the application, re-launch it, and choose a new file to view. There might be a button to avoid this under the Ctrl-A window, but I can't read German.


640 x 480 screen resolution

640x480.png

800 x 600 screen resolution

800x600.png

1024 x 768 screen resolution

1024x768.png

There are three color screen resolutions available for Hacky GUI using my VESA video adaptor. When GEM starts up, it searches for a screen driver in the GEMSYS folder (although this seach path can be modified by patching GEM.RSC with RESDIR). All three drivers have four bits of color depth, but these sixteen different colors are picked from a system palette that can be independently modified.

The screen resolutions are:

640 x 480
800 x 600
1024 x 768

As the resolution increases, more and more of the precious DOS low memory is consumed, up to nearly 400 kilobytes in the highest resolution. This can be seen most readily by launching PAINT.APP under each screen mode. The blank canvas goes from a full sheet, to a half, to a quarter, even with GEM running partly in high memory.

A fourth screen resolution available is to force my VESA to operate like an EGA at 640 x 200 x 4, but I use that as a demonstration only, never for actual work.


Accessories

gemacc.png

Only four folder windows can be open on the GEM desktop at the same time, but additional windows may be open in the form of accessory programs, which are chosen from a pulldown menu by clicking on the program title in the upper right hand corner of the screen. As it is currently configured on my machine, I have two clocks (digital and analog), a program to do print jobs in the background, a four-function calculator, and a window displaying the date, time, DOS version, and the size the largest block of free memory.

The analog clock can be resized, while the digital clock comes with an alarm that can be set to beep the system bell. The print spooler is a handy way to do print jobs without going to GEM Output, which takes over the whole screen (DOS is not normally a multitasking environment).

There are other accessories such as a screen capture program and a card file program. Accessories are are small-model EXE files stored with the extension .ACC in the GEMSYS folder, but I do not yet understand how to get GEM to recognize everything that is available when it is launched. ViewMax only accepts the calculator and the digital clock. Adding some accessories will cause GEM to ignore the presence of others. I seek the optimum configuration.


ASCII Table

ascii.png

(*$R-*)
(*$S-*)
(*$I-*)
(*$B-*)
(*$M 1024, 10240, 10240 *)
Program ASCII_Tabelle;

Uses Gembind;

Procedure Tabelle;
Var Dialog : Dialog_ptr;
Zeile : String[40];
i, j, k,
Dummy : Integer;
Begin
Dialog := New_Dialog(22, 0, 0, 37, 23);
Dummy := Add_DItem(Dialog, G_String, None, 11, 1, 0, 0, 0, 0);
Set_DText(Dialog, Dummy, 'ASCII-Tabelle', System_Font, TE_Left);
Dummy := Add_DItem(Dialog, G_String, None, 2, 2, 0, 1, 0, 0);
Set_DText(Dialog, Dummy, '| 0 1 2 3 4 5 6 7 8 9 A B C D E F',
System_Font, TE_Left);
Dummy := Add_DItem(Dialog, G_String, None, 1, 3, 0, 1, 0, 0);
Set_DText(Dialog, Dummy, '-+------—',
System_Font, TE_Left);

Zeile := ' | 1 2 3 4 5 6 7 8 9 a b c d e f'; (* Formular for Zeilenformat *)
For i := 2 to 256 do
Begin
k := (i-1) Div 16;
If (i > 16) And (k = 0) Then k := 16;
j := i Mod 16;
If j = 0 Then j := 16;
Zeile[j*2+2] := Chr(i-1);
If j = 16 Then
Begin
(* linken Rand beschriften *)
If k <= 9 Then Zeile[1] := Chr(k + 48)
Else zeile[1] := Chr(k + 55);
Dummy := Add_DItem(Dialog, G_String, None, 1, k+4, 0, 1, 0, 0);
Set_DText(Dialog, Dummy, Zeile, System_Font, TE_Left);
End;
End;
Dummy := Add_DItem(Dialog, G_Button, Selectable Or Exit_Btn Or Default,
5, 21, 25, 1, 4, $1180);
Set_DText(Dialog, Dummy, ' (c) by Jan Willamowius ', System_Font, TE_Center);

Center_Dialog(Dialog);
Dummy := Do_Dialog(Dialog, 0);
End_Dialog (Dialog);
Delete_Dialog(Dialog);
End;

Begin
If Init_Gem >= 0 then
Begin
Init_Mouse;
Tabelle;
Exit_Gem;
End;
End.


Calendar

calendar.png

Any DOS binary will work as a GEM app, but there's only bindings for C, Pascal, and Fortran and I program in Turbo Basic. Bindings are short pieces of code that translate calls made from a higher level language to the machine code that the GEMVDI interface uses. PowerBasic allows me to drop machine language code right in-line with the rest of my code. The task I have set myself is to create compiler Basic "bindings" for GEM.

There is a GEM group on Yahoo for announcing new developments, but it is rather sparse. Most of the activity in 2008 was spam. But new GEM files such as fonts and complete "distros" are being uploaded to the (mostly illegal) abandonware download site called Vetusware. Meanwhile these are the third-party GEM programs I don't have.

Bitstream Font Manager for GEM

Dataman v1.1 (relational database)

Davrelle.app (presentation graphics multimedia)

DynaCadd (CAD program)

GEM Fortran 1.1

GEM Pascal 1.72

Mipscalc (financial spreadsheeet with presentation graphics)

Perform (forms generator program)

Presentation team (integrates many GEM apps)

Publish-it

Scan

Superbase (relational database)

Text to GEM (converts 48 lines of text to GEM draw file)

Timesworks Publisher V1, V2 & LITE

TrTp2GEM (true type fonts to GEM fonts)

Typographica Font manager for GEM

Ventura Publisher

VTX-PC (GEM terminal )

Zedit (GEM editor)


Cardfile

cardfile.png
GEM was designed in 1985, ten years before the "Start Button" paradigm came in with Windows 95, which has become standard even for Linux windows managers. Right out of the box it looks like the old Macintosh interface. So much so, in fact, that Apple successfully sued Digital Research and got them to cripple GEM in such a way that it was never able to compete with Windows on the PC. Today GEM is free software, so there's no more need to make Apple happy. But GEM is still set up so that only the trash can and the drive icons can appear on the Desktop. Now in Linux, when a drive is mounted, it is indistinguishable from a folder, and here under GEM, clicking on a drive icon opens the root of that drive, just like a folder. So the first thing I did was change all the drive icons to folders (except removable drives, which I kept as a floppy icon). Then I changed all the drive icons to different colored folders. I only have nine "slots" to use for drive icons, which includes the icon for general folders and the icon for the trash can, so I'm forced to call the trash can a folder so I can also use that icon for other folders.

CD Player

gemcdp.png

In the 1990s I had a European computer called an Amstrad 1640 with 640K of memory and a 8086 v3 microprocessor that ran at 8 MHZ, which was almost as fast as the 80286's that were out at the time. It was, in fact, just as fast as the aborted 80186 processor. My Amstrad 1640 wasn't a standard PC. The power supply was in the monitor, and I had to use an Amstrad keyboard.

When the original mouse went bad I had to go through the serial port with a generic mouse. The thing ran Digital Research's DR-DOS 1.2 and MS-DOS 3.20 until I upgraded to MS-DOS 6.0, and it only had a 30 MB hard drive. But I could use it to access BBS's, FidoNet, and later I got on the Internet itself (email, USENET, text-based web) with a Unix shell account.

My Amstrad had a 720 kilobyte 3 1/2" floppy drive and I could not get it to read 1.44 Meg floppies, which were just coming out. This limitation was hard-wired into the BIOS. There was a 30 Megabyte hard drive which quickly filled up. But I was using this computer with BBS's and an Unix shell account in 1996, which was my earliest time on the Internet.

The Amstrad's power supply was built into the monitor, and when it blew late in 1997, the computer was toast because it was a decade-old proprietary design that was no longer supported.

There's almost no documentation for GEM out there on the web. There was a lot of activity around 2005, but most of the websites are down, abandoned by their owners. This blog will soon have the biggest GEM footprint on the Net, by default. It also helps that Blogger is owned by Google.

When I used EDICON to create the icon for .BAT files I had to remove the batch file extension from the DESKTOP.INI file so they would run in DOS instead of merely being displayed. But there are a number of other file types that remain called out in the .INI file including .TXT files and .INI files, plus I added .DIZ (Description In Zipfile) files so I could read the standard summary of new programs after unzipping them. Also I added .ME files because sometimes they use READ.ME instead of FILE_ID.DIZ to describe the purpose of a piece of software.

The disadvantage to using DESKTOP.APP to view files is that I must call out all the file types that I want to be able to see ahead of time before I can read them. The advantage is that it appears in a window on my desktop so I can leave the document open while I do other things. It's not true DOS multitasking, but its close enough for government work.

My Amstrad computer had a weird video card which performed like a standard CGA adaptor for all DOS programs except GEM. Medium resolution was 320x200 with two bits of color and three palettes, all of them hideous. It had a maximum resolution of 640 x 200 with 1 bit of color depth, from a palette of sixteen colors. Under GEM it had the same 640 x 200 pixel resolution but each pixel could be one of sixteen colors, not just the whole screen.

For the longest time I thought that the GEM software somehow dynamically interacted with the CGA to switch the palette on a pixel-by-pixel basis to get four bits of color depth. Now I know it was just accessing a graphics card from Plantronics that operated in a 640x480x4 pseudo-EGA mode under GEM.


Edicon

edicon.png

I wasn't happy with the look of the GEM desktop right out of the box. It was calling my CD-ROM a network drive, and it was using a hard drive icon for my RAM drive. But GEM is more configurable than Windows, it just takes a little elbow grease. EDICON is the application to tweak system icons, which are found in the DESKHI.ICN file.

First I changed the icon for the folders. I added a checkboard pattern to the folder icon to make it easier to see and less "flat" and made the whole thing cyan and dark blue so folders would stand out. Then I improved the icon for removable drives, by making it look a lot more like a floppy disk.

EDICON allows the icons to be moved around, rotated, flipped, and for drive icons, the drive letter can be positioned anywhere. Multiple windows can be opened with different icon sets, and individual icons and data can be cut and pasted between windows. The number of open windows in EDICON is not limited to four as in the GEM Desktop.

ViewMax icons are stored in the VIEWHI.ICN file, but I found that ViewMax does not display the color in icons properly, so I keep them black and white. GEM only displays disk drives and the trash can on the desk top. Except for floppies and the CD-ROM, my disk drives are displayed with folder icons. Some are RAM virtual drives, and the batch file which launches GEM moves data to and from one of these drives at startup and shutdown, simulating a hard-disk folder.


File Find

viewfind.png

GEM ViewMax has a built-in file finder, as well as the ability to select files using wild-cards. I used it to conduct a survey of all the GEM applications on my C-drive. Apps which are in bold text have write-ups and/or screenshots on my blog, wiki, and the Hacky GUI website. Some of these may need to be run under a different flavor of DOS to work. ScGem, for example, a simple spreadsheet program, locks up under my install of FreeGEM.

1stguide desktop gemcdp othello tetris
1stmail dicmerge gemp3 output tictac
1stview djdemo gemsetup paint uitest
artline doodle gemsid prop uninst
artline2 draw gemweb publishr userdefs
basic2 edicon graph rcs viewmax
bjack eventss gscript scgem vmcolour
boinkout fanwor hello settings winlaby
chess fdtests install show wordchrt
clean fgdoodle maped spoolers wordplus
clocks filter memgrafs startrek write
convert fntmerge metafile stx xform
demo gds midi sysfont xforms

File Information

fileinfo.png

Filter

filter.png

Format

format.png

GEM has a built-in option to format disks, but it doesn't work under the normal Desktop. I did get it to work under the original release of ViewMax, version 1.0. FreeDOS itself is not ready for prime time when it comes to formatting raw disks that have never been formatted, and GEM relies on FreeDOS services to format. I have to use Norton Tools to directly bypass this problem.

ViewMax 1.0 was created under the post-Apple lawsuit paradigm of no Trash Can and only two non-overlapping folder windows, which is the Old School style of GEM that I remember on my Amstrad (one file viewer window can overlap these). This style is not necessarily bad. With the reduced memory footprint, this version of ViewMax can load a number of Desktop Accessories. Later versions of ViewMax has movable, overlapping windows but only runs the calculator, digital clock, and print spooler.

GEM screen drivers can be named anything you want, so long as the first two letters of the file name are SD and the extension matches the video card you actually have (CGA, EGA, VGA). I have 16 color VGA drivers with screen resolutions of 640x200, 600x480, 800x600, and even 1024x768. But I cannot get a screen-shot of GEM running with 1024x768, because it consumes so much memory that the computer hangs up when I try to grab a picture, whether I use Screen Thief or GEM's own built-in Snapshot accessory.

GEM Web

gemweb.png

Hacky GUI Font

hackyfont.png

Icons

icons.png

Install Application

install.png

Locomotive Basic

basic2.png

LHGEM

lhgem.png

When MS-DOS was created for the IBM-PC, the microprocessor involved was the Intel 8088 which uses a combination of 16 bit segments and 16 bit addresses to reach 1 megabyte of memory and that was a hardware limit, made even smaller by the convention of reserving the upper 384 kilobytes of RAM for screen memory and to mirror the BIOS.

Even when the 80286 and 80386 crashed through that 640K wall, the structure of DOS was already established, and while DOS itself, device drivers, terminate-and-stay resident programs and data such as spreadsheets could be stored in upper memory, executables such as the GEMVDI had to reside in that precious lower memory.

WIth my current screen driver, the GEM AES eats 193,360 bytes of conventional memory, leaving only 384,480 bytes to run new programs. LHGEM to the rescue. My GEM.BAT file loads GEM with the command GEMVDI -LHGEM. This program loads about 43% of GEM into an upper memory block, and frees up 82,848 bytes of low memory, leaving 491,840 bytes free to use for applications.


Memgraf

memgraf.png

Memgraf is both a GEM application and a desktop accessory. Since DOS is not a multitasking operating system, running Memgraf as an application makes little sense. But as an accessory, Memgraf can run concurrently with other application and show how memory usage changes.

Shown here in the first window is Memgraf running without loading the GEM AES into high memory. I launch the WinLaby game, and memory usage drops from about 92% to 77%.

Overlaying that window is a screen shot from another session of GEM using LHGEM to load the AES into high memory. Memory usage drops from about 77% to 63%.

I have different versions of the Desktop and different screen drivers, and every combination has different memory requirements. Some will load up to half of GEM into upper memory blocks, while others only load about a third. Memgraf provides quick visual feedback on what's going on memory-wise.


OFM

gemofm.png

Under the VIEW pulldown menu in the GEM Desktop is the option to display files in text mode rather than icons, which allows the user to see file sizes and the file creation date-time group at a single glance. Holding the shift key while clicking once on various files selects them for group copy or erase operations. The GEM Desktop can display files as icons or text, but the chosen option is applied over all open windows rather than specific to each window. The ViewMax application, which is specifically designed for file management, allows the display style of each open window to be individually set, and adds the option of displaying a directory tree hierarchy.

In GEM the files can be sorted by name, date, size, or type, but the files are displayed alternating left to right over two columns rather than down a single column. GEM therefore fails as an Orthodox File Manager (OFM), which has a source and target panel to the left and right rather than stacked one over the other. The OFM paradigm has evolved as the most intuitive and efficient human-computer interface for complex file management tasks. Using the 640 x 480 pixel screen driver, the list is displayed in a single column, but the column is too wide to allow two windows to display their complete information. I'm looking for a 800 x 600 pixel driver that will work correctly.


OpenGEM/3

classicgem.png

OpenGEM/4

opengem4.png

OpenGEM/5

opengem5.png

Preferences

gempref.png

Resource Construction Set

rcs.pngrcsicon.png

SDHACKY.VGA small font

sdhackys.png

SDHACKY.VGA large font

sdhackyl.png

Settings

settings.png

The Settings application permits the user to tweak a number of different aspects of GEM, which are saved to the GEM.CFG file in the GEMSYS folder. The color settings define sixteen different colors, four different fill styles, and twenty-four different fill patterns for the active and inactive titlebars, scrollbars, desktop background, buttons, active and inactive info lines, 3D highlighting and shadows, the radio buttons, and checkboxes.

The window settings allow the user to select symbols from the GEM character set to serve as visual aids for various parts of the GUI (such as maximize, or resize, or scroll down). A toggle is also found here to select three-dimensional window borders. The general settings allow the user to select rounded or square corners, flat “ViewMax” style window frames or 3D ones, whether the accessories menu is to the upper left or upper, and whether it displays the current program name or just “Desk”.

After setting everything up, the configuration can be saved under a unique filename as a “theme”, or other themes can be loaded. Closing SETTINGS.APP saves it to the configuration file and returns to the GEM desktop.


Spreadsheet

scgem.png

Sysfont

sysfont.pngsysfont2.png

Text Viewer

desktop.png

The GEM Desktop has a built-in viewer which can be used to browse any ASCII text file by selecting "Show Contents" from the FILE pulldown menu. HackyGUI uses the SDPSC8.VGA device driver, which displays a palette of sixteen colors in an 800 by 600 pixel screen. Using the standard system font, this is sufficient to display a text-mode calendar without scrolling.

If GEM discerns that a file is a binary instead of a text file, it will display the contents in a hexadecimal array like a DEBUG memory dump.

If one installs DESKTOP.APP by selecting "Install Application" from the EDIT pulldown menu, there are eight blank slots where one may type the extensions of files to be opened automatically by the file viewer by simply double-clicking on the file. Icons for all of these files will be assigned from the data icon which is paired with the chosen application icon.

If eight auto-loading filename extensions are not enough, then one may add extensions manually in the DESKTOP.INF file, but if DESKTOP.APP is installed again, the list of auto-loading extensions will be truncated to the first eight.


ViewMax

viewmax.png

ViewMax is a great GEM-based file manager that looks like a million bucks and has a smaller footprint in “low” DOS memory than any other file manager I've found. It leaves only 15,120 bytes in the precious conventional memory when running another program. If VIEWMAX.APP is launched from GEM, it leaves 18,720 bytes locked up in conventional memory for the GEMVDI. Contrast to GEM itself, which uses that 18,720 bytes plus another 203,056 bytes for the GEM AES, unless the LHGEM utility is used to load some of GEM high, depending on which screen driver is used. In my current configuration, LHGEM loads 71,552 bytes high and leaves 131,504 bytes in low memory for GEM.EXE. But ViewMax scoots nearly completely out of the way.

ViewMax uses the same set of icons I have developed for HackyGUI except that color is turned off, because it “bleeds” outside of the icons and doesn't display properly.

Running as a GEM application, ViewMax does not use graphic characters for the tree branches, it uses alphanumerics which look poor. Also, after a DOS application is run, ViewMax reverts to the GEM desktop instead of resuming itself.

I prefer ViewMax over the GEM desktop for file management because it is far more configurable. Each window in ViewMax, for example, can be set to display icons, a tree, or text view. In the GEM desktop there is no tree view, and if you select text view or icons, that will be the state for all of the windows.


ViewMax 1.0

vmax1.png

Zip

gemzip.png

For managing compressed files, Windows has WinZip and Hacky Linux uses Xarchiver. These programs allow the user to simply click on a compressed ZIP file and extract it to the hard drive. But for HackyGUI (aka GEM) I had to fiddle with it a little bit to make it work. The first step was to use EDICON to make my own icon for ZIP files and then install PKUNZIP.EXE under GEM as a DOS application that takes no parameters.

After that, I chose a ZIP file called GEMSPEC.ZIP, and made a new folder for it named GEMSPEC on my C drive. There was just one small nag. To create a new folder in GEM I have to click inside the box to start typing, it's not automatically ready to go like has become standard operating procedure under Windows and all the Linux desktops.

Now I just just surf into my new folder, click on the ZIP file and it unpacks itself just like under Windows and Linux. Clicking on a ZIP file automatically provides the filename to the 4DOS command interpreter.

Since I don't need the original ZIP file anymore I toss it into the trash. Now I click on the unzipped text file and away I go. It's a "confidential" document originally intended for the eyes of Digital Research employees only. But that was then, this is now. So GEM Zip. Just because it's DOS doesn't mean it has to be hard.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License