Skip to contentSkip to conversation

Changing an app to use linux framebuffer

DISCUSSION Simon Bridger 2 participants 4 messages Dec 2, 2002 – Dec 3, 2002

lore
Share & tools
lore
#0 lore raw

Hi Stas, thanks for the reply.

Slow is a nuisance, but it isn't terminally slow.

The showstopper is the mouse behaviour. What happens is this. When the mouse reaches the edge of the autotrax screen, autotrax pans, and moves its own mouse cursor back to the middle of the screen.
Meanwhile the Xmouse is still at, or off, the edge of the Xwindow containing xdos

Would it be possible to make an xdos session run fullscreen?
- on a specific desktop (which we aren't using for anything else)
- without borders, widgets etc. (since we are full screen we don't need any of that)
- with the xwindows mouse disabled/hidden (since autotrax is doing all its own mouse display)

Assuming the mouse problem is solvable, is there a way to rewrite the autotrax driver to make it faster when using the xdos screen?

As I had another look at it I also notice that the vesa drivers for 1024x768 and smaller work properly.
The 1280x? driver appears to have an address wrap around on screen, and the 1400x1050 driver crashes

regards
Simon

#1 lore raw
Quoted 4 lines · Simon Bridger

Would it be possible to make an xdos session run fullscreen?
- on a specific desktop (which we aren't using for anything else)
- without borders, widgets etc. (since we are full screen we don't need any of that)

ctrl-alt-f1 to switch to a console, login, type xinit /path/to/xdosemu -- :1
replace /path/to with where xdosemu (or xdos) really is.

Match the resolution of the X server with the xdosemu box (use ctrl-alt-+ and ctrl-alt--, edit XF86Config, whatever).

Now dosemu is running in X session :1 which is normally reached by Ctrl+Alt+F8.

Quoted 2 lines

- with the xwindows mouse disabled/hidden (since autotrax is doing all its own mouse display)

Use Ctrl-Alt-Home to have the mouse trapped (and again to de-trap it). Set
$_X_mgrab_key = "Home"
in dosemu.conf if ctrl-alt-home didn't work.

Quoted 2 lines

Assuming the mouse problem is solvable, is there a way to rewrite the autotrax driver to make it faster when using the xdos screen?

The way xdos works is to update the contents of the video buffer (dirty pages) periodically. So a video driver would play nice with DOSEMU if it updates the video buffer in chunks localized in pages (4k in size), rather than scatter stuff around more or less randomly. It will also help to have the X server running at the same bpp as autotrax expects. 8bpp would be quickest.
xinit /path/to/xdosemu -- :1 -depth 8
There are various options in dosemu.conf you can play with, too.

Bart

#2 lore raw

Thanks Bart,
the xinit .... gets it up on its own terminal nicely.

Does xdos accept vesa mode 0x140 (1400x1050)?
I can't get seem to get this mode going. (or any mode greater than 1024x768) I tried increasing the xframebuffer size from 2048K, but that had no effect. Does the x_framebuffer size affect speed at all? (ie having it unnecesarily big)

Quoted 5 lines

Use Ctrl-Alt-Home to have the mouse trapped (and again to de-trap it). Set
$_X_mgrab_key = "Home"
in dosemu.conf if ctrl-alt-home didn't work.

I haven't been able to get it to trap the mouse at all. dosemu.conf does contain the line $_X_mgrab_key = "Home"
I am using a laptop, does this affect the key mapping?
Can I just force mouse trapping when I start, rather than by using the keyboard?

Quoted 3 lines

The way xdos works is to update the contents of the video buffer (dirty pages) periodically. So a video driver would play nice with DOSEMU if it updates the video buffer in chunks localized in pages (4k in size),

It currently writes in 32k windows of course, and the drivers try to minimise page changes. This could be changed to 32 blocks perhaps.
Perhaps the autotrax driver should be changed to explicitly tell dosemu when a page should be updated?

Quoted 1 line

There are various options in dosemu.conf you can play with, too.

I'm game

Simon

#3 lore raw
Quoted 1 line · Simon Bridger

Does xdos accept vesa mode 0x140 (1400x1050)?

try
$_X_vesamode = "1400,1050"
not sure which mode number it will be but that can be figured out.

Quoted 4 lines

I can't get seem to get this mode going. (or any mode greater than 1024x768) I tried increasing the xframebuffer size from 2048K, but that had no effect. Does the x_framebuffer size affect speed at all? (ie having it unnecesarily big)

maybe. I'm not sure.

Quoted 5 lines

I haven't been able to get it to trap the mouse at all. dosemu.conf does contain the line $_X_mgrab_key = "Home"
I am using a laptop, does this affect the key mapping?
Can I just force mouse trapping when I start, rather than by using the keyboard?

try to run xdos -D+X -O and see what it says about mouse grabbing.

Quoted 4 lines

It currently writes in 32k windows of course, and the drivers try to minimise page changes. This could be changed to 32 blocks perhaps.
Perhaps the autotrax driver should be changed to explicitly tell dosemu when a page should be updated?

It cannot. A page is dirty or not, 386+ hardware can take care of that. It is just that the update function updates the xdos window n times per second and takes only dirty pages into account.

Bart