VOGONS


First post, by Ceddie

User metadata
Rank Newbie
Rank
Newbie

Hello,
I'm investigating DOS game GOOB (Keypunch Software, 1986-ish, part of "Arcade 1") that uses the DOS system clock as a 60-second game timer.

At the beginning of gameplay, it resets the system clock to midnight using DOS function 2Dh:

MOV AH, 2Dh
INT 21h

It then repeatedly reads the clock using function 2Ch:

MOV AH, 2Ch
INT 21h

The game ends when the time reaches 00:01:00.

Problem: In DOSBox, the game immediately ends because the system clock apparently isn't being reset to 00:00:00.

Changing the executable's timer comparison from 00:01:00 to 23:59:59 allows gameplay to proceed, confirming that the clock comparison is responsible for the immediate termination.

Question: Does DOSBox support INT 21h / AH=2Dh (Set System Time)? If not, is there a workaround that doesn't require patching the executable?

Reply 2 of 3, by DaveDDS

User metadata
Rank Oldbie
Rank
Oldbie

Seems an odd way to tell 60 secs ... trash the system clock.

I'd justs read the BIOS 55ms clock "tick" at start, then test if: (currect_tick - startup_tick) >= 60x55

Pretty sure DosBox doesn't support time set - and you wouldn't want it to because that would trash the host time!

Haven't tested this, but IIRC DOS maintains it's own time-of-day as early BIOS didn't know time and you always had to set it at system boot.

Does this game fit on a 1.44m floppy disk (with enough room for "bare" DOS)?

You could make an image for a DOS boot disk for it, and boot that under DosBox (with a little autoexec you could make the game launch automatically)

If for some reason that doesn't work, you could try under another more complete system emulator like PCEM, 86BOX, VMWARE, VirtualBox

https://dunfield.themindfactory.com ; "Daves Old Computers" ; SW dev addict best known:
ImageDisk: rd/wr ANY floppy PChw can ; Micro-C: compiler for DOS+ManySmallCPU ; DDLINK: simple/small filetransfer(w/o netSW)via Lan/Lpt/Com

Reply 3 of 3, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

A few games set the system clock to 00:00:00 as a crude method to process elapsed time. It's most often done by games programmed in BASIC, even if a compiled form of it. DOSBox SVN supports this specific use of the system clock, but 0.74(-3) does not.