[UNAPI] - Telnet Client

ページ 1/9
| 2 | 3 | 4 | 5 | 6

By ducasp

Paladin (680)

ducasp さんの画像

06-08-2019, 04:56

Hi there,

I've made a fully featured TELNET client. Also there is a short video demonstrating it:

https://www.youtube.com/watch?v=a28fRMwZaeM

It can be downloaded at:

https://github.com/ducasp/MSX-Development/tree/master/UNAPI/...

Instructions and more details on this implementation:

https://github.com/ducasp/MSX-Development/blob/master/UNAPI/...

Fully featured? That means it negotiates TELNET options it have and that the other end offer. So if the other end echo, it won't echo, automatically. It will be detected properly and if you load jANSI, you get color text and ANSI animations... And I know, probably you are now thinking, jANSI? It is going to be slow... You'll be surprised, jANSI allows to be used directly and this client does just that, as well as it uses a DUMPSTR function to send text on large blocks to be rendered. The result is HISPAMSX MSX boot logo being drawn on an OCM (at turbo speeds) as fast as GR8NET built-in telnet client on a TURBO-R (comparison made through Karloch video on Youtube, so if now gr8net is faster than that, sorry about my mistake), drawing the animation on 11-12s (although jANSI is not perfect on that specific animation and do not render the black border around MSX).

Also it can download files using X/YMODEM/YMODEM-G, and I really recommend using YMODEM-G, X and Y modem are using 128 bytes blocks on many BBSs (like HISPA) and this make transfers really slow, YMODEM-G uses 1K blocks as well as being a streaming protocol, meaning it won't halt waiting reception confirmation before sending the next packet. NOTE THAT THIS FEATURE IS STILL A WORK IN PROGRESS and has bugs, but you can download files and files will work.

This is beta software, and I'm working on this in my free time, that lately is not much as I'm on a new job. ;) Things will be fixed and improved when I can, or, anyone can get the code at my github ( https://github.com/ducasp/MSX-Development/tree/master/UNAPI/... ) and improve it. :P

ログイン/登録して投稿

By konamiman

Paragon (1198)

konamiman さんの画像

06-08-2019, 12:00

This is awesome. We definitely need moar networking applications for MSX! Running Naked in a Field of Flowers

By fr3nd

Expert (112)

fr3nd さんの画像

06-08-2019, 12:55

konamiman wrote:

This is awesome. We definitely need moar networking applications for MSX! Running Naked in a Field of Flowers

I totally agree. Very nice tool! I'll add it to MSXHub as soon as possible!

By Parn

Paladin (837)

Parn さんの画像

06-08-2019, 15:18

This is great!

By fr3nd

Expert (112)

fr3nd さんの画像

06-08-2019, 20:02

I've added it to MSXHub. Install it running:

hub install telnet

https://msxhub.com/TELNET

By ducasp

Paladin (680)

ducasp さんの画像

06-08-2019, 20:19

Thanks fr3nd, that's awesome Smile

By ducasp

Paladin (680)

ducasp さんの画像

09-08-2019, 06:18

Hey,

I tought I would not have time to update it soon... But here is v0.80... fr3nd, can you update the hub package? Only the readme.md and the telnet.com file changed... Lots of good changes and it is shaping up very good... Now I'm testing it with "obsonet" on BlueMSX as well.

Can be downloaded at: https://github.com/ducasp/MSX-Development/tree/master/UNAPI/...

引用:

CHANGELOG
- Fix the program crashing when receiving two bytes TELNET commands. We do
not execute those, but need to properly parse. It no longer crashes if
you log-in at HISPAMSX and leave it logged/untouched

- Fix on X/YMODEM(G) transfers corrupting some bytes of data

- Enhancement on YMODEM(G) performance, got up to 8KB/s using MSX-SM WiFi
UNAPI adapter

- Some BBSs allow the Telnet Client to know that a transfer is in progress
by sending Telnet command WILL TRANSFER_BINARY. Now this client is able
to recognize it and it will pop-up the transfer protocol selection
automatically. If the BBS do not send WILL TRANSFER_BINARY, you still
can invoke the transfer protocol selection

- Fix YMODEM/YMODEM-G not detecting the end of a batch or single file
transfer properly. Now it detects properly. Exception is HISPAMSX when
using YMODEM-G (you need to lie to it telling you want YMODEM as it does
not list YMODEM-G as an option, so you tell it you are going to download
YMODEM, configure your user options with YMODEM as preferred protocol,
and when downloading a batch ou single file choose YMODEM but on the
telnet client you choose YMODEM-G and the transfer will occur as YMODEM
G, which is a blessing as XMODEM and YMODEM use 128 bytes long blocks at
HISPA which is really slow, not sure why they do not enable 1K blocks)

- ESC no longer quits the program, as this key might be requested to
interact with some BBSs. Now, to quit the program hit CTRL+E

- It should now work fine with MSX1 as long as you have an UNAPI adapter
that works with it. It will understand that it is a MSX1 and not try to
set 80 columns mode, but set it to 40 columns if less are set. Also, on
MSX 2/2+/TR it will set the screen to 80 columns if less are set and
jANSI is not installed (with jANSI, it always use 80x25). BBSs will be
aware that terminal is 40x24 or 80x24. Also, if you have a MSX-1 with
an 80 columns adapter that reports properly the number of columns in use,
this software will not try to change anything so it should work on those
as well

- Instead of returning the real cursor position on 6n escape code, it will
return 25x80 as some BBSs use this information to determine terminal
window size

- Not really an update, it was alway like that, but just making sure it is
clear, jANSI/MEMMAN is not mandatory. It will work without it, but it is
not going to tell the other end it is ANSI and of course colors and ANSI
animations won't work.

By fr3nd

Expert (112)

fr3nd さんの画像

09-08-2019, 08:15

By ducasp

Paladin (680)

ducasp さんの画像

09-08-2019, 15:34

Tks!

By ducasp

Paladin (680)

ducasp さんの画像

10-08-2019, 20:39

Toying around with jANSI source code, I could fix one issue (it was ignoring a third character in a parameter like advancing lines due to a buggy BBS in the past that was adding a junk number) where asking to go 255 lines down would not get you to the last line or going 255 columns to the right would not get you to the last column. Many BBS's use this and then request cursor position to check terminal window size... When you had no telnet negotiation, this was the way to find out screen limits) where some BBSs were not getting the correct screen size.

I did this after understanding HISPA and a few other Synchronet BBS's "hiccup" before printing the avatar, at this point they request the cursor position and telnet client was doing this only once or up to enter being pressed. So I've changed the code to properly return X,Y positions as the current cursor position.

Now, trying to fix the lack of black border around MSX logo on HISPA boot screen, the reason for that is that Color 0 for a character is not treated as black color by jANSI, basically it will use the current background color of the screen, that is the background color set before clearing the screen (which normally is black).

To make the logo, first it is requested foreground and background colors set to blue, then clear screen, this will cause the screen to be all blue.

Then will set foreground and background color according to what they want to print (if border, background blue, foreground black, print character 219 or 220... If part of MSX, background blue, foreground black, print character 219/220 or others).

End result is that as the background is not black, setting black color for the border characters will effectively make then blue like the background. I've spent quite a few hours on jANSI source code trying to fix it but, as I'm no VDP expert and probably this is not as simple as telling use black (as black is the background color), I do not think this is going to be easy to fix unless whoever does it is v9938 knowledgeable. (if anyone feel like it: https://hansotten.file-hunter.com/software/, download TSR development kit Guide and disk and use GEN80 /GTSR.BAT to make the TSR after JANSI.GEN, that can be found in this disk: https://hansotten.file-hunter.com/uploads/files/janvandermee... )

Just in case anyone bothers to try it, I've made available a basic program that shows the problem and can test the fix. It will request Black Foreground and White Background and write some text and a few blocks (text will be blue, blocks will be blue and won't show as screen was initialized after clearing with blue background color), then request White Foreground and Black Background and write some text and a few blocks (text will be white, but text background will be blue and blocks will be white).

It can be downloaded at:

https://drive.google.com/open?id=1gLqu_j3Ar2eppdkebBOR4DGcW2...

Just run it in basic after running memman and instaling jansi TSR...

By Grauw

Ascended (10772)

Grauw さんの画像

10-08-2019, 21:22

Try setting the TP bit (5) in VDP register 8 to 1. If you’re lucky JANSI is already writing the correct colours to VRAM and that’s all that’s required to make the VDP not treat colour 0 as the border colour.

From Basic: VDP(9) = VDP(9) OR 32

(Basic has a +1 offset on VDP register numbers > 8.)

ページ 1/9
| 2 | 3 | 4 | 5 | 6