Subject: MESS serial: Step forward

From: "Michael Zapf" <[email-masked]>
Date: Sat, 18 Jun 2011 19:35:27 -0000

Sometimes there are moments when you got something small working, and although there's still a lot to do, you can't wait to tell everybody, since you know the following work is just to make it perfect ...

... so have a look at these two photos: 

http://www.mizapf.de/ti99/part1.jpg
http://www.mizapf.de/ti99/part2.jpg

It's just the outbound direction right now, but I have some ideas for the inbound connection that should work.

Beery, watching? :-)

Michael

---

From: Gregory McGill <[email-masked]>
Date: Sat, 18 Jun 2011 16:47:28 -0700

wooo!

On Sat, Jun 18, 2011 at 12:35 PM, Michael Zapf <[email-masked]> wrote:

> **
>
>
> Sometimes there are moments when you got something small working, and
> although there's still a lot to do, you can't wait to tell everybody, since
> you know the following work is just to make it perfect ...
>

---

From: Tony Knerr <[email-masked]>
Date: Sat, 18 Jun 2011 19:59:07 -0400

I believe the proper response is "WooHoo"

So,

WooHoo!

Tony

On 6/18/2011 7:47 PM, Gregory McGill wrote:
>
> wooo!
>
> On Sat, Jun 18, 2011 at 12:35 PM, Michael Zapf <[email-masked] 
> <mailto:[email-masked]>> wrote:
>
>     Sometimes there are moments when you got something small working,
>     and although there's still a lot to do, you can't wait to tell
>     everybody, since you know the following work is just to make it
>     perfect ...
>
>     It's just the outbound direction right now, but I have some ideas
>     for the inbound connection that should work.
>
>     Beery, watching? :-)
>
>     Michael
>
>

---

From: mark wills <[email-masked]>
Date: Sun, 19 Jun 2011 10:26:55 +0100 (BST)

Yeah! That is seriously cool! Is the intention to emulate the TI RS232 DSR?

Mark

>________________________________
>From: Tony Knerr <[email-masked]>
>To: [email-masked]
>Sent: Sunday, 19 June 2011, 0:59
>Subject: Re: [TI994A] MESS serial: Step forward
>
>
>  
>
>>>It's just the outbound direction right now,
                          but I have some ideas for the inbound
                          connection that should work.

---

From: "Michael Zapf" <[email-masked]>
Date: Sun, 19 Jun 2011 12:17:19 -0000

Hi Mark,

> Yeah! That is seriously cool! Is the intention to emulate the TI 

in MESS there is already an emulation of the TMS9902 (the so-called "Asynchronous Communication Controller"), and of the TI RS232 card with its DSR. 

Until now you could only output to a file; the command line argument was like "-serl1 serialout.bin" (also selectable in the UI). The data written to the TMS9902 were just copied into this file, so there was no input and no connection to a real device either.

One of the MAME/MESS devs came up some months ago with a simple implementation of a socket connection usable in the place of a file. Thus, when writing "-serl1 socket.localhost:10000" you can now make MESS open a socket connection to localhost, port 10000.

Now instead of directly talking to the PC's UART from MESS (which would mean to create that support separately for Windows, Linux, MacOS as it is platform-dependent), I used this socket connection to forward the bytes to a "serial bridge" which I included in my TIImageTool (but which could also run separately). It opens a server socket, gets the bytes over the socket connection from MESS, and uses RXTX to control the UART which sends the data over the serial connection to the TI or Geneve.

Currently only data are sent; the next step is to encode configuration data which makes RXTX reconfigure the serial interface, and also line states (e.g. raising or lowering RTS). 

The next challenge is the inbound communication, i.e. when the TI/Geneve is sending. MESS is a single-threaded program, so I have to find out how to implement something like an asynchronous receive support. Indeed, there are some good hints how to do this; it should be done by using a periodic timer at a sufficiently high frequency that polls the socket input. (Timers are served by the same thread.) Or it could be possible (need to check) to have the 9902 executed as an independent processor. If there are data, the 9902 emulation will then raise the interrupt line and the corresponding CRU lines. As I said, this is all available, but the link to the real serial device was missing.

Michael

---

From: "Klaus L" <[email-masked]>
Date: Mon, 20 Jun 2011 12:34:10 -0000

Great work Michael! Looking forward into this!

---

From: "Beery" <[email-masked]>
Date: Mon, 20 Jun 2011 17:49:33 -0000

Just now saw it.  

Awesome dude!!!!!

Beery

---

From: "Beery" <[email-masked]>
Date: Mon, 20 Jun 2011 17:52:58 -0000

Sounds like some good progress.

Beery