* Re: Can I use DOSEMU for testing device driver code?
@ 2004-02-13 20:12 Stas Sergeev
0 siblings, 0 replies; 16+ messages in thread
From: Stas Sergeev @ 2004-02-13 20:12 UTC (permalink / raw)
To: linux-msdos
Hello.
Edenyard wrote:
> It appears that DOSEMU has BIG problems when one wants to do this sort
> of thing and nobody quite seems to know why.
Yes, this is the case sometimes, but
usually it is not.
> Last time I asked about this on the mailing list, the response
> I got was, "What's RTS?"....
What have you expected? You haven't
provided the test-case program, no
logs either, you haven't even opened
a bug report on SF tracker.
No reply only means that noone had
that problem previously.
I am using the serial ports via dosemu
at work every day, I can toggle both RTS
and CTS lines as well as the TX line,
the oscilloscope was attached just in
case - so if you sumbit a bug report
and provide at least some info and a
test-case, perhaps your problem would
have been resolved long ago already.
I was saying that in that list many
times and I can only repeat: problems
are not get fixed themselves! You have to
do at least something to get them fixed,
at least open a bug report and provide
a test-case (or logs, but logs not always help).
Unfortunately even when explicitly asked,
many people are not willing to submit a bug
report. Nothing can be done in that case -
game over. On the other hand, some users
are not only providing a bug reports, but
are also willing to do many additional
tests that are required, and in most cases
that works very good. Please see this as
a recent example:
http://sourceforge.net/tracker/index.php?func=detail&aid=884096&group_id=49784&atid=457447
Hope that helps. Be reasonable. You were
asked "What's RTS" not because noone
knew that:)
^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <4034D439.5080308@edenyard.co.uk>]
* Re: Can I use DOSEMU for testing device driver code?
[not found] <4034D439.5080308@edenyard.co.uk>
@ 2004-02-19 18:36 ` Ged Haywood
0 siblings, 0 replies; 16+ messages in thread
From: Ged Haywood @ 2004-02-19 18:36 UTC (permalink / raw)
To: Gerald Pye; +Cc: DOSEMU users mailing list
Hi Gerald,
On Thu, 19 Feb 2004, Gerald Pye wrote:
> > You could use a module for serial port support
> The only slight problem that I have with that is that I do need one of
> the serial ports to be working under Linux, so I have to have the loaded
> somehow - don't I???
There's an option in the kernel configuration menus to have 'non-standard'
serial port support, which can be ports at other addresses. I had a quick
look at it once and had what could be charitably described as mixed results
so YMMV as they say. There's always a problem with not having a separate
interrupt for each port, that's just designed into the PC and there's not
much you can do about it but use only some of the ports.
73,
Ged.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Can I use DOSEMU for testing device driver code?
@ 2004-02-15 11:15 Stas Sergeev
0 siblings, 0 replies; 16+ messages in thread
From: Stas Sergeev @ 2004-02-15 11:15 UTC (permalink / raw)
To: linux-msdos
Hello.
Ryan Underwood wrote:
>> The problem in (B) seems to be that all of my transmitted characters
>> disappear into a sort of 'virtual' UART to be transmitted later, whilst
>> the RTS signal seems to come out of the port in 'real' time.
> I don't think that is happening. i.e. in,out instructions are directly
> executed, there is no emulation involved.
No, the "problem B" was about an
emulated access, which is indeed
going via an emulated UART.
Its latency was considerably
reduced in dosemu-1.2.0 (not in
any 1.1), but still of course can't
match the direct access.
The fact that RTS gets out of sync
with the TX looks like a bug, most
likely the emulated FIFO is being
switched on when it shouldn't. But
sigh, looks like that bug will have
to wait for the next time:)
Btw, from the docs I have, it is
unclear whether there are some
ways to disable the FIFO, other than
by writing to FCR directly. But I
strongly suspect that at least
changing the DLAB state also should
disables it, which may explain this
problem.
If someone have an info on that -
would be nice to have a look.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Can I use DOSEMU for testing device driver code?
@ 2004-02-12 21:53 easlab
2004-02-13 8:17 ` Edenyard
2004-02-15 5:04 ` Ryan Underwood
0 siblings, 2 replies; 16+ messages in thread
From: easlab @ 2004-02-12 21:53 UTC (permalink / raw)
To: linux-msdos; +Cc: easlab
On Thu, Feb 12, 2004 at 04:11:34AM -0200, synthespian wrote:
> > I have a "special need" wrt DOSEMU: I
> > have this excellent book on
> > programming for hardware (device
> > drivers), but it's written only for
> > DOS/Win32. But it's a /very/ good
> > book, full of C code.
> > As I don't have a DOS/Windows
> > platform and I would really like to
> > use this book, I was wondering if
> > DOSEMU could help me.=20
> > I wonder if you implement device
> > control in a standard DOS way, using
> > wrappers that remain faithful to the
> > DOS original. I imagine that, by
> > studying your code, I could learn how
> > to program the stuff I want, while at
> > the same time beeing able to use the
> > book /and/ learning about Linux.
Ryan Underwood wrote:
> Device drivers in DOSEMU that need to access hardware/host OS resources
> are implemented in a static manner; i.e. the necessary ISR is already
> installed at the time when you start dosemu. You can hook those ISR to
> add your own functionality, but you will not be able to access the
> hardware (port I/O or IRQ) of the host machine without specifically
> allowing DOSEMU to do so (see $_ports and friends). Only the drivers
> that are installed when DOSEMU is started are allowed to access host
> hardware otherwise.
>
>
> That said, what type of device are you programming? If it is controlled
> just through some hardware registers and polling, $_ports should work
> for you. If it needs an interrupt, you need to also pass its IRQ to
> dosemu through the config file and make sure linux doesn't have
> something already on that IRQ. This is for DOS drivers; I don't know
> anything about how Windows drivers would interact with DOSEMU.
All my DOS application can't do is toggle 2 pins of the par-port.
No interupts. dosemu-1.1.99 as root, won't do it, even with
editing dosemu.conf to:
$_ports { device /dev/lp1 fast range 0x378 0x37f } # lpt1
and other combinations
Under DOS these are the correct port addresses.
Has any body ever done this ?
== Chris Glur.
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: Can I use DOSEMU for testing device driver code?
2004-02-12 21:53 easlab
@ 2004-02-13 8:17 ` Edenyard
2004-02-13 12:01 ` Bart Oldeman
2004-02-15 5:04 ` Ryan Underwood
1 sibling, 1 reply; 16+ messages in thread
From: Edenyard @ 2004-02-13 8:17 UTC (permalink / raw)
To: easlab, linux-msdos
easlab@absamail.co.za wrote:
> All my DOS application can't do is toggle 2 pins of the par-port.
> No interupts. dosemu-1.1.99 as root, won't do it, even with
> editing dosemu.conf to:
> $_ports { device /dev/lp1 fast range 0x378 0x37f } # lpt1
> and other combinations
>
> Under DOS these are the correct port addresses.
> Has any body ever done this ?
>
> == Chris Glur.
It appears that DOSEMU has BIG problems when one wants to do this sort
of thing and nobody quite seems to know why. Some time ago, I posted a
similar problem about a DOS program that I had which writes characters
to a serial port and then has to toggle the RTS line (within 50
milliseconds of the last bit of the last character going out of the TX
shifter) so that the reply can come back - the RS232 interfaces to a
half-duplex RS485, hence the RTS controls direction, send or receive.
I find that I can write the characters in my program when running under
DOSEMU 1.1.99 and they do eventually come out of the socket round the
back of the PC but there's no telling when. That makes it impossible to
know when to toggle RTS, since reading the correct status bit
(presumably emulated by DOSEMU, not the REAL bit in the UART) to see when
the shifter's empty is obviously NOT related to the timing of the actual
characters coming out of the hardware.
I, like you, have tried all sorts of permutations of using $_ports,
etc., but to no avail. If you ever find a solution, I'd be delighted to
hear it. Last time I asked about this on the mailing list, the response
I got was, "What's RTS?".... That wasn't from Bart, by the way. He seems
to have answers for most things. Not for this, though!
Cheers,
Gerald.
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: Can I use DOSEMU for testing device driver code?
2004-02-13 8:17 ` Edenyard
@ 2004-02-13 12:01 ` Bart Oldeman
2004-02-14 12:52 ` Edenyard
0 siblings, 1 reply; 16+ messages in thread
From: Bart Oldeman @ 2004-02-13 12:01 UTC (permalink / raw)
To: Edenyard; +Cc: easlab, linux-msdos
On Fri, 13 Feb 2004, Edenyard wrote:
> I, like you, have tried all sorts of permutations of using $_ports,
> etc., but to no avail. If you ever find a solution, I'd be delighted to
> hear it. Last time I asked about this on the mailing list, the response
> I got was, "What's RTS?".... That wasn't from Bart, by the way. He seems
> to have answers for most things. Not for this, though!
it's very simple since I don't have experience with DOSEMU driving
hardware directly, except for video ports (where I know for sure that
$_ports works but there is nothing to answer there beyond what is already
in the HOWTO or README{-tech}.txt).
Anyway, try to run
dosemu -D+iTcw -o log
look at the contents of log and see if anything suspect happens, ie. does
dosemu open the ports in the first place, does it read the right config
file and so on.
Bart
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: Can I use DOSEMU for testing device driver code?
2004-02-13 12:01 ` Bart Oldeman
@ 2004-02-14 12:52 ` Edenyard
2004-02-15 4:58 ` Ryan Underwood
0 siblings, 1 reply; 16+ messages in thread
From: Edenyard @ 2004-02-14 12:52 UTC (permalink / raw)
To: Bart Oldeman; +Cc: linux-msdos
Many thanks for your message, Bart!
> Anyway, try to run
> dosemu -D+iTcw -o log
>
> look at the contents of log and see if anything suspect happens, ie. does
> dosemu open the ports in the first place, does it read the right config
> file and so on.
I've done that and I've tried two different methods with the COM port to
try and find out exactly what's happening. Before I go any further, I
should say that it's DOSEMU 1.1.99 running on a 2.4.22 kernel on an
Athlon 1GHz. The PC has the standard two serial ports: COM1/ttyS0 at
0x3f8 and COM2/ttyS1 at 0x2f8. I've appended the fragment of my DOS prog
(written in Power Basic) to the end of this message (after the log
outputs) that you can see what I'm trying to do.
Here are the results:
First method - in this, I attempt to drive the COM port directly. This
results in an error message which says that there's a conflict between
COM1 and std port i/o.
The relevant lines from dosemu.conf are:
$_com1 = "/dev/ttyS0 irq 4"
$_ports = " fast range 0x3f8,0x3ff"
What happens when I run my DOS prog is that the RTS signal appears to be
perfectly timed to the data coming out of the TX pin on the serial port
connector. Unfortunately (probably because of the port conflict?) I
can't read any data coming back into the serial connector.
Here's a rough ASCII representation of what the oscilloscope (connected
to the serial connector) displays:
RTS pin: _____| |______________________________
TX pin: -------XXXXXXXXXXXXXXXXX-------------------------------
I've copied the contents of the log file to the end of this message in
the section headed "DOSEMU log - Method 1"
Second method - in this, I don't attempt to drive the COM port directly.
Now there's no error message about conflicts, but the data doesn't come
out of the TX pin of the serial port connector at the right time, which
means that the RTS signal timing is all wrong with respect to the
transmitted data stream. I also see that my prog never has to wait for
the UART to send a character before loading the next one in. That seems
very odd! This prog runs at 1200 baud, so you can see that it should
take about 10ms for each character to shift out of the UART TX register.
Running DOSEMU in this second method, it takes roughly 20 MICROSECONDS
to send a character!! Is this because DOSEMU is emulating the hardware -
is that the correct term for it?
Another rough ASCII wave chart:
RTS pin: _____| |____________________________________________________
TX pin: ------------XXXXXXXXXXXXXXXXX-------------------------------
(Note that the prog thinks that all the characters were sent while RTS
was on, but the characters don't actually come out of the UART until
much later - then it's too late!)
Here are the relevant lines in dosemu.conf for method 2:
$_com1 = "/dev/ttyS0 irq 4"
$_ports = ""
I've copied the contents of that log file also to the end of this
message in the section headed "DOSEMU log - Method 2"
So - to summarise my position at the moment: either (A) I get a conflict
between COM1 and the existing port driver but I can get RTS and TX
signals timed correctly at the connector; or (B) I can have no port
conflict but there seems to be no correct relationship between driving
the RTS signal and the TX data coming out of the connector.
The problem in (B) seems to be that all of my transmitted characters
disappear into a sort of 'virtual' UART to be transmitted later, whilst
the RTS signal seems to come out of the port in 'real' time.
And to summarise my questions: (A) how can I avoid a port conflict an
dreceive data if I want to drive the port directly? (B) how can I make
sure that the timing of RTS and the TX data is correct if I don't drive
the port directly?
The 2 logs and the programme fragment are below. Sorry for the length
of this message. I'd be very grateful for any help or clues that you can
offer me.
Cheers,
Gerald.
============================================================================
DOSEMU log - Method 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
debug flags: -a+cw
CONF: Enabling use of pentium timer
CONF: dosbanner on
CONF: timer freq=18, update=54925
CONF: CPU set to 586
CONF: 8192k bytes XMS memory
CONF: 1024k bytes EMS memory
CONF: EMS-frame = 0xe000
CONF: DPMI-Server on
CONF: config.emusys = 'EMU'
CONF: dosemu running on console
SER: directory /var/lock namestub LCK.. binary No
SER: /dev/ttyS0 port 0 int 4
MOUSE: /dev/mouse type 7 using internaldriver: yes, emulate3buttons: no
baudrate: 0
CONF: Keyboard-layout keyb-user
CONF: Keyboard-layout auto
device: /dev/fd0 type 2 h: 0 s: 0 t: 0 floppy A:
CONF: fastfloppy = 1
CONF: IPX support off
CONF(LPT0) f: (null) c: lpr o: -POL610raw t: 5 port: 0
CONF: not allowing speaker port access
CONF: Packet Driver disabled.
CONF: range of I/O ports 0x03f8-0x03ff
PORT: allow_io for port 0x03f8:8 perm=3 or=0 and=ff
PORT: range 0x03f8-0x03ff already registered as serial(auto)
PORT: Device /dev/null opened successfully = 4
PORT: registered "std port io" handle 0x01 [0x03f8-0x03ff] fd=138804216
PORT: giving fast access to ports [0x03f8-0x03ff]
nPORT: set_ioperm [3f8:8:1] returns 0
device: /dev/hda1 type 3 partition# 1 h: -1 s: -1 t: -1 drive C:
CONF: config variable c_system unset
debug flags: +iTcw
CONF: running exclusively as ROOT: uid=0 (cached 0) gid=0 (cached 0)
DBG_FD already set
DOSEMU-1.1.99.1 is coming up on Linux version 2.4.22-ATH040209e
CONF: reserving 640Kb at 0x00000 for 'd' (Base DOS memory (first 640K))
CONF: reserving 64Kb at 0xF0000 for 'r' (Dosemu reserved area)
major = 4 minor = 2
CONF: reserving 128Kb at 0xA0000 for 'v' (Video memory)
PORT: registered "8254 Timer0" handle 0x06 [0x0040-0x0040] fd=-1
PORT: registered "8254 Timer1" handle 0x07 [0x0041-0x0041] fd=-1
PORT: registered "8254 Timer2" handle 0x08 [0x0042-0x0042] fd=-1
PORT: registered "8254 Ctrl02" handle 0x09 [0x0043-0x0043] fd=-1
PORT: registered "CMOS RAM" handle 0x0a [0x0070-0x0071] fd=-1
SERIAL $Header: /cvsroot/dosemu/dosemu/src/base/serial/ser_init.c,v
1.1.2.1 2003/09/17 14:40:54 bartoldeman Exp $
registering /dev/ttyS0 for serial
ERROR: PORT: conflicting devices: COM1 & std port io
registering /dev/mouse for internal_mouse
PORT: registered "8259 PIC0" handle 0x0c [0x0020-0x0021] fd=-1
PORT: registered "8259 PIC1" handle 0x0d [0x00a0-0x00a1] fd=-1
PORT: registered "DMA - XT Controller" handle 0x0e [0x0000-0x000f] fd=-1
PORT: registered "DMA - XT Pages" handle 0x0f [0x0081-0x0087] fd=-1
PORT: registered "DMA - AT Controller" handle 0x10 [0x00c0-0x00de] fd=-1
PORT: registered "DMA - AT Pages" handle 0x11 [0x0089-0x008f] fd=-1
PORT: registered "SB Emulation" handle 0x12 [0x0220-0x0233] fd=-1
PORT: registered "Adlib (+ Advanced) Emulation" handle 0x13
[0x0388-0x038b] fd=-1
PORT: registered "Midi Emulation" handle 0x14 [0x0330-0x0331] fd=-1
PORT: registered "Joystick Port Emulation" handle 0x15 [0x0200-0x020f] fd=-1
PORT: registered "8042 Keyboard data" handle 0x16 [0x0060-0x0060] fd=-1
PORT: registered "8042 Keyboard command" handle 0x17 [0x0064-0x0064] fd=-1
PORT: registered "Speaker port" handle 0x18 [0x0061-0x0061] fd=-1
CONF: reserving 64Kb at 0xE0000 for 'E' (EMS page frame)
TIME: using 9154 usec for updating ALRM timer
20 < 20
60 > 45
20 < 20
60 > c5
20 < 20
60 > c5
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
70 < 8a
71 < 26
70 < 8f
71 > 6
70 < 8b
71 > 2
70 < 8f
71 > 6
70 < 8b
71 < 2
70 < f
71 > 6
64 > 1c
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
2f2 < ff
PORTb: 2f2 not available for write
2f3 < ff
PORTb: 2f3 not available for write
2f4 < ff
PORTb: 2f4 not available for write
2f5 < ff
PORTb: 2f5 not available for write
2f6 < ff
PORTb: 2f6 not available for write
2f7 < ff
PORTb: 2f7 not available for write
6f2 < ff
PORTb: 6f2 not available for write
6f3 < ff
PORTb: 6f3 not available for write
6f4 < ff
PORTb: 6f4 not available for write
6f6 < ff
PORTb: 6f6 not available for write
6f7 < ff
PORTb: 6f7 not available for write
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
60 > 2e
20 < 20
20 < 20
20 < 20
60 > ae
20 < 20
20 < 20
20 < 20
20 < 20
60 > 18
20 < 20
20 < 20
60 > 32
20 < 20
20 < 20
60 > 98
20 < 20
20 < 20
60 > b2
20 < 20
20 < 20
20 < 20
60 > 32
20 < 20
20 < 20
20 < 20
60 > b2
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
60 > 14
20 < 20
20 < 20
20 < 20
60 > 94
20 < 20
20 < 20
20 < 20
60 > 12
20 < 20
20 < 20
60 > 92
20 < 20
20 < 20
20 < 20
20 < 20
60 > 1f
20 < 20
20 < 20
20 < 20
60 > 9f
20 < 20
20 < 20
60 > 14
20 < 20
20 < 20
20 < 20
60 > 94
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
60 > 1c
20 < 20
20 < 20
20 < 20
61 > 2c
61 < 2c
SPEAKER: sound OFF!
43 < 36
40 < 0
40 < 0
21 > f8
21 < e8
60 > 9c
60 > 9c
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
60 > 1
60 > 1
20 < 20
20 < 20
21 > e8
21 < f8
20 < 20
60 > 81
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
60 > 1d
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
60 > 1d
20 < 20
60 > e0
20 < 20
60 > 2a
20 < 20
60 > e0
20 < 20
60 > 51
20 < 20
20 < 20
20 < 20
60 > e0
20 < 20
60 > d1
20 < 20
60 > e0
20 < 20
60 > aa
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
60 > 9d
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
60 > 1d
20 < 20
20 < 20
60 > 38
20 < 20
20 < 20
20 < 20
20 < 20
leavedos(0|0x0) called - shutting down
SPEAKER: sound OFF!
============================================================================
DOSEMU log - Method 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
debug flags: -a+cw
CONF: Enabling use of pentium timer
CONF: dosbanner on
CONF: timer freq=18, update=54925
CONF: CPU set to 586
CONF: 8192k bytes XMS memory
CONF: 1024k bytes EMS memory
CONF: EMS-frame = 0xe000
CONF: DPMI-Server on
CONF: config.emusys = 'EMU'
CONF: dosemu running on console
SER: directory /var/lock namestub LCK.. binary No
SER: /dev/ttyS0 port 0 int 4
MOUSE: /dev/mouse type 7 using internaldriver: yes, emulate3buttons: no
baudrate: 0
CONF: Keyboard-layout keyb-user
CONF: Keyboard-layout auto
device: /dev/fd0 type 2 h: 0 s: 0 t: 0 floppy A:
CONF: fastfloppy = 1
CONF: IPX support off
CONF(LPT0) f: (null) c: lpr o: -POL610raw t: 5 port: 0
CONF: not allowing speaker port access
CONF: Packet Driver disabled.
device: /dev/hda1 type 3 partition# 1 h: -1 s: -1 t: -1 drive C:
CONF: config variable c_system unset
debug flags: +iTcw
CONF: running exclusively as ROOT: uid=0 (cached 0) gid=0 (cached 0)
DBG_FD already set
DOSEMU-1.1.99.1 is coming up on Linux version 2.4.22-ATH040209e
CONF: reserving 640Kb at 0x00000 for 'd' (Base DOS memory (first 640K))
CONF: reserving 64Kb at 0xF0000 for 'r' (Dosemu reserved area)
major = 4 minor = 2
CONF: reserving 128Kb at 0xA0000 for 'v' (Video memory)
PORT: registered "8254 Timer0" handle 0x06 [0x0040-0x0040] fd=-1
PORT: registered "8254 Timer1" handle 0x07 [0x0041-0x0041] fd=-1
PORT: registered "8254 Timer2" handle 0x08 [0x0042-0x0042] fd=-1
PORT: registered "8254 Ctrl02" handle 0x09 [0x0043-0x0043] fd=-1
PORT: registered "CMOS RAM" handle 0x0a [0x0070-0x0071] fd=-1
SERIAL $Header: /cvsroot/dosemu/dosemu/src/base/serial/ser_init.c,v
1.1.2.1 2003/09/17 14:40:54 bartoldeman Exp $
registering /dev/ttyS0 for serial
PORT: registered "COM1" handle 0x0b [0x03f8-0x03ff] fd=-1
registering /dev/mouse for internal_mouse
PORT: registered "8259 PIC0" handle 0x0c [0x0020-0x0021] fd=-1
PORT: registered "8259 PIC1" handle 0x0d [0x00a0-0x00a1] fd=-1
PORT: registered "DMA - XT Controller" handle 0x0e [0x0000-0x000f] fd=-1
PORT: registered "DMA - XT Pages" handle 0x0f [0x0081-0x0087] fd=-1
PORT: registered "DMA - AT Controller" handle 0x10 [0x00c0-0x00de] fd=-1
PORT: registered "DMA - AT Pages" handle 0x11 [0x0089-0x008f] fd=-1
PORT: registered "SB Emulation" handle 0x12 [0x0220-0x0233] fd=-1
PORT: registered "Adlib (+ Advanced) Emulation" handle 0x13
[0x0388-0x038b] fd=-1
PORT: registered "Midi Emulation" handle 0x14 [0x0330-0x0331] fd=-1
PORT: registered "Joystick Port Emulation" handle 0x15 [0x0200-0x020f] fd=-1
PORT: registered "8042 Keyboard data" handle 0x16 [0x0060-0x0060] fd=-1
PORT: registered "8042 Keyboard command" handle 0x17 [0x0064-0x0064] fd=-1
PORT: registered "Speaker port" handle 0x18 [0x0061-0x0061] fd=-1
CONF: reserving 64Kb at 0xE0000 for 'E' (EMS page frame)
TIME: using 9154 usec for updating ALRM timer
20 < 20
60 > 45
20 < 20
60 > c5
20 < 20
60 > c5
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
70 < 8a
71 < 26
70 < 8f
71 > 6
70 < 8b
71 > 2
70 < 8f
71 > 6
70 < 8b
71 < 2
70 < f
71 > 6
64 > 1c
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
2f2 < ff
PORTb: 2f2 not available for write
2f3 < ff
PORTb: 2f3 not available for write
2f4 < ff
PORTb: 2f4 not available for write
2f5 < ff
PORTb: 2f5 not available for write
2f6 < ff
PORTb: 2f6 not available for write
2f7 < ff
PORTb: 2f7 not available for write
6f2 < ff
PORTb: 6f2 not available for write
6f3 < ff
PORTb: 6f3 not available for write
6f4 < ff
PORTb: 6f4 not available for write
6f6 < ff
PORTb: 6f6 not available for write
6f7 < ff
PORTb: 6f7 not available for write
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
60 > 18
20 < 20
20 < 20
20 < 20
60 > 32
20 < 20
60 > 98
20 < 20
20 < 20
60 > b2
20 < 20
20 < 20
20 < 20
60 > 32
20 < 20
20 < 20
20 < 20
60 > b2
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
60 > 14
20 < 20
20 < 20
20 < 20
60 > 94
20 < 20
20 < 20
60 > 12
20 < 20
20 < 20
60 > 92
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
60 > 1f
20 < 20
20 < 20
60 > 9f
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
60 > 14
20 < 20
20 < 20
60 > 94
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
60 > e
20 < 20
20 < 20
20 < 20
60 > 8e
20 < 20
20 < 20
20 < 20
60 > e
20 < 20
20 < 20
20 < 20
60 > 8e
20 < 20
20 < 20
60 > e
20 < 20
20 < 20
20 < 20
60 > 8e
20 < 20
20 < 20
20 < 20
60 > e
20 < 20
20 < 20
60 > 8e
20 < 20
20 < 20
20 < 20
60 > e
20 < 20
20 < 20
60 > 8e
20 < 20
20 < 20
20 < 20
60 > e
20 < 20
20 < 20
20 < 20
60 > 8e
20 < 20
20 < 20
20 < 20
20 < 20
60 > e
20 < 20
20 < 20
60 > 8e
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
60 > 2e
20 < 20
20 < 20
20 < 20
60 > ae
20 < 20
20 < 20
20 < 20
20 < 20
60 > 18
20 < 20
20 < 20
60 > 32
20 < 20
20 < 20
60 > 98
20 < 20
20 < 20
60 > b2
20 < 20
20 < 20
20 < 20
60 > 32
20 < 20
20 < 20
20 < 20
60 > b2
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
60 > 14
20 < 20
20 < 20
60 > 94
20 < 20
20 < 20
60 > 12
20 < 20
20 < 20
20 < 20
60 > 92
20 < 20
20 < 20
20 < 20
60 > 1f
20 < 20
20 < 20
20 < 20
60 > 9f
20 < 20
20 < 20
20 < 20
60 > 14
20 < 20
20 < 20
20 < 20
60 > 94
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
60 > 1c
20 < 20
20 < 20
20 < 20
60 > 9c
60 > 9c
20 < 20
61 > 3c
61 < 3c
SPEAKER: sound OFF!
43 < 36
40 < 0
40 < 0
3f9 < 0
3fb < 87
3f8 < 60
3f9 < 0
3fb < 7
3fc < 9
3fb < 80
3f8 < 60
3f9 < 0
3fb < 3
3fc < b
3f9 < 1
3fc < b
3fe > 0
3fa < 4f
3f8 > 0
3f8 > 0
3fd > 60
21 > f8
21 < e8
3fc < b
3fd > 60
3f8 < 2
3fd > 20
3f8 < 30
3fd > 20
3f8 < 31
3fd > 20
3f8 < 30
3fd > 20
3f8 < 33
3fd > 20
3f8 < 3
3fd > 20
3f8 < 30
3fd > 20
3f8 < 31
3fd > 20
3f8 < d
3fd > 20
3fd > 60
3fc < 9
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
3fc < b
3fd > 60
3f8 < 2
3fd > 60
3f8 < 30
3fd > 20
3f8 < 31
3fd > 60
3f8 < 30
3fd > 20
3f8 < 33
3fd > 60
3f8 < 3
3fd > 20
3f8 < 30
3fd > 60
3f8 < 31
3fd > 20
3f8 < d
3fd > 60
3fd > 60
3fc < 9
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
3fc < b
3fd > 60
3f8 < 2
3fd > 60
3f8 < 30
3fd > 20
3f8 < 31
3fd > 60
3f8 < 30
3fd > 20
3f8 < 33
3fd > 60
3f8 < 3
3fd > 20
3f8 < 30
3fd > 60
3f8 < 31
3fd > 20
3f8 < d
3fd > 60
3fd > 60
3fc < 9
60 > 1
60 > 1
20 < 20
3fc < 0
21 > e8
21 < f8
20 < 20
20 < 20
60 > 81
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
20 < 20
60 > 1d
20 < 20
60 > 38
20 < 20
20 < 20
20 < 20
20 < 20
leavedos(0|0x0) called - shutting down
SPEAKER: sound OFF!
============================================================================
Fragment of DOS RS485 programme run with DOSEMU:
============================================================================
' TX2NETWORK turns on the TX driver, then waits for the TX holding
' register to empty before sending each character in TX$ to
' the UART. When the last character has gone into the UART,
' it again waits for the TX holding register to empty;
' then and ONLY then does it check for the TX shifter to empty
' before turning the TX driver off again.
' This last precaution is necessary on some UARTs to ensure that
' the TX shifter empty does not give a spurious clear signal
' before the last character has been completely sent.
'
'
' For the purposes of testing, TX$ has these ASCII characters:
'
' ASCII: STX 0 1 0 3 ETX 0 1 CR
' Hex: 03 30 31 30 33 03 30 31 0D
'
' An initialisation routine has already set the UART to 1200 baud.
'
'
TX2NETWORK:
'
' Set RTS to turn TX driver on. Wait for TX driver to settle.
'
out IUART+MCR%,TXEN%
delay .1
'
' Check that TX holding reg is empty first.
' Then send characters in TX$ one by one to UART to be shifted out.
'
for i%=1 to len(TX$)
while (inp(IUART+LSR%) and &B00100000)=0 : wend
out IUART+THR%,asc(mid$(TX$,i%,1))
next i%
'
' Wait for last bit of last character to be shifted out,
' then reset RTS to turn TX driver off:
'
while (inp(IUART+LSR%) and &B00100000)=0 : wend
while (inp(IUART+LSR%) and &B01000000)=0 : wend out IUART+MCR%,TXDIS%
return
'
============================================================================
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Can I use DOSEMU for testing device driver code?
2004-02-14 12:52 ` Edenyard
@ 2004-02-15 4:58 ` Ryan Underwood
2004-02-16 11:27 ` Edenyard
0 siblings, 1 reply; 16+ messages in thread
From: Ryan Underwood @ 2004-02-15 4:58 UTC (permalink / raw)
To: linux-msdos
[-- Attachment #1: Type: text/plain, Size: 1501 bytes --]
On Sat, Feb 14, 2004 at 12:52:10PM +0000, Edenyard wrote:
>
> Here are the results:
>
> First method - in this, I attempt to drive the COM port directly. This
> results in an error message which says that there's a conflict between
> COM1 and std port i/o.
>
> The relevant lines from dosemu.conf are:
>
> $_com1 = "/dev/ttyS0 irq 4"
> $_ports = " fast range 0x3f8,0x3ff"
>
> What happens when I run my DOS prog is that the RTS signal appears to be
> perfectly timed to the data coming out of the TX pin on the serial port
> connector. Unfortunately (probably because of the port conflict?) I
> can't read any data coming back into the serial connector.
Urm, sounds like you need to enable irqpassing for that port, unless you
are strictly doing polling I/O. First use setserial to disable Linux's
use of the port though.
> Running DOSEMU in this second method, it takes roughly 20 MICROSECONDS
> to send a character!! Is this because DOSEMU is emulating the hardware -
> is that the correct term for it?
I have noticed rather slow port I/O under dosemu too. I cannot explain
it yet.
> The problem in (B) seems to be that all of my transmitted characters
> disappear into a sort of 'virtual' UART to be transmitted later, whilst
> the RTS signal seems to come out of the port in 'real' time.
I don't think that is happening. i.e. in,out instructions are directly
executed, there is no emulation involved.
--
Ryan Underwood, <nemesis@icequake.net>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Can I use DOSEMU for testing device driver code?
2004-02-15 4:58 ` Ryan Underwood
@ 2004-02-16 11:27 ` Edenyard
2004-02-17 7:52 ` Ryan Underwood
2004-02-17 9:36 ` Ged Haywood
0 siblings, 2 replies; 16+ messages in thread
From: Edenyard @ 2004-02-16 11:27 UTC (permalink / raw)
To: Ryan Underwood; +Cc: linux-msdos
Ryan Underwood wrote:
> First use setserial to disable Linux's
> use of the port though.
Reading the man page for setserial, it seems that the way to disable
the port (/dev/ttyS0) is: 'setserial /dev/ttyS0 uart none'. Is that
correct? When I try that (as root), although it doesn't issue any error
message, it doesn't disable /dev/ttyS0 either. When I subsequently do
'setserial /dev/ttyS0' to check, it merely says that the UART is
unknown, but that ttyS0 is STILL using IRQ4 and port address 0x3f8.
How do I get to disable ttyS0 completely so that DOSEMU can have
direct access to it?
TIA,
Gerald.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Can I use DOSEMU for testing device driver code?
2004-02-16 11:27 ` Edenyard
@ 2004-02-17 7:52 ` Ryan Underwood
2004-02-17 9:36 ` Ged Haywood
1 sibling, 0 replies; 16+ messages in thread
From: Ryan Underwood @ 2004-02-17 7:52 UTC (permalink / raw)
To: Edenyard; +Cc: Ryan Underwood, linux-msdos
[-- Attachment #1: Type: text/plain, Size: 870 bytes --]
On Mon, Feb 16, 2004 at 11:27:30AM +0000, Edenyard wrote:
> Ryan Underwood wrote:
>
> >First use setserial to disable Linux's
> >use of the port though.
>
> Reading the man page for setserial, it seems that the way to disable
> the port (/dev/ttyS0) is: 'setserial /dev/ttyS0 uart none'. Is that
> correct? When I try that (as root), although it doesn't issue any error
> message, it doesn't disable /dev/ttyS0 either. When I subsequently do
> 'setserial /dev/ttyS0' to check, it merely says that the UART is
> unknown, but that ttyS0 is STILL using IRQ4 and port address 0x3f8.
I am not sure. uart none is what I did to be able to load a kernel
module which also directly accessed that port. (atarisio) So I would
think it would be sufficient to not get in the way of dosemu. Perhaps
not though.
--
Ryan Underwood, <nemesis@icequake.net>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Can I use DOSEMU for testing device driver code?
2004-02-16 11:27 ` Edenyard
2004-02-17 7:52 ` Ryan Underwood
@ 2004-02-17 9:36 ` Ged Haywood
1 sibling, 0 replies; 16+ messages in thread
From: Ged Haywood @ 2004-02-17 9:36 UTC (permalink / raw)
To: Edenyard; +Cc: Ryan Underwood, linux-msdos
Hi there,
On Mon, 16 Feb 2004, Edenyard wrote:
> How do I get to disable ttyS0 completely so that DOSEMU can have
> direct access to it?
Perhaps you need to recompile your kernel.
You could use a module for serial port support instead of compiling it
into the kernel directly. Then you would have a choice of letting the
kernel use the ports or not, by loading the module or not.
73,
Ged.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Can I use DOSEMU for testing device driver code?
2004-02-12 21:53 easlab
2004-02-13 8:17 ` Edenyard
@ 2004-02-15 5:04 ` Ryan Underwood
1 sibling, 0 replies; 16+ messages in thread
From: Ryan Underwood @ 2004-02-15 5:04 UTC (permalink / raw)
To: linux-msdos
[-- Attachment #1: Type: text/plain, Size: 1313 bytes --]
On Thu, Feb 12, 2004 at 04:53:38PM -0500, easlab@absamail.co.za wrote:
>
> All my DOS application can't do is toggle 2 pins of the par-port.
> No interupts. dosemu-1.1.99 as root, won't do it, even with
> editing dosemu.conf to:
> $_ports { device /dev/lp1 fast range 0x378 0x37f } # lpt1
> and other combinations
You don't want to use the lp device. In fact, it will work better if
you remove the lp and all parport drivers before using dosemu. I can
use the parallel port with:
1) removed all linux parallel port support (lp,ppdev,parport_pc,parport)
2) $_ports = "range 0x3bc,0x3be range 0x7bc,0x7be" and $_irqpassing = "7"
3) sudo dosemu
This is for a port at 0x3bc. The 0x7bc range is the ECP registers,
which are usually unnecessary but in my case they were (even though ECP
DMA mode cannot be used under dosemu). ECP control register is used to
set the parallel port's mode from spp to tristate on some chips that
boot up in spp mode.
If you are not using the interrupt, then you do not need irqpassing.
I was unable to get anything to work until removing the linux pp
drivers, probably because (Stas said) dosemu checks /proc/ioports for
already used port ranges by linux drivers and refuses to use them again.
--
Ryan Underwood, <nemesis@icequake.net>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Can I use DOSEMU for testing device driver code?
@ 2004-02-12 6:11 synthespian
2004-02-12 10:15 ` Ryan Underwood
0 siblings, 1 reply; 16+ messages in thread
From: synthespian @ 2004-02-12 6:11 UTC (permalink / raw)
To: linux-msdos
Hello --
I have a "special need" wrt DOSEMU: I
have this excellent book on
programming for hardware (device
drivers), but it's written only for
DOS/Win32. But it's a /very/ good
book, full of C code.
As I don't have a DOS/Windows
platform and I would really like to
use this book, I was wondering if
DOSEMU could help me.
I wonder if you implement device
control in a standard DOS way, using
wrappers that remain faithful to the
DOS original. I imagine that, by
studying your code, I could learn how
to program the stuff I want, while at
the same time beeing able to use the
book /and/ learning about Linux.
Any thoughts?
Thank you,
Regs,
Henry
PS: I was unable to download the
source at sourceforge, just gave me a
blank page.
PS2: Would you kindly reply also to
me, if at all possible (I don't
subscribe to the list yet - should I?)
---
Acabe com aquelas janelinhas que pulam na sua tela.
AntiPop-up UOL - É grátis!
http://antipopup.uol.com.br
-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Can I use DOSEMU for testing device driver code?
2004-02-12 6:11 synthespian
@ 2004-02-12 10:15 ` Ryan Underwood
2004-02-14 19:00 ` EL Henry
0 siblings, 1 reply; 16+ messages in thread
From: Ryan Underwood @ 2004-02-12 10:15 UTC (permalink / raw)
To: linux-msdos
[-- Attachment #1: Type: text/plain, Size: 1720 bytes --]
On Thu, Feb 12, 2004 at 04:11:34AM -0200, synthespian wrote:
> Hello --
>
> I have a "special need" wrt DOSEMU: I
> have this excellent book on
> programming for hardware (device
> drivers), but it's written only for
> DOS/Win32. But it's a /very/ good
> book, full of C code.
> As I don't have a DOS/Windows
> platform and I would really like to
> use this book, I was wondering if
> DOSEMU could help me.
> I wonder if you implement device
> control in a standard DOS way, using
> wrappers that remain faithful to the
> DOS original. I imagine that, by
> studying your code, I could learn how
> to program the stuff I want, while at
> the same time beeing able to use the
> book /and/ learning about Linux.
Device drivers in DOSEMU that need to access hardware/host OS resources
are implemented in a static manner; i.e. the necessary ISR is already
installed at the time when you start dosemu. You can hook those ISR to
add your own functionality, but you will not be able to access the
hardware (port I/O or IRQ) of the host machine without specifically
allowing DOSEMU to do so (see $_ports and friends). Only the drivers
that are installed when DOSEMU is started are allowed to access host
hardware otherwise.
That said, what type of device are you programming? If it is controlled
just through some hardware registers and polling, $_ports should work
for you. If it needs an interrupt, you need to also pass its IRQ to
dosemu through the config file and make sure linux doesn't have
something already on that IRQ. This is for DOS drivers; I don't know
anything about how Windows drivers would interact with DOSEMU.
--
Ryan Underwood, <nemesis@icequake.net>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Can I use DOSEMU for testing device driver code?
2004-02-12 10:15 ` Ryan Underwood
@ 2004-02-14 19:00 ` EL Henry
2004-02-15 4:53 ` Ryan Underwood
0 siblings, 1 reply; 16+ messages in thread
From: EL Henry @ 2004-02-14 19:00 UTC (permalink / raw)
To: linux-msdos
Ryan Underwood <nemesis-lists <at> icequake.net> writes:
> That said, what type of device are you programming?
I'm not yet, that's why I want to read the book. I want to know if there's any
chance of the standard DOS C code in it running in DOSEMU.
Regs
Henry
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Can I use DOSEMU for testing device driver code?
2004-02-14 19:00 ` EL Henry
@ 2004-02-15 4:53 ` Ryan Underwood
0 siblings, 0 replies; 16+ messages in thread
From: Ryan Underwood @ 2004-02-15 4:53 UTC (permalink / raw)
To: linux-msdos
[-- Attachment #1: Type: text/plain, Size: 551 bytes --]
On Sat, Feb 14, 2004 at 07:00:04PM +0000, EL Henry wrote:
> Ryan Underwood <nemesis-lists <at> icequake.net> writes:
>
> > That said, what type of device are you programming?
>
> I'm not yet, that's why I want to read the book. I want to know if there's any
> chance of the standard DOS C code in it running in DOSEMU.
Yes, there is a chance, but it depends highly on the semantics and will
probably require $_ports and $_irqpassing to be configured as well as
dosemu running as root.
--
Ryan Underwood, <nemesis@icequake.net>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2004-02-19 18:36 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-13 20:12 Can I use DOSEMU for testing device driver code? Stas Sergeev
[not found] <4034D439.5080308@edenyard.co.uk>
2004-02-19 18:36 ` Ged Haywood
-- strict thread matches above, loose matches on Subject: below --
2004-02-15 11:15 Stas Sergeev
2004-02-12 21:53 easlab
2004-02-13 8:17 ` Edenyard
2004-02-13 12:01 ` Bart Oldeman
2004-02-14 12:52 ` Edenyard
2004-02-15 4:58 ` Ryan Underwood
2004-02-16 11:27 ` Edenyard
2004-02-17 7:52 ` Ryan Underwood
2004-02-17 9:36 ` Ged Haywood
2004-02-15 5:04 ` Ryan Underwood
2004-02-12 6:11 synthespian
2004-02-12 10:15 ` Ryan Underwood
2004-02-14 19:00 ` EL Henry
2004-02-15 4:53 ` Ryan Underwood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox