At the top of your program after the SYNC RATE is set, try including the line
cls : sync
That seems to sorta set things up sometimes.
Something to check is inside the setup.ini file which should live in the same directory as DB.exe. There is a flag blitflipmode . If it is set to zero, try setting it to one:
blitflipmode=1
If it is set to one, try setting it to zero. I wrote up a description about it some years ago based on my limited understanding of Direct X 7. It seems to make sense but I haven't really thought about it for a while. Anyway, here is the description
Quote: "blitflipmode Whenever the screen is blitted, display graphics information is basically copied from one area of memory to the other. If a screen is flipped, a pointer to where the display information is in memory, is changed. Flipping is faster than blitting. In windowed mode, graphics are blitted. In fullscreen mode, it seems graphics buffers are flipped. Sometimes, because of video card drivers and the setup of the graphics card, flipping may cause some display problems with DBC - like slow downs, or a disappearing mouse. In these cases, you would set blitflipmode to 1 so that all graphics are blitted through the Windows Graphics Device Interface (GDI). Sometimes when 2d is rendered with 3d, the 2d graphics may flicker or flash. If there are multiple SYNCS called in the program, the 2d portion of the screen that overlaps the 3d portion will be erased and redrawn. If blitflipmode is set to 1, the overlapped portion may flash (because it is being redrawn pixel by pixel); if blitflipmode is set to 0, it will not flash (because the whole image is flipped at once). In general however, I've found most display problems are corrected with blitflipmode=1
"
This also implies that you should included a copy of setup.ini with your executable of your game.
Another possibility: With modern windows OSs there can be some forced timing issues that come with modern Direct X. No matter what the SYNC rate is set to, DBC will lock to a generic sync rate of 60 fps. This isn't the actual screen redraw rate, this is the iteration rate of a loop with a sync command in it:
do
sync
loop
This loop would be forced to run at 17 milliseconds per iteration.
To get around this limitation, load and play a midi or mp3 file as MUSIC (not a sound) at the start of your program. This somehow allows the iteration control back to DBC so you can set whatever sync rate you like. This may also help in controlling the flashing that may be tied to aa imposed limit on synchronization.
One other thing to try, is setting up your own "page flipping" so to speak. You create a background bitmap, do all of your 2d drawing there (including text), and then copy the background bitmap to screen zero (the drawing area):
sync on
sync rate 60
create bitmap 1,bitmap width(0),bitmap height(0)
do
rem the current bitmap is set to 1 right now so do our drawing there
cls
text 0,0,"I'm being drawn on bitmap 1"
text 0,20,"My fps is "+str$(screen fps())
rem copy bitmap 1 to 0. This effectively clears screen 0
copy bitmap 1,0
sync
loop
If you are mixing 2d and 3d, this method will draw over any 3d unless you set DRAW TO BACK before you do your bitmap copy:
sync on
sync rate 60
create bitmap 1,bitmap width(0),bitmap height(0)
rem draw all 2d behind 3d
draw to back
do
rem the current bitmap is set to 1 right now so do our drawing there
cls
text 0,0,"I'm being drawn on bitmap 1"
text 0,20,"My fps is "+str$(screen fps())
rem copy bitmap 1 to 0. This effectively clears screen 0
copy bitmap 1,0
sync
loop
Enjoy your day.