Are modems made of iron?
ZXNet echo conference «zxnet.pc»
From Kirill Frolov → To All 8 August 2004
Press RESET immediately, All!
Interesting points are highlighted.
Are there “hardware” PCI modems and do they need drivers for Windows?
This article continues the cycle we started earlier, designed to introduce
interested readers with little-known features of the work
modems. In it we will try to talk about the implementation features
serial ports for modems in general, and about implementation features
new generation internal modems designed to operate on
PCI bus.
First, let's talk about how classic external modems work. If you have
external modem, then you connect it to the computer via the connector
serial port (“COM” port). In this case, the modem is outside, the port
- inside. For simplicity, we will assume that the port is internally connected to the bus
ISA. At the time of the 386 cars, this was actually the case: inside
computer, there was a "multi I/O" card in the ISA bus connector, on which
Among other things, a COM port was implemented. The connector from the port went to
the computer case, where the external modem was plugged in.
Each COM port, from the point of view of programs inside the computer,
represented by a set of sequentially located port registers
in the processor I/O space to which programs have access
access to read/write transmitted data, parameter configuration
COM port, read port status. Since these registers are portsarranged one after another in a fixed sequence,
usually they only talk about the address of the first of them, i.e., the base address
for the entire block of registers. It is called the "base COM port address".
In addition, each COM port can generate one interrupt for
central processor, designed to signal the program about
that the port has completed a particular operation. On the computer
There may be several COM ports, and for them
conflict-free operation requires that they use different addresses
ports in I/O space and various interrupt lines. Before
creation of "Plug'n'Play" technology responsibility for correct
the configuration of port addresses and interrupt lines was entirely up to
the user who installed the new board into the computer.
The base address of the COM port was set by switches on the multicard, and
was, as a rule, a choice of 1 of 4 standard addresses for ports
COM1..COM4, respectively: 3F8h, 2F8h, 3E8h, 2E8h. Since,
according to the specification, devices on the ISA bus operating in
I/O space can, for the sake of simplicity, only check
the lower 10 bits of the address (although, in fact, nothing prevents them
check all 16 bits), the same ports also responded to addresses like
13F8h, 23F8h, E3F8h, etc. This led to conflicts with somevideo adapters, for example, the popular S3 family, since they
It was the older mirrors who used them for their own needs.
mapping from address 2E8h, which belongs to COM4. When we created
our ISA modem, we checked all 16 bits of the address, and
Many years of practice have shown that conflicts do not arise with anything.
We have not seen such a motherboard on which, when working with
ports issued only 10 address bits to the bus, so you can
a significant degree of confidence to assert that such a recommendation is
This is just some kind of relief for developers of peripheral devices.
The port interrupt line number was also set by switches, and, as
As a rule, the choice was small. By default, interrupts are considered
ports COM1..COM4 use 4,3,4,3 respectively. That is, COM2 and
COM4 shares IRQ3, and COM1 and COM3 share IRQ4. Since in
times when there were no PS/2 mice yet, and the mouse was usually connected to
COM1, the modem could be placed on either COM2 or COM4 or selected
for him a non-standard interruption, which not everyone understood
programs. It is typical that even today, if you look at the settings
Setup of your motherboard, then the choice of possible addresses and
interrupts for COM ports located on the board will remain the same
the most.Now let's look at what we have with internal ISA modems. Done
They are very original - like the sum of an external modem and a multicard! Then
yes, the modem itself is assembled on the modem board, then its COM port, which
it would be externally connected to a multicard, as described
above, and then a “piece” of a multicard going out to the ISA bus, with another
port. Moreover, on some modems this is done completely verbatim:
for example, the old 14400 Sportsters were made specifically as an external
Sportster, and a classic serial port going to the bus
ISA. If the board of such a modem is roughly cut and placed in the gap
buffer adapters for 12 volts, then its modem part can be easily
connect to a regular multicard, and to the remaining port part you can
connect the mouse. Both will work! This approach has
> a definite plus is full compatibility. Since the modem has
> is an "honest" serial port, then it behaves exactly the same
> like multimap. Including delays, errors, speed detection and
> etc. And there are two shortcomings. Firstly, this is a rather expensive solution, and
> secondly, the maximum speed is limited to 115200 bps.> For some time now, modem manufacturers have started using two modems instead
> ports have one bidirectional port emulator. That is, from the point of view
> on a machine it looks like a port, but from the point of view of the modem it doesn’t matter what it is
> since this is an internal matter of the modem manufacturer. Home
A special feature of this port is its unlimited transfer speed. If not
take special measures, you can get the speed of such a port
500 kilobytes per second instead of 11 kilobytes for the classic port.
Since this is exactly the emulator we installed on our internal modem
HTS Express Xs12, I can say from my own experience that not everything is like that
simple. On the one hand, such a port is true happiness for those
who likes to update the firmware in the modem, who surfs the Internet, and for
those who require all sorts of additional features such as collecting
online statistics. But, on the other hand, it turned out that the quality
drivers from a well-known company that wrote all the currently popular operating systems
system leaves much to be desired. For example, DOS windows under Win98
it just goes crazy if it comes from the modem at great speed
just a kilobyte of text message. What it gets
user in his terminal program, there are only pitiful remnantswhat the modem sent him. Some FOSSIL drivers when running under
DOS loses data if it moves at that speed because
don't work properly with hardware flow control - they forget
that you need to check the state of the CTS signal before sending the next one
bytes and calmly send tens of kilobytes of what is in the modem
them in the buffer, despite any attempts by the modem to do so
resist. Problems with Linux were noted, but the details are for us
unknown, since this information is from the words of our users. And,
finally, the program can be considered the pinnacle of programming wonders
RapidCommVoice of older versions, whose authors probably never
figured out how the COM port works, and therefore instead of flow control
select the byte transfer rate to the modem using a timer so that it
coincided with the physical speed of the port! In general, all this
forced us and, as far as we know, other modem manufacturers
with port emulators, it is forced to limit transfer rates to
levels similar to the speed of real ports. As shown
practice, this completely eliminated all problems of this kind with
drivers and programs. True, we still managed to do a lot
faster COM port, at 20-30 kilobytes per second.
Meanwhile, objectively, a port limited to a speed of 115200 -harmful! Firstly, the faster the data goes, and the larger the size
block of data, the less overhead there is in the system,
because in one interruption (context switch, suspension
tasks, etc.) the driver can receive/receive more data, and it becomes
Perhaps there will be much fewer such switches in the system. Secondly,
for some reason there is an opinion that the V.42Bis protocol packs data into 4
times. This is wrong. The compression algorithm used by the V.42Bis protocol is
Of course, it is inferior in efficiency in most cases to algorithms
popular archive programs like PkZip, but the file is from one
It can compress “spaces” or zeros by 10 times or more. Same as
a file with a large number of identical substrings. Speed 33600 bps
V.34 protocol corresponds to approximately 4000 and a few bytes in
second for a packed stream (since bytes are transferred without start
and stop bits, in blocks of sufficiently large size, and overhead
the V.42 link layer protocol is not very noticeable in this case). Even
quadruple decompression will already give 16 kilobytes per second, while
as the port speed of 115200 bps is only 11 kilobytes/s (with
When transmitted over a serial port, each 8-bit byte is framed
additionally a start bit and a stop bit, so the speed in bytes
calculated as 115200/10).It’s easy to calculate what will happen on the V.90 protocol. It's also easy
consider that even doubling the speed of the COM port will not help the matter. It's necessary
more. Of course, www pages usually take much longer to read than
downloaded, but what is downloaded not for reading, but for the archive, is usually
packed, but the idea remains the same - a hardware COM port emulator
does not interfere with the operation of the modem, but a real COM port, even though it is internal
a modem, even an external one, interferes.
> But the time has come for manufacturers to do something for the PCI bus.
> It would seem that it would be easier to take the same port emulator and output it from
> signals for working on PCI. But there is one fundamental thing here
problem: the manufacturer cannot fix addresses on the PCI bus
devices! If the manufacturer installed an address decoder on the ISA bus,
which responded to a certain range of addresses specified by jumpers
on the board, and the user entered this range of addresses in the settings
operating system (or the system looked for it itself using the
brute force), then on the PCI bus everything is different. In addition to memory space and
I/O space, there is still space on the PCI bus
configurations. Moreover, unlike the first two, its control signals
are not routed as a bus, but to each PCI slot separately. Exactlyso it doesn’t matter which slot you plugged your PCI into
device. For example, if you move your network card from one
slot into another (adjacent) one, then Windows will find it again, and it will be
already another, second in a row, network card in the system. It's all done
in order to implement the well-known Plug'N'Play principle, that is
free the user from the need to manually distribute addresses and
interrupt lines on devices, and then write it into the system.
> When you turn on the computer, the PCI BIOS itself scans the spaces
> configurations of all slots, finds what is there (all PCI
> the device must provide its class, subclass, list upon request
> address windows, interrupts, etc. required by it), after which
> distributes the entire address space between devices. Ditto
> interrupts are also distributed. Moreover, as a rule, if on
address distribution You cannot influence in any way, then interrupts in
Most motherboards can be assigned literally by hand: just
choose which interrupt to use for which PCI slot.
Or at least limit the list of interruptions that will beused for PCI devices. Many more motherboards
ask for the type of operating system being loaded. This is done for
in order not to initialize secondary controllers at all on
PCI before the system boots, so that it distributes them as it pleases
> "like". But, one way or another, about the location of COM ports on
> the usual standard addresses and interrupt lines on the PCI bus are possible
> forget forever, at least within the framework of the current one
> standard and practice of its implementation in motherboards.
> What to do about it? After all, if, in spite of everything, you release a modem with
> PCI COM port, then not a single DOS program can work with it
> can. At a minimum, you will have to write her the address of this by hand
> port and interrupt line number. Moreover, if the interrupt line number
> is usually also written by the BIOS after self-testing the computer
> sign, then it’s generally unclear where to get the address. But in fact
understandable. There is a so-called interface of the above-mentioned PCI BIOS,
through which you can not only get an address on any PCI busdevice, but even change it. For our HTS Express modem there was
at one time it was written optimized to work on 386 machines
FOSSIL driver (called HtFossil, located at http://www.hts-spb.com).
Just for fun, we recently added an automatic search for such
ports on the PCI bus, and it works great: the port is located,
its address and interrupt line are determined, after which FOSSIL works
with it the same way as with any ISA. But what to do with standard
DOS programs, in half of which you can only select a port by number
1..4 or, in the best case, select an address from the list, and in the remaining
half - you cannot enter an address greater than 3FFh, while PCI
Does the BIOS try to “stick” the port somewhere in B000h? Obviously nothing
There's nothing you can do about it other than make this program work.
through FOSSIL, in which you can specify all the required parameters. If
Since such a program cannot be made to work through FOSSIL, then
All that remains is to try to reconfigure the PCI COM port address under
standard value, which will be discussed in more detail below.
> What was said above about the possibility of working under DOS applies only to
> full hardware modems. However, there are others in nature
> devices that can also be inserted into the PCI slot and with which> the manufacturer prescribed to play the role of a modem. Against the background of absence
sufficient information on the DOS-PCI modem problem, and also intentionally
>> misleading users (“Cannot work under DOS either
>> one PCI modem!"), a number of interested manufacturers and suppliers
>> continues to push a fairly discredited idea to the masses
>> WinModem. Some of these manufacturers even refuse
creating full PCI modems, preferring to release them instead
WinModems.
What is WinModem? This is half of the modem. The half that
demodulates the signal from the line. The one that beeps dials a number, etc. A
the second half - the one that analyzes teams, corrects mistakes
(V.42), packs/unpacks data (V.42bis), and implements all
There are simply no auxiliary functions in the modem. She was cut off along with
the equipment that handled it. The idea, frankly speaking, is not new.
Many years ago there were attempts to make the public happy with WinRPI modems, and
even soft modems (in which not half, but 3/4 of the circuit is cut off,
including signal processing itself), but these attempts are successful
failed - the user simply voted with his feet. The same
“lucky” owners who managed to buy such devices,forever remember what it is to search for a driver from your WinRPI for
some new operating system, for example Win95. Why is it needed?
driver? And then, that the cut off half of the functions is still needed somewhere
implement. So it was implemented in the driver. That is, part of the modem -
in the hardware, partly in the driver. And without the appropriate driver this
iron is completely useless. This was all done to reduce the cost, and this
the only reason. Because the client has to pay for the modem hardware
necessary, but he already paid for fifty kilobytes of RAM in his computer,
when I bought the computer. The same applies to several percent of it
speed.
In theory, the idea is not bad at all, because they work exactly according to this scheme
all video adapters. But in practice everything is much worse. First, modems
require a strictly limited reaction time to events on the line. They
can't wait for your CD-Rom to spin up or take off the brakes
TCP/IP driver. All this leads to communication failures. Video adapter
wait, well, redraw your mouse cursor 200 milliseconds later,
and that's all. But the remote modem will not wait, it will decide what you have in
telephone line problems, and will begin to deal with them, for example,
will start the retrain. Secondly, the serial port driver for
Windows is still a device! Just repeat it so that itworked with all programs, in all modes, and repeated in detail
not only functionality, but also errors in the original driver - to
what all programs are accustomed to is far from a trivial task. How
Practice has shown that WinModem manufacturing companies are not going to
throw your best developers at these cheaper devices. And
the quality of the second half of the modem in the driver is “excellent” -
until the entire system freezes. And finally, third: if, purchasing
full modem, you have confidence that wherever you turn it on,
and no matter what system is loaded, it will work there, because
serial port support was, is and will be in all
operating systems; then with WinModem you can be sure and in advance
are confident that on the day when the manufacturing company for one or another
for other reasons you will get tired of rewriting drivers for your modem model
for the next new operating system or its version, you can
feel free to use it as a museum exhibit or set
spare parts Moreover, due to the complexity of the driver, it is likely that
Even the release of the next subversion of an existing operating system is enough
systems. Well, what are the reasons for companies to stop supporting your modem model?
maybe 1000 and one. For example, so that you buy a new version from her,or simply because the company closes or someone buys it. All
this also applies to other versions of WinModems, for example, running
via USB bus.
> However, true full PCI modems still exist. For example, USR
> Faxmodem (formerly Sportster) models 2977, 2976, 3298, 5610, 5610A
>> (the latter without a transformer). WinModem's propaganda of recent years
>> so convinced many that real modems now remain
>> only in external performance, which we have repeatedly heard not only
>> confident statements of users, but also statements of some
>> authoritative "hardware" publications that this modem only works
>> with special drivers. I hope this article will help you
see for yourself that this is not the case. We do not know what and how to do under
unixes, but for DOS and Win98 you can repeat everything yourself
procedures described below.
> Note: Common modern Unix-like systems in full
> to the extent they support the PCI bus software-hardware interface and can
> recognize and use any PCI devices if they are available> support in the system core. As for real "hardware" modems,
> then from the OS point of view they are represented by standard controllers
> (for IBM-PC) serial interface, which is supported
> in almost any OS.
[p3180587.jpg]
First for DOS. First, make sure that this modem
initialized by PCI BIOS. This is usually what happens
default", so if the BIOS did not do this, look, no
does it have settings like “Boot to PNP OS?”, “PNP OS installed”, etc.
They may be called differently, but the point is to force the BIOS
initialize all peripherals, not just the hard drive with
video adapter. After this BIOS (usually before the system boots)
displays in a plate a list of PCI devices with their brief description. Modem
it should be listed as "Simple communication adapter" or something
similar.
[p3180582.jpg]
Now we load DOS itself. It doesn’t matter which one - 5, 6 or 7 from Win98
(this is when "Command prompt only" after pressing in the process
downloads). The main thing is that it is not a DOS window under Windows. Take FOSSIL with
of our website, it is called HtFossil version 5.00 and higher. And
we launch it with the /PC key. This forces HtFossil on its ownscan all adapters in the computer, find COM ports among them, and
determine their addresses and interrupts. For each such adapter found
HtFossil will display a line that the adapter has been found, show its address and
interrupt, as well as to which COM port it is assigned. Next, you either
you can work with this port through any program that allows
work with FOSSIL with port numbers greater than 4, or just take and
transfer the base address and interrupt number to some other one
FOSSIL, DOS program and anywhere. For the TeleMate program, to
for example, you need to correct it in its configuration file for the selected
port, for example the fifth, three parameters - base address, vector number
interrupt, and the hardware interrupt number. The first and last are possible
taken from the line output by HtFossil, and the vector number is calculated
so: for interrupts from 0 to 7 it is equal to 8 plus the interrupt number, and for
interrupts from 8 to 15 it is equal to 70h + interrupt number - 8. However,
Telemate can also work with FOSSIL if the speed of the COM port is in this
the program is set to no higher than 38400.
You can also, instead of the /PC key, set these parameters to some
junior port in the same HtFossil. We draw your attention to the fact that
you can forcefully change addresses and interrupts in the HtFossil program
only for standard, first four, ports. HtFossil also hasability to change the base address of automatically found PCI COM
port, which may be useful when working with communication
programs that do not allow working with non-standard addresses
ports. This is done by specifying the base address change key before
key /PC. For example, like this:
HtFossil.Com /B5:1234h /Pc
The following will happen: when HtFossil detects the PCI COM port,
then before reading from there its base address set
BIOS, it will first try to change this address to the given one
(1234h), and only after that will it read it again and display it on the screen. If
the device allows you to change its base address, it will become 1234h,
and if it doesn’t allow it, then the address will remain as it is
programmed PCI BIOS. In both cases everything will be fine
will most likely work correctly. If the address modification key
set after the /Pc key, then no one can change the base address in the device
won't, but instead HtFossil will ignore the address read from
device, and will certainly work with the address that
you asked, just as in the case of junior, standard, ports
(1..4).
You can set any base address and any interrupt you want,
but use any of the first four ports for this. B
in principle, nothing prevents you from reassigning them even to each other,for example, by setting COM2 as the base address 2E8h, that is
fourth port address.
> In order to use a full PCI modem under Win98, it is enough
> select the standard Windows driver. This is done like this: insert
> modem into the computer, load Windows. She will find the modem as new
> device and will prompt you to select a driver. She doesn't want to do it on her own
> use a standard driver, you will have to help her. Tell me
> so that it shows you a list of all drivers on the system, then select
>> standard drivers, including a simple COM port. The system will ask you
>> did you think well, and will warn you that this is not the driver
>> devices. Say that you always think well and she is wonderful
>> will start working with your new modem, calling it the next one
>> COM port, for example, the fifth.
[step1.gif] [step2.gif]
[step3.gif] [step4.gif]
[step6.gif] [step7.gif]
Just for fun, you can look at the resources of this port, that is
base address and interrupt, in Device Manager.
[step9.gif]The only thing that may have problems is with the operation of DOS and older
16-bit programs in a Windows window. However, at the current historical
at the moment this is not particularly relevant, and after a while it is hardly
In general, there will still be DOS programs that are of interest to anyone for working with
modem that needs to be launched in a Windows window. And also, please note
Attention: port addresses and interrupt line number may be different
under DOS and Windows, because both are the result
automatic resource allocation when initializing PCI adapters, and not
necessarily the same in different operating systems.
> If you want to work with your modem exactly as a modem, and not
> just like with a port, then you may also need to assign to this
> modem port. If you haven’t found one yourself (modems also have a mechanism
> PNP), You can do this through the "Control Panel" by going to the section
>>
>> Note: what exactly is a “modem driver” for?
>>
> "Modems" and asking to look for a new one. If the new one is called
> "Standard modem", then we recommend that you change it manually to
> something more similar to your real modem. In general, similar> occurs in situations where the .Inf file is from the modem manufacturer
> is incorrect, does not correspond to the current firmware version in the modem or does not correspond at all
> is missing from the WindowsInf subdirectory.
[step05.gif]
Now a few words about DOS windows under Windows. Generally speaking, in this
PCI BIOS mode is not required to work, since all controls
Windows takes care of the hardware. It happens that from time to time, in
depending on unstable and obscure reasons, PCI BIOS (more precisely
what is left of it when emulating a DOS window) produces an unreasonable
information about PCI device parameters, for example, zero port addresses
and interruptions. In this case, Htfossil launched with the /PC key will display
error message: "Bad PCI COM port IRQ found". If you met
with such a phenomenon, then you will hardly be able to adapt our FOSSIL for
automatic search for PCI modem. However, you can try
do this manually. Just look in Windows Device Manager,
what port addresses and what interrupt numbers are allocated for the desired
you ports, and write them manually on the command line with FOSSIL for
some COM port that you currently do not need. There is no need for that
meaning that you are not going to work with it through FOSSIL. So maybebe, for example, a port with a mouse. Let's say that this is your COM1. And your PCI
The modem is detected by Windows at address DB08h and has interrupt 10. Then
line...
HtFossil.Com /B1:DB08h /I1:10
... will load FOSSIL and force it to use COM 1 when accessing
not the address 3F8h and IRQ 4, but the address DB08h and IRQ 10. Now you can
tell your DOS program COM 1 as the port it uses
should work. Unfortunately, not everything will necessarily appear in a DOS window.
work in this case:
Windows may not want to emulate non-standard port addresses.
In this case, you can try the opposite way - do
These addresses are standard! If you select "properties" in Device Manager
(Properties) port of your PCI modem, sub-item "Resources" and disable
check the "Use automatic settings" checkbox, then you can try to register in
as a parameter any standard address (address range)
port, for example from COM 4, that is, 2E8h-2EFh.
[step15.gif]
If Windows does not allow you to change them, try selecting another "Basic"
configuration", Windows usually allows you to change parameters for some reason
for an odd-numbered configuration. Standard interrupt issue
a little more complicated - you can’t change it in Windows. Fortunately,
many modern BIOSes allow you to assign interrupts 3 and 4 to boardsPCI.
[p3180573.jpg]
If you managed to change the port and interrupt address as a result, then
Windows will try to reconfigure your device so that
the addresses match the ones you selected. If successful, you generally receive
completely standard serial port, at a standard address and with
standard interrupt number. In this case, Windows can renumber
Your port is also in the standard range 1..4.
And finally, how to get everything back. The easiest way for Windows is
This is to delete the device in Deivce manager. Don't be afraid to delete something
what you need - everything you need, Windows will find it for you again the next time
reboot. You can remove all COM ports altogether - everything will be found
again. And all non-PNP equipment will be found after you launch
standard Wizard for adding new equipment, in the mode
"Find it yourself." The only thing you may need after this is
find “modems” again, and then repeat the modem selection in
settings for Internet calls, because although Windows will be there
show the correct model, in fact, when removing or adding
device, she loses links to it, and when she tries to call through
such a modem will do some pretty strange things, telling you that
There is either no modem, or it is busy, etc. However, choosing the same modemas previously in the "DialUp networking" settings ("Remote
access") completely eliminates the problem.
Mikhail Likhachev, Dmitry Utyansky (HTS, Russia)
Published -- March 27, 2001
From Kirill Frolov → To All 8 August 2004
Press RESET immediately, All!
Interesting points are highlighted.
Are there “hardware” PCI modems and do they need drivers for Windows?
This article continues the cycle we started earlier, designed to introduce
interested readers with little-known features of the work
modems. In it we will try to talk about the implementation features
serial ports for modems in general, and about implementation features
new generation internal modems designed to operate on
PCI bus.
First, let's talk about how classic external modems work. If you have
external modem, then you connect it to the computer via the connector
serial port (“COM” port). In this case, the modem is outside, the port
- inside. For simplicity, we will assume that the port is internally connected to the bus
ISA. At the time of the 386 cars, this was actually the case: inside
computer, there was a "multi I/O" card in the ISA bus connector, on which
Among other things, a COM port was implemented. The connector from the port went to
the computer case, where the external modem was plugged in.
Each COM port, from the point of view of programs inside the computer,
represented by a set of sequentially located port registers
in the processor I/O space to which programs have access
access to read/write transmitted data, parameter configuration
COM port, read port status. Since these registers are portsarranged one after another in a fixed sequence,
usually they only talk about the address of the first of them, i.e., the base address
for the entire block of registers. It is called the "base COM port address".
In addition, each COM port can generate one interrupt for
central processor, designed to signal the program about
that the port has completed a particular operation. On the computer
There may be several COM ports, and for them
conflict-free operation requires that they use different addresses
ports in I/O space and various interrupt lines. Before
creation of "Plug'n'Play" technology responsibility for correct
the configuration of port addresses and interrupt lines was entirely up to
the user who installed the new board into the computer.
The base address of the COM port was set by switches on the multicard, and
was, as a rule, a choice of 1 of 4 standard addresses for ports
COM1..COM4, respectively: 3F8h, 2F8h, 3E8h, 2E8h. Since,
according to the specification, devices on the ISA bus operating in
I/O space can, for the sake of simplicity, only check
the lower 10 bits of the address (although, in fact, nothing prevents them
check all 16 bits), the same ports also responded to addresses like
13F8h, 23F8h, E3F8h, etc. This led to conflicts with somevideo adapters, for example, the popular S3 family, since they
It was the older mirrors who used them for their own needs.
mapping from address 2E8h, which belongs to COM4. When we created
our ISA modem, we checked all 16 bits of the address, and
Many years of practice have shown that conflicts do not arise with anything.
We have not seen such a motherboard on which, when working with
ports issued only 10 address bits to the bus, so you can
a significant degree of confidence to assert that such a recommendation is
This is just some kind of relief for developers of peripheral devices.
The port interrupt line number was also set by switches, and, as
As a rule, the choice was small. By default, interrupts are considered
ports COM1..COM4 use 4,3,4,3 respectively. That is, COM2 and
COM4 shares IRQ3, and COM1 and COM3 share IRQ4. Since in
times when there were no PS/2 mice yet, and the mouse was usually connected to
COM1, the modem could be placed on either COM2 or COM4 or selected
for him a non-standard interruption, which not everyone understood
programs. It is typical that even today, if you look at the settings
Setup of your motherboard, then the choice of possible addresses and
interrupts for COM ports located on the board will remain the same
the most.Now let's look at what we have with internal ISA modems. Done
They are very original - like the sum of an external modem and a multicard! Then
yes, the modem itself is assembled on the modem board, then its COM port, which
it would be externally connected to a multicard, as described
above, and then a “piece” of a multicard going out to the ISA bus, with another
port. Moreover, on some modems this is done completely verbatim:
for example, the old 14400 Sportsters were made specifically as an external
Sportster, and a classic serial port going to the bus
ISA. If the board of such a modem is roughly cut and placed in the gap
buffer adapters for 12 volts, then its modem part can be easily
connect to a regular multicard, and to the remaining port part you can
connect the mouse. Both will work! This approach has
> a definite plus is full compatibility. Since the modem has
> is an "honest" serial port, then it behaves exactly the same
> like multimap. Including delays, errors, speed detection and
> etc. And there are two shortcomings. Firstly, this is a rather expensive solution, and
> secondly, the maximum speed is limited to 115200 bps.> For some time now, modem manufacturers have started using two modems instead
> ports have one bidirectional port emulator. That is, from the point of view
> on a machine it looks like a port, but from the point of view of the modem it doesn’t matter what it is
> since this is an internal matter of the modem manufacturer. Home
A special feature of this port is its unlimited transfer speed. If not
take special measures, you can get the speed of such a port
500 kilobytes per second instead of 11 kilobytes for the classic port.
Since this is exactly the emulator we installed on our internal modem
HTS Express Xs12, I can say from my own experience that not everything is like that
simple. On the one hand, such a port is true happiness for those
who likes to update the firmware in the modem, who surfs the Internet, and for
those who require all sorts of additional features such as collecting
online statistics. But, on the other hand, it turned out that the quality
drivers from a well-known company that wrote all the currently popular operating systems
system leaves much to be desired. For example, DOS windows under Win98
it just goes crazy if it comes from the modem at great speed
just a kilobyte of text message. What it gets
user in his terminal program, there are only pitiful remnantswhat the modem sent him. Some FOSSIL drivers when running under
DOS loses data if it moves at that speed because
don't work properly with hardware flow control - they forget
that you need to check the state of the CTS signal before sending the next one
bytes and calmly send tens of kilobytes of what is in the modem
them in the buffer, despite any attempts by the modem to do so
resist. Problems with Linux were noted, but the details are for us
unknown, since this information is from the words of our users. And,
finally, the program can be considered the pinnacle of programming wonders
RapidCommVoice of older versions, whose authors probably never
figured out how the COM port works, and therefore instead of flow control
select the byte transfer rate to the modem using a timer so that it
coincided with the physical speed of the port! In general, all this
forced us and, as far as we know, other modem manufacturers
with port emulators, it is forced to limit transfer rates to
levels similar to the speed of real ports. As shown
practice, this completely eliminated all problems of this kind with
drivers and programs. True, we still managed to do a lot
faster COM port, at 20-30 kilobytes per second.
Meanwhile, objectively, a port limited to a speed of 115200 -harmful! Firstly, the faster the data goes, and the larger the size
block of data, the less overhead there is in the system,
because in one interruption (context switch, suspension
tasks, etc.) the driver can receive/receive more data, and it becomes
Perhaps there will be much fewer such switches in the system. Secondly,
for some reason there is an opinion that the V.42Bis protocol packs data into 4
times. This is wrong. The compression algorithm used by the V.42Bis protocol is
Of course, it is inferior in efficiency in most cases to algorithms
popular archive programs like PkZip, but the file is from one
It can compress “spaces” or zeros by 10 times or more. Same as
a file with a large number of identical substrings. Speed 33600 bps
V.34 protocol corresponds to approximately 4000 and a few bytes in
second for a packed stream (since bytes are transferred without start
and stop bits, in blocks of sufficiently large size, and overhead
the V.42 link layer protocol is not very noticeable in this case). Even
quadruple decompression will already give 16 kilobytes per second, while
as the port speed of 115200 bps is only 11 kilobytes/s (with
When transmitted over a serial port, each 8-bit byte is framed
additionally a start bit and a stop bit, so the speed in bytes
calculated as 115200/10).It’s easy to calculate what will happen on the V.90 protocol. It's also easy
consider that even doubling the speed of the COM port will not help the matter. It's necessary
more. Of course, www pages usually take much longer to read than
downloaded, but what is downloaded not for reading, but for the archive, is usually
packed, but the idea remains the same - a hardware COM port emulator
does not interfere with the operation of the modem, but a real COM port, even though it is internal
a modem, even an external one, interferes.
> But the time has come for manufacturers to do something for the PCI bus.
> It would seem that it would be easier to take the same port emulator and output it from
> signals for working on PCI. But there is one fundamental thing here
problem: the manufacturer cannot fix addresses on the PCI bus
devices! If the manufacturer installed an address decoder on the ISA bus,
which responded to a certain range of addresses specified by jumpers
on the board, and the user entered this range of addresses in the settings
operating system (or the system looked for it itself using the
brute force), then on the PCI bus everything is different. In addition to memory space and
I/O space, there is still space on the PCI bus
configurations. Moreover, unlike the first two, its control signals
are not routed as a bus, but to each PCI slot separately. Exactlyso it doesn’t matter which slot you plugged your PCI into
device. For example, if you move your network card from one
slot into another (adjacent) one, then Windows will find it again, and it will be
already another, second in a row, network card in the system. It's all done
in order to implement the well-known Plug'N'Play principle, that is
free the user from the need to manually distribute addresses and
interrupt lines on devices, and then write it into the system.
> When you turn on the computer, the PCI BIOS itself scans the spaces
> configurations of all slots, finds what is there (all PCI
> the device must provide its class, subclass, list upon request
> address windows, interrupts, etc. required by it), after which
> distributes the entire address space between devices. Ditto
> interrupts are also distributed. Moreover, as a rule, if on
address distribution You cannot influence in any way, then interrupts in
Most motherboards can be assigned literally by hand: just
choose which interrupt to use for which PCI slot.
Or at least limit the list of interruptions that will beused for PCI devices. Many more motherboards
ask for the type of operating system being loaded. This is done for
in order not to initialize secondary controllers at all on
PCI before the system boots, so that it distributes them as it pleases
> "like". But, one way or another, about the location of COM ports on
> the usual standard addresses and interrupt lines on the PCI bus are possible
> forget forever, at least within the framework of the current one
> standard and practice of its implementation in motherboards.
> What to do about it? After all, if, in spite of everything, you release a modem with
> PCI COM port, then not a single DOS program can work with it
> can. At a minimum, you will have to write her the address of this by hand
> port and interrupt line number. Moreover, if the interrupt line number
> is usually also written by the BIOS after self-testing the computer
> sign, then it’s generally unclear where to get the address. But in fact
understandable. There is a so-called interface of the above-mentioned PCI BIOS,
through which you can not only get an address on any PCI busdevice, but even change it. For our HTS Express modem there was
at one time it was written optimized to work on 386 machines
FOSSIL driver (called HtFossil, located at http://www.hts-spb.com).
Just for fun, we recently added an automatic search for such
ports on the PCI bus, and it works great: the port is located,
its address and interrupt line are determined, after which FOSSIL works
with it the same way as with any ISA. But what to do with standard
DOS programs, in half of which you can only select a port by number
1..4 or, in the best case, select an address from the list, and in the remaining
half - you cannot enter an address greater than 3FFh, while PCI
Does the BIOS try to “stick” the port somewhere in B000h? Obviously nothing
There's nothing you can do about it other than make this program work.
through FOSSIL, in which you can specify all the required parameters. If
Since such a program cannot be made to work through FOSSIL, then
All that remains is to try to reconfigure the PCI COM port address under
standard value, which will be discussed in more detail below.
> What was said above about the possibility of working under DOS applies only to
> full hardware modems. However, there are others in nature
> devices that can also be inserted into the PCI slot and with which> the manufacturer prescribed to play the role of a modem. Against the background of absence
sufficient information on the DOS-PCI modem problem, and also intentionally
>> misleading users (“Cannot work under DOS either
>> one PCI modem!"), a number of interested manufacturers and suppliers
>> continues to push a fairly discredited idea to the masses
>> WinModem. Some of these manufacturers even refuse
creating full PCI modems, preferring to release them instead
WinModems.
What is WinModem? This is half of the modem. The half that
demodulates the signal from the line. The one that beeps dials a number, etc. A
the second half - the one that analyzes teams, corrects mistakes
(V.42), packs/unpacks data (V.42bis), and implements all
There are simply no auxiliary functions in the modem. She was cut off along with
the equipment that handled it. The idea, frankly speaking, is not new.
Many years ago there were attempts to make the public happy with WinRPI modems, and
even soft modems (in which not half, but 3/4 of the circuit is cut off,
including signal processing itself), but these attempts are successful
failed - the user simply voted with his feet. The same
“lucky” owners who managed to buy such devices,forever remember what it is to search for a driver from your WinRPI for
some new operating system, for example Win95. Why is it needed?
driver? And then, that the cut off half of the functions is still needed somewhere
implement. So it was implemented in the driver. That is, part of the modem -
in the hardware, partly in the driver. And without the appropriate driver this
iron is completely useless. This was all done to reduce the cost, and this
the only reason. Because the client has to pay for the modem hardware
necessary, but he already paid for fifty kilobytes of RAM in his computer,
when I bought the computer. The same applies to several percent of it
speed.
In theory, the idea is not bad at all, because they work exactly according to this scheme
all video adapters. But in practice everything is much worse. First, modems
require a strictly limited reaction time to events on the line. They
can't wait for your CD-Rom to spin up or take off the brakes
TCP/IP driver. All this leads to communication failures. Video adapter
wait, well, redraw your mouse cursor 200 milliseconds later,
and that's all. But the remote modem will not wait, it will decide what you have in
telephone line problems, and will begin to deal with them, for example,
will start the retrain. Secondly, the serial port driver for
Windows is still a device! Just repeat it so that itworked with all programs, in all modes, and repeated in detail
not only functionality, but also errors in the original driver - to
what all programs are accustomed to is far from a trivial task. How
Practice has shown that WinModem manufacturing companies are not going to
throw your best developers at these cheaper devices. And
the quality of the second half of the modem in the driver is “excellent” -
until the entire system freezes. And finally, third: if, purchasing
full modem, you have confidence that wherever you turn it on,
and no matter what system is loaded, it will work there, because
serial port support was, is and will be in all
operating systems; then with WinModem you can be sure and in advance
are confident that on the day when the manufacturing company for one or another
for other reasons you will get tired of rewriting drivers for your modem model
for the next new operating system or its version, you can
feel free to use it as a museum exhibit or set
spare parts Moreover, due to the complexity of the driver, it is likely that
Even the release of the next subversion of an existing operating system is enough
systems. Well, what are the reasons for companies to stop supporting your modem model?
maybe 1000 and one. For example, so that you buy a new version from her,or simply because the company closes or someone buys it. All
this also applies to other versions of WinModems, for example, running
via USB bus.
> However, true full PCI modems still exist. For example, USR
> Faxmodem (formerly Sportster) models 2977, 2976, 3298, 5610, 5610A
>> (the latter without a transformer). WinModem's propaganda of recent years
>> so convinced many that real modems now remain
>> only in external performance, which we have repeatedly heard not only
>> confident statements of users, but also statements of some
>> authoritative "hardware" publications that this modem only works
>> with special drivers. I hope this article will help you
see for yourself that this is not the case. We do not know what and how to do under
unixes, but for DOS and Win98 you can repeat everything yourself
procedures described below.
> Note: Common modern Unix-like systems in full
> to the extent they support the PCI bus software-hardware interface and can
> recognize and use any PCI devices if they are available> support in the system core. As for real "hardware" modems,
> then from the OS point of view they are represented by standard controllers
> (for IBM-PC) serial interface, which is supported
> in almost any OS.
[p3180587.jpg]
First for DOS. First, make sure that this modem
initialized by PCI BIOS. This is usually what happens
default", so if the BIOS did not do this, look, no
does it have settings like “Boot to PNP OS?”, “PNP OS installed”, etc.
They may be called differently, but the point is to force the BIOS
initialize all peripherals, not just the hard drive with
video adapter. After this BIOS (usually before the system boots)
displays in a plate a list of PCI devices with their brief description. Modem
it should be listed as "Simple communication adapter" or something
similar.
[p3180582.jpg]
Now we load DOS itself. It doesn’t matter which one - 5, 6 or 7 from Win98
(this is when "Command prompt only" after pressing in the process
downloads). The main thing is that it is not a DOS window under Windows. Take FOSSIL with
of our website, it is called HtFossil version 5.00 and higher. And
we launch it with the /PC key. This forces HtFossil on its ownscan all adapters in the computer, find COM ports among them, and
determine their addresses and interrupts. For each such adapter found
HtFossil will display a line that the adapter has been found, show its address and
interrupt, as well as to which COM port it is assigned. Next, you either
you can work with this port through any program that allows
work with FOSSIL with port numbers greater than 4, or just take and
transfer the base address and interrupt number to some other one
FOSSIL, DOS program and anywhere. For the TeleMate program, to
for example, you need to correct it in its configuration file for the selected
port, for example the fifth, three parameters - base address, vector number
interrupt, and the hardware interrupt number. The first and last are possible
taken from the line output by HtFossil, and the vector number is calculated
so: for interrupts from 0 to 7 it is equal to 8 plus the interrupt number, and for
interrupts from 8 to 15 it is equal to 70h + interrupt number - 8. However,
Telemate can also work with FOSSIL if the speed of the COM port is in this
the program is set to no higher than 38400.
You can also, instead of the /PC key, set these parameters to some
junior port in the same HtFossil. We draw your attention to the fact that
you can forcefully change addresses and interrupts in the HtFossil program
only for standard, first four, ports. HtFossil also hasability to change the base address of automatically found PCI COM
port, which may be useful when working with communication
programs that do not allow working with non-standard addresses
ports. This is done by specifying the base address change key before
key /PC. For example, like this:
HtFossil.Com /B5:1234h /Pc
The following will happen: when HtFossil detects the PCI COM port,
then before reading from there its base address set
BIOS, it will first try to change this address to the given one
(1234h), and only after that will it read it again and display it on the screen. If
the device allows you to change its base address, it will become 1234h,
and if it doesn’t allow it, then the address will remain as it is
programmed PCI BIOS. In both cases everything will be fine
will most likely work correctly. If the address modification key
set after the /Pc key, then no one can change the base address in the device
won't, but instead HtFossil will ignore the address read from
device, and will certainly work with the address that
you asked, just as in the case of junior, standard, ports
(1..4).
You can set any base address and any interrupt you want,
but use any of the first four ports for this. B
in principle, nothing prevents you from reassigning them even to each other,for example, by setting COM2 as the base address 2E8h, that is
fourth port address.
> In order to use a full PCI modem under Win98, it is enough
> select the standard Windows driver. This is done like this: insert
> modem into the computer, load Windows. She will find the modem as new
> device and will prompt you to select a driver. She doesn't want to do it on her own
> use a standard driver, you will have to help her. Tell me
> so that it shows you a list of all drivers on the system, then select
>> standard drivers, including a simple COM port. The system will ask you
>> did you think well, and will warn you that this is not the driver
>> devices. Say that you always think well and she is wonderful
>> will start working with your new modem, calling it the next one
>> COM port, for example, the fifth.
[step1.gif] [step2.gif]
[step3.gif] [step4.gif]
[step6.gif] [step7.gif]
Just for fun, you can look at the resources of this port, that is
base address and interrupt, in Device Manager.
[step9.gif]The only thing that may have problems is with the operation of DOS and older
16-bit programs in a Windows window. However, at the current historical
at the moment this is not particularly relevant, and after a while it is hardly
In general, there will still be DOS programs that are of interest to anyone for working with
modem that needs to be launched in a Windows window. And also, please note
Attention: port addresses and interrupt line number may be different
under DOS and Windows, because both are the result
automatic resource allocation when initializing PCI adapters, and not
necessarily the same in different operating systems.
> If you want to work with your modem exactly as a modem, and not
> just like with a port, then you may also need to assign to this
> modem port. If you haven’t found one yourself (modems also have a mechanism
> PNP), You can do this through the "Control Panel" by going to the section
>>
>> Note: what exactly is a “modem driver” for?
>>
> "Modems" and asking to look for a new one. If the new one is called
> "Standard modem", then we recommend that you change it manually to
> something more similar to your real modem. In general, similar> occurs in situations where the .Inf file is from the modem manufacturer
> is incorrect, does not correspond to the current firmware version in the modem or does not correspond at all
> is missing from the WindowsInf subdirectory.
[step05.gif]
Now a few words about DOS windows under Windows. Generally speaking, in this
PCI BIOS mode is not required to work, since all controls
Windows takes care of the hardware. It happens that from time to time, in
depending on unstable and obscure reasons, PCI BIOS (more precisely
what is left of it when emulating a DOS window) produces an unreasonable
information about PCI device parameters, for example, zero port addresses
and interruptions. In this case, Htfossil launched with the /PC key will display
error message: "Bad PCI COM port IRQ found". If you met
with such a phenomenon, then you will hardly be able to adapt our FOSSIL for
automatic search for PCI modem. However, you can try
do this manually. Just look in Windows Device Manager,
what port addresses and what interrupt numbers are allocated for the desired
you ports, and write them manually on the command line with FOSSIL for
some COM port that you currently do not need. There is no need for that
meaning that you are not going to work with it through FOSSIL. So maybebe, for example, a port with a mouse. Let's say that this is your COM1. And your PCI
The modem is detected by Windows at address DB08h and has interrupt 10. Then
line...
HtFossil.Com /B1:DB08h /I1:10
... will load FOSSIL and force it to use COM 1 when accessing
not the address 3F8h and IRQ 4, but the address DB08h and IRQ 10. Now you can
tell your DOS program COM 1 as the port it uses
should work. Unfortunately, not everything will necessarily appear in a DOS window.
work in this case:
Windows may not want to emulate non-standard port addresses.
In this case, you can try the opposite way - do
These addresses are standard! If you select "properties" in Device Manager
(Properties) port of your PCI modem, sub-item "Resources" and disable
check the "Use automatic settings" checkbox, then you can try to register in
as a parameter any standard address (address range)
port, for example from COM 4, that is, 2E8h-2EFh.
[step15.gif]
If Windows does not allow you to change them, try selecting another "Basic"
configuration", Windows usually allows you to change parameters for some reason
for an odd-numbered configuration. Standard interrupt issue
a little more complicated - you can’t change it in Windows. Fortunately,
many modern BIOSes allow you to assign interrupts 3 and 4 to boardsPCI.
[p3180573.jpg]
If you managed to change the port and interrupt address as a result, then
Windows will try to reconfigure your device so that
the addresses match the ones you selected. If successful, you generally receive
completely standard serial port, at a standard address and with
standard interrupt number. In this case, Windows can renumber
Your port is also in the standard range 1..4.
And finally, how to get everything back. The easiest way for Windows is
This is to delete the device in Deivce manager. Don't be afraid to delete something
what you need - everything you need, Windows will find it for you again the next time
reboot. You can remove all COM ports altogether - everything will be found
again. And all non-PNP equipment will be found after you launch
standard Wizard for adding new equipment, in the mode
"Find it yourself." The only thing you may need after this is
find “modems” again, and then repeat the modem selection in
settings for Internet calls, because although Windows will be there
show the correct model, in fact, when removing or adding
device, she loses links to it, and when she tries to call through
such a modem will do some pretty strange things, telling you that
There is either no modem, or it is busy, etc. However, choosing the same modemas previously in the "DialUp networking" settings ("Remote
access") completely eliminates the problem.
Mikhail Likhachev, Dmitry Utyansky (HTS, Russia)
Published -- March 27, 2001