Win4Lin User's Guide

About Device Definition

Use this view of the Device Definition window to view, modify, create, or delete a custom device definition.

For more information about the general subject of device definitions and managing them, see About Device Definition.

Custom Device Definition

Win4Lin allows DOS and Windows to use hardware devices such as the printers and scanners connected to your parallel port as well as game controllers attached to the game port. This is done by "directly attaching" to the parallel or game ports. This means that a Linux device driver is not used, and DOS or Windows directly uses the hardware ports. When Win4Lin is installed it creates definitions for the standard parallel and game ports.

You can also create your own custom device definitions to provide access to other types of devices.


Note: With the current version of Win4Lin, only IO ports may be attached. So you cannot attach devices that require IRQ, DMA, or Memory Mapped IO.

Note: Win4Lin does not support direct attachment of hardware devices that are "Plug-and-Play" because the attachment setting of these type of devices can change each time the Linux system is restarted. The "Plug-and-Play" mechanism is not used from within Win4Lin to detect or configure hardware.


Custom devices defined here are available for attachment in the Devices view of the Personal Win4Lin Session Configuration window.

To add a new custom device:

  1. Click on the New button to create a new direct attach token name for the device.

  2. Fill in the required information as described in the following section.

    Alternatively, you can select an existing custom device definition from the list of tokens, modify the settings appropriately, and then save the resulting definition under a new token name.

Custom Device Configuration

You will need to configure all of the hardware parameters that apply to your device.

In the Configuration text box, select the hardware parameter that you want to modify from the following list:

IRQ
If the device communicates through an Interrupt Request (IRQ). See IRQ Attachment for the remaining device definition steps.

DMA
If the device communicates through a Direct Memory Access (DMA) channel. See DMA Attachment for the remaining device definition steps.

IO Port
If the device communicates through a range of IO port addresses. See IO Port or Memory Mapped IO Attachment for the remaining device definition steps.

Memory Mapped IO
If the device communicates through memory mapped IO address range. See IO Port or Memory Mapped IO Attachment for the remaining device definition steps.

UMB
If the DOS or Windows driver requires the exclusive use of a buffer in the Upper Memory Block (UMB) address range. (It is extremely rare for a driver to have this requirement.) See UMB Attachment for the remaining device definition steps.

IRQ Attachment

Note: Attachment of IRQ is not currently supported.

Follow these steps to specify IRQ for a custom device:

  1. Click on the Add button, and enter the physical IRQ this device is to use. Consult the manufacturer's documentation for the physical IRQ to use. Also, see ``Defining a direct attach custom device'' in the Win4Lin User's Guide for a list of available IRQ numbers.

    If you make a mistake, click on the incorrect entry to highlight it, and then click on the Remove button to delete the incorrect entry. Then, reenter the correct IRQ as described in step 1.

  2. If this device must use a physical IRQ that has been assigned to another device, you can remap the IRQ to a virtual IRQ value by clicking on the Remap button.

    A dialog box appears in which you can enter a the virtual IRQ value. The value can be 0, 2 through 7, 9 through 13, or 15. You cannot choose a virtual IRQ value that another device is already using as a physical or virtual IRQ at the same time as this device. (Note: by default, the virtual IRQ5 is used in your Win4Lin sessions by the Win4Lin mouse driver.)

    If virtual mapping has been established for the device and you want to delete it, click on the Unmap button.

DMA Attachment

Note: Attachment of DMA is not currently supported.

Follow these steps to specify DMA for a custom device:

  1. Click on the Add button, and enter the DMA channel the device needs to use. Valid DMA values are 0 through 7.

    If you make a mistake, click on the incorrect entry to highlight it, and then click Remove. Then, reenter the correct DMA value as described in step 1.

  2. If this device must use a DMA channel that another device is using, you can remap the DMA channel to a virtual DMA channel by clicking on the Remap button.

    A dialog box appears in which you can enter a virtual DMA value. The value can be from 0 through 7. You cannot choose a virtual DMA channel that another device is already using as a physical or virtual DMA channel at the same time as this device.

    If virtual mapping has been established for the device and you want to delete it, click on the Unmap button.

IO Port or Memory Mapped IO Attachment

Note: Only attachment of IO ports is currently supported. Attachment of Memory Mapped IO is not supported.

Follow these steps to specify IO Port or Memory Mapped IO for a custom device:

  1. Click on the Add button to bring up a window in which you can enter the address range. The address is given in hexadecimal notation, and is typically in the range 0 - 7ff for IO ports, and in the range c0000 to effff for memory mapped IO.


    Note: For a Memory Mapped I/O device, the range must start on a 4K boundary and be a multiple of 4K.

    If you make a mistake, click on the incorrect entry to highlight it, and then click Remove. Then, enter the correct value as described in step 1.

  2. If this device must use an address range that another device is using, you can remap the address to a virtual address by clicking on the Remap button.

    A dialog box appears in which you can enter the virtual address range. The address is given in same hexadecimal notation. You cannot choose a virtual address that another device is already using as a physical or virtual address at the same time as this device.

    If virtual mapping has been established for the device and you want to delete it, click on the Unmap button.


WARNING: To use a device that communicates through Memory Mapped IO, you must first modify your default dos and win configurations to attach this device, and then make new DOS images. See ``Making new DOS images'' for instructions.

UMB Attachment

Follow these steps to specify a UMB buffer to be reserved.

  1. Click on the Add button, and enter the address range to use. The address is given in hexadecimal notation, and is typically in the range a0000 - fffff.

    If you make a mistake, click on the incorrect entry to highlight it, and then click Remove. Then, enter the correct address range as described above.