Archive for June, 2009
FREEDOS Project Documentation
by admin on Jun.20, 2009, under Computers, Daily
So I’m trying to help the freedos project with documentation. Here’s a bit of what I’ve written to replace the new users guide. Unfortunately wordpress is being a pain, and it’s late, so the formatting is a bit off.
Welcome to the DOS new users guide. In this guide I try to give the reader just enough information to start using DOS efficiently. This is by no means an extensive guide and it is only meant to get the reader familure with DOS. DOS is not hard to learn and there are graphical interfaces to help you out if you’re interested, but most of DOS’s power is in the commandline. Besides, It only takes a limited number of commands to use DOS efficiently and these commands could be learned in a day.
To help give you a full idea of what happens when you use DOS I’ll explain what happens when your computer boots all the way up to when DOS is loaded as well as some of what DOS does at boot up. Then I’ll explain a few commands to get you fimilure with DOS so that you may feel at home using it on a daily basis.
Let’s begin with the power on button. When you turn your computer on by pressing the power button the electrical components in your computer power up. One of the first of these components to power up is the BIOS. The BIOS is the basic communication block between your computers hardware (keyboard, mouse, soundcard, modem, floppy drive, etc..) and your computers operating system (in this case DOS). For more information on the BIOS, see http://en.wikipedia.org/wiki/BIOS.
Once the BIOS boots then, depending on what you’re settings are, it searches for a boot sector on your harddrive, cdrom drive, or floppy drive. The boot sector is a small bit of code written (usually by your operating system, DOS) in a special memory space on your drive. Once the boot sector is found it’s then placed into memory and then executed by the computer. To learn more about boot sectors and boot strapping see http://en.wikipedia.org/wiki/Bootstrapping_(computing).
In our case we have a DOS boot sector and once it’s placed into memory DOS loads two files. The first file is the config.sys file. This file usually contains device drivers like cdrom, network and sound card drivers. Once the config.sys is loaded the autoexec.bat file is loaded. Usually the autoexec.bat file can contain device drivers much like the config.sys as well as user configuration settings, such as prompt type, environment variables and other customizations a user may wish to make.
After the autoexec.bat is loaaded, DOS then displays the command prompt:
<C:\>
followed by a blinking cursor. At this point DOS is waiting for commands from the user, that means you! From the prompt you can perform basic file operations such as copying files, moving files, ranaming files or listing files.
Before we begin with how to perform these operations it’s a good idea to get an understanding of how DOS organizes files. DOS stores files onto drives. Drives are usually named by a letter followed by a colon. For example, floppy drives are usually A: or B:, the harddrive is C: and the CDROM drive is D:. You can access different drives in DOS by typing the drive letter followed by the colon and pressing return.
Example of a user changing drive to A: and back to C: in DOS.
<C:\TMP>a:
<A:\>c:
<C:\TMP>
On each drive there may also be directories. Directories are just like they sound, it’s a way of organizing files into a logical structure. For example, in the following structure:
C Drive
|
±GAMES directory
|
±DOOM directory
|
±DOOM.EXE
±DOOM.WAD
±README.TXT
±…
the drive C contains the GAMES directory and within the GAMES directory there is a DOOM directory. Just like the DOOM directory contains the files DOOM.EXE, DOOM.WAD and README.TXT other directories can contain files as well. These files and directories can be organized in any way that the user wants or needs.
Now back to the command prompt with a little explination:
C: \ >_
^ ^ waiting for your command
| |
| root directory
|
drive C
The C: denotes the drive that you’re currently on, from there the / shows you the current directory. The prompt is there as a friendly reminder to the user as to where they are on the drive. The prompt can also be changed by typing PROMPT followed by any number of command switches, which I won’t go into on the tutorial. Type PROMPT /? for more information on the PROMPT command.
Now for you’re first command, the DIR command! The DIR command is short for directory listing. The DIR command lists files and directories within the current directory. For example, if you’re at <C:\> and you type DIR you may get something similar to the following:
C:\>DIR
Volume in drive C is mu/drives/c
Directory of C:\
CONFIG SYS 346 11-10-08 8:19p
TMP <DIR> 05-25-09 6:57p
AUTOEXEC BAT 556 11-10-08 8:19p
2 file(s) 902 bytes
1 dir(s) 2,147,450,880 bytes free
The command above shows all files and directories within the current directory (C:\). Two files are listed above, CONFIG.SYS and AUTOEXEC.BAT and one directory is listed TMP. The files are followed by a size in bytes. The CONFIG.SYS is 346 bytes big and the AUTOEXEC.BAT is 556 bytes big. The date to the right of each file is the last modification date. The rest is self explanitory, total bytes taken by files, total bytes free, number of files and number of directories.
Like most DOS commands DIR can take a number of arguements as input. Arguements are usually passed in with a / character. For example to list directories in a wide format type DIR /W. If you’re curious to know about the other arguements to DIR or any other command just type the command followed by a /?. For example, DIR /?:
C:\>DIR /?
Displays a list of files and subdirectories in a directory.
DIR [drive:][path][filename] [/P] [/W] [/A[[:]attributes]]
[/O[[:]sortorder]] [/S] [/B] [/L] [/V]
[drive:][path][filename]
Specifies drive, directory, and/or files to list.
(Could be enhanced file specification or multiple filespecs.)
/P Pauses after each screenful of information.
/W Uses wide list format.
/A Displays files with specified attributes. (Defaults to /ADHSRA)
attributes D Dire……..
The next thing you’ll probably want to do is be able to navigate into different directories. To do this we use the Change Directory, CD or CHDIR command. CD and CHDIR do the same but I like to use the CD command since it’s much shorter to type on the command line then CHDIR. To use the CD command type CD followed by the path that you wish to change to. For example if I wanted to navigate to the directory C:\GAMES\DOOM I’d type (at the C prompt):
<C:\>CD \GAMES\DOOM\
Followed by the enter key. DOS changes the directory which is reflected on the command prompt:
<C:\GAMES\DOOM>
Unlike the DIR command the CD command does not really give any indication of what happened. This is why the prompt is so useful and what it’s used for. Oh, by the way another useful tip CD .. changes to the previous directory.
Now that you can list directories and files, change directories and change drives you maybe interested in creating directories and removing directories. Well these commands are easy to use, just follow along. At the C: prompt (or any other drive for that matter) you can create a directory. Let’s say we need a directory to store your pictures from your digital camera. Let’s call this directory PICTURES.
To create the directory just type the Make Dir command, MKDIR followed by the directory path and name. For example:
<C:\>MKDIR PICTURES
or
<C:\>MKDIR C:\PICTURES
Both of the commands create the directory PICTURES in C:\.
Well that’s great! Now you have a directory to store your pictures, next you’ll need to copy them in from a floppy drive. So you pop the floppy disk into the drive.
Action Star KVM 4-Port Switch
by admin on Jun.10, 2009, under Computers, Daily
So I purchased an Action Star KVM switch (modelPK-4PA0-a). This particular switch has four computer ports. All ports have a ps2 keyboard and a ps2 mouse input as well as a vga input. The reason I went with a ps2 switch instead of a usb switch is because I need this switch to work with my 486 dos computer. I figured that since the specs for the switch listed almost every operating system except dos, that things might work fine in dos.
Upon receiving the switch I opened the package, this particular model comes with 4 kvm cables, one for each port. The kvm does not require any external power to work, so I did not need to worry about which device to unplug from the wall socket. I plugged the switch into my linux box and then plugged one of the ports into my tv tuner box (which has vga out).
Then I powered up my linux box. Things went along fine for a while, but I wanted to see if the tv tuner would work so I switched to the tuner. Bam! The tuner worked perfectly even though the switch did not have the keyboard our mouse ps2 sockets plugged into the switch for that particular port.
I watched a few tv commercials in discust and switched back to linux. Then back to slashdot, I followed a few links and then my mouse started acting odd! Everytime I’d scroll up the browser would go to the previous page!
Upset, I decided to google for some answers and I found some.
The reason the mouse gets all wonkey after a switch is because the switch disconnects the mouse from power completely. For usb mice and mice with scroll wheels there are two modes that the mouse can be used in, basic and advanced. The basic mode only allows three basic mouse buttons and the advanced mode allows more buttons such as scroll, scroll click, and the left and right thumb buttons.
When the mouse gets disconnected it looses power and gets put back into the basic mode. This causes some os’s to get a little weird because they still “think” the mouse is still in advanced mode. This causes the mouse to act spirraticly sometimes causeing the mouse to track wrong or click incorrectly.
In linux there are settings that you can set in your kernel or modprobe.conf to fix this issue. In my case I used:
options psmouse proto=exps
options psmouse resetafter=10
This tells the psmouse module to use the exp protocol, and after 10 bad packets reset the mouse driver.
My only concern now is, will my mouse get all weird in dos now? Will I have to save up and purchase a better kvm to get the mouse to work in dos? Only time will tell. I get my old 486 dos computer Friday. Sometime next week I’ll update this post with my findings.
More information on the mouse/kvm issue can be found at Erratic Mouse Behaviour with mouse… website.
486 for fun
by admin on Jun.06, 2009, under Computers, Daily
So I’ve decided to bring back some old memories and poke around with freedos on an old 486. The problem was I didn’t have a 486 to poke around with and I do hate emulators. For several weeks I’ve been watching ebay for sales on old computers when I found this one:
The ebay user had it listed for a price of over $300 with a buy it now of $375. Wickedly-Fast 486 at the price of a new netbook. I laughed for about 5 minutes over that one.
The specs for this michine were quite a read though, but I was still not convenced it was worth over $150. It had a new AT case, 515mb harddrive, a 5 & 1/4 floppy, 3.1/2 floppy, cdrom as well as 32mb of ram. None if this really impressed me . What impressed me was the sound blaster awe 32 (confirmed to work in dos) sound card and the motherboard which had three pci slots! With one free pci slot I could put this 486 on the network with a little effort.
Taking advice from a business class I took in college I decided to contact the seller even though he didn’t have the “Make an offer” button on the listing.
Dear socaleer,
Hello,
I’d like to purchase this system, however I feel that your asking too much. Can you make the price negotiable?
Thanks
-fefe_l33t
At first I decided to see if he’s willing to haggle for the computer. I realized that at the price he’s asking for this system he’s not likely to get any buyers for the first listing, so I had a little more wiggle room as far as negotiations.
Dear fefe_l33t,
I may have some flexibility in price at the low-end, but not too much. This is the ultimtate fast 486 system in a brand new case, with new power supply, and a combo floppy drive so it has real value. What are you willing to offer?
-socaleer
This guy is ridiculous, he thinks he’s got hot shit listed on ebay. But I know better then that. My offer was intentionally low and I did not want to hint to him what I was really after (the soundcard and motherboard). I don’t care much for an old keyboard, mouse or crappy old software like windows 3.1, so I took off the items I care less about.
Dear socaleer,
Since most netbooks are around $275, I’ll offer 150$ for the lot without keyboard, mouse or software.
-fefe_l33t
I thought netbooks as a basis for the purchase price was a good idea, especially since everyone wants a netbook these days and they are extreamly cheap.
Dear fefe_l33t,
Tell you what, $160.00 and you have a deal. My PCs are very well-packed (see my feeback) and ship via FedEx, fully insured, with tracking info sent to you. If you agree on $160.00, let me know and I will edit the auction ASAP to a $160.00 BIN auction for the PC only. Regards…
-socaleer
$160, I can handle that. So I accepted his offer, he changed the price listed and now I have a 486 on the way.
In case your curious, that advice I spoke about from the business class (see above) was, “All prices are negotiable”
Missing peanut butter
by admin on Jun.04, 2009, under Daily, General
When I came home today from work I couldn’t find my peanut butter!
I looked in my room,
I looked in my kitchen!
I looked in Dalton’s room,
I looked in my family room!!
I was about to give up until… until!
I heard it, I heard it calling from the fridge.
I walked up to the fridge door, put my hand on the door and opened it.
And there it was! Staring at me, that gooey, sticky, peanutty butter.
I stared back.
and it sat there. It did nothing.
I winced at it, and it did nothing.
I grabbed it! It did nothing.
and then!
and then!
I opened it, took a spoon and dipped it in the peanut butter.
Yum! It was good.
GOG – Beneath a Steel Sky
by admin on Jun.01, 2009, under Computers, Gaming
A couple of co-workers mentioned gog.com (good ole games) as a great place to pick up old game classics. Of course I couldn’t resist trying to get one of these Good Ole Games working on my linux box and here it is.
The first game I tried was Beneath a Steel Sky, it’s free for download once you sign up for an account. The game uses SCUMMVM which has been ported for Windows, Linux and many other operating systems (I think even palmos!). SCUMMVM is an old adventure game engine origonally written for games such as Indianna Jones and The Fate of Atlantis, the Kings Quest series and many other classic adventure games.
The hard part was getting the game files out of the executable that GOG gives you. During inspection of the exe with a hexeditor I noticed that it was written using the borland installer. Unfortunatly, I know very little about the format and instead of fiddling with the game I decided to run it in wine. As WINE’s site says, wine is not an emulator. Wine allows windows executables to run natively on linux (and other operating systems) with a little work.
When I ran the setup program in wine some of the fonts were a bit screwy and the screen was kind of off, but it was enough to get the game extracted from the executable.
The next thing I had to do was run SCUMMVM and get the game setup and running. When I launched ScummVM it had a start up menu. In this menu I selected “Add Game…” then I browsed to the installation directory of Beneath a Steel Sky (/home/<login>/.wine/drive_c/Program Files/GOG.com/), selected Beneath a Steel Sky then clicked “Choose”. I selected DOS for the platform and clicked “OK”.
Once the game setup was done I clicked “Start” and enjoyed Beneath a Steel Sky without ever having to touch Windows.
