To play DOS games of a 'Live MS-DOS CD' we will use this technique to create a bootable MS-DOS CD. Note that we'll be using a Linux environment to create the CD, but the CD itself will be MS-DOS (v7 or 'the MS-DOS from the Windows 98 Emergency Disk')
Start by collecting your DOS games in a working directory. Organize them so that
By creating a consistent directory structure, we'll be able to create a simple menu to start the games later. You want something like this :
--remaster/ |--dosgamecd/ |-- boot.img - image of a DOS boot floppy or a windows 98 setup disk | |-- misc. system files - will be added later (additinal DOS commands, menu.bat and other batch files, ...) | |-- GAMES/ |-- CARMEN/ | -- "Where in the World is Carmen Sandiego" game files |-- PRINCE/ | -- "Prince of Persia" game files |-- PACMAN/ | -- "Pacman" game files |-- PONG/ | -- "pong" game files (pong.exe, ...)
the boot.img is an image of a DOS bootable floppy or a Windows 98 setup disk that provides a DOS kernel, and some routines to create a RAM Drive and provide access to the CD drive. Refer to bootable MS-DOS CD
In each game subdirectory, create a start.bat that starts the game. This allows you to identify the games by the directory name and allows you to use a 'dir /AD /ON /B' command to list all games. The start.bat could simply call the relevant executable, or do some additional configuration first, add command line switches if any, or copy the entire game to a RAM drive and run it from there (the CD is read-only, but a RAM drive is writable - some games may require a writable working directory to keep score tables and such). This is something that needs to be tested for each game, and probably not all games will work.
REM sample PONG start.bat pong.exe
REM sample TETRIS start.bat to run from RAMDISK copy TETRIS\*.* %RAMD%:\ %RAMD%: tetris.com
such a menu could then look something like this :
@echo off REM this file should be caled "PLAY.BAT" so you can call it with "play name_of_game" REM CD drive is assumed to ve X:\ - this is set in config.sys / autoexec.bat of boot image :main if "%1"=="" GOTO usage GAME=%1 X: CD X:\GAMES REM This DIR shows folder names to choose games from DIR /AD /ON /W REM Trying to find executable for selected game REM looks for start.bat or name_of_game.[ bat | com | exe ] CD %GAME% if exist start.bat CALL start.bat if not exist start.bat %GAME% GOTO usage :usage ECHO. ECHO type ECHO PLAY name_of_game # eg. PLAY CARMEN GOTO fini :FINI CD X:\ SET GAME=
On the floppy that you will use to create the boot CD, edit or create an autoexec.bat that has as final statement
%CDROM%:\play.bat. This will give you the menu right after booting the CD, allowing you to easily choose a game to start playing.
An alternative menu can be created by adding the DOS choice.exe to the floppy image or the CD, and use that in a menu.bat such as this :
@ECHO OFF :menu CLS ECHO. ECHO. ECHO 1 - Where is Carmen Electra ECHO 2 - Prince of Persia ECHO 3 - Tetris ECHO. ECHO _____________________________ ECHO choose a number CHOICE /N /C:123456789 FOR %%i in (9 8 7 6 5 4 3 2 1 ) do IF ERRORLEVEL %%i GOTO L%%i :L1 cd CARMEN CARMEN.EXE goto READY :L2 cd PRINCE PRINCE.EXE goto READY :L3 cd TETRIS call start.bat goto READY :READY cd \ goto menu
Add menu.bat to the working directory, so it will be included when creating the CD.
Set a fixed drive letter for the CD drive (in boot floppy autoexec.bat), eg X:\
Create a 2nd batch file on the CD, eg X:\configure.bat, and call it from the boot floppy's autoexec.bat. Use configure.bat to modify the configuration (eg copy or remove files from the ramdrive, (re-)set COMSPEC or TEMP variables, ...
The ramdrive's drive letter will be the next available letter, and therefore depends on the number of partitions on the computer where you run the CD. You can capture the RAMDRIVE drive letter in a variable by repeating the findramd.bat routine, eg in X:\configure.bat
set LglDrv=27 * 26 Z 25 Y 24 X 23 W 22 V 21 U 20 T 19 S 18 R 17 Q 16 P 15 set LglDrv=%LglDrv% O 14 N 13 M 12 L 11 K 10 J 9 I 8 H 7 G 6 F 5 E 4 D 3 C cls call A:\setramd.bat %LglDrv% copy a:\command.com %RAMD%:\command.com set comspec=%RAMD%:\command.com set temp=%RAMD%:\tmp set tmp=%RAMD%:\tmp path=%RAMD%:\;a:\;a:\command;X:\ echo RAMDRIVE is %RAMD% X: cd \ dir /ON /AD /W
see Bootable images
see Bootable images
boot the CD, and choose from the menu. The CD can also be used on a working (DOS or) Windows 9x system : just navigate to the CD-drive, and run the menu, or go into the GAMES subdirectories and click a start.bat.
You can add a graphical user interface in stead of a text menu with DOS GUI's such as Dosshell or Arachne Web Browser for DOS.
To use Arachne Web Browser, it's best to get Arachne installed and set up on a working DOS/Win98 system, then copy its configuration over to the CD remastering directory. You may also want to install a mouse driver. Note that this uses up quite a bit of memory - You'll need to manage the memory (himem.sys, emm386.exe, ... to make this work)