# Legacy ISA MLSSA card

## dynamphorous

To all those who know about legacy hardware.... 

I have a system in which I am forced to use an old legacy ISA card to do frequency response measurements using an old DRA labratories MLSSA card. Now the software for this is all written for dos, and I figured there was a chance that it might work with DOSEMU. I have gotten the software working in that enviroment, but the hardware is providing a much harder challenge. 

The card itself wants to have hardware addresses 0x3e0 to 0x3ef, with a IRQ of 3, and a DMA of 1 (these settings can be changed, but they seem like good options). Now I am using a more modern system with a PCI to ISA bridge, but this motherboard and hardware configuration is known to work with the MLSSA card if you load windows 98 onto it, so I figure linux should have no problem with it. 

Anyways, I am hoping that someone here will have experience in two areas. Firstly, knowing how to poll a ISA bus, and determine if the card is there  and working in linux (there is so little documentaiton I dont know if that is even a possibilty, but I live in hope). I have compiled ISA support into my kernel, but there is no software for determining what is connected to the ISA bus (equivalent to lspci, or lsusb) available that I can see. 

The second thing I would like to know, is if anyone has any experience with DOSEMU, how do you configure the direct hardware access? I have already setup the IRQ and address range in the dosemu.conf file, but those do not seem to allow the software running in dosemu to see the hardware. Also, I see no way of setting the DMA. 

Thank you very much to anyone more experienced in this field who might be able to help me out!

----------

## poly_poly-man

Well, there's no way to poll an ISA bus without knowing everything about all the hardware you expect to be there*.

I know for certain that dosbox, being a complete x86 emulator, will not work with the setup you are describing. However, it seems (I'm not 100% sure about this) that dosemu uses vm86? If that's the case, you have a chance to use the hardware from it. However, I've never used dosemu, so I can't really help you with any specifics.

* well, unless it can be handled by ISA plug-n-play, which, given the fact that you set up its address and such, this card doesn't support.

----------

## dynamphorous

Thank you for your prompt response! Yea, you basically hit exactly on why I am using dosemu.. my understanding is that it can transparently allow the programs to access the hardware, but I just dont have the expereince with legacy hardware to know what to do from here now that its not working despite the configuration looking right! got ANY ideas of software to probe ISA cards if I know the addresses they are at?

----------

## poly_poly-man

 *dynamphorous wrote:*   

> Thank you for your prompt response! Yea, you basically hit exactly on why I am using dosemu.. my understanding is that it can transparently allow the programs to access the hardware, but I just dont have the expereince with legacy hardware to know what to do from here now that its not working despite the configuration looking right! got ANY ideas of software to probe ISA cards if I know the addresses they are at?

 if you know the address it's at, that should be enough. Basically, it either exists, or when you try to access it, it will fail.

You will need to get dosemu to forward that port, that irq, and possibly that dma to the actual hardware - make sure it has permissions (it's likely you'll need to be root).

btw, make sure there are no port/irq conflicts... took me ages to realize that my modem (com2) wasn't working because I dropped my isa network card on irq3...

but as I said, there's no generic isa polling short of isapnp, which it seems like this card doesn't support.

----------

## dynamphorous

OK, so is there some way you can think of to confirm that when dosemu is set to pass memory addresses and IRQ  (i still dont see anywhere to set DMA passing) it is actually doing so? Other than just running the program in question (which I do using sudo, and it responds with "card not found at address 3e0").

Also, is there somthing special that needs to be done when dealing with a ISA bridge as far as memory addresses go? I dont know if the newer system will simply allow direct access to the ISA bus as it would have on older hardware.

```
00:1f.0 ISA bridge: Intel Corporation 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge (rev 02)
```

Thank you for any help you can provide, as legacy hardware is not somthing I have to deal with every day, and certanly not my forte!

----------

## poly_poly-man

 *dynamphorous wrote:*   

> OK, so is there some way you can think of to confirm that when dosemu is set to pass memory addresses and IRQ  (i still dont see anywhere to set DMA passing) it is actually doing so? Other than just running the program in question (which I do using sudo, and it responds with "card not found at address 3e0").
> 
> Also, is there somthing special that needs to be done when dealing with a ISA bridge as far as memory addresses go? I dont know if the newer system will simply allow direct access to the ISA bus as it would have on older hardware.
> 
> ```
> ...

 I believe the isa bridge just makes the isa hardware act like regular hardware, on a primarily pci-based system.

#1: pastebin the results of (as root): strace dosemu <your options>

#2: that port seems open (never heard of anything sitting there), but consider moving your card to another irq - 3 is pretty popular (com2, and who knows what a semi-pnp system might drop there. cat /proc/interrupts to see what openings you have - I'd suggest, as long as there's nothing there already, switching this card to irq 10 - generally a wide-open spot.

----------

## dynamphorous

Ok, so I ran strace, and I got some interesting results. 

```

major = 136 minor = 2

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 (0x20000)

CONF: DPMI base addr = 0xffffffff

CONF: PM DOS API Translator on

CONF: No DJGPP NULL deref checks: off

CONF: dosemu running on _xterm

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: IRQ 3 for irqpassing uses SIGIO

CONF: Packet Driver enabled.

CONF: range of I/O ports 0x03e0-0x03ef

Direct port I/O in dosemu.conf requires root privs and -s

device: /home/daniel/.dosemu/drives/c type 4 h: -1  s: -1   t: -1 drive C:

device: /home/daniel/.dosemu/drives/d type 4 h: -1  s: -1   t: -1 drive D:

CONF: cdrom MSCD0001 on /dev/cdrom

CONF: config variable c_system unset

Linux kernel 2.6.29; CPU speed is 2527021000 Hz

CPU-EMU speed is 2527 MHz

CONF: running exclusively as ROOT: uid=0 (cached 0) gid=0 (cached 0)

CONF: Warning: PCI requires root, disabled

DBG_FD already set

DOSEMU-1.4.0.1 is coming up on Linux version 2.6.29-gentoo-r5 #1 SMP Mon Jun 29 14:04:18 Local time zone must be set--see zic  i686

Compiled with GCC version 4.3.3 -m32

CONF: reserving 640Kb at 0x00000 for 'd' (Base DOS memory (first 640K))

CONF: reserving 48Kb at 0xF4000 for 'r' (Dosemu reserved area)

CONF: reserving 128Kb at 0xA0000 for 'v' (Video memory)

CONF: reserving 8256Kb at 0x100000 for 'x' (Extended memory (HMA+XMS))

CONF: reserving 4Kb at 0xC0000 for 'V' (VGAEMU Video BIOS)

SERIAL $Id: ser_init.c 1769 2007-05-04 05:59:48Z bartoldeman $

PKT: Cannot allocate TAP device (dynamic): No such file or directory

CONF: reserving 64Kb at 0xE4000 for 'E' (EMS page frame)

CONF: reserving 140Kb at 0xC1000 for 'U' (Upper Memory Block (UMB, XMS 3.0))

TIME: using 9154 usec for updating ALRM timer

ERROR: MFS: couldn't find root path /media/CDROM

```

The part of special interest to me is that it says "warning: PCI requires root, disabled". This was being run using sudo, and I defintily have allowed myself full permissions in dosemu. It also says that its passing in the memory address 0x3e0 - 0x3ef, which are the ones I told it to pass in...

The regular strace output for dosemu is not somthing that you would want to see, dosemu makes ALLOT of system calls, and it does it continuously, so there are allot of "get time of day" commands as well as memory allocation for vm86. Do you know anything about this -s flag it says it needs allong with root privilidges for direct hardware access? I have read many manuals on this, but never got a straight answer on how the -s flag is used...

----------

## poly_poly-man

actually, I would like to see the full strace, in a session where you attempt to use the hardware. Don't paste it here, upload it to a pastebin.

----------

## dynamphorous

Using strace during the whole operation generates a file that is 310,000 lines long. (around 18mb). I used sed originally to cut out all the lines that say vm86(0x1, 0x81f0460, 0x808b0d5, 0x8, 0xb751e000) and the ones that say "gettimeofday" and that makes it a far more managable 3.6mb. It is still 64,000 lines long, and hence way too big to fit in a pastebin. So you can view the file online at filebin.ca. If I knew exactly what to cut out and show you, I would make it shorter. 

let me know if there is somthing more useful I can show you.

http://filebin.ca/bqpyq/strace_dosemu_mlssa.txt

Thanks again for your help!

----------

