Menu

#539 Retrace in text mode

fixed_in_git
open
nobody
None
5
2014-06-12
2014-06-11
Andrew Bird
No

Hi all,
I have a dos program (can't distribute, sorry) that does lots of writes to the screen in one of those old text based user interfaces. I'm not sure which toolkit was used to create it, but it definitely wasn't turbo vision. It's far slower on dosemu than a windows xp cmd window. I've found that switching to use the OLD_CGA_SNOW_CODE in src/env/video/miscemu.c helps dramatically, presumably because it avoids a call to gettimeofday(), but I'm wondering if code waiting for the retrace in text mode makes any sense at all? Could it be shortcut?

WinXP XP 65 secs.
Current devel 500 secs.
Current devel + switch to OLD_CGA_SNOW_CODE 215 secs.

Dosemu command line

bin/dosemu.bin -n --Fimagedir tmp-image -t -I "cpuemu off video{vga}"

Discussion

  • Stas Sergeev

    Stas Sergeev - 2014-06-11

    presumably because it avoids a call to gettimeofday()

    No because its now cached.

    but I'm wondering if code waiting for the retrace in
    text mode makes any sense at all?

    I think this is a question for an author
    of your prog, right?

    Could it be shortcut?

    Maybe somewhere in an options of your prog.
    Why would we care?
    As the comment in the code says:


    • Wait 20 milliseconds before we tell the DOS program that the VGA is
    • in a vertical retrace. This is to avoid that some programs run too
    • fast in Dosemu

     
  • Andrew Bird

    Andrew Bird - 2014-06-11

    Hi Stas,
    I'm not just in the business of fixing performance for one old DOS program, I thought it might be helpful to share the info on the speedup I found. It seems silly to cripple performance for other programs on the basis that "some programs run too fast in Dosemu". Anyway please close this.

     
  • Stas Sergeev

    Stas Sergeev - 2014-06-11

    silly to cripple performance for other programs on the basis that

    This is just the way some progs are using
    to synchronize their speed. It is more
    common to use timer for synchronization,
    but some are waiting for retrace. We can't
    just remove this.
    How fast is it under pure dos? (not xp)
    Maybe the delays should be shortened.

     
  • Stas Sergeev

    Stas Sergeev - 2014-06-12

    How fast is it under pure dos?

    OK OK, under dosbox. :)
    I think the best fix is to find an
    option in your prog and disable the
    retrace waiting. Or patch it out with
    hiew.

     

Log in to post a comment.

MongoDB Logo MongoDB