DOS Games in Windows XP

Support for old software is not a high priority anymore and is fading fast. This is bad news for gamers who want to play those old DOS (and even Windows) games that do not run on modern hardware and operating systems.

One solution is to find old hardware to run those old games on. This is the ideal solution from a compatibility standpoint, but has its own drawbacks like extra physical hardware, electricity, space, cost, and so on. Another solution is to use hardware emulation software that tricks the old software into thinking that it is running on the hardware that the emulator tells it. This is less compatible, but has advantages like price and convenience.

Emulators like DOSBox, VMWare, Virtual PC, Parallels, QEMU, and the like are a great way to go in a lot of cases. But, for really intensive games like FPSes, you will probably want to run them natively to get better performance.

The three biggest obstacles in running old software on modern computers natively are CPU, sound, and audio.

Old software was not designed to run on modern CPUs which are often too fast, and also have multi-threaded/core functions. Worse, modern systems are moving to a model that old software developers could not even conceive of in those days. There are programs that can slow a system down (usually by running the CPU in a controlled, but infinite loop) so that the old program gets fewer CPU cycles, but a much better solution is to use an emulator.

Audio in a program running natively has been handled for the most part by VDMSound. It has not been updated in a long time, but most class-gamers will attest that it works for most purposes. Emulators work well too, but they do not usually offer as wide a variety of sound cards.

Video has had its share of hacks as well. Ken Silverman—they guy who created the Build engine which powered games like Duke Nukem 3D—released a couple of tools (NOCLI and NOLFB) that will modify old apps so that they can run in XP without locking up. However, even with those, most graphics programs (eg games) will usually freeze in XP on startup and display only the first frame. The way to fix this is to install the Full Screen Video Driver For Console which comes with Windows XP but is not installed by default:

  1. Open the Control Panel
  2. Run the Add Hardware applet, click Next, wait
  3. Select Yes…already connected
  4. Scroll down and select Add a new hardware device
  5. Select …manually…(Advanced)
  6. Select Show All Deviced
  7. Select Microsoft Corporation for Manufacturer and Full screen video driver for console for Model

That’s it. Now graphical DOS software should run properly in Windows. You can still use NOLFB and NOCLI if needed. Windows 2000 could not only run graphical DOS software full-screen, but it could even run them in a window, which XP cannot do. That was a great feature that is missed. Windows Vista has changed quite a bit that a lot of even XP softare will not run in it. It’s adoption has been pretty slow, so we’ll just have to see what gamers come up with for it, although it may very well be the case that XP is the last OS for classic-gamers: future classic-gamers will probably have to run emulators that hopefully will be much better.

Existance of After-Life Unprovable

A few years ago I got fed up with the lack of knowledge about an after-life and existence of ghosts. In an effort to once and for all clear up this mystery, I made the decision that when I die, I would come back and unlike other “ghosts”, I would make it absolutely clear. That is, instead of moving an object when nobody is around or appearing to a single crazy person in the dark, or other such traditional manifestations, I would appear in say, Times Square among thousands of people and make a damn-big show. I would remove all doubt once and for all.

Of course, if there is no after-life after all, then I would not be able to show up. That part did not seem like a problem. I figured that it would just be the other half of the proof. If I do not show up, it means there is no after-life, if there is, then I would show up and make it clear that I have come back.

Unfortunately, in less than a minute of forming my plan, I realized that I would not be able to prove it after all. What happens if there is an after-life, but I am not able to immediately come back? What if what seems like a minute to me is 100 years in the living world? I would show up, but I had “disproved” the after-life 100 years ago. What if there is an after-life, but I am unable to come back and show myself? What if there is an after-life, but I am not allowed to come back and show myseld?

It dawned on me, that even if there is an after-life, there may be other forces at work that prevent me from proving it once and for all. In other words, the only way to determine whether or not there is an after-life once and for all is if I can come back, which would prove that there is. Not coming back proves nothing (not a surprise to scientists and logicians). The lack of proof is not proof in and of itself.

In summary, one of two things will happen when a person dies, either they do come back or they don’t, and only comeing back proves anything, but even then, their manifestation may be limited by various factors. Therefore, there really is no way to prove the existence of an after-life or ghosts, or rather, there is no way to disprove them.

Here is another article on the same subject that had occurred to me at another time , but with a different spin.

Tue-Sat Program Setting Required

Manufacturers of VCRs have always missed something important when they designed the programming ability of their products, and modern-day DVR manufacturers are no better. It may be the case that one or two products out there have already thought of it, but at least 99.99% of them do not. The design defect in question is the day range of the programming function.

Most products allow you to choose one time, every week on specified day, every day, and every weekday (Mon-Fri). What they forget to allow is every weekday (Tue-Sat). Why would you include a Tuesday to Saturday range?

Simple. Suppose that you have two programs that air each weeknight that you want to record. One is from 11:00pm to 12:00am on channel 3 and the other is from 12:00am to 01:00am on channel 4. Programming the first one is easy enough, you select M-F/12am/1am/3. What about the second? It may be Monday to Friday nights, but technically it is Tuesday to Saturday mornings since it begins after midnight! The only option here would be to select S-S/12am/1am/4 and remember to take the tape out on the weekend.

With a T-S option, it would simply be T-S/12am/1am/4 and no extra work trying to keep it from taping on the weekend is necessary. This is why these devices need a Tuesday to Saturday program option.

*UPDATE*
Well wonders never cease. It turns out that my very own VCRs (GE/RCA) have this exact functionality. I must never have created an early-morning, daily program because I have never seen this screen:
Daily A.M. Program Clarification Screen

Human Eras

Human history can be broken down into a small handful of eras which are defined by drastic changes in both civilization and development.

The first era was the one spanning some hundred thousand years from early cavemen who started using tools and lived in caves up to about 10,000-8,000BC. These early people were the first genetically modern humans. They began to communicate, albeit in a rudimentary way, but that communication, coupled with their use of tools would turn out to be the beginning of a break from the rest of the creatures on the planet, separating us further and further from the natural.

The second era started around the time that people began building their domiciles instead of just squatting in natural ones and goes until around 500AD. This era is marked by the rise and eventual fall of the great empires: Persian, Egyptian, Greek, Roman and so on. They built great cities, buildings, monuments, and statues. As it turns out, they would be the last of the large monoliths and statues as later eras had very few. These empires were turbulent and violent. The Earth was still quite uncharted and many lands were still uninhabited, and thus explorers set out to find, claim, and if necessary, conquer new lands. The empires pulsated, growing and shrinking and while they lasted thousands of years, they were eventually reduced to what are now small, relatively insignificant, stand-alone countries.

The third era started when the great empires fell. When literacy and education started becoming available to more and more people, communication allowed them to share information which led to less tolerance for the old ways. People were no longer willing to be slaves and build massive cities and tributes to a single person and hid family. They began revolting and standing up for themselves which eventually caused the great empires to die out. Ironically enough, even though this era began due to the spread of knowledge, it is actually better known better for its intolerance of knowledge. It is the one of the middle-ages, medieval times, or the apt term dark-ages. The millennium that followed was one where religion became all-important and led to great and bloody wars, like the Crusades, Witch Trials, and Spanish Inquisition in which horrible clashes of faith led to more deaths than even the frequent invasions of the previous era. This era condemned knowledge and gave rise to conspiracy, suspicion and superstition.

The fourth era overlapped the previous era a little as some people resisted the dread and constant fear caused by the ignorance of the previous era. Contrasting to the resistance to knowledge of the recent past, people attempted to live in an age of enlightenment in which knowledge and education would once again prevail. This era gave rise to the Renaissance and was marked most significantly by the advancement of art and artists throughout these few centures such as some of the most famous painters, sculptors, composers, and musicians of all time. It also advanced and sparked new life in the study of science with new theories most notably in physics helped bring about the next era.

The fifth era was the start of modern technology. It began with a more thorough study of electricity which led to better understanding it and eventually the generation of power. The harnessing and use of electricity caused the largest and fastest change to the world than ever in the history of the planet. Because of electricity, industry and technology took off and changed everything in every field. This era started out innocently enough, using the new-found power to make life better, but a lack of true understanding would lead to many problems. We currently live in this era and are trying to fix the mistakes of the recent-past. We are also both advancing quickly as well as reaching a plateau.

It is interesting to note that each era was shorter than the previous one. Advancement and development progressed at an accelerating rate. If this pattern holds up, future eras should be even shorter. It could however break down, possibly even in our current era and lead to stagnation. What could the next era(s) be like? Reasonable expectations of the next two follow.

The sixth era will likely start very soon, in many of our lifetimes. The previous era was about 300 years long and this one is already more than half that length. It will probably be the era of space. As we mess up our own planet, the push to leave it and find another grows stronger. Space travel is already possible and going farther is only a matter of time. In the next era we will likely begin using the moon, Mars, and possibly other planets as mines, landfills, and new homes. We will create bigger and better ships and weapons to take us further and kill ourselves more effectively. This and the next era are the realms of science fiction, the hope of progress and exploration as in Star Trek.

The seventh era, assuming that humankind has survived will probably be the last. It will have two or three possible outcomes. One is that humans will finally meet other creatures, making contact (although probably never meeting) aliens. If we do make contact with aliens, it probably won’t come to pass until the eighth era, if that ever occurs. With or without the aliens, we may become so enlightened and knowledgeable that we repair the planet, unite, and turn the world into paradise, a true utopia. The final option, and unfortunately the most probably outcome is that we will get so out of control, so selfish and apathetic that all empathy, fairness, and justice will be gone. Humans will have evolved to be cold, heartless people who only think of themselves, and using their advanced knowledge and technology will ignite wars unlike any the world has ever seen. The death and destruction will be so vast and devastating that if any humans (or animals or plants for that matter) survive, they will regress so far back—possibly due to mutation—that the world will once again be back at the first, or possibly even the 0th era.

All of human history can indeed be split into a few distinct blocks where great shifts occurred, usually due to a shift in thinking. It is truly amazing how far humans have come, specifically because of their brains. They really are special in some ways, but the road to here has been an unbelievably bloody one, and the path yet to come does not look any cleaner or dryer.

Rule of Thumb Can Do More Harm Than Good

I just read the following line in an article in a security focues issue of NetworkLife magazine about novice computer users and firewalls:

A good rule of thumb: “If an alert occurs when users are launching any kind of Internet action, such as connecting to their mail servers, downloading programs, connecting to a Web server, or updating software, then they should accept it”

And to be honest, that has been the general consensus on this matter for pretty much ever. Unfortunately, while it is quite logical, it is not a very good rule of thumb. What happens when a piece of software, say their anti-virus app, tries to check for an update while the user is typing a paper? An alert pops up telling them that a program is trying to connect, and they think “hmmm, I’m just typing a paper; I didn’t initiate anything, so I’m supposed to block it”. They click Deny Access. The next day it tries to check while they’re playing Solitaire, so they click Deny Access again. The day after, it happens while they were in the bathroom, so they get tired of this and just click Deny Access And Remember. Now their anti-virus is never updated again.

The opposite can occur as well. They open an email and see a message from someone they don’t know and click the attachment to see the greeting card. An alert pops up telling them that a program is trying to access the Internet. They think “hmmm, I’m viewing email and I just clicked a Web-card, so it’s safe to allow it”. Now they are infected with a trojan and their zombie computer will begin sending out infected spam.

Truly, the best rule of thumb is to just educate the users in even a rudimentary fashion. If you go to the trouble of installing a firewall on grandma’s computer and telling her a rule of thumb as the above, then you may as well just give her a better, crash course instead.

Windows Screensavers Textures

Windows includes several built-in screensavers, including one that shows 3D text. In the settings dialog for the 3D text screensaver, you can select to have it render with a reflection or texture, thus giving it a metallic look. When you select either the reflection or texture settings, you can then specify a bitmap file to have Windows use that when rendering the 3D text. If you do not specify a bitmap, it still renders it with a texture using a built-in graphics file. Interestingly enough, even though the custom-text-dialog box defaults to only bitmap (.BMP) files, the built-in textures are actually JPEGs.

If you have ever wondered what they look like, you can see them by opening the screensaver file (ssText3d.scr) in a resource editor and looking in the JPG section. The two files look like this (they are identical in Windows XP and Windows 7):

Reflection texture from Windows’ 3D Text screensaver
The reflection texture has been used in some of the DirectX samples in the DirectX SDK and if I remember correctly, is a photo of the lobby at Microsoft.
Texture from Windows’ 3D Text screensaver
The generic texture looks an awful lot like those from some texture packs like Absolute Cross or Propaganda Tiles.


CLS is a Hack

Open a command prompt and type the following command: cls>clstest.txt. Now examine the contents of clstest.txt. You will see that it contains one character: 0x0C—FF which stands for form-feed. That’s right, CLS clears the screen by merely scrolling the previous contents out of sight by printing out a form-feed character; well, almost merely.

If you are using XP or higher, set the command prompt window to have a larger buffer and try this command: more /p clstest.txt. It displays the contents of the file, expanding any form-feed characters it finds. What happens is that the display scrolls the previous contents up by the number of lines equal to the console window’s screen height, which can be less than the buffer height, effectively clearing the screen, but leaving buffer.height-screen.height lines unaffected; you can still scroll up to see the previous contents. Using the CLS command however does erase the contents of the buffer and resets the cursor to the top-left most position.

CLS prints a form-feed character because when it was first created back in the days of early versions of (MS-)DOS there were no back-buffers and screens were a fixed size.

This behavior of CLS is still present even in Windows 7. It is interesting to see some of the indelible backwards compatibilities.

NULL Character (and other Control Codes) at Command Line

You can type control codes at command prompt in Windows (and DOS) by pressing the corresponding key with the Control key. Get it, Control key for control code?

The connection between letter and code is simple: add 0x40. That is, for control code 1, add 0x40 to get 0x41 which is the ASCII code for ‘A’, therefore press Ctrl+A to get character 1 (SOH).

But, the alphabet only accounts for 26 of the first 32 characters. What about codes 27-31? The correspondence remains the same. Character 27 (ESC) is 0x1B+0x40=0x5B which is ‘[’, 28 (FS) is ‘\’, 29 (GS) is ‘]’, 30 (RS) is ‘^’, and 31 (US) is ‘_’.

Unfortunately, since ‘_’ is a shifted character, it requires holding Shift to create, so it is not possible to press Ctrl+Shift+- to get character 31 that way (and for the curious, no, Ctrl+- won’t work). For that, you’ll have to resort to the classic Alt+Numpad method (Alt+31 on the numeric pad).

Conversely, you cannot press Alt+0 to type character 0 (NUL). To get null, you have to use the Control key. Remember that it requires adding 0x40, so zero plus 40 is, well, 40. That’s right, 0x40 (64) is ‘@’ so, pressing Ctrl+Shift+2 (or just Ctrl+2) gets some sort of reaction. However, it does not seem to produce the expected effect, probably because nulls are string terminators for any software that uses ASCIIZ encoding (a very common method). (So Ctrl+2 is Null; that explains why it can sometimes be used as an abort chord similar to Ctrl+C or Break).

In practice (in at least XP’s command line), Ctrl+@ causes the prompt “More? ”, after which it passes whatever the user enters to the program as a parameter. For example the command echo ^@ followed by the the user entering testing would print out testing because the string was piped into the echo command. Another example: dir ^@ allows the user to select the file/directory to list (entering /s at the prompt would display all subdirectories). There does not seem to be a way to prevent the prompt from being displayed (not even by redirecting to nul).

No doubt, some creative and enterprising individual will be able to exploit this feature to enhance batch files.

Virus Clues

If you are downloading files from a P2P network, then be especially wary of viruses.

One dead giveaway is when a search gives you moderate results, but then you get a few results (usually at the end of the search) that suddenly have hundreds, or even thousands of sources, particularly if those files are of wildly different sizes. What happened, did you get really lucky and manage to find a hidden cache of the file you were looking for? No, those few results that show hundreds or thousands of sources for the file you were searching for are not real, they are viruses that a bad server returns. When you do a search, the servers that are queried return a list of sources for that file that they know of. There are fake servers and virus pits that always respond with a very large number of sources no matter what the file is. They return a large number as bait, and if someone attempts to download the file, they receive one of a number of fakes (possibly even dynamically created), which are infected with viruses and other malware, regardless of what file they were trying to get.

Yet another dead giveaway is when you get a ZIP file that contains three files, an EXE, a DLL, and a TXT, especially if the files have gibberish filenames. This is a common dummy file that virus pits send out which contains an encrypted virus (checking the binary contents looks like it’s not an executable, but it is merely XOR-encrypted and is indeed a virus). What’s interesting about this one is that it usually uses the tag ZWT. ZWT is an actual scene group that does release “legitimate” cracks and such. It is unknown whether the owners of the virus pits that send out fake ZWT-tagged files targeted ZWT on purpose or not, but since it is the only group who’s name is used in the fakes, it may very well be the case.

One more virus-infected fake pattern that is making the rounds on the donkey network is the one where the resulting files contain an NFO file and an EXE. The EXE is the virus, and the NFO contains nothing but a numerical url: eg www.209193.com, www.39520.com, etc. These ones often contain the name of a piece of software or something in the names, and even version numbers to look even more legitimate. However, they don’t usually contain release group names.

As usual, be very wary of anything you download, especially from P2P networks, and in particular when looking for warez. Always check files that you download with at the very least a virus scanner, if not a trojan scanner, worm scanner, rootkit scanner… You can also run them through online scanners such as Jotti’s, Virus.org, and Virustotal.

If everyone kept themselves clean, the whole world would be cleaner overall. If you must pirate, practice safe piracy.