ultimateii-dos-lib icon indicating copy to clipboard operation
ultimateii-dos-lib copied to clipboard

VT100/ANSI

Open MaxPlap opened this issue 6 years ago • 19 comments

Would be very useful support for VT100/ANSI terminal. I think it's the big missing of ultimateII. Why should I give up my UltimateII+ to free Cartridge slot for a RRNET or use the userport with wimodem?

MaxPlap avatar Jan 12 '20 16:01 MaxPlap

I think this is a valid issue. Lets keep it open.

xlar54 avatar Mar 15 '20 02:03 xlar54

My original issue was wrong: I cannot connect to some telnet server using the Term, and I erroneously thought it was a codec issue. I find out it was the absence of support for telnet negotiation (RFC854). I suppose it is not in the feature list

MaxPlap avatar Mar 21 '20 10:03 MaxPlap

@MaxPlap I have added very simple Telnet RFC854 handling and a start on ANSI support. Check out my branch here for the code.

https://github.com/LeifBloomquist/ultimateii-dos-lib/blob/master/src/samples/ultimateterm.c

LeifBloomquist avatar Jul 24 '21 18:07 LeifBloomquist

@LeifBloomquist , I pulled the project but I got some sort of compilation error:

ultimateterm.c(1405): Error: Conflicting types for 'handle_telnet_iac'

I used the build.sh script and I'm using cl65 2.18

MaxPlap avatar Jul 27 '21 14:07 MaxPlap

@LeifBloomquist , I pulled the project but I got some sort of compilation error:

ultimateterm.c(1405): Error: Conflicting types for 'handle_telnet_iac' I used the build.sh script and I'm using cl65 2.18

OK I'll have a look into it.

@MaxPlap I can't reproduce this unfortunately on a clean machine. I'm using cl65 2.19 Git fcda94f under Windows, (which uses build.bat, but build.sh should work just the same).

I tried both my fork (which only builds u-term64.prg) and also started with xlar54's latest build, just copying in the modified ultimateterm.c, both worked fine (though there are many unrelated warnings about Pointer conversions).

Try the latest cl65? Though you can see the function definition and the prototype (line 170) match so...not sure where this error is coming from?

LeifBloomquist avatar Jul 27 '21 14:07 LeifBloomquist

Also I think it would be cleaner to move the Telnet and ANSI handling code to their own files, will address that "soon".

LeifBloomquist avatar Jul 27 '21 14:07 LeifBloomquist

interesting... gonna have to merge it, I just have to test it!

sblendorio avatar Jul 27 '21 15:07 sblendorio

You were right, my version of cc65 was slightly too old. I tried and it works! I connected to some linux telnet server and I was able to use it for a while. I think it may be interesting to continue its development with a dedicated branch, I'd love to use my C128 as a good terminal for my raspberry Pi home server.

MaxPlap avatar Aug 13 '21 18:08 MaxPlap

@MaxPlap I'm testing the whole thing, one question: how to switch to "ANSI" mode coming from ASCII or PETSCII?

sblendorio avatar Aug 25 '21 13:08 sblendorio

It checks the first byte received when the connection has been estabilished: https://github.com/LeifBloomquist/ultimateii-dos-lib/blob/dd36312e176bcb082bed1d5075c7b96d2762c1e3/src/samples/ultimateterm.c#L740 if it's 0xff, it assumes it's a telnet connection and set the flag for it

MaxPlap avatar Aug 25 '21 13:08 MaxPlap

so when it's TELNET connection, no way to change mode, is it right? It sounds good.

sblendorio avatar Aug 25 '21 13:08 sblendorio

It's quite a good assumption. When the terminal will become a feature creep, charset selection may be implemented

MaxPlap avatar Aug 25 '21 14:08 MaxPlap

Fixing it in the original repo. Is it a problem if I do so without pull-request?

sblendorio avatar Aug 25 '21 14:08 sblendorio

Gonna do pull-request.

sblendorio avatar Aug 25 '21 15:08 sblendorio

@LeifBloomquist merged your branch and did some fix about cast warnings. Do you have some good idea for improvements in this feature?

sblendorio avatar Aug 25 '21 15:08 sblendorio

It would be good to handle some more ANSI control messages, though my current implementation has some limitations for more complex messages. At very least, would want to be able to use vi, nano/pico and pine :-)

Ideally we would eventually have as many features as CaTer: https://www.opppf.de/Cater/ (can also study their source). But it also needs a special termcap file on the server side.

LeifBloomquist avatar Aug 25 '21 16:08 LeifBloomquist

Released 2.5! https://github.com/xlar54/ultimateii-dos-lib/releases/tag/v2.5

@LeifBloomquist what about helping us to implement Punter download protocol?

sblendorio avatar Aug 26 '21 08:08 sblendorio

Can do, though my hobby time is severely limited these days. Open a new issue for it?

LeifBloomquist avatar Aug 26 '21 14:08 LeifBloomquist

@LeifBloomquist sure! Here it is :) https://github.com/xlar54/ultimateii-dos-lib/issues/54

sblendorio avatar Aug 27 '21 07:08 sblendorio