Skip to contentSkip to conversation

dosemu graphics problem

DISCUSSION David Relson 2 participants 4 messages Jul 3, 2009 – Jul 4, 2009 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

G'day,

I have a DOS application that uses the Borland graphics library to write to the screen. The library uses direct hardware access, so dosemu is run with the -s switch. When "dosemu -s" is run from a terminal window in Gnome, FreeDOS starts fine and the application runs fine.

As the goal is to run this application on an embedded system, it would be proper to run "dosemu -s" from a terminal session rather than Gnome. When this is done, the following lines are output:

Running as root in full feature mode osemu.confot available (outw), save_vga_state failed.

Googling for the second message doesn't find anything useful. Anybody know what the message means and how to work around it?

Thank you.

David

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Hello Bart,

Glad to make your acquaintance and appreciate the info !!

Quoted 8 lines · On Fri, 3 Jul 2009 12:44:18 -0400 Bart Oldeman wrote:

2009/7/3 David Relson <[email protected]>:

Quoted 5 lines

I have a DOS application that uses the Borland graphics library to write to the screen.  The library uses direct hardware access, so dosemu is run with the -s switch.  When "dosemu -s" is run from a terminal window in Gnome, FreeDOS starts fine and the application runs fine.

Quoted 8 lines

Just a clarification: dosemu with -s means direct hardware access *on Linux*. For video that means to run dosemu in a VC outside X (Ctrl-Alt-F2 or such), and in that case the DOS application interacts directly with the VGA hardware in the PC.

You don't need to run dosemu -s just because the DOS app thinks it does direct hardware access: it is all emulated if you run it in Gnome.

The ultimate goal is the embedded environment which uses an ICOP-6154 board with a 486SX and porting the DOS application to Linux. Using DosEMU and FreeDOS is intended as a temporary state.

When run without a GUI, i.e. X and Gnome, the application clears the screen (to black) and that's about it.

When run from a Gnome terminal border lines and bars are drawn, intro text is displayed (from files identified by the file command as "raw G3 data, byte-padded"), date/time is displayed, etc.

I appreciate the "-D+v" suggestion. Evidently the "osemu.confot ..." text is from the following:

ERROR: Port 0xac1c is not available (outw), "save_vga_state" failed. Adjust your dosemu.conf
leavedos(46|0x2e) called - shutting down

Unfortunately I have no idea what port 0xac1c is. Have you any suggestions for finding out more.

The board _does_ have VGA support. From the board's datasheet:

XGI Volari Z9s Chipset, it
VGA and TFT Flat Panel Interface Support Onboard 32MB VGA Memory, support resolution up to 1280 x 1024, 16M colors

I've looked at /etc/dosemu/dosemu.conf and see the many options. I've changed $_cpu from 80586 to 80486 and $_chipset from vesa to plaintext. Neither change helps the program run.

FWIW I've attached the complete boot.log (from command "dosemu -s" with a default dosemu.conf).

Quoted 7 lines
Quoted 6 lines

As the goal is to run this application on an embedded system, it would be proper to run "dosemu -s" from a terminal session rather than Gnome.  When this is done, the following lines are output:

   Running as root in full feature mode osemu.confot available (outw), save_vga_state failed.

Quoted 8 lines

You can run with -D+v and look at ~/.dosemu/boot.log for more info. But if the embedded system does not have VGA hardware it is not going to work.

SDL (dosemu -S) on a graphics framebuffer or if the app only uses DOS text mode, plain "dosemu" might do the job though.

Bart

major = 4 minor = 1
CONF: config variable parser_version_3 set
CONF: config variable c_system set
CONF: Parsing built-in dosemu.conf file.
CONF: config variable version_3_style_used set
CONF: Parsing built-in global.conf file.
CONF: config variable version_3_style_used unset
CONF: config variable version_3_style_used set
CONF: opened include file /etc/dosemu/dosemu.conf
CONF: closed include file /etc/dosemu/dosemu.conf
CONF: mapping driver = 'mapshm'
debug flags: -a+cw
CONF: Disabling use of pentium timer
CONF: dosbanner on
CONF: timer freq=18, update=54925
CONF: CPU set to 586
CONF: JIT CPUEMU set to 0 for 586
CONF: 2048k bytes EMS memory
CONF: EMS-frame = 0xe400
CONF: DPMI-Server on (0x5000)
CONF: DPMI base addr = 0xffffffff
CONF: PM DOS API Translator on
CONF: No DJGPP NULL deref checks: off
CONF: dosemu running on console
CONF: VGA-BIOS-Segment 0
CONF: VGA-BIOS-Segment set to 0xc000
CONF: VGA-BIOS-Size 0
CONF: VGA-BIOS-Size set to 0x8000
CHIPSET: 12
CONF: time mode = 'bios'
SER: directory /var/lock namestub LCK.. binary No
MOUSE: no device specified, type 0 using internaldriver: yes, emulate3buttons: no baudrate: 0
CONF: Keyboard-layout keyb-user
CONF: **** Warning: floppy /dev/fd0 not accessable, disabled
CONF: fastfloppy = 1
CONF: IPX support off
CONF(LPT0) f: (null) c: lpr -l t: 20 port: 0
CONF(LPT1) f: (null) c: lpr -l -P lpt2 t: 20 port: 0
CONF: not allowing speaker port access
CONF: Packet Driver enabled.
device: /root/.dosemu/drives/c type 4 h: -1 s: -1 t: -1 drive C:
device: /root/.dosemu/drives/d type 4 h: -1 s: -1 t: -1 drive D:
device: /root/.dosemu/drives/g type 4 h: -1 s: -1 t: -1 drive E:
CONF: cdrom MSCD0001 on /dev/cdrom
CONF: config variable c_system unset
Linux kernel 2.6.26; CPU speed is 499909000 Hz
CPU-EMU speed is 500 MHz
major = 4 minor = 1
CONF: running exclusively as ROOT: uid=0 (cached 0) gid=0 (cached 0)
DBG_FD already set
DOSEMU-1.4.0.0 is coming up on Linux version 2.6.26-gentoo-r4
CONF: reserving 640Kb at 0x00000 for 'd' (Base DOS memory (first 640K))
CONF: reserving 48Kb at 0xF4000 for 'r' (Dosemu reserved area)
CPU: Stack bottom 0xbf91c000, top 0xbf931000, esp=0xbf91f140
Registering HWRAM, type=v base=0xe0000000 size=0xffffff
CONF: reserving 16383Kb at 0xE0000000 for 'v' ((null))
Registering HWRAM, type=v base=0xe1000000 size=0x3fff
CONF: reserving 15Kb at 0xE1000000 for 'v' ((null))
Registering HWRAM, type=v base=0xe1004000 size=0x3fff
CONF: reserving 15Kb at 0xE1004000 for 'v' ((null))
Registering HWRAM, type=v base=0xe1008000 size=0x3fff
CONF: reserving 15Kb at 0xE1008000 for 'v' ((null))
Registering HWRAM, type=v base=0xe100c000 size=0x3fff
CONF: reserving 15Kb at 0xE100C000 for 'v' ((null))
Registering HWRAM, type=v base=0xa0000 size=0x20000
CONF: reserving 128Kb at 0xA0000 for 'v' (Video memory)
WARN: copying VBIOS file from /dev/mem
CONF: reserving 32Kb at 0xC0000 for 'V' (Video BIOS)
CONF: reserving 8256Kb at 0x100000 for 'x' (Extended memory (HMA+XMS))
ERROR: Port 0xac1c is not available (outw), "save_vga_state" failed.
Adjust your dosemu.conf
leavedos(46|0x2e) called - shutting down

#3 lore raw

Hello David,

Quoted 6 lines

 ERROR: Port 0xac1c is not available (outw), "save_vga_state" failed. Adjust your dosemu.conf
 leavedos(46|0x2e) called - shutting down

Unfortunately I have no idea what port 0xac1c is.  Have you any suggestions for finding out more.

You can run "lspci -v" to figure it out. Perhaps you see something like I/O ports at ac1c [size=4]
I/O ports at 9e00 [size=8]
for the host bridge (that was what google turned up for me). Apparently the VGA BIOS accesses this hardware, so you'd need to set those ranges in the $_ports setting in dosemu.conf.

In the above case that would be
$_ports = "range 0xac1c,0xac1f range 0x9e00,0x9e7"

Warning: this direct hardware access is a bit dangerous! Though it is not unusual to get the machine hung, in some very rare cases hardware may be damaged (in real DOS the same thing could happen though, as all apps have full hardware access).

Bart
--
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
Quoted 16 lines · On Fri, 3 Jul 2009 19:48:34 -0400 Bart Oldeman wrote:

Hello David,

Quoted 6 lines

 ERROR: Port 0xac1c is not available (outw), "save_vga_state" failed. Adjust your dosemu.conf
 leavedos(46|0x2e) called - shutting down

Unfortunately I have no idea what port 0xac1c is.  Have you any suggestions for finding out more.

You can run "lspci -v" to figure it out. Perhaps you see something like I/O ports at ac1c [size=4]
I/O ports at 9e00 [size=8]
for the host bridge (that was what google turned up for me). Apparently the VGA BIOS accesses this hardware, so you'd need to set those ranges in the $_ports setting in dosemu.conf.

Quoted 2 lines

In the above case that would be
$_ports = "range 0xac1c,0xac1f range 0x9e00,0x9e7"

Hi Bart,

Neither "hwinfo" nor "lspci -v" shows video related port information. FWIW, I'm attaching the video related portions of the hwinfo and lspci output.

After adding '$_ports = "range 0xac1c,0xac1f" ', I ran "dosemu -s" and got the following messages:

Access to cdrom denied.
Kernel: allocated 41 Diskbuffers = 21812 Bytes in HMA FreeCom version 0.84-pre2 XMS-Swap [Aug 28 2006 00:29:00]
ERROR: MFS: couldnt find root path /media/CDROM

As there's no CDROM on the machine, these may be meaningless.

I believe I've mentionned that I see the same "screen cleared/blanked/backed" behavior on 2 machines when running without X. The two machines have different intel compatible processors (one a 300 Mhz Vortex 486SX, the other a 500 Mhz AMD Geode) and different VGA video (XGI Volari Z9s vs AMD Geode LX). What are the chances that, in my newbie ignorance, I have missed an obvious configuration option? Any suggestions what that might be?

Regards,

David

### kernel-2.6.26-gentoo-r4.config ###

CONFIG_FB_GEODE=y
CONFIG_FB_GEODE_LX=y
# CONFIG_FB_GEODE_GX is not set
# CONFIG_FB_GEODE_GX1 is not set

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
# CONFIG_VGACON_SOFT_SCROLLBACK is not set CONFIG_VIDEO_SELECT=y
CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set

### lspci -v ###

00:01.0 Host bridge: Advanced Micro Devices [AMD] CS5536 [Geode companion] Host Bridge (rev 31)
Subsystem: Advanced Micro Devices [AMD] CS5536 [Geode companion] Host Bridge
Flags: bus master, 66MHz, medium devsel, latency 248

00:01.1 VGA compatible controller: Advanced Micro Devices [AMD] Geode LX Video (prog-if 00 [VGA controller])

	Subsystem: Advanced Micro Devices [AMD] Geode LX Video
	Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 11
	Memory at e0000000 (32-bit, non-prefetchable) [size=16M]
	Memory at e1000000 (32-bit, non-prefetchable) [size=16K]
	Memory at e1004000 (32-bit, non-prefetchable) [size=16K]
	Memory at e1008000 (32-bit, non-prefetchable) [size=16K]
	Memory at e100c000 (32-bit, non-prefetchable) [size=16K]
	Kernel driver in use: lxfb

### hwinfo ###

40: udi = '/org/freedesktop/Hal/devices/pci_1022_2081' pci.device_protocol = 0 (0x0)
pci.vendor = 'Advanced Micro Devices [AMD]' linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:01.1' info.vendor = 'Advanced Micro Devices [AMD]' info.subsystem = 'pci'
info.parent = '/org/freedesktop/Hal/devices/computer' pci.product = 'Geode LX Video'
info.product = 'Geode LX Video' pci.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:01.1' pci.subsys_vendor = 'Advanced Micro Devices [AMD]' info.udi = '/org/freedesktop/Hal/devices/pci_1022_2081' pci.product_id = 8321 (0x2081)
linux.hotplug_type = 2 (0x2)
pci.vendor_id = 4130 (0x1022)
linux.subsystem = 'pci'
info.linux.driver = 'lxfb'
pci.subsys_product_id = 8321 (0x2081) pci.subsys_vendor_id = 4130 (0x1022) pci.device_class = 3 (0x3)
pci.device_subclass = 0 (0x0)