Hi folks,
This is a question specific for you Dos game programmers:
I programmed a game and want it to run with a fixed speed whether it runs on a 286,386,486 cpu.
This is the code I used to maintain a fixed speed:
// set timer rate to default
Change_Timer(TIMER_18HZ);
Old_Isr = _dos_getvect(TIME_KEEPER_INT);
_dos_setvect(TIME_KEEPER_INT, GameLoop);
// GameLoop is the game loop function
while(!done);
// replace old ISR
_dos_setvect(TIME_KEEPER_INT, Old_Isr);
Under DosBox emulator and also under DosBox Magic for android phones it works pretty good with the same fixed speed even when I changed cpu speeds.
The problem arose when I tried to run my game under MS-Dos 6.22 virtual machine under VMWARE software.
The game just wan't load at all while other DOS games run normally.
From what I noticed is that the problem is with the dos_setvect(TIME_KEEPER_INT, GameLoop) command.
If I put my game loop inside a while() loop command without dos_setvect function, the game loads under VMWARE but the speed is totally crazy, it's to high.
So my question is whether my game loop with dos_setvect(TIME_KEEPER_INT, GameLoop) command is correct or not
and why it wan't load under VMWARE where I installed DOS v6.22 ?
Thanks in advance for any help.