Resurrected Entertainment

Archive for the 'Software' category

TheDRAW!

July 18, 2008 1:42 pm

There are two ways to render graphics in DOS. The first involves setting the desired graphics mode and then drawing pixels on the screen via the BIOS or writing directly to video memory (an interesting topic by itself); the second method involves staying in text mode and drawing pictures with the standard set of ASCII or IBM's Extended ASCII characters (thanks to Telecom Corner for the chart).

IBMS Extended ASCII

While scripting batch files, you can also make use of ANSI escape sequences to control the cursor, display coloured or blinking text, etc. In case your interested, DOS requires an ANSI driver in order to translate these escape sequences. These escape sequences are non-intuitive and look something like this:

ESC[=5;7h

Ahh. Isn't it cute? Many people have been discreetly killed for creating less offensive syntax than that. In addition to the regular set of ASCII characters which can be used in creative and artistic ways to produce a recognizable picture, using the set of extended ASCII characters provides an easy way to draw connected lines within the grid of displayable characters. When creating your picture keep in mind the screen size, since this is dependent on the video mode (some video modes can display more rows and columns).

TheDRAW Title ScreenTheDRAW was written by Ian E. Davis and was last released in October of 1993. It is a program which allows you to paint a picture or create an animation using these special characters and ANSI attributes. It's not like painting individual pixels, you are limited by the set of characters available. However, this hasn't stopped ASCII artists from creating fantastic content. The most stunning examples I found were on Bulletin Board Systems. They were often themed according to design of the on-line system. Using TheDRAW, these pictures could be exported as ANSI-compliant or ASCII text files, or as header files to be used in other programming languages. There are a number of small tools available for translating these files into other formats used by other languages.

TheDRAW package is bundled with a utility called TheGrab which can take an screen shot of a running program. It's not your typical screen shot utility which takes snap shots of any graphics screen. This program works only for text mode screens and will output a file in ANSI, ASCII, COM, or TheDRAW format files. Be wary of using this memory resident utility under DOSBox 0.72 as it will crash and force you to end your session.

Last but not least, TheDRAW package is bundled with a utility for creating your own fonts to be used in TheDRAW paint program. This is without a doubt one of my favourite features and makes creating screens a breeze. There are many fonts available in the wide, wide world so have fun.

All of these features are thuroughly explained in the documentation and in-program help. Many of my programs took on a more professional and fun look because of this drawing tool; although I think I went overboard in some cases. I still find it the best tool available for doing this sort of work in DOS, although I'm sure many of you may prefer other software such as AcidDRAW.

PGP: Source Code and Internals

April 28, 2008 10:51 pm

PGP BookMy copy finally arrived the other day and I am elated. Now, before you make another hasty buying decision based solely on my opinion, and on a single line of text, there are a couple of things worth mentioning about the book. First and foremost, the book does lack a few structural elements like plot and little things like paragraphs. Having read about the history of Philip Zimmerman and his toil with the U.S. government, I already knew this before I purchased the book.

It does contain source code. Lots of code. The entire PGP program, in fact, including the project files. The book was sent to print because the digital privacy laws the government was attempting to enact at the time, did not cover the printed page. If all you want is the source code, you can simply find it on the Internet. Looking for a specific version, especially an older version, is more difficult and may be fraught with export restrictions.

The story behind the printing of the book is a fascinating history lesson and one we should all be concerned about, even if you live in another country, since we all know governments are not terribly adept at learning from their mistakes.

TheDraw for DOS

March 10, 2008 10:21 pm

There are two ways to display graphics in DOS. The first involves getting out of text mode and setting the desired graphics mode and then drawing pixels on the screen via the BIOS or writing directly to video memory; the second method involves drawing with the set of ASCII or extended ASCII characters. You can also make use of ANSI escape sequences to control the cursor, display coloured or blinking text, etc. DOS requires an ANSI driver in order to translate these escape sequences. These character codes are non-intuitive and look something like this: ESC[=5;7h. I swear my cat coughed up a fur ball which looked exactly like that the other day.

The set of extended ASCII characters provides an easy way to draw connected lines within the grid of displayable characters. This grid changes in size depending on the video mode set. With the default video mode in DOS, the dimensions of this grid is usually 80 characters wide by 25 characters high and covers the entire screen. Naturally, these characters can be connected to form anything from boxes to mazes. It's how all those menus and dialogs are drawn when using a program like QBasic.

TheDRAW is a program which allows you to paint a picture using a variety of special characters. It's not like painting individual pixels, you are limited by the set of characters available. However, this hasn't stopped ASCII artists from creating fantastic content. The most stunning examples I found were on Bulletin Board Systems which used them to attract new and repeat visitors alike. The ANSI art found on those systems were often themed according to design of the on-line system or the whim of the system operator. Using TheDRAW, these pictures could be exported as ANSI-compliant or ASCII text files, or as header files to be used in other programming languages. There are a number of small tools available for translating these files into other formats used by other programming languages.

ANSI art drawn using the TheDRAW

Many of my programs in QuickBasic took on a more professional and uniform look because of this spectacular drawing tool. I still find it the best tool available for doing this sort of work in DOS, although I'm sure many of you may prefer other programs.

When I began to write software using The C Programming Language, I used TheDRAW to create a title screen in a number of small programs (the concept of a splash screen hadn't been introduced yet). Although most dialogs and windows I used were crafted in code using a custom built user interface library, the more complex dialogs were created using this application. To allow for input or interaction, the fields were marked by a special character, followed by a small series of alpha-numeric characters. These markers would be found by the interface library and the characters following the marker would correspond to a header file which linked the "names" to constants and then to user interface controls and data structures.

The output from TheDRAW was compressed and archived in a separate resource file to keep them from being easily pillaged by unworthy scavengers. I'm not an artist so it may have been overkill.

GW-BASIC

November 29, 2007 8:19 pm

GW-BASIC PromptI first discovered this little gem while poking around on my Tandy 1000 RL computer back in 1991. Because I was familiar with various versions of BASIC already, I was able to fire it up and immediately begin writing fairly simple applications. However, there were differences to Atari's version of BASIC, and no discernable way to figure that out without a book or some other documentation. I poked around on a few of my favourite Bulletin Board Systems (BBS) and found a small cache of programs written in GW-BASIC. I downloaded each of them, spending all of my download credits in the process. I poured over them line by line and found myself having more questions than answers.

Many new programmers today expect there to be some sort of documentation available when they learn a new technology. It's an expectation that has evolved over the years. Today, it would be practically unheard of if you couldn't find some resource describing the software on the Internet, or some blurb in a book, or even bundled with the product. However, when I started looking for a book on GW-BASIC (version 3.23 to be exact), it was darn near impossible. The people I spoke with had no understanding of programming, let alone a specific language. The computer sections in the store were spartan compared to the sections you find in stores today. In fact, several years later, I still needed to special order the books I wanted through the book store; even today, I usually order my titles through Amazon since a store like Indigo usually doesn't have them in stock.

I eventually wandered into a local computer store - I was attracted by a demo of Wing Commander II playing on one of their expensive new 486 machines, so I went in to ask them if they knew where I could get my hands on some material. I spoke with the owner and he seemed to recall seeing a book for BASIC in the back of the store. He left for a couple of minutes and returned with two books under his arm. One was for the exact version of GW-BASIC I was looking for and the other was a compatible book for MS-DOS. I was ecstatic and I nearly fainted when he gave them to me for free. I don't remember what I said to the man that day, but I'm sure it wasn't adequate.

I wrote so many programs in that environment. I think I still have a few of them today on floppy diskette. They were simple at first, like simple word games such as hangman. However, it wasn't long before I discovered how to increase the resolution and colour depth and draw simple graphics. I had already written code for the Atari which made use of pixel plotting routines or simple geometric shapes. There were pre-canned routines the Atari provided for drawing shapes, along with a few parameters for style, colour, and shape. GW-BASIC was similar but provided several more commands and options. With a smaller font and a higher resolution, debugging within BASIC became more feasible. I still couldn't scroll, but at least I could view a larger portion of the code on the screen.

Sound was also possible through the PLAY command, or if you were so inclined, through a custom routine written in assembly language which could be written to generate all sorts of sounds like noise or even speech. I had converted several songs using music sheets and converted them to their GW-BASIC equivalent. Not terribly exciting, but it did make for some creative demos which seemed to impress onlookers.

Some of the more interesting projects involved controlling external devices like printers. I must have programmed my software to use every conceivable option available through my Star NX 1000 II dot-matrix printer. I could instruct it to use standard type effects like bold and italics when printing text, but I could also program it to print graphical data like images and shapes. I even created printed graphics for the Mandel Brot set by rendering the fractal to my printer instead of the screen, one pixel at a time.

Perhaps the most interesting device was a robotic arm which was controlled through a series of commands dispatched through the parallel port. I didn't have access to such a device at home but my school eventually purchased one, so one of the teachers decided to create a contest for students. Whoever could program the robotic arm first, would win a special prize. The task was to pick up a piece of chalk and draw a picture consisting of at least four shapes. It was a fun contest and I walked away with a pass which granted me as much lab time as I wanted.

Before I upgraded to a new machine and moved to a new version of MS-DOS, I was intimately familiar with every command in that book, even the more obscure commands like CHAIN and PCOPY. Although, the really obscure commands were still a mystery. I didn't know you could actually write assembly language routines in GW-BASIC using DEF USR and USR commands until sometime later.

Amiga OS

November 27, 2007 2:14 pm

Early Amiga OSAt around the same time I discovered DeskMate, the Amiga OS made its entry into the market as the aptly named operating system for the Amiga computer. Until recently, I had never owned an Amiga machine. I spent a fair amount of time with friends mucking around with various bits of software and hardware. One of my favourite combinations was the NewTek Video Toaster which was a powerful video editing software kit. You could do all sorts of video effects and overlays due to a technology called genlock. Genlock allowed you to synchronize different signals so that their sources become coincident, which made it possible for you to place blackout bar over your sister's face just for kicks.It also sported several hardware and software features which I had never seen before. Real hardware multi-tasking was available on the Amiga 1000, but we mostly used the Amiga 500 which wasn't as sophisticated in the same areas but provided terrific hardware for games. A friend of mine had a massive collection of software which were all archived in a custom-built diskette storage case made of wood and decaled with the Amiga logo. When we weren't playing games and slogging through his massive collection of software, we were programming in Amiga BASIC or the occasional dip into the Lattice C compiler. I didn't really understand the compiler since it was my first experience with a compiler, and it's really difficult to learn a new programming technology when you have no means to experiment in your free time and no books available to read. At the time, I really wasn't that interested anyway because I really connected with the structured BASIC available on the Amiga. It was a technology I could more readily understand because of my experience with Atari's BASIC and Tandy's GW-BASIC.

The Amiga OS made a strong impression on me as to what I was missing when I used a personal computer running DOS or Windows. There really wasn't any comparison at the time. I remember feeling a bit underwhelmed whenever I switched my machine on after returning from a night of Amiga fun. However, after a few hours I was back into full swing. I'm not sure if I came to the realization that the machine I owned presented me with all sorts of different puzzles and tantalizing delights, but I do remember feeling like there was so much more to explore and learn. I believe that is what kept me from begging my folk's for an Amiga every time I returned home. Although, I might have asked once or twice...

MS-DOS

10:23 am

MS-DOS LogoDespite Tandy's DeskMate application which tried to handle a number of disk and application related functions, MS-DOS (Microsoft Disk Operating System) was the actual operating system on which Deskmate needed to operate. I had experience with an earlier version of Microsoft's DOS which I used at school; I believe the versions were 2.0 and 1.25. Unlike today where hard drives are common place and often taken for granted, the machines in the lab could only boot by way of 5 1/4" floppy diskettes which contained the operating system. I believe the Tandy computer came with MS-DOS 3.42 and it was pre-installed on the hard drive. This was so much better than booting from a floppy, and I quickly assimilated as many commands as I could, since the school never gave me the time I wanted on the machine or the resources. Even with the aid of a text book, there were a few commands which took me a while to grasp, like COMMAND.COM or DEBUG.COM. My understanding of these wouldn't completely solidify until I started programming in lower level languages like C and assembly language. I was also introduced to Microsoft's shell scripts which they called Batch files. With the addition of extra software on the system, these scripts could actually become fairly sophisticated. Before I moved on to greener pastures and more flexible user interfaces, my system had sophisticated menus and launchers which helped my family out when they wanted to use the machine (it wasn't often, but it did happen).

Version 5 was a much more refined operating system and contained powerful commands and programs like QBasic. It also featured a memory manager which allowed software to access all of that wonderful new memory that you may have been fortunate enough to acquire. Although it was included in MS-DOS Version 4, I believe the DOSSHELL command's popularity spiked in Version 5. This was a program which was intended as a graphical replacement to the dull COMMAND.COM shell. It introduced a feature called task swapping which allowed you to load more than one program but only run one of them at a time; unlike multitasking which appears to run more than one program at the same time. Also, DOSSHELL could not load more programs than your memory would allow since it did not have a paging mechanism. Naturally, all of these benefits conflicted with the new versions of Windows which did exactly the same thing only better, and was soon relegated to a supplemental disk in future releases before being dropped entirely.

Version 6 introduced the much feared DELTREE command. DELTREE was a command which could recursively remove directories and files; it was so feared because new or untrained users would presumably delete their entire operating system accidently. If this was indeed a problem, I think they should have modified the program to make it more difficult to accidently trash your operating system by adding extra prompts and warnings for example, since it is a very useful command in some circumstances. Despite its notoriety, it was a fairly simple command as far as software goes, and the void was soon filled by programmers who released new versions on the Internet which did exactly the same thing only better; I wrote a utility to replace it as well but mine displayed a user interface if you specified the right command option.

Tandy Deskmate

September 17, 2007 1:30 pm

Tandy DeskmateI first experienced this desktop software while using a Tandy 1000 RL machine which my father decided to go out and buy at the last minute on Christmas Eve, so I wouldn't be disappointed. It was a nifty little machine with a 20 MB hard drive, built-in audio, 3 1/2-inch drive, and virtually no expansion capabilities what-so-ever. It had one ISA bus; everything else was pretty much hardwired into the system. It did have serial and parallel ports which allowed you to plug-in a MODEM or printer which certainly helped later on. After booting it up, I discovered the manufacturer had installed DeskMate onto a read-only partition on the harddrive. Much to my dismay, they had pre-configured it at the factory. When I needed to reinstall the system sometime later, DeskMate never functioned like it did out of the box. For some reason, and I have yet to figure out, it was about two or three times slower.

When compared against other Windowing environments at the time, such as Windows 2.X or even Windows 3.X, it could hold its own. The major feature missing was network support, but even Microsoft products didn't support that until Windows 3.11.Until DeskMate walked into my life, I had never experienced a visual desktop before. It was an exciting experience and I wanted to explore every nook and cranny. First and foremost, I wanted to write software for it, so I phoned the number provided by Tandy Corporation in our manual. They said I needed to purchase the software development kit (SDK) and a suitable compiler. At the time, I didn't know what a compiler was so I thanked the person and went about calling local stores and asking them questions. After a bit of research I discovered that the SDK was expensive and so was the compiler, which according to the sales person was a "program to make other programs." They were probably brushing me off since I was basically a kid (or a young punk) at the time. I know they were at least a few hundred dollars a piece which put them out of my price range. In the end, I'm happy I didn't invest the money in the SDK since I have since learned it wasn't very good. Apparently, many companies had to write much of their own code in order to do anything useful. I would still like to check out the API, so until then, I reserve final judgement.

DeskMate had all sorts of small applications available. It had all of the standard applications like a word processor, simple database, spreadsheet, drawing application, telecommunications software, etc. These applications are extremely simplistic compared to what is available today; although the word processor did have spell checking and even a thesaurus and dictionary (purchased separately), and the database was functional enough to be useful. It even installed a personal diary program, which was very well done. It also came with a variety of useful on-screen tutorials to help you learn the software as you use it. Microsoft Windows didn't have anything that helpful until Windows 95.

VisiCALC

1:00 pm

VisiCALC on the AtariI was exposed to this piece of software at about the same time I was learning how to send graphical data to our printer. I didn't really appreciate the complexity of this software until much later. My father was the one who was the real expert, but I also fired it up to help with my homework and to calculate some values I needed for a few of the games I was writing. It was the first time I had ever seen a spread sheet program, even though it appeared on the Apple II a couple of years earlier. Financially, the program was a boon for Apple and almost single-handedly lead to the mass adoption of the system. Financially, I'm not sure how it fared on the Atari since it took the company about a year to port it to other systems, but it's common to see systems for sale on eBay which are being sold with a few games, miscellaneous pieces of software, and VisiCALC.This spread sheet software introduced me to a world where software can be used for something other than playing games. Although, let's face it, they're not as much fun or practical these days. I think I absorbed that idea pretty well for a boy who hadn't quite entered his teenage years. I started to think about how I could write programs for my father which would help him with his financial chores. I don't think I produced anything terribly useful, but I did write a few small calculator programs which could do a few interesting calculations involving trigonometry and simple algebra. I hadn't yet discovered decimal encoding techniques like Binary Coded Decimal (BCD), but I eventually learned that Atari used BCD routines in its library implementation which BASIC used extensively. VisiCALC was able to handle floating point values efficiently because it was written in assembly language and the 6502 processor has floating point instructions available. The programmers used these instructions directly instead of using Atari's library, which had a very positive impact on performance.

For more information on the development of VisiCALC, there are a couple of sources on the Internet available including one from the creators themselves.

Atari 8-bit OS

September 10, 2007 2:03 pm

Atari OS 2.5Atari DOS - This operating system was the first operating system I was exposed to during my youth, and the 2.x series was the most popular in my household. The operating system was loaded off of 5 1/4" double-sided double-density diskettes which usually offered about 320 KBs of storage space after formatting, although other disk formats offered less or more storage depending on density. The operating system did little more than manage disk functions such as formatting diskettes or erasing and copying files, hence the full name "Disk Operating System." It could, however, be used to boot strap the cartridge or run a binary program at an arbitrary address after it was loaded. The DOS was mostly used to access files and programs stored on floppy diskette. It provided a File Management System (FMS) which needed to remain in memory in order to provide disk access functionality to other programs.

Believe it or not, there are still hardware/software hobbyists and professionals creating products to use with your Atari. I have a software solution called A.P.E. which allows me to use my computer as a virtual disk drive, printer, modem, etc. It's absolutely fantastic and accelerates software loading to a fraction of the time it took before. There are also products which allow you to connect a hard drive through the cartridge port, or even USB devices!

APE ScreenshotA.P.E. stands for Atari Peripheral Emulator and is an essential piece of software for any Atari user. Until a few years ago, I was forced to play my Atari games via an emulator or on the Real McCoy using the terribly slow, but wonderfully nostalgic floppy disk drive. I don't think it's necessary to mention how painful it was waiting for the disk operating system to load, and then waiting for the actual game to load, and then waiting for the game to save, and then waiting for the game to load the second disk... you get the idea. There was a lot of waiting, and somehow I mangaged to do it without batting an eye lash in 1984.

First and foremost, A.P.E.'s biggest strength comes in the form of its disk drive emulation software. In order to get it to work, you must own a working Atari computer. The author probably explains exactly which Atari computers are compatible somewhere on his website, but I can tell you for sure that the Atari 800 XL and Atari 400 computers work like a charm. Simply connect your Atari computer to your personal computer using a custom SIO interface cable. The cable can be purchased through the web site, or you can even make your own if you're so inclined. Install the APE software on a computer, configure it, select a disk image, and boot up your Atari machine. Voila! The software you selected will boot in record time. Plus, your personal computer now acts as a virtual hard drive for your Atari! You can put away those floppy diskettes, all of your games and applications can be saved and archived as an "ATR" file, which A.P.E. can understand.

Microsoft LAN Manager

July 25, 2007 12:15 pm

After I had finished assembling my RetroBox, I was forced to to make a decision on what operating system to use. I chose to go with Windows 98 because I needed to be able to access my network. I also wanted to be able to boot into a DOS shell, but I didn't want to dual-boot the machine. By writing a few options into the CONFIG.SYS and AUTOEXEC.BAT files, the user is presented with a small set of choices which may drop them into the shell. When I need to access files on my network or if I want to print something, I choose an option which boots me into Windows. My RetroBox is not a terribly fast beast, and it takes a while to boot and log-in.

To help alleviate this problem, I installed Microsoft LAN Manager in my DOS environment. Now I can access my network files and print through the network with ease. The process was a little frustrating and your experience may vary. I am providing this information, just in case you're considering tossing the whole project and moving to Tibet to become a monk (if you're already a monk living in Tibet, then you may be considering moving to Canada to become a Mountie).

The very first step would be to obtain a network card. For compatibility reasons, a popular 10/100 Mb card would be optimal. I have compiled a list of network card drivers which are bundled with Microsoft LAN Manager (which I will now be calling LAN Man to save some typing). Even if your network card is not on the list (mine wasn't), you may still be able to obtain a driver from the company's web site. My card is a D-Link 835TX and the earliest driver posted on the website was for Windows 98. After decompressing the file, however, I found a driver specifically for LAN Man which saved me from having to create a custom NIF file. I will explain how LAN Man uses these files a little later.

Once the physical card is installed, unpack your installation and run SETUP.EXE to get started. For many people, the setup process should be pain-free. My setup was not so problem free, however. I suppose it was due to the fact that I was running the Windows 98 shell, and not a pure MS-DOS, PC-DOS, or FreeDOS installation. I believe the root of the problem stemmed from the fact that the Windows 98 shell doesn't like the '$' wildcard. If you take a look at the SETUP.INF file, you'll notice a number of files ending in the dollar sign. Within the file, a program like NetBEUI would be referenced like this:

DRIVERS\PROTOCOL\NETBEUI\NETBEUI.ex$

Under MS-DOS, this would match the file NETBEUI.EX_. Under the Windows 98 shell, it does not seem to match it at all, so the installer complains that it cannot find the file. What I did to correct this problem was to simply change the wildcard to the '_' character and presto! The installer was able to see the file and continue with the installation.

Because my card was not on the list of available drivers, I needed to add it to the list myself, which meant making an entry in the SETUP.INF file so it could find the driver files (<DRIVER NAME>.DOS and PROTOCOL.INI) and the Network Information File (NIF). After making an additional entry in the SETUP.INF file and copying the files to the right locations (under DRIVERS\ETHERNET), the setup program correctly enumerated the card name and I was able to select it from the installation menu.

After these changes, the install carried on happily, but complained at the very end that it could not find the "NETWKSTA." file. There is no "NETWKSTA" file; it's just a directory. This is the eight-character directory shorthand for Network Work Station. I don't know why it was complaining, but it's an important program and needs to be installed so you can use network resources like shared files and printers. This is also easily corrected after completing the installation. Just copy the file:

\MSLANMAN.DOS\NETWKSTA\NETWKSTA.500 to
\MSLANMAN.DOS\NETPROG\NETWKSTA.EXE.

Don't copy it from the CD-ROM, because that file is compressed and won't run. That file will end in an underscore, so it won't match the name I listed above.

During the network setup portion of the installer, if you choose to use DHCP then you don't need to specify an IP address or sub-net mask. For log-in credentials, just supply a user name without a password if you don't have an MS LAN Manager or Windows NT authentication service setup. When it asks you for a domain name and you don't know what that means, just enter in a dummy name or leave it blank (I didn't try leaving it blank, the installer may refuse to continue). One item to keep in mind: a Windows domain is not the same thing as a work-group, but I used my work-group name anyway since I knew it wouldn't matter. Eventually, if I choose to setup a domain, I will change the domain name at that time.

After moving the commands inserted into my CONFIG.SYS and AUTOEXEC.BAT files around to suit my own taste, I rebooted the machine and ran the NET.EXE program. Using this software, I could enter the UNC path to one of my machines:

\\MACHINE1

Go to the view menu and select "View available network resources". It will present you with a dialog which will allow you to assign a shared folder to a local resource like a drive letter. I was able to read and write (provided the permissions are set appropriately on the share) to the folder using the new drive letter (F: in this case).

Please note: you won't be able to mount a printer or a shared folder if the share name is greater than eight characters! It will simply complain that it cannot find the network resource.