The magazine of the Melbourne PC User Group
Members' Tips 'n' Tricks
Ron Taylor
|
|
Welcome to the first PC Update for 1995. Another year passed, time to hang a fresh new calendar on the wall. It will be interesting to see what new products the computer world brings us over the coming months. Will Windows 95 live up to its
promise - or more to the point the expectations that so many potential users are placing on
it - expectations that seem to far outnumber any promises that could possibly be made. Only time will tell!
Speaking of calendars, I must express my sincere appreciation to the many members who responded to my request for assistance with information and program code on calendar functions in the December 1994 edition of
Tips 'n' Tricks. Often I hear comments that Melb PC's annual membership is the best value around for forty bucks, I couldn't agree more. Thanks go out to; Tony Smith who sent on a Turbo Pascal listing complete with inline function, Chris Deeble for Zellers formula in BASIC, Andrew Benka for a neat C++ segment, John Stoddart who generously faxed in much relevant math detail complete with historical info, Nhan
Tran from Canberra for corrected leap-year calcs [I hope you received my Netmail reply Nhan.
RT], and not forgetting Marne Fraser for his follow-up data and program listing in QBasic.
It is reassuring to find so many members who still quietly maintain an active interest in programming, whether for business or pleasure, especially so because this sector of PC users is always helpful and willing to share their knowledge with anyone. Keep it up folks, we all learn from each other. Enough talk, let's play.
DOOM in Stereo? - It's a Killer!
What makes a game popular? Whatever it is DOOM has got it! It can't be the violence; lots of others have as much of that or even more. Sound and graphics are OK but nothing to write home to mum about, it's easy enough to play I suppose, which is a big plus, and fairly challenging too but still not unbeatable, even without using any cheats.
Although it needs a fair bit of computer power, it runs pretty stable and doesn't crash on you. Yep! DOOM is good, and DOOM ][ is even better, all 15 MB of it
not easy to find the secret levels though. Most of all, it is a versatile game, with utilities around allowing the user to edit those dreaded .WAD files, add characters and weapons, make your own scenarios etc.
DOOM also allows multiplayer games via network or modem, which can add challenge and be a lot of fun too. Many players may not realise that you don't need a network or modems to connect and play against another PC, you can do it with a "null-modem" cable.
A null-modem cable is simply a serial (or RS-232) cable with a few wires swapped around inside, or better still get hold of a standard serial cable plus a null-modem adaptor to plug into one end. Either way it should only cost about $15-$20 for a unit 7 to 10 metres long. They are also handy for transferring data between PCs.
Of course the PCs have to be within close proximity to connect them. Make sure they are both switched off and plug the null-modem cable into a vacant serial port on each PC and they are ready to fire up. If you don't have a spare PC (and most people don't), then arrange with a friend to bring theirs along for a Saturday afternoon DOOM-Day. It doesn't
matter if the two machines are not the same speed either, my 5X25 runs quite veil against the DX2/66.
T'he other weekend I decided to introduce a new challenge, playing against myself (who needs friends when you've got a spare computer!) Imagine, facing two monitors, setup for deathmatch with monsters disabled so they don't get in the way... joystick in each hand frantically trying to kill myself before I kill myselfl!!
Sounds demented Huh? Not only does it test your coordination to the limit but
who cares about motion sickness? - this is guaranteed to send your brain in a rap dance!!! Be afraid... be very afraid.
No seriously, it's great fun if you can hang in there. And now for a batch file to make it convenient to start up your "networked" game, alter it as required to suit each PC:
cd game\doom2
SERSETUP -com2 -115200 -deathrmatch -nomonsters -skill 3 |
Run this on both machines. It will first give you a message that it is connected showing the "speed" then it will proceed to go through the long initialise sequence of' starting up the main DOOM program.
The important settings are the first two ,parameters after SERSETUP,
"-COM2" is he COM port number used for the
connection on the PC you are running, the next "-115200" is the baud rate which must be the same on both machines (if you don't specify a baud rate it defaults to 14,400). Note: The Doom ][ docs state that permissible baud rates are
9600 - 57,600, I found that 115,200 works just fine on both my PCs and gives slightly better transfer update rates.
If one of the PCs uses a non-standard IRQ number or Port Address on it's serial card then you will need to specify those as well using "-irq #" and "-port
Ox[Hex #]". All other parameters are optional, check the manual and README file for an explanation of what they are and set them to suit the type of game you wish to play.
Help with the Works
Modern software packages for the PC are awesome, particularly the high-end "suites" of Wordprocessor Spreadsheet Database etc. Not only do they always contain a vast amount of features that we may never use but increasingly tend to consume unrealistic amounts of disk space and system power to operate effectively, let alone the exorbitant cost of continual upgrades to keep abreast. I recently got to the point of asking myself', "Do I `need' all this?"
After pondering on this seemingly insurmountable "problem" 1 decided to investigate what was available at the
other end of the market and subsequently decided to buy a copy of MS Works for Windows v3. Like many products in this bracket Works has matured into a competent offering, something akin in features to the top-enders of 1-2 years ago with a user-friendly modern polish, more than adequate to cater for my needs. This reminds me of that old adage "...the business grew so big we had to move into smaller premises!"
At the current street price there wasn't much to lose-plus it came on CD-ROM, a full blown multimedia product, which suited me just fine. The big advantage of MM application software is the extensive help systems on the CD, which usually includes the complete set of manuals plus much more.
Not being familiar with the product I sure needed regular and quick access to that help which the CD offered, unfortunately to do this you must have the CD in the drive to access it! Usually I want to use some other software on CD at the same time (or play some favourite tracks from an audio one). Hmm, if only I could afford more drives.
How could I have the cake and eat it too? The solution was to copy the file MSWORKS.MVB to the \MSWORKS directory on the hard disk. Note that this file is around 20 MB so if you are short of disk space it's out of the question.
MSWORKS.MVB is the main Help system file for MM Works. To make it accessible from the disk all you need to do is modify the Works .ini file MSWORKS3.INI found in the \WINDOWS directory. MSWORKS3.INI contains a section like this:
[MMWorks]
HelpFilePath=(z:\dir\filename)
where z: is your CD-ROM drive letter. Now just change it to; "HelpFilePath = MSWORKS.MVB" and it's done! Naturally if you do this, access to any part of the Help is a whole lot faster direct from the Hard Disk.
A word of caution: If you have modified your Works toolbars to any extent you will find that the line "DefineToolBar" under the "[MSWorks]" section can get quite long, this line
must be kept intact.
Therefore you will need to use a text editor that can safely load and resave long lines of text (over 1000 characters), without truncating or splitting the lines up. Many editors, particularly some of the DOS-based ones, are not capable of this so check first before proceeding with your favourite. Here is where the old Windows Notepad comes into play, you can always trust it with the job.
Wait For a Y/N Response
Often it is necessary to get a simple Key response from a user and have the PC act accordingly depending on which key was pressed. Anyone using MS-DOS 6 and above has the external command CHOICE available to do this but many PCs are still running happily on earlier versions of the operating system.
This little program isn't fancy but will do the job, when run it will wait indefinitely for a Y/N from the keyboard, then can act on whichever key was typed. It does not give any prompt but you can easily supply that with an ECHO statement, however it does output the user's response to the screen.
N ASK_YN.COM
a
mov ah, 00
int 16
mov ah, 00
cmp ax, 4e
jz 11c
cmp ax, 6e
jz 11c
cmp ax, 59
jz 128
cmp ax, 79 jz 128
jmp 100
mov ah, 09
mov dx, 0138
int 21
mov ax, 4c01
int 21
mov ah, 09
mov dx, 0134
int 21
mov ax, 4c00
int 21
db '(Y)' '$'
db '(N)' '$'
rcx
3c
w
q |
Type in the script as shown leaving a blank line, just press [Enter], before the "rcx" and after the last "q". Now save the text as a file called ASK_YN.SCR and from the DOS prompt use the command:
DEBUG ASK YN.SCR
This makes ASK_YN.COM, a handy 60-byte utility. When run from a batch file it will wait for the user to press "Y" or "N" (upper or lower case are detected). Errorlevel 0 is returned for "Y" and Errorlevel 1 for "N". Here is a sample fragment of batch file to show how it could be used:
...
ECHO Press Y to do something...
ECHO Press N to continue...
C:\UTILS\ASK_YN
IF ERRORLEVEL 1 GOTO NO
IF ERRORLEVEL 0 COTO YES
:NO
do something different here then branch to continue
GOTO CONTINUE
:YES
do something else here
:CONTINUE
... |
Well T'n'T is a bit light on this month, not to worry, I should be able to round up
a bit more for you when all members get back into the swing after the holiday break. Hope you all had a great time and don't forget to pass on your computing secrets.
Before I close off, apologies are in order, in
PC Update October 1994 under subheading titled "Is a .DOC file executable?", I neglected to inform that the Tip only applies when using the 4DOS command processor. Thanks to David Brownridge for pointing out the mistake and I hope it had not caused too much inconvenience to readers of this section. Till next month, Enjoy!
Reprinted from the Jan / Feb 1995 issue of PC Update, the magazine of Melbourne PC User Group, Australia
|