English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 07 September 2004, 23:46   #1
Borg_Number_One
Zone Friend
 
Join Date: Aug 2004
Location: Germany
Age: 45
Posts: 44
Send a message via ICQ to Borg_Number_One
Serial Port Emulation; 9-bit mode

Hyvää iltaa Toni!

Your idea to transfer 9 bits
(detailed: 11 bit=1 start bit, 9 data bits, 1 stop bit)
in two cycles
(cycle one: 1 bit, cycle two: 8bits) is/was great.

This made/makes it possible to play good old two-player games (which use 9-bit transfer mode) via (emulated) serial port.

Until now it is impossible to play that games on a real Amiga and together with the same games in Win-UAE.
Links about the problem:
http://eab.abime.net/showthread.php?...highlight=9bit
http://eab.abime.net/showthread.php?...ighlight=9-bit
http://eab.abime.net/showthread.php?...ighlight=9-bit

Now it is time to solve that Problem with the help of a hardware-circuit which should do following:

1.)Connection-scheme/diagram:
PC+WinUAE+"direct"-mode<--->|serial-converter-circuit|<--->Amiga
8+1 bit, 2 cycles<-->circuit<--->9-bit, 1 cycle, half transfer rate.

2.)How it should work:
the serial-converter-circuit should collect two cycles
(1.cycle: 1byte, 2.cycle 8 bytes; it should not ignore/forget the start/stop-byte too. )
from/by the PC(running the game inside WinUAE in "direct"-mode).
Then it's out put should should generate 9-bit per cycle with the half Baud/Cycle-Rate.

The whole process of the circuit should work vice versa too.
(collect 9-bit from the Amiga and split it into two cycles and send it to the PC with the double Baud-rate)


Now the question:
Is there anybody which is able to develop the print-out of the circuit or real device?

Last edited by Borg_Number_One; 26 July 2006 at 12:51.
Borg_Number_One is offline  
Old 08 September 2004, 05:08   #2
Chuckles
The Ancient One
 
Join Date: Feb 2002
Location: Kansas City/USA
Age: 69
Posts: 685
If the Borg cannot replicate such a device themselves with all the technology they have assimilated, what chance do the rest of us have of being able to do so?

(Sorry, I couldn't resist asking)
Chuckles is offline  
Old 08 September 2004, 14:10   #3
Borg_Number_One
Zone Friend
 
Join Date: Aug 2004
Location: Germany
Age: 45
Posts: 44
Send a message via ICQ to Borg_Number_One
(I forgot to log in, could anybody delete the previous post?)
@Chuckles: You are right!

@Toni

Which of the following method does WinUAE use to realize the split?

Cycle 1: 1 start bit, 1 Data bit, 1 stop bit;
Cycle 2: 1 start bit, 8 Data bits, 1 stop bit;

Cycle 1: 1 start bit, 1 Data bit;
Cycle 2: 8 Data bits, 1 stop bit;

Cycle 1: 1 start bit, 8 Data bits, 1 stop bit;
Cycle 2: 1 start bit, 1 Data bit, 1 stop bit;

Cycle 1: 1 start bit, 8 Data bits;
Cycle 2: 1 Data bit, 1 stop bit;

Well, can the state(1 or 0) of start/stop bit directly be changed/modified by software, independet from the data bits or is it related to the data bits every time?

In Device Manager->Port(COM & LPT)->COMx you can see that there are only settings for stop bits.


Does it mean that the state(1 or 0) of the start bit(of the UART 16550) can be controlled directly?

What is about the amiga side?
There are only setting for the stopp bits too?!?
Borg_Number_One is offline  
Old 08 September 2004, 17:07   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,522
Start and stop bits can't be disabled.

Start bit's length is always 1. Stop bit can be 1, 1.5 or 2 bits. (>1 for ancient slower systems, I think?) Note that 1 "bit" here means length of 1 data bit.
Toni Wilen is online now  
Old 08 September 2004, 21:07   #5
Borg_Number_One
Zone Friend
 
Join Date: Aug 2004
Location: Germany
Age: 45
Posts: 44
Send a message via ICQ to Borg_Number_One
Quote:
Originally Posted by Lord of WinUAE Toni Wilen
Start and stop bits can't be disabled.

Start bit's length is always 1. Stop bit can be 1, 1.5 or 2 bits. (>1 for ancient slower systems, I think?) Note that 1 "bit" here means length of 1 data bit.
Ok...really important to know that start and stop bit cannot be disabled.
Well is it possible to directly change the HIGH (1) and LOW (0) -state of that bits?
Can the state of the start/stop bits directly be queried/sampled too?

If yes then following were possible:

Amiga: 1 start bit, 9-bits of data, 1 stopbit. =11 bits
e.g.:
1___011011100___1

PC: 1 start bit, 8-bits of data, 2 stop bits. =11 bits
1___01101110___01
(the number of stopbits of the UART 16550 can be incresed to 2 )

Well, this method requires that the first of the two stop bits can directly(or inderectly) be read/recalculated by WinUAE.

This means no adpter/circuit would be necessary....and I hope so.


Well, which of the mention splitting methods above does WinUAE use?

Last edited by Borg_Number_One; 09 September 2004 at 11:31.
Borg_Number_One is offline  
Old 09 September 2004, 13:02   #6
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,522
Start and stop bits are hardcoded.

Quote:
Well, which of the mention splitting methods above does WinUAE use?
None of those. Number of data bits is either 7 or 8. PC hardware doesn't support anything else. (and changing number of data bits on the fly confuses receiver..)

Internal contents of two 8-bit data bytes (9-bit "emulation" hack) may change between WinUAE versions.

btw, your project is probably not so useful because serial lag (time for serial data to leave emulation and appear in PC physical serial port and back) is too large to play any action serial-linked game without serious problems. (Lotus 2 with >2 players is good example)
Toni Wilen is online now  
Old 11 September 2004, 14:47   #7
Borg_Number_One
Zone Friend
 
Join Date: Aug 2004
Location: Germany
Age: 45
Posts: 44
Send a message via ICQ to Borg_Number_One
solution

Hi Toni.

The UART is able to use 1 start bit, 9-bit, 1 stop bit!!!

http://www.elecdesign.com/Articles/A...6245/6245.html

Quote:
However, it’s possible to use the PC UART with 9-bit protocols without any extra hardware. The trick is to use the parity bit as the 9th bit. Suppose we want to send a string, such as “ABC,” to the slave processor at address 41h and that we’ve established odd parity for communications. The frame to be transmitted would look like that shown in the table.
Some further Links:

a.)
http://www.mikrocontroller.net/wiki/UART
Google translation:
http://216.239.37.104/translate_c?hl...language_tools

Altavista translation:
UART UART is the abbreviation for universal Asynchronous receiver transmitter. The UART is the usual serial interface with PCS and micro-control-learns. Can do data in words from 5 to 9 bits (with the standard CONTROLLER "16550") , are usual 8 or 9 bits are transferred. These are also from many micro-control-learn to support modes. Extended remarks are USA RTS. Sequence of the bits

b.)
http://www.mikrocontroller.net/artic...Der_UART_1.htm

English Translation:
http://babelfish.altavista.com/babel...1.htm&lp=de_en

Well, it will maybe help to look for: "CHR 9" / "CHR9" too.
Borg_Number_One is offline  
Old 11 September 2004, 15:04   #8
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,522
Quote:
The UART is able to use 1 start bit, 9-bit, 1 stop bit!!!
Yes and no. It can send 8bit+parity BUT the state of parity bit can't be changed on the fly. You can only do this:

8databits+paritybit=1,8databits+paritybit=1,...,wait until transmit buffer is empty,switch parity-bit mode,8databits+paritybit=0,8databits+paritybit=0.

Not very useful..
Toni Wilen is online now  
Old 11 September 2004, 17:38   #9
Borg_Number_One
Zone Friend
 
Join Date: Aug 2004
Location: Germany
Age: 45
Posts: 44
Send a message via ICQ to Borg_Number_One
Hi Toni...

the whole thing about the current serial port is going to more and more interesting.
I tried following to see really all what happens while serial transfer.:

1.)
-installed a virtual Com-Port-connection (e.g.: Virtual Serial Ports Driver by "Eltima Software")
http://www.eltima.com/

2.)
-installed a com port sniffer/viewer/redirector
e.g.:
Comport Watcher / Com Exploration
or
Advanced Serial Port Monitor
or
Advanced Serial Port Monitor v3.00
or
Serial Sniffer
(I prefer this, because it can forward data to another port.)

3.)Add a virtual Comport-Link/Connection(e.g. COM3<->COM4) in "Virtual Serial Ports Driver".
Then open any serial sniffer/port monitor on COM4 and start WinUAE with COM3.
If you run a game which has serial/direct link capacities you will see data in your com port monitor program.


Furthermore you can create a second virtual Comport-Link/connection(e.g. COM5<->COM6)

Then run winuae(with COM3) start "serial sniffer" select COM4 on the left side and COM5 on the right side.
Then start a second instance of WinUAE and choose COM6.

Now you reached following...:

WinUAE COM3<->COM4--Serial Sniffer--COM5<->COM6 WinUAE (2. instance)

...and you can "see" the data-transfer between the both games now.

Now the interesting part:

If you run "Overdrive" and start a "link-up"-game you will see that following data will appear:
HEX:
5A5A54584F4B......
ASCII:
ZZTXOK....... [ZZ TX OK seems to be a kind of readable data that overdrive uses ]
binary-coded:
10110100101101001010100010110000100111101001011.......

Well, I wonder why no change happens if I enable/disable "direct"-mode in WinUAE.
In both ways I get the same data???

If I build a real connection (COM1<->COM2) : WinUAE[COM1]<->[COM2 @ 9600 bps]SerialSniffer I get the same result if I disable/anable "direct" mode in WinUAE.

Why does not change anything if I enable/disable "direct"-mode in WinUAE?
(If I connect my real A600 to the COM1, run Overdrive and run "SerialSniffer" I only get stupid stuff. I tried all baudrates too. That means that the game Overdrive uses 9-Bit mode.)

Maybe it seems that there is a small bug too.

If you directly connect COM1 and COM2 and run WinUAE[@COM1] without "direct"-mode and start Overdrive in link-up mode than you can see that only a transfer rate of 115200 bps in SerialSniffer[@COM2] brings decent data.
If you activate "direct"-mode then only 9600 bps brings decent data.

If you deactive direct mode again then nothing changed.
That means deactivate direct mode again does not really work.

You have to close WinUAE and start it again.
(even load the config which has disabled "direct"-mode does not help.)
Borg_Number_One is offline  
Old 26 July 2006, 13:45   #10
Borg_Number_One
Zone Friend
 
Join Date: Aug 2004
Location: Germany
Age: 45
Posts: 44
Send a message via ICQ to Borg_Number_One
Hi Toni.

1.)
Some minutes ago, I sent an email to: Jens from "www.schoenfeld.de" where I ask him about developing and building the described converter.

If he agrees to build such a converter, then it will be possible to run " 9-bit / 11-bit " - applications/games between a real Amiga and WinUAE really soon.

2.)
Referring to this:
http://eab.abime.net/showthread.php?...ighlight=9-bit
-->
http://eab.abime.net/showpost.php?p=100337&postcount=7

when will you realize: "routing serial port to/over network" ?


Currently there are no known free solutions to route/trace serial ports via network.
There are currently only commercial and expensive products, which allow to trace/route (virtual) serial ports via network.

So, could you add following menus to WinUAE's serial port properties?

a)
Enable/disable tracing COM port connection via Network (TCP/IP)

b)
Pulldown menu:
-- Use WinUAE as: serial port/COM port server --
-- Use WinUAE as: serial port/COM port client --

c)
TCP/IP address / domain name
( for listening incomming connection / for connecting to another WinUAE COM port server)

d)
TCP/IP port
Borg_Number_One is offline  
Old 27 July 2006, 04:46   #11
Chuckles
The Ancient One
 
Join Date: Feb 2002
Location: Kansas City/USA
Age: 69
Posts: 685
I wonder how many civilizations had to be assimilated since the first post in this thead before the Borg could make this possible. I just hope that those annoying Ferengi were among the victims.
Chuckles is offline  
Old 02 August 2006, 13:15   #12
Borg_Number_One
Zone Friend
 
Join Date: Aug 2004
Location: Germany
Age: 45
Posts: 44
Send a message via ICQ to Borg_Number_One
News:

Jens is very interested in the idea.

But he currently is not thinking about to realize such an converter / adapter for running applications / games (which use 9bit...xbit serial transfer method) between WinUAE and a real Amiga.

Maybe, a poll/survey could help.
Borg_Number_One is offline  
Old 02 August 2006, 13:36   #13
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,522
Please, just forget it. Emulating serial port link connection between two physical computers is a flawed idea (but it was fun experiment..)

Unfortunately latency makes it unusable.
Toni Wilen is online now  
Old 02 August 2006, 13:48   #14
Borg_Number_One
Zone Friend
 
Join Date: Aug 2004
Location: Germany
Age: 45
Posts: 44
Send a message via ICQ to Borg_Number_One
Why forgetting?

I tested many different 9bit...xbit Amiga games/programs with different
"(virtual) COM port via TCP/IP"-applications (shareware / trialware).

WinUAE can successfully use the (virtual) com port and the games and programs work fine between two physical WinUAE computers.

Well, because there does not seem to be decent freeware "(virtual) COM port via network" solutions, it would be great, if future WinUAE releases would have the mentioned "COM port via network" feature.


Referring to the "WinUAE<-->real Amiga" project, I am still looking for firms that could realize such a converter.
Borg_Number_One is offline  
Old 04 August 2006, 18:17   #15
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,522
"Only" problem is that not everything work and can ever work perfectly.

Another problem with possible commercial projects is that I will get bug reports or complaints that his/her "expensive" adapter does not work properly (anymore) etc.. even if I don't really have nothing to do with it.

I can make small WinUAE changes if needed but thats all, I am not going to "support" it officially.
Toni Wilen is online now  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Serial Port Questions iainnitro support.Hardware 10 21 April 2012 16:03
Serial Port <--> Tablet: no communication ral-clan support.WinUAE 0 02 February 2011 19:51
How to test serial port? mmikko support.Hardware 2 05 February 2008 08:43
PortJnr - Clockport fast serial port. Smiley MarketPlace 8 05 July 2007 01:32
Lightgun with serial port cebulba support.Hardware 1 10 December 2003 14:05

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 22:36.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10383 seconds with 15 queries