DirectSerial patch

Here you can discuss the development of patches.

Re: Direct serial port working

Postby joe_pool_is » 2005-6-06 @ 14:13

h-a-l-9000 wrote:Another update:

- diff for current cvs
- modem update
Thanks hal9000. I appreciate the time you have put in on this more than you know.
Wanted: Gasoline and matches.
User avatar
joe_pool_is
Newbie
 
Posts: 28
Joined: 2005-5-26 @ 15:18
Location: Texas

Re: Direct serial port working

Postby h-a-l-9000 » 2005-6-08 @ 04:14

Modem now works for Tyrian (and Radix and Tzone).
But where to find an opponent :happyhappy:
You do not have the required permissions to view the files attached to this post.
h-a-l-9000
DOSBox Author
 
Posts: 4512
Joined: 2005-2-23 @ 00:14

Re: Direct serial port working

Postby Qbix » 2005-6-08 @ 07:29

coooool
Water flows down the stream
How to ask questions the smart way!
User avatar
Qbix
DOSBox Author
 
Posts: 10555
Joined: 2002-11-27 @ 14:50
Location: Fryslan

Q. About "extern Bitu cycle_count"

Postby joe_pool_is » 2005-6-09 @ 19:32

Hey hal9000,

I am trying to get your serial port mod to work with orz's realtime clock mod (see viewtopic.php?t=5418&highlight=real+clock+dosbox).

I started with a successful version of orz's realtime clock mod and applied the changes to allow your serial port mod to work. I could not, however, get the project to compile. There were too many errors, undefined symbols, and code changes that I was unable to follow.

Instead, I took a successfully compiled version of your serial port mod and applied the changes specified in orz's realtime clock mod. His patch ran smoothly on your modified code, and I was able to compile the results into a new executable. Unfortunately, this executable fails to access the serial port.

Upon inspection of the code using WinMerge (http://winmerge.org/), one of the differences that I have noticed is in the placement of "extern Bitu cycle_count", which it appears that orz's version uses to cycle the CPU's clock speed.

Is it possible that your version of DOSBox initializes the serial port based on the cycle_count variable? If this variable gets changed (i.e. the CPU clock cycle is increased or decreased), would something in the setup of your serial port routines report a failure? Any idea how to work around such a glitch? (I assume you are immersed in this code *much* more than I have been) If it helps, my code is attached.

Regards,
You do not have the required permissions to view the files attached to this post.
Wanted: Gasoline and matches.
User avatar
joe_pool_is
Newbie
 
Posts: 28
Joined: 2005-5-26 @ 15:18
Location: Texas

Re: Direct serial port working

Postby joe_pool_is » 2005-6-09 @ 22:32

To further enhance your debugging experience, I have noticed that this version of DOSBox (dosbox_serialRT.exe) works when cycles=36000 in the [CPU] section of dosbox.conf but not when cycles>=50000. Interesting...

I'll investigate further into this tomorrow. Have a good evening, everyone!
Wanted: Gasoline and matches.
User avatar
joe_pool_is
Newbie
 
Posts: 28
Joined: 2005-5-26 @ 15:18
Location: Texas

Re: Direct serial port working

Postby h-a-l-9000 » 2005-6-09 @ 23:11

You are not using my latest diff here...
Since you get RX overrun (as well as me on my old test pc, it means more data came than the emulated application was able to fetch from the serial port), have you tried increasing Dosbox' cycles?
I also see you are using the fastest baudrate, you could try a slower one if possible to give the emulator more time.
Looks like I have to add some buffer...

I don't use cycle_count at all.
h-a-l-9000
DOSBox Author
 
Posts: 4512
Joined: 2005-2-23 @ 00:14

Re: Direct serial port working

Postby h-a-l-9000 » 2005-6-09 @ 23:18

Oh, too fast is not good neither..
At 50000 you probably have 100% CPU usage. Set cycles lower to stay under 100%.
h-a-l-9000
DOSBox Author
 
Posts: 4512
Joined: 2005-2-23 @ 00:14

Re: Direct serial port working

Postby musta myy » 2005-6-14 @ 10:55

Got these errors:
Code: Select all
Serial port: line error.
Serial port: line error.
Serial port at 0x3f8: RX Overrun!
Serial port at 0x3f8: Write to reserved register, value 0x0, register 2
Serial port: line error.


Software is a kind of datalogger which requires authentication/adapter dongle connected to COM1. Baudrate is 9600 and can't change it. Software also requires slowing down in real DOS @ Pentium133.
It would be great to get this working.
Thanks.
musta myy
Newbie
 
Posts: 1
Joined: 2005-6-14 @ 10:44

Re: Direct serial port working

Postby joe_pool_is » 2005-6-14 @ 13:18

musta myy wrote:Got these errors:
Code: Select all
Serial port: line error.
Serial port: line error.
Serial port at 0x3f8: RX Overrun!
Serial port at 0x3f8: Write to reserved register, value 0x0, register 2
Serial port: line error.


Software is a kind of datalogger which requires authentication/adapter dongle connected to COM1. Baudrate is 9600 and can't change it. Software also requires slowing down in real DOS @ Pentium133.
It would be great to get this working.
Thanks.
I get those same RX Overrun errors, but they don't seem to hurt anything.

To get serial communication to work for our software dongle, I had to set the core=dynamic, cycles=33000 (actually, anything up to 33000 cycles works for my situation), and be sure to set enabled=false for each COM port your PC does not have (my DELL laptop only has COM1). These values are in the dosbox.conf file. If you don't have a dosbox.conf file, you can generate one while running DOSBox by entering "C:\>config -writeconf dosbox.conf" at the prompt. It will write the file to the same directory you are running the DOSBox executable from.

Hope this helps!
Wanted: Gasoline and matches.
User avatar
joe_pool_is
Newbie
 
Posts: 28
Joined: 2005-5-26 @ 15:18
Location: Texas

Re: Direct serial port working

Postby whocrazy » 2005-6-26 @ 01:59

Hello there. I am totally blind and in the ole dos days, I used some special hardware that attached to the serial port, com2.
I would really like to use this capability under dos box, but I dont know what to do because it won't work. I've downloaded the latest dosbox patch, made the necessary changes to the dosbox.conf file but I'm still not getting anywhere. I keep getting the error: ax6033 dx1
unhandled int 14 call 1
Can anyone help?
:depressed:
You do not have the required permissions to view the files attached to this post.
whocrazy
Newbie
 
Posts: 65
Joined: 2004-3-01 @ 03:41
Location: Melbourne Australia

Re: Direct serial port working

Postby h-a-l-9000 » 2005-6-26 @ 12:50

It's missing BIOS support. What you could try from here:
Download the BNU 1.70 FOSSIL driver (http://www.pcmicro.com/bnu/),
extract it, make the files availible in Dosbox, and run BNU.COM. It should say
that there is at least one device availible. Now run your program.
Hopefully the FOSSIL driver implements the standard INT14h functions.
h-a-l-9000
DOSBox Author
 
Posts: 4512
Joined: 2005-2-23 @ 00:14

Re: Direct serial port working

Postby whocrazy » 2005-6-26 @ 22:16

first, the good news
if I start up a command prompt and load the bnu.com driver, I am able to use my speech hardware.
Now the bad news, if I start up dosbox and run the bnu program then load the speech software, the software freezes and I am not able to do anything except click on the x button to close down dosbox.
whocrazy
Newbie
 
Posts: 65
Joined: 2004-3-01 @ 03:41
Location: Melbourne Australia

Re: Direct serial port working

Postby whocrazy » 2005-6-29 @ 02:04

so it looks like I'll never be able to make use of dos box to play my old classics. really frustrating
whocrazy
Newbie
 
Posts: 65
Joined: 2004-3-01 @ 03:41
Location: Melbourne Australia

Re: Direct serial port working

Postby Qbix » 2005-6-29 @ 07:14

well the serial stuff is still being worked on.
So don't give up hope easely. maybe it's possible to share the application with hal9000 to see if he can figure out what is wrong with it.
Water flows down the stream
How to ask questions the smart way!
User avatar
Qbix
DOSBox Author
 
Posts: 10555
Joined: 2002-11-27 @ 14:50
Location: Fryslan

Re: Direct serial port working

Postby h-a-l-9000 » 2005-6-30 @ 00:32

@whocrazy: You could also try other drivers like http://www.digsys.se/adf.html, and my new version (which still has no BIOS support). Maybe your application can be configured to use the UART directly instead of INT14h BIOS?


About the new "version":

Configuration:
The configuration can be changed on-line within Dosbox. At the prompt, type 'serial1 modem', if you want a modem on com1. For a real serial port, type 'serial1 directserial realport:com1'. 4 serial ports are supported.
In the config file, it has moved to the BIOS section. I had to rename the entries from comX to serialX because of a config change issue.

Directserial:
- line error messages more detailed
- more tolerant handling of received data, so a slowly running application has a bigger chance to get it before RX overflow occurs

Modem:
- accepts connection only if a modem-aware program is running (DTR on)
- tested with the following terminal software:
Telix
Bananacom
SBBS with both MS Telnet and terminal running in Dosbox as client
BNU FOSSIL driver (not everything tested)

- tested with the following games:
Tyrian
Radix (Demo)
C&C 1
Warcraft
Warcraft2
Descent
Descent2
Terminal Velocity
TZone
F-29 Retaliator

- Does not work for:
Moo2 (1.3 patch, lower version even less) - It can connect, but shows me clock mouse pointer after I chose my color, and nothing more happens.

I've also been working on the IPX emulation, and have been able to make some more games work. But maybe at a high price: It uses up a hardware interrupt, as I can't think of any other way to make the protected mode runtime switch to the right context for event notification.
- Additional working games (always only 2 players tried):
Tyrian
Radix
Moo2
Warcraft

- still not working:
C&C1 (Multiplayer game can be started, but immediately says "Games are out of sync" and also does some illegal reads, which are caused by a zero pointer. It does not crash anymore, though.

These games are still working despite of me messing with IPX:
Warcraft2
Terminal Velocity
Descent (I think)
Descent2

Testing with more than 2 players and other would be required.
You do not have the required permissions to view the files attached to this post.
Last edited by h-a-l-9000 on 2005-7-04 @ 22:38, edited 3 times in total.
h-a-l-9000
DOSBox Author
 
Posts: 4512
Joined: 2005-2-23 @ 00:14

Re: Direct serial port working

Postby `Moe` » 2005-6-30 @ 09:04

How about linux support? I could write up a basic version, and assist in testing. Lacking a serial port, I couldn't test/support it, however.
User avatar
`Moe`
Oldbie
 
Posts: 1169
Joined: 2004-4-29 @ 01:06
Location: Oldenburg, Germany

Re: Direct serial port working

Postby h-a-l-9000 » 2005-7-01 @ 03:28

Of course, further compatibility would be great.
I have been looking for multiplatform libraries, but found none with all the required functions. It's actually rather difficult to find them at all.
We can do it on our own, too.
I'd probably find a way to test it with real serial ports (maybe Dosbox works on Knoppix, or I put Linux on a spare harddisk..).
h-a-l-9000
DOSBox Author
 
Posts: 4512
Joined: 2005-2-23 @ 00:14

Re: Direct serial port working

Postby whocrazy » 2005-7-02 @ 04:12

Hello there. the link:
http://www.digsys.se/adf.html
doesn't work, it says not found
whocrazy
Newbie
 
Posts: 65
Joined: 2004-3-01 @ 03:41
Location: Melbourne Australia

Re: Direct serial port working

Postby whocrazy » 2005-7-02 @ 04:36

Hi. when running your compiled version of dos box I get the error this application has failed to start because the file msvcp71d.dll was not found. Where the hell can I get that file?
whocrazy
Newbie
 
Posts: 65
Joined: 2004-3-01 @ 03:41
Location: Melbourne Australia

Re: Direct serial port working

Postby HunterZ » 2005-7-02 @ 06:57

Sounds like that binary was compiled with Microsoft Visual C++ and the person forgot to include the MSVC++ DLLs with it. You might be able to get them from Microsoft's web site.
You're perfect, yes it's true...but without me, you're only you.
User avatar
HunterZ
l33t++
 
Posts: 6073
Joined: 2003-1-31 @ 19:04
Location: Seattle

PreviousNext

Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 1 guest