VOGONS


DOSBox and PLC software

Topic actions

First post, by Sheltem

User metadata
Rank Newbie
Rank
Newbie

Hi, Im trying to use dosbox to emulate some software (Basic Builder PCS6000 - not that any1 would know it) that communicates with a PLC.

So far it works well, i have got the software running, it can connect to the plc and download and view the logic. About 30sec after downloading and viewing the logic I get an error message in the program 'Time Out Error'. This error seems to happen only when the program is idle for a little while.
BTW the pc's are running windows 2000 (blah i know but its for work) I have the latest dosbox 0.65 and the PLC program works in windows.

Does anyone know how I might be able to get this going? It would make like alot easier.

So far I have tried lots of different settings in the CPU area of the dosbox.conf and I have setup the [serial] as serial1=directserial realport:COM1

Why use dosbox? a) the program can only use COM port 1, so using dosbox i can reroute that to comport 2 (b) its a very old program and if you do not have the correct type of video card when you alt tab to windows and alt tab back the screen remains black (c) thier is 6 plcs and we currently have to use 6 separate pcs with 6 'special' video cards if dosbox works we can run multiple plc's of the one PC and (d) the program is fixed as full screen, with dosbox i can have multiple instances open and view them all at the same time (and they look much better).

1 more thing, OMG TY i can now play Xeen and The fate of Atlantis! DOSbox rox.

Cheers
LG

Reply 1 of 23, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Sounds a bit like the serial port bug that 0.65 has. Try my build (in the patches section here or on my homepage) it has that bug corrected along with some other improvements.

> we can run multiple plc's of the one PC
If you don't run out of CPU power and memory 😉

1+1=10

Reply 2 of 23, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

I wonder how much CPU/memory his program requires?

Didn't Qbix say that DosBox runs in simple by default?
He can also mess around with the memsize parameter in dosbox.conf. Although it's doubtful this program uses EMS/XMS.

How To Ask Questions The Smart Way
Make your games work offline

Reply 3 of 23, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Dosbox still needs 33MB memory on the host with memsize=1 and xms/ems=false. 32MB with sound hardware deactivated. I wonder what's so huge in there...

1+1=10

Reply 4 of 23, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

heh. I guess that's the next big optimization project. Every time I read forums for DosBox ports to consoles/PDA's I hear about how DosBox is a memory/processor hog. Not much we can do about the processor besides the obvious (frameskip/core/lower cycles).

Hmm, mabye I'll poke around in the sources for those ports and see what the differences are. Dreamcast port would be the best bet but IIRC it's based on 0.60 (Yuk!).

How To Ask Questions The Smart Way
Make your games work offline

Reply 5 of 23, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Dynamic core is 10MB worth 😉 22MB with normal core.

1+1=10

Reply 7 of 23, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The other big memory consumers:

PAGING_Init (12324 kB)
VGA_Init (2092 kB)
GUS_Init (1044 kB)

1+1=10

Reply 8 of 23, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

yeps paging is the largest one of DOSBox

Water flows down the stream
How to ask questions the smart way!

Reply 9 of 23, by Sheltem

User metadata
Rank Newbie
Rank
Newbie

Still no joy. =(
I tried using the combined build off Hal's website but I get the same problem. Any other ideas?

Im not very familiar with dosbox but if it works for large amounts of data and has problems with small amounts perhaps thier is a buffer causing a problem?

Reply 10 of 23, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Does the Dosbox status window say anything unusual?
Is a screensaver or other software running when the error occurs?

1+1=10

Reply 11 of 23, by Sheltem

User metadata
Rank Newbie
Rank
Newbie

Nothing that strikes me as unusual in the status window and the pc's are running an almost fresh install of 2000. No screensavers either.

Some more info:
I ran the program once with the com ports setup incorrectly and when the program tried to access the ports dosbox would show an error message. I'll attach a screenshot. Anyway right after i attempt to download the logic this error pops up once every seccond.
The number of cycles does not effect the speed of this error message. These error messages seem to correspond to when the timeout occurs (if the com ports are setup correctly).

Reply 12 of 23, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

That tells me that your app uses the bios INT14 interface. If you'd like to help with debugging run this
http://home.arcor.de/h-a-l-9000/test/dosbox_sertest1.zip
and send me the status window output. (no need for huge screenshots, the text in the console can be copied to clipboard).

1+1=10

Reply 13 of 23, by GrafZahl

User metadata
Rank Newbie
Rank
Newbie

Hi h-a-l-9000

I have nearly the same problem with the INT14 interface and an old DOS Software.
Here is the output from the status window made with the Dosbox version above:

CONFIG:Loading settings from config file dosbox.conf
MIDI:Opened device:win32
Serial1: Opening com1
Ser1: RTS off.
Ser1: DTR off.
Ser1: CTS off.
Ser1: DSR off.
Ser1: RI off.
Ser1: CD off.
Ser2: RTS off.
Ser2: DTR off.
Ser2: RI off.
Ser2: DSR off.
Ser2: CD off.
Ser2: CTS off.
BIOS INT14: port 4 does not exist.
BIOS INT14: port 2560 does not exist.
BIOS INT14: port 3072 does not exist.
BIOS INT14: port 3584 does not exist.
BIOS INT14: port 4096 does not exist.
BIOS INT14: port 4608 does not exist.
.
.
.
and so on

I hope this will help you...

GZ

Reply 15 of 23, by GrafZahl

User metadata
Rank Newbie
Rank
Newbie

By the way:WinXP Home on a 2GHz Medion Laptop, original on a 386 20MHz.

Output from ...test3:

CONFIG:Loading settings from config file dosbox.conf
MIDI:Opened device:win32
Serial1: Opening com1
BIOS INT14: Unhandled call 40
BIOS INT14: Unhandled call 40
BIOS INT14: Unhandled call 40
BIOS INT14: Unhandled call 40

cheers

Reply 16 of 23, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Looks like that app needs special hardware/TSR (what's a I1541)?

1+1=10

Reply 17 of 23, by GrafZahl

User metadata
Rank Newbie
Rank
Newbie

The software is running on an (standart) 19" 386 industry pc. it talks via rs2332 with a touch screen controller. it should send first "01h 52h 0dh" and then receive something like "01h 30h 0dh" and so on. (4800 7N2)

The original touch screen driver runs on dosbox, it seems to use the standart serial drivers from dos ? But the software don't use this driver.

When i start the software, the first thing ist to check, wheter the touch screen controller is "online". that's the output from above (...call 40) an nothing is coming out from serial port 1.

sorry, I don't no what "I1541" means. What is TSR?

oh, "echo text > com1" works not. no error-message, but also no output on com1...

thank you!

Reply 18 of 23, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Well call 40 is nothing a "normal" PC would be able to handle (unless there is some secret about INT14). In the interrupt list (a collection of various API documentation) call 40 is described as I1541, some sort of communication API. Are you loading some extra drivers (TSR= terminate and stay resistent) in autoexec.bat / confi.sys which are missing in Dosbox?
"echo text > com1" only sends data if CTS and DSR are on (like on real DOS). As a workaround you can connect RTS->CTS and DTR->DSR on the serial plug.

1+1=10

Reply 19 of 23, by GrafZahl

User metadata
Rank Newbie
Rank
Newbie

I don't think that there will be a special driver loaded on startup, but i will test it on thuesday at work.
I found this
http://www.ctyme.com/intr/int-14.htm
and
http://sta.c64.org/cables.html
seems to be a commodore (may god rest his soul) serial cable...
and there is a driver to emulate it
http://members.surfeu.fi/1541/

Other question:
Will it be possible to "speak" with a I/O com. card like
http://www.visonet.ch/produkte.cfm?ID_n=79&la … =26&hauptkat=25
or is absolute impossible? if this not works, the serial stuff will not make sense...

have a good weekend!