VOGONS


First post, by gaula92

User metadata
Rank Newbie
Rank
Newbie

I'm running Dosbox with the SDL API running on Directfb, wich in turn runs on the uvesafb framebuffer. It's a great solution, with minimal overhead. In fact it uses less CPU % that the OpenGL backend on Nvidia binary drivers (almost 5% faster than OpenGL in Super Frog and Jazz Jackrabbit).

To archieve it, I must not use any sacalers, of course, and the color depth must be 32 bit in the framebuffer video mode, since the uvesafb is NOT accelerated and things like color conversion and scaling would be done in software, destroying the original purpose of the whole thing.

But I'm facing some problems:
I would need the exact video modes for DOS games, so I can include them in /etc/fb.modes.
I know SuperFrog runs somewhere near 320x240@59.61HZ, and Jazz runs at 320x200@70HZ if one uses the "jazz.exe /VGA" parameter when launching the game from within DOSBOX.
In fact, I have some video modes with those refresh rates defined for X,and the Opengl side works perfect with those modes (not exactly 320x200 or 320x240 but multiples with the same refresh rates).

I've tried using the default 320x200@85Hz and 320x240@85hz included in /etc/fb.modes, but even if Jazz runs great in 320x200@85HZ, SuperFrog has skippy scroll in 320x240@85hz...

Does DOSBOX's default emulated S3 video card include VESA 2.0 support so I can control the mode 13h and mode-X refresh rates (with Univbe or some other tool) from withing DOSBOX so I can create EXACT equivalents in /etc/fb.modes?

regards

Reply 2 of 7, by gaula92

User metadata
Rank Newbie
Rank
Newbie

Ok, but I have another doubt related to DOS video modes:
Why does /etc/fb.modes say 320x200 is 85HZ? Does it make any sense from dosbox's viewpoint? I mean, isn't mode13h 320x200@70 and mode-x 320x240@60HZ?
Why are both modes listed as 85HZ all around the net??

Reply 4 of 7, by TeaRex

User metadata
Rank Member
Rank
Member

Does /etc/fb.modes use the same kind of modelines as /etc/X11/xorg.conf? If so, you can use these. They cover all standard VGA modes (including the CGA and EGA emulation modes) and most of the common Mode-X modes, but not SVGA or real pre-VGA hardware. The timinings come from various websites and some calculations of my own. The clock rates are based on the assumption that the VGA's horizontal frequency is exactly twice as high as in NTSC, which at least seems to be the idea.

In theory, they should all be compatible with a real 1987 VGA monitor, but don't blame me if yours blows up.

There is one deviation from real hardware: in xorg.conf, the doublescan modes can only use even numbers of lines, not just for the screen, but also for the vsync and vertical blanking areas. Lines that end in 263 should really have 262.5 instead but this is not possible in X, or at least I don't know how.

    ModeLine     "720x480_60" 28.321678321678 720 738 846 900 480 490 492 525 -hsync -vsync
ModeLine "360x480_60" 14.160839160839 360 369 423 450 480 490 492 525 -hsync -vsync
ModeLine "720x400_70" 28.321678321678 720 738 846 900 400 412 414 450 -hsync +vsync
ModeLine "360x400_70" 14.160839160839 360 369 423 450 400 412 414 450 -hsync +vsync
ModeLine "720x350_70" 28.321678321678 720 738 846 900 350 387 389 450 +hsync -vsync
ModeLine "360x350_70" 14.160839160839 360 369 423 450 350 387 389 450 +hsync -vsync
ModeLine "720x240_60" 28.321678321678 720 738 846 900 240 245 246 263 -hsync -vsync doublescan
ModeLine "360x240_60" 14.160839160839 360 369 423 450 240 245 246 263 -hsync -vsync doublescan
ModeLine "720x200_70" 28.321678321678 720 738 846 900 200 206 207 225 -hsync +vsync doublescan
ModeLine "360x200_70" 14.160839160839 360 369 423 450 200 206 207 225 -hsync +vsync doublescan
ModeLine "640x480_60" 25.174825174825 640 656 752 800 480 490 492 525 -hsync -vsync
ModeLine "320x480_60" 12.587412587413 320 328 376 400 480 490 492 525 -hsync -vsync
ModeLine "640x400_70" 25.174825174825 640 656 752 800 400 412 414 450 -hsync +vsync
ModeLine "320x400_70" 12.587412587413 320 328 376 400 400 412 414 450 -hsync +vsync
ModeLine "640x350_70" 25.174825174825 640 656 752 800 350 387 389 450 +hsync -vsync
ModeLine "320x350_70" 12.587412587413 320 328 376 400 350 387 389 450 +hsync -vsync
ModeLine "640x240_60" 25.174825174825 640 656 752 800 240 245 246 263 -hsync -vsync doublescan
ModeLine "320x240_60" 12.587412587413 320 328 376 400 240 245 246 263 -hsync -vsync doublescan
ModeLine "640x200_70" 25.174825174825 640 656 752 800 200 206 207 225 -hsync +vsync doublescan
ModeLine "320x200_70" 12.587412587413 320 328 376 400 200 206 207 225 -hsync +vsync doublescan

tearex

Reply 5 of 7, by gaula92

User metadata
Rank Newbie
Rank
Newbie

@TeaRex: Thanks a lot, but I've found out that I just can't use arbitrary video modes with arbitrary frequencies on the UVESAFB framebuffer in Linux (I should have read that before trying to specify those custom modes in /etc/fb.modes)

That said, I need another solution to make MODE-X games perfectly smooth here...

Reply 7 of 7, by gaula92

User metadata
Rank Newbie
Rank
Newbie

No, there isn't. It's a NV50 chip. NV50 is not supported by nvidiafb, and nouveau, the new nvidia framebuffer/driver, doesn't allow arbitrary framebuffer refresh rates from from fbset.
If you guys know about another native framebuffer for NV50 cards, then tell me 😀