How do I set up XP to program Door games?
How do I make the Windows XP screen wider?
How do I create a folder to share between machines?
How do I install Turbo Pascal 7.0 under Virtual Box?
How do I prepare Turbo Pascal for programming Door games?
How do I compile all the TPUs in order to set up the DoorKit?
How do I quickly compile the files I need to set up the DoorKit?
What does a small test game look like?
How do you test your first game?
How do I set up XP to program Door games?
In order to start programming Door games, you need to set up a development environment in Windows XP to run Tubro Pascal 7.0.
Virtual Box will allow you to run Windows XP, and you can get the O/S from archive.org.
1. Download and install Virtual Box: here
2. Download Windows XP from archive.org: here
Setting up Windows XP under Virtual Box:
( Virtual Box needs Windows 11 Pro to enable the virtual machine )
Open Virtual Box and hit Control-N to create a new machine:
Name the machine and set the folder. The default will work, but you might want to choose another location. Next, ensure the Type is set to Microsoft Windows, and the Version is Windows XP (32-bit):
Under the Hardware tab, set Base Memory to 2048 MB and the Processors to 4 CPUs:
Under Hard Disk, all the information should be correct. So go ahead and hit Finished:
Now start your new virtual machine:
You'll need to insert the media. Point the program to the Windows XP ISO. Then hit Mount and Retry Boot:
Set up Windows XP as you would normally, using the install key from archive.org:
How do I make the Windows XP screen wider?
To widen the screen, install the Guest Edition CD Image that came with Virtual Box. Then, you'll have to change some of the machine settings.
On the top bar of Virtual Box, click the Devices option and then Insert Guest Additions CD Image from the dropdown menu:
Autoplay the CD and follow the install instructions:
After installing the image, choose to manually reboot later and then Turn Off Computer using the Start button:
Open the Settings in Virtual Box for your machine:
Under Display, increase the Video Memory to 128MB and select VMSVGA for the Graphics Controller:
Start the machine, and when it comes up, you'll have to accept all the new hardware that is found:
It will say, cannot install this hardware. Make sure you check: Don't prompt me again. Then Finish:
Choose the display properties that you want:
How do I create a folder to share between machines?
There is a Shared Folders option under settings that will allow you to auto-mount a folder to a drive letter in Virtual Box.
Open the Settings in Virtual Box for your machine:
Under Shared Folders, click the folder with a + on it. Select the folder you want to share under Folder Path and then Auto Mount it to the E Drive. When you're finished, click OK to save the settings:
How do I install Turbo Pascal 7.0 under Virtual Box?
A floppy drive needs to be added to the virtual machine. Then, you can install Turbo Pascal from the disks.
1. Download Turbo Pascal 7.0: here
2. Download Turbo Pascal Patch: here
Open the Settings in Virtual Box for your machine:
Under System, turn off the Floppy and Optical Drive from the Boot Order:
Under Storage, click the green + box, Add Controller. Choose I82078 (Floppy) in the dropdown. Then click OK to accept:
Once the controller is added, click the + on the disk: Adds floppy drive. This will allow you to insert an image.
In the Floppy Disk Selector, click on Add. In the dialog box that opens, use the explorer to load your disk image file:
After selecting the disk image, choose it to add it to the controller. OK out of the settings and start the machine:
In Virtual Box, using Windows Explorer, go to the A Drive and run the Install program:
Install Turbo Pascal 7.0 using all the defaults:
Swap the disks when you need to by right-clicking on the disk icon at the bottom of Virtual Box. Choose the disk image and continue the installation. You need to do it for all 4 disks:
After it displays the PATH information, you are done with the disks:
You'll need to add the BIN folder to the PATH. Open the Control Panel and go into System Properties. Click on the Advanced tab and choose Environment Variables:
Under System Variables, click on the PATH. Next, click Edit. At the end of the line, add: ;C:\TP\BIN
OK out of all of it for the changes to stick.
Now, you need to apply the patch. Ensure you extract the zip to your Output folder, which you mapped to the E drive when you set up the virtual machine.
Start the virtual machine. Using Windows Explorer, make an Install folder under Documents. Then go to the Output drive (Z:) and copy the t7tplfix folder to the install folder.
Copy the Install\t7tplfix\t7tplfix.exe to C:\TP\BIN:
Make a backup copy of TURBO.TPL:
Execute t7tplfix.exe. Hit P to patch TURBO.TPL. Afterward, hit Q to quit.
After patching, use Windows Explorer to go into C:\TP\BIN and send the TURBO shortcut to the desktop.
The development environment for programming Door games is now set up. The last step before making them is setting up DDPlus by compiling the needed files.
How do I prepare Turbo Pascal for programming Door games?
DDPlus is a series of Pascal files that must be compiled to use the DoorKit. You'll need to copy the files over and change a few settings in Turbo Pascal.
1. Download DDPlus 7.1: here
Extract the DDPlus71.zip to the Output folder:
Start the virtual machine. Using Windows Explorer, copy the ddplus71 folder from the Output drive (Z:) to the Install folder under Documents:
In the Install\ddplus folder, copy over DVAWARE.OBJ and SLASYNC.OBJ to C:\TP\SOURCE:
In the Install\ddplus folder, sort by file type and copy over all the .PAS files to C:\TP\SOURCE:
Start Turbo Pascal. You need to input the path into the directories. Goto Options/Directories and fill in the path information:
Under Compile, set the Destination to be disk by clicking on it once to get it to go from Memory to Disk:
Under Options, select Linker and set it to Disk:
Change the directory that you load from. Under File, Change dir... Choose C:\TP\SOURCE:
To save the changes, under Options, click Save \...\TURBO.TP:
How do I compile all the TPUs in order to set up the DoorKit?
To compile a TPU, you must have all the file's dependencies. Turbo Pascal will throw an error if you don't. Setting up DDPlus requires many dependencies to be compiled before you end up with the final TPU.
Open (F3) the DDPLUS.PAS from the C:\TP\SOURCE folder:
Compile the program (Alt+F9). This will throw an error that it's missing the COMIO.TPU:
Load COMIO.PAS and compile that. You'll see it needs DDFOSSIL.TPU:
Load DDFOSSIL.PAS and compile that. This file will compile:
Close DDFOSSIL.PAS by clicking the green box in the upper left, going back to COMIO.PAS and compile it. It will fail needing ASYNC2.TPU:
Open ASYNC2.PAS and compile it. This file will compile:
Close ASYNC2.PAS going back to COMIO.PAS and compile it. You need DDIGI.TPU:
Open DDIGI.PAS and compile it. This file will compile:
Close DDIGI.PAS going back to COMIO.PAS and compile it. This time COMIO.PAS will compile:
Close COMIO.PAS going back to DDPLUS.PAS and compile it. You need DDSCOTT.TPU:
Open DDSCOTT.PAS and compile it. This file will compile:
Close DDSCOTT.PAS going back to DDPLUS.PAS and compile it. You need DDANSI2.TPU:
Open DDANSI2.PAS and compile it. This file will compile:
Close DDANSI2.PAS going back to DDPLUS.PAS and compile it. You need DDOVR.TPU:
Open DDOVR.PAS and compile it. This file will compile:
Close DDOVR.PAS going back to DDPLUS.PAS and compile it. You need DDOVR2.TPU:
Open DDOVR2.PAS and compile it. This file will compile:
Close DDOVR2.PAS going back to DDPLUS.PAS and compile it. It will finally compile:
Once you have the TPU you can start writing games:
How do I quickly compile the files I need to set up the DoorKit?
With all the .PAS files in the SOURCE folder, you need to compile them in this order:
DDFOSSIL.PAS, ASYNC2.PAS, DDIGI.PAS, COMIO.PAS, DDSCOTT.PAS, DDANSI2.PAS, DDOVR.PAS, DDOVR2.PAS, DDPLUS.PAS
What does a small test game look like?
This is the test program that comes with the documentation for DDPlus. Type it in and save it as NUMDOOR.PAS under the SOURCE folder. Then, compile it to make sure it works.
1. Download NUMDOOR.PAS: here
A detailed explanation of this process is in the DDPLUS.DOC file that comes with the package.
program numdoor;
uses ddplus;
procedure DoTheTitle;
begin;
sclrscr;
swriteln('Hello, '+user_first_name+
' '+user_last_name+
'. Welcome to NumDoor!');
swriteln('');
end;
procedure playgame;
var
thenum: word;
playerguess: word;
guessnum: byte;
done: boolean;
tempstr: string;
begin;
swriteln('I''m thinking of a number.'+
' Can you guess what it is?');
swriteln('');
guessnum:=0;
randomize;
thenum:=random(100)+1;
done:=false;
while not done do
begin;
inc(guessnum);
swrite('Guess #');
str(guessnum,tempstr);
swrite(tempstr);
swrite(': ');
sread_num_word(playerguess);
if playerguess> thenum then swriteln('Lower!') else
if playerguess< thenum then swriteln('Higher!') else
if playerguess= thenum then
begin;
swriteln('Correct!');
done:=true;
end;
if guessnum=10 then done:=true;
end; { end of while}
if thenum <> playerguess then
begin;
swriteln('You Lost!');
str(thenum,tempstr);
swriteln('The number was '+tempstr+'.');
end;
end;
procedure waitforkey;
var
ch: char;
begin;
swriteln('');
swriteln('Press any key to continue.');
sread_char(ch);
end;
begin;
initdoordriver('GAME.CTL');
dothetitle;
playgame;
waitforkey
end.
How do you test your first game?
After you have compiled your game, you need to set up a TEST folder. After getting all the files in place, you can use the command line or DOSBox to test the game.
1. Download DOSBox: here
Install DOSBox under the virtual machine:
Make a TEST folder under the C: drive:
From the Install\ddplus71 folder, copy GAME.CTL to the TEST folder:
Copy NUMDOOR.EXE to C:\TEST:
The files in the final folder:
Run DOSBox and enter the following commands:
mount C C:\TEST
C:
NUMDOOR/L
Executing NUMDOOR with the /L command tells the game to run in local mode, allowing for testing.
Your first game should look like this: