VOGONS

Common searches


DirectSerial patch

Topic actions

Reply 220 of 353, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

@Motorola radio users
http://home.arcor.de/h-a-l-9000/dosbox_files/ … osbox_ocbus.zip

Use like this: serialx directserial realport:comy ocbus

@CJEC:
Did you change the phonelistsize?

I found a build that supports 10 entries.
http://home.arcor.de/h-a-l-9000/dosbox_files/ … tch_exe_old.zip

Reply 221 of 353, by cliceub

User metadata
Rank Newbie
Rank
Newbie

h-a-l-9000,
I made the tests today and he did not function, Motorola software continues not recognizing the radio. 🙁

I use config:

serial1=directserial realport:com2 ocbus

ps1: thank's for attention.
ps2: it forgives for the delay in the tests.

Reply 222 of 353, by cpohl2go

User metadata
Rank Newbie
Rank
Newbie

Sorry, but I am yet another newbe. I am trying to run an old dos app called LM90 for commicating to a PLC in dosbox running on linux. I download the latest dosbox cvs revision, but as soon as the application tries to commicate with the PLC I get this output on the terminal.

Serial1: Opening /dev/ttyS1
Serial1: Warning: Tried to activate FIFO.
Serial1: Errors occured: Framing 0, Parity 0, Overrun 1 (IF0:0), Break 0

Any help would be appreciated.

Reply 223 of 353, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

cpohl2go - did you make any changes to the DOSBox configuration, like mapping the emulated serial ports to your real, physical ports?

Also, I am not sure how well the serial port stuff is supported on Linux. Much of it is (I think) done on the Windows version by passing all the I/O requests directly to Windows.

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 226 of 353, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie

Well, actually device names on Linux can be quite different these days. Classic UART16440-based ports are indeed called /dev/ttyS0, /dev/ttyS1 and so on. USB serial converters (including those built into devices like mobile phones or PDAs) can be called /dev/ttyUSB0 (and up) or /dev/ttyACM0 (and up) and probably there can be other names as well, depending on driver.

Reply 227 of 353, by cpohl2go

User metadata
Rank Newbie
Rank
Newbie

Here is how I have the dosbox.conf file setup.
serial1=directserial realport:ttyS1 startbps:9600 parity:N stopbits:1 bytesize:8

The serial port is /dev/ttyS1. I am able to connect to the plc using minicom with these parameters.

I have tried connecting in Windows with the dosbox release 0.65 with no success. I have not tried using the latest in cvs. I really prefer setting this up for linux.

I have tried to increase the cycles with no success. What should I increase the cycles to?

Reply 228 of 353, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

cpohl2go - A new version of DOSBox is just around the corner. Hang onto your hat and wait, and you won't have to deal with the CVS version (I hope).

Edit: DOSBox 0.70 was released a few minutes ago 😁

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 229 of 353, by cpohl2go

User metadata
Rank Newbie
Rank
Newbie

I am still getting the same errors with the recent release.

Here is the error.
Serial1: Warning: Tried to activate FIFO.
Serial1: Errors occured: Framing 0, Parity 0, Overrun 1 (IF0:0), Break 0

Reply 230 of 353, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Do you compile it yourself?

Open /include/serial.h and change '#define SERIAL_DEBUG 0' the 0 to 1.
Set the serial port like this:
serialx directserial realport:xxxx dbgtr dbgmd dbgreg dbgirq dbgaux
Now run your app.
A log file serlog.txt will be created in the capture directory. Put it here and maybe I can help.

Reply 231 of 353, by cpohl2go

User metadata
Rank Newbie
Rank
Newbie

Here is the output in the file. Thanks for all the help!

COM1: BASE 3f8, IRQ 4

1.000 Port type directserial realport ttyS1
1.000 RTS off.
1.000 DTR off.
1.000 CTS off.
1.000 msr interrupt on.
1.000 DSR off.
1.000 RI off.
1.000 CD off.
1.000 msr interrupt off.
19168.710 write 0x80 to LCR.
19168.712 write 0xc to THR.
19168.714 write 0x0 to IER.
19168.716 write 0x3 to LCR.
19168.719 write 0x7 to FCR.
19168.720 read 0x1 from ISR.
19168.723 write 0x9 to MCR.
19168.723 DTR on.
19168.909 read 0x60 from LSR.
19175.353 write 0x0 to IER.
19175.375 read 0x60 from LSR.
19175.397 read 0x60 from LSR.
19175.400 read 0x3 from LCR.
19175.401 write 0x43 to LCR.
19175.401 break on.
19186.000 rx 0x07 (7)
19186.000 rx interrupt on.
19278.846 read 0x43 from LCR.
19278.847 write 0x3 to LCR.
19278.847 break off.
19278.867 read 0x61 from LSR.
19278.876 write 0xb to MCR.
19278.876 RTS on.
19278.896 read 0x61 from LSR.
19279.088 write 0x0 to IER.
19279.090 write 0x1 to MCR.
19279.090 RTS off.
19279.186 write 0x0 to IER.
19279.197 write 0x80 to LCR.
19279.199 write 0xc to THR.
19279.201 write 0x0 to IER.
19279.203 write 0x3 to LCR.
19279.206 write 0x7 to FCR.
19279.207 read 0x1 from ISR.
19279.210 write 0x9 to MCR.
19279.308 read 0x61 from LSR.
19285.723 write 0x0 to IER.
19285.745 read 0x61 from LSR.
19285.767 read 0x61 from LSR.
19285.770 read 0x3 from LCR.
19285.771 write 0x43 to LCR.
19285.771 break on.
19303.000 rx 0x07 (7)
19303.000 rx overrun (IF=512)
19303.000 error interrupt on.
19388.698 read 0x43 from LCR.
19388.699 write 0x3 to LCR.
19388.699 break off.
19388.718 error interrupt off.
19388.718 read 0x63 from LSR.
19388.728 write 0xb to MCR.
19388.728 RTS on.
19388.748 read 0x61 from LSR.
19553.619 read 0x61 from LSR.
19553.646 read 0x61 from LSR.
19553.650 write 0x7 to FCR.
19553.669 read 0x61 from LSR.
19553.673 rx interrupt off.
19553.673 read 0x7 from RHR.
19553.692 read 0x60 from LSR.
19553.696 write 0x7 to IER.
19553.696 IRQ4 on.
19553.698 write 0x7 to IER.
19553.699 read 0x60 from LSR.
19553.701 read 0x7 from RHR.
19553.702 tx interrupt off.
19553.702 IRQ4 off.
19553.702 read 0x2 from ISR.
19553.703 read 0x0 from MSR.
19553.705 read 0xb from MCR.
19553.706 write 0xb to MCR.
19553.719 write 0x1b to THR.
19553.719 tx 0x1b ( 19553.733 write 0xb to MCR.
19553.849 tx interrupt on.
19553.849 IRQ4 on.
19553.855 tx interrupt off.
19553.855 IRQ4 off.
19553.855 read 0x2 from ISR.
19553.863 write 0x41 to THR.
19554.921 tx 0x41 (A) (from THR)
19554.921 tx interrupt on.
19554.921 IRQ4 on.
19554.927 tx interrupt off.
19554.927 IRQ4 off.
19554.927 read 0x2 from ISR.
19554.935 write 0x0 to THR.
19555.963 tx 0x00 (0) (from THR)
19555.963 tx interrupt on.
19555.963 IRQ4 on.
19555.969 tx interrupt off.
19555.969 IRQ4 off.
19555.969 read 0x2 from ISR.
19555.977 write 0x0 to THR.
19557.005 tx 0x00 (0) (from THR)
19557.005 tx interrupt on.
19557.005 IRQ4 on.
19557.011 tx interrupt off.
19557.011 IRQ4 off.
19557.011 read 0x2 from ISR.
19557.019 write 0x0 to THR.
19558.047 tx 0x00 (0) (from THR)
19558.047 tx interrupt on.
19558.047 IRQ4 on.
19558.053 tx interrupt off.
19558.053 IRQ4 off.
19558.053 read 0x2 from ISR.
19558.061 write 0x0 to THR.
19559.089 tx 0x00 (0) (from THR)
19559.089 tx interrupt on.
19559.089 IRQ4 on.
19559.095 tx interrupt off.
19559.095 IRQ4 off.
19559.095 read 0x2 from ISR.
19559.103 write 0x0 to THR.
19560.131 tx 0x00 (0) (from THR)
19560.131 tx interrupt on.
19560.131 IRQ4 on.
19560.137 tx interrupt off.
19560.137 IRQ4 off.
19560.137 read 0x2 from ISR.
19560.145 write 0x0 to THR.
19561.000 rx 0x07 (7)
19561.000 rx interrupt on.
19561.000 IRQ4 on.
19561.006 read 0x4 from ISR.
19561.011 read 0x1 from LSR.
19561.013 rx interrupt off.
19561.013 IRQ4 off.
19561.013 read 0x7 from RHR.
19561.022 read 0x0 from LSR.
19561.026 write 0x5 to IER.
19561.173 tx 0x00 (0) (from THR)
19561.173 tx interrupt on.
19562.012 rx 0x41 (65)
19562.012 rx interrupt on.
19562.012 IRQ4 on.
19562.018 read 0x4 from ISR.
19562.023 read 0x21 from LSR.
19562.025 rx interrupt off.
19562.025 IRQ4 off.
19562.025 read 0x41 from RHR.
19562.033 read 0x20 from LSR.
19563.024 rx 0x07 (7)
19563.024 rx interrupt on.
19563.024 IRQ4 on.
19563.030 read 0x4 from ISR.
19563.035 read 0x61 from LSR.
19563.037 rx interrupt off.
19563.037 IRQ4 off.
19563.037 read 0x7 from RHR.
19563.045 read 0x60 from LSR.
19573.000 rx 0x07 (7)
19573.000 rx interrupt on.
19573.000 IRQ4 on.
19573.006 read 0x4 from ISR.
19573.011 read 0x61 from LSR.
19573.013 rx interrupt off.
19573.013 IRQ4 off.
19573.013 read 0x7 from RHR.
19573.021 read 0x60 from LSR.
19574.012 rx 0x07 (7)
19574.012 rx interrupt on.
19574.012 IRQ4 on.
19574.018 read 0x4 from ISR.
19574.023 read 0x61 from LSR.
19574.025 rx interrupt off.
19574.025 IRQ4 off.
19574.025 read 0x7 from RHR.
19574.033 read 0x60 from LSR.
19575.024 rx 0x07 (7)
19575.024 rx interrupt on.
19575.024 IRQ4 on.
19575.030 read 0x4 from ISR.
19575.035 read 0x61 from LSR.
19575.037 rx interrupt off.
19575.037 IRQ4 off.
19575.037 read 0x7 from RHR.
19575.045 read 0x60 from LSR.
19576.036 rx 0x07 (7)
19576.036 rx interrupt on.
19576.036 IRQ4 on.
19576.042 read 0x4 from ISR.
19576.047 read 0x61 from LSR.
19576.049 rx interrupt off.
19576.049 IRQ4 off.
19576.049 read 0x7 from RHR.

And so on.[/code]

Reply 232 of 353, by cpohl2go

User metadata
Rank Newbie
Rank
Newbie

Sorry, I didn't see the file attachment option until I hist submit. Here is the whole file.

Attachments

  • Filename
    dosbox_000.serlog.txt
    File size
    39.36 KiB
    Downloads
    63 downloads
    File license
    Fair use/fair dealing exception

Reply 233 of 353, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Can't see anything obviously wrong in there and have no comparison...
Something more to try:
set cycles very low (1000 or lower).
add rxdelay:0 to the serial port parameters.

1+1=10

Reply 234 of 353, by cpohl2go

User metadata
Rank Newbie
Rank
Newbie

It has been a long time since I installed this on my old win95 machine and I went back to the documentation because I remember getting the serial port set up then was a pain. The documentaion has a few config.sys file settings for the serial port to work correctly.

DEVICE=C:\DOS\HIMEM.SYS
DOS=HIGH,UMB
DEVICE=C:\DOS\EMM386.EXE 1024
FILES=20
BUFFERS=40

Would this be effecting anything? Are there dosbox equivalent settings?

Reply 235 of 353, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

No.

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 236 of 353, by Banzai

User metadata
Rank Newbie
Rank
Newbie

Hal, my old friend--

It has been some months since I started using your 0.65 build with the DirectSerial enhancements. The version I have works for alot of things, but not all. So, I have some questions, answers which are not entriely apparent from past posts:

1. Did your enhanced DirecSerial mods become integrated into 0.70?

2. Have you made any changes to DirectSerial since 9/17/06?

3. Does your code now do anything with the Ring Indicator handshake line?
I'm asking, because one of the applications that still doesn't work right
uses this line.

If your DirectSerial code has been folded into the 0.70 release, then I will test it, and see what works, and what doesn't.

I want you to know also, that your efforts are *GREATLY* appreciated by a whole community of users of DOSBox, who use it to program their radio equipment. DOSBox (and your directserial subsystem) makes this SO much simpler . . . .

Reply 237 of 353, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

> Did your enhanced DirecSerial mods become integrated into 0.70?

Yes, it's in there. And Directserial for Linux too.

> Have you made any changes to DirectSerial since 9/17/06?

I think so (I don't keep records on that 😉)

> Does your code now do anything with the Ring Indicator handshake line?

RI should work fine, at least since 0.70. Some USB/Serial-Converters or their drivers are badly implemented though and don't support RI.

And of course it's nice to hear somebody can make use of it.

1+1=10

Reply 238 of 353, by mf2hd

User metadata
Rank Newbie
Rank
Newbie

Hello,
I'm posting here, without opening a new thread because it's a "serial port" related one.
I hope it isn't a mistake...

System:
notebook P4 1.8
serial port on m.board (not usb or pcmcia).
o.s. winxp prof. sp2

dosbox 0.70 (cvs from aep compiled by myself).

in dosbox.conf I've tried two settings for serial (the problem persists with both):

serial1=directserial realport:com1 startbps:9600 parity:n bytesize:8 stopbits:1 irq:4

serial1=directserial realport:com1

the other serials are:

serial2=disabled
serial3=disabled
serial4=disabled

The program that I've run is a very old tool that scans a 485 bus to find the hex address of the devices that are on this one.
The screen is a "text mode" with some graphic sub-pages in vga for trend view.

The problem:
during the scan the screen shows some device with right "name" and other without "name" (it found "something" but doesn't know "what it is"), in both cases the address are wrong.
The status window shows a lot of lines (see attachment) and the strange thing is these lines "running" again after the exit from the program.

Notes:
In the past I've tried to run the program in win31/95/98 command prompt but it doesn't work (the scan missed a lot of devices: timing problems, I supose).The only way to a "perfect running" is start it in dos.

Who wrote the program have used for the two digit date the formula: "actual_date - 1900", so I must change the system date to 1999 before starting the dosbox and the program, also it freezes because the "xx/xx/10X" that goes out of the screen.

Will this action create problems to dosbox internal routines?

The rs232/rs485 converter that I've used was built by me and it works fine (test with many different devices and producers for years without problems).
The power for the circuit isn't taken from the port (9V battery or ext.supply).
It uses only 3 lines from rs232 (TX,RX,GND), the commutation from tx/rx is made with a timer (555) that resets the 485 transceiver every 1s (about, for 9600,8,n,1).

Maybe this last one that generates the continuos lines in status windows during and after the program run/exit?

Thanks in advance for the help and suggestions.
As always, sorry for my english.

_mf2hd_

Attachments

  • Filename
    serial_dbox.rar
    File size
    55.75 KiB
    Downloads
    60 downloads
    File comment
    serial in status window
    File license
    Fair use/fair dealing exception

Reply 239 of 353, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I think nobody has had any luck with DOSBox and RS485 so far...

One suggestion:

serial1=directserial realport:com1 rxdelay:0

or rxdelay:10... (default is 100)

Or if the adapter connects rx and tx (the device also receives the data it sends ) try my "ocbus" build..

Re: Direct serial port working