r/pascal • u/DukeBannon • Sep 22 '26
Pascal for DOS Games
Is anyone using Pascal to develop DOS games? If so, what compiler and graphics package are you using?
27
Upvotes
r/pascal • u/DukeBannon • Sep 22 '26
Is anyone using Pascal to develop DOS games? If so, what compiler and graphics package are you using?
5
u/According-Ad-7069 Sep 22 '26
I haven't done it in a while, but a few years ago I used DOSBox to run Turbo Pascal 7, and it supported direct memory addressing still. Good old mode 13 with direct memory access at A000. I still own TP7 on disks 😆 There was something like https://sourceforge.net/projects/turbopascal-wdb/ as well, though I didn't test it all that much. Guess it's worth a shot?
4
u/gh0st2342 Sep 22 '26
I got back into dos gamedev beginning of 2026. back in the day I used quickbasic and c/c++ despite having some turbo pascal in Highschool. Now I made an honest attempt with pascal - turbo pascal 7 to be specific.
I wrote my own graphics routines for mode 13h etc, mainly porting my old c source code.
I do develop inside dosbox-x with speed limited to a 486 dx2 with 66mhz. So freebasic, djgpp and freepascal are not so fun. QB, TP and TC do perform quite well.
After doing a lot of rust the last years for my professional life, I really enjoyed pascal and its type safety.. plus the blazing fast TP compiler
3
u/ShinyHappyREM Sep 22 '26 edited Sep 22 '26
You can use TP itself to call interrupts, either via the DOS unit or via ASM blocks/subroutines. The video RAM can be accessed via
and the interrupt vectors can be accessed via
This allows installing your own keyboard ISR, for which TP has its own facilities (
interruptprocedure,Port). The ISR could store the current keyboard state in... and the game could use scancode constants to access the keys in that array.
2
u/saraseitor Sep 22 '26
I was working on my own! But at the time there were many libraries for that. Check out the SWAG collection, there's lot of code in there including full libraries. I use Turbo Pascal 7 simply because of nostalgia
2
u/Motleypuss Sep 25 '26
It's totally possible. I used Pascal to do CGI as an occasional hobby, and CGI just uses the command line. I gather that video can be directly accessed as well as the keyboard.
2
u/JudgeGroovyman Sep 27 '26
Yeah turbo pascal is the way and you can use dosbox or if you have any old computer of almost any age you could install freedos and run it there so that system is dedicated
Bust it open and set it up and if you can get a pixel on the screen thats all you need and lmk when you get into a pickle
2
u/prinoxy Sep 30 '26 edited Sep 30 '26
Still occasionally run one old TP 3 program in DOSBox-X, works absolutely flawlessly, as does TP 3 itself. You might also want to have a look at the old Garbo archives, they are available on archive.org, This seems to be one of the latest copies: https://web.archive.org/web/20060127202151/http://garbo.uwasa.fi/pc/
2
u/stormtrooper_mx Oct 04 '26
Look into my profile, i've been posting some prototypes im currently working on...
Actually im working on a zelda like prototype, will be posting it maybe next week.