Page 1 of 1

TTY comms via serial link support

Posted: April 27th, 2025, 1:21 pm
by gwald
Hi Martin.

There is someone making a Net Yaroze game with serial link cable communication between two PS1's.
And there is no support for the serial link cable in NY, apart from the TTY functions, ie ioctl and open/close, read/write etc.
Seem to have managed to do it and it's working on hardware! :clap :dance
TMK, this is the first time it's has been done! :D

Not sure how trivial TTY is to implement basic TTY (open/close, read/write char, etc) on no$psx, but it would make it easier in the future if someone else is game to do it! :mrgreen:

Re: TTY comms via serial link support.

Posted: April 27th, 2025, 10:48 pm
by nocash
I have no idea what you are talking about... a tty text output hardware game that was made by someone?
But whatever you mean, I have probably already emulated that.

Re: TTY comms via serial link support.

Posted: April 28th, 2025, 4:28 am
by MasterLink
I don't think he's talking about TTY text output, but rather like how Doom lets you link two PS1's to play a multiplayer game on two separate TV's. I guess that wasn't supported with the Net Yaroze (with the NY libraries I assume).

What game is this, so we can look it up?

Re: TTY comms via serial link support.

Posted: April 29th, 2025, 12:05 pm
by gwald
nocash wrote: April 27th, 2025, 10:48 pm I have no idea what you are talking about... a tty text output hardware game that was made by someone?
But whatever you mean, I have probably already emulated that.
Sorry, I often can't find the right words to explain things, MasterLink is correct.

TTY is a two way protocol (typically over a serial interface) and it's being used between two real playstations to communicate input and position, so opening a TTY device and using putchar into the other PSX and getchar to read the other's data etc. Because Net Yaroze doesn't have serial cable lib support.
When using No$PSX with two PSX connected via serial, TTY char's are sent, but never received.

MasterLink wrote: April 28th, 2025, 4:28 am What game is this, so we can look it up?
I guess it's in development, so I don't know.
Just talking and sending info I know about how serial/TTY was used via NY, apart from Siocons PC transfer related stuff, wasn't much.

Re: TTY comms via serial link support.

Posted: May 2nd, 2025, 8:44 pm
by gwald
Here is a video of it working! :clap :dance
https://www.youtube.com/watch?v=vEgT5Susqt0




And source code :praise :
https://github.com/logi-26/YarIO

Re: TTY comms via serial link support.

Posted: May 16th, 2025, 4:52 pm
by Administrator
Great video showing the demonstration of the software. The car demo was impressive.

I had a very, very quick look at the code. It looks like console 1 sends the controller data to console 2 and vice versa. It's just bit-banging the controller input data. I think a better method would be console 1 sends its position first and then console 2 sends its position data to console 1 after an update request is issued. That way in the event of a single bit being dropped or corrupted, the position will be consistent as they are both kept in sync. If a timeout occurs, the connection can be retried 3 times before a disconnection event is triggered. Otherwise, another idea is every 1000 frames or so, they automatically resync.