VOGONS

Common searches


Timing patches

Topic actions

First post, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Fix start discrepancy (20sec) between DOS clock and RTC. ("beautification" 😉)

Attachments

  • Filename
    dostimestart.diff
    File size
    1.85 KiB
    Downloads
    82 downloads
    File license
    Fair use/fair dealing exception

Reply 1 of 71, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Port I/O on the ISA-Bus is not arbitrarily fast. Each I/O-access takes about 1-2 microseconds. This fixes:

- timed joystick in Terminal Velocity: coordinates don't wrap at high cycles
- timed joystick in Descent 2: it doesn't go crazy at high cycles
- Checkit detects timed joystick even above something like 2000 cycles
- timed joystick calibration depends less on the cycles value in lot's of games
- Titus the Fox detects Adlib even at 50000 cycles
- Prince of Persia detects adlib reliable at 9000 cycles and sometimes (around every 10th try) at 50000
- In some situations (i.e. title screen) some games take less CPU
- This is the first of three patches needed to make Archon Ultra and The Horde run kind of bullet-proof in DOSBox.

Attachments

  • Filename
    iodelay.diff
    File size
    1.66 KiB
    Downloads
    77 downloads
    File license
    Fair use/fair dealing exception

Reply 2 of 71, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Change the timer hack to stick to the correct time.
This is the second patch needed by Horde/Archon.

Attachments

  • Filename
    systimer.diff
    File size
    1.16 KiB
    Downloads
    74 downloads
    File license
    Fair use/fair dealing exception

Reply 3 of 71, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

VGA blanking / retrace improvement

- It makes the second part of the panic demo run at correct speed.
- the workaround for tearline in Tyrian is not necessary any more.
- No tearline in a demo "show.exe" at the magic circle.
- Has a positive effect on Fury ingame with dynamic core.
- It is the 3rd needed for Archon/Horde.

Attachments

  • Filename
    vgablanking.diff
    File size
    10.14 KiB
    Downloads
    80 downloads
    File license
    Fair use/fair dealing exception

Reply 7 of 71, by vasyl

User metadata
Rank Oldbie
Rank
Oldbie

Excellent job. I was wondering about that port i/o speed for quite a while -- it's great that it works. That was single most annoying issue in DOSBox. I will have to check if that also fixes Goblins 3 installer. BTW, do those VGA changes fix KQ6 intro? I would not be surprised. In that case my "vgaparts" patch can be declared obsolete. The SVGA patch may have to be updated but that should be fairly straightforward.

Reply 8 of 71, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

moved to the patches area.
Can somebody test kq6 intro ?
The vga changes are rather large and the lines are rather long. So I'm having a bit of trouble deciding the correctness of the changes.
I'll test tyrian at my pc as I 'm the one who is suffering from it the most.

Water flows down the stream
How to ask questions the smart way!

Reply 9 of 71, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

A build with the patches:
http://home.arcor.de/h-a-l-9000/dosbox_files/dosbox_t.zip

I've attached a little piece of documentation of how the vga patch should work.

Attachments

  • Filename
    vgatiming.png
    File size
    11.98 KiB
    Downloads
    32 downloads
    File license
    Fair use/fair dealing exception

Reply 11 of 71, by vasyl

User metadata
Rank Oldbie
Rank
Oldbie

KQ6 intro looks fine in hal's build.

Are you sure? I just checked -- I am seeing the same problem as before 🙁 Running at 12K cycles normal core; KQ6 from Roberta Williams Anthology.
Checked Goblins 3 installer -- that's funny, it's been working for a while. Tried a few of ykhwong's builds: the installer did not work (error -7) in all builds before March 2006, crashed the DOSBox in April and May, and mysteriously started working reliably in June. Go figure.

Reply 12 of 71, by Kippesoep

User metadata
Rank Oldbie
Rank
Oldbie

I can confirm vasyl's findings about the KQ6 intro: no joy there.
It does however fix Turbo Outrun (which had the cars flickering in VGA mode while running fine in the seemingly identical MCGA mode -- even in 0.66b2).

My site: Ramblings on mostly tech stuff.

Reply 13 of 71, by rcblanke

User metadata
Rank Oldbie
Rank
Oldbie

I was using 10.000 cycles normal core and for me using HAL's build the intro looks slightly better than when using plain CVS; movie hiccups only rarely occur. But you're entirely correct; your 'Changes to scheduled rendering' patch has a much better effect, resulting in almost fluent animation.

Reply 14 of 71, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

do iowrites need the same delay as reads ?
I was thinking that a write could be a fire and forget operation.
instead of a reads needs to wait for the reply

Wouldn't these delays slow down certain graphics modi ? Like EGA ?
Futher I think that Delay should be after the exception check, but that is minor.

Water flows down the stream
How to ask questions the smart way!

Reply 15 of 71, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

> do iowrites need the same delay as reads ?

This could depend on how smart the chipset is. I did a test on the 386sx which looped 4000 times ior and 4000 times iow. Both loops took about 8 milliseconds (loop code execution is included). Though with iow -> iow it just has to wait until the previous I/O operation completed.

> Wouldn't these delays slow down certain graphics modi ? Like EGA ?

As on a real computer (if the delay value is correct). So there are some EGA modes that use I/O a lot?

> Futher I think that Delay should be after the exception check, but that is minor.

Sounds good.

I've found the KQ6 thread and tried epic pinball - that one needs the "Tyrian workaround" or the ball gets invisible near the top of the screen.