Configuring TINST (Turbo Pascal) for the Pico VGA RC2014 terminal ?

270 views
Skip to first unread message

Jean-Marc Ducretet

unread,
Jul 8, 2022, 12:29:42 PM7/8/22
to RC2014-Z80
Hello to all
Has anyone ever configured TINST to use Turbo Pascal 3 on CP/M with the Pi RC2014 Pico VGA Terminal?
A week ago I received a set of RC2014 Mini + RC2014 Mini CP/M Upgrade Kit + RC2014 Pi Pico VGA Terminal which works very well. I installed Turbo Pascal 3 and started writing some fun programs. But I am having a small problem with scrolling in the Turbo editor. When I use Tera term, I can scroll down and up without any problem, but with the Pico VGA Terminal, there is a strange behaviour. I can move the cursor, but only the last (or first) line of the screen scrolls. The other lines stay in the same place. I ran TINST to choose a terminal and selected terminal #6 (ANSI). It is on this terminal that I have this problem. I have tried other terminals, but without good results. The last possibility is to configure my own terminal, but I don't know what to enter in the various configuration steps. Hence, my question: has anyone already configured Turbo Pascal to work with the Pico VGA terminal?
Thanks in advance.
Jean-Marc

Spencer Owen

unread,
Jul 9, 2022, 5:50:31 AM7/9/22
to rc201...@googlegroups.com
Hi Jean-Marc,

I haven't ever programmed in Pascal, so I haven't used Turbo Pascal 3 before. I tried to recreate your setup using "Turbo Pascal 3.0 for CP/M-80" from here, however, running TURBO or TINST just seems to hang my machine. Not sure if there's something wrong with this source or if I'm doing something wrong :(

Anyway, I'm making some assumptions here, but there are probably two possibilities for what's going wrong with your setup.  Either PicoTerm isn't displaying the screen as expected or the cursor keys are not sending the escape codes that TP3 expects.

If you remove the Rx jumper from the Pi Pico VGA Module then you will be able to connect both a VGA monitor and FTDI cable so that you can see the display on a monitor and within Tera Term, but use Tera Term to send the keystrokes.  What you see on the monitor and on Tera Term _should_ be the same.  If it isn't, then that indicates TP3 is sending escape codes that PicoTerm doesn't understand or is handling incorrectly.

If both the VGA monitor and Tera Term do display the same info and scroll around ok, then it seems like it it the way TP3 is interpreting the cursor key.

When you run TINST, what are the other terminal options? Is there a plain ASCII or VT100 option?  What are the parameters it is looking for if you configure your own terminal settings?

Thanks

Spencer

--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/45f375ec-5856-4a39-861d-cbff87ec7b87n%40googlegroups.com.

S P Dixon

unread,
Jul 9, 2022, 1:36:13 PM7/9/22
to RC2014-Z80
Hello Jean-Marc

It's Shiela, author of PicoTerm. 

I'm grateful to you for raising this. I haven't run Turbo Pascal on my RC2014 before, but I've downloaded and am running it now. I look forward to playing with it. 

I think ANSI is most likely to be the right selection for Picoterm.

I see the same symptoms that you describe, and have investigated (by intercepting the codes that TP3 sends) and have found that it uses two sequences that PicoTerm lacks, these being <esc>[1L  and <esc>[1M,  these apparently meaning 'insert line' and 'delete line'.  The scroll commands and the scroll that happens when you cursor to the top or bottom of the screen seem to rely on these sequences. 

(I don't see these codes on the Wikipedia page for ANSI escape sequences, which has been my main reference. And I haven't yet found them documented anywhere else. But I use Minicom and that handles the scrolling, and obviously your Teraterm does too. So these must be fairly 'standard' sequences.)

I can't see a way to configure our way out of this because PicoTerm doesn't have a concept of scrolling part of the screen up or down. 

However, it does seem fairly trivial to add support for these two escape sequences to PicoTerm and I am doing that now. We'll then be able to see whether there's anything else that TP3 is sending that PicoTerm isn't handling properly. (It may be necessary to set up a configuration for PT using TINST, or edit the ANSI one, so that it knows the correct number of rows.)

I'll let you know when I have more news.

Shiela

PS If anyone can point me at some documentation for these two sequences, that would be welcome. Otherwise I'm making some assumptions - eg that the number 1 is the number of rows to be inserted / deleted. But it could have a different meaning.

Jean-Marc Ducretet

unread,
Jul 10, 2022, 2:32:35 AM7/10/22
to RC2014-Z80
 [EDIT] Sorry if this message appears twice, but I thought I had replied and I still can't see anything on the Google Group. So I send it again.

Hello Shiela,

Thank you for your quick response and congratulations on PicoTerm working so well.
I'm responding briefly to give you the link to this site: https://www.real-world-systems.com/docs/ANSIcode.html
which confirms what you were saying about the role of <esc>[1L and <esc>[1M
[1L Insert line if currently in scrolling region
[1M Delete 1 line if currently in scrolling region
I look forward to hearing from you.
Have a nice day

Jean-Marc

Jean-Marc Ducretet

unread,
Jul 10, 2022, 4:20:58 AM7/10/22
to RC2014-Z80
 Hi Spencer

I connected a VGA monitor and a FTDI cable and indeed the display was not the same when I reached the bottom of the screen.  TP3 does send escape codes that PicoTerm does not understand (confirmed by Shiela in the other post).

Also, here are some interesting links:

I found binaries for TP3 here : https://web1.foxhollow.ca/cpm/

And the documentation for configuring TINST can be found here:
http://bitsavers.informatik.uni-stuttgart.de/pdf/borland/turbo_pascal/TURBO_Pascal_Reference_Manual_CPM_Version_3_Dec88.pdf
Appendix L - INSTALLATION - Page 219 of the file

Best regards,
Jean-Marc

S P Dixon

unread,
Jul 10, 2022, 4:34:22 AM7/10/22
to RC2014-Z80
Thank you very much to that link. It gives me more confidence in the meaning of those codes and confirms that the number means the number of lines to insert/delete.

I've implemented them and the TP3 editor seems to work as intended (although I've only gone as far as csr directions, scroll/page up/down). At least it matches what I see in minicom. One thing I had trouble with is that <del> seems to do a backspace but leave the character visible.  (I can remove characters with ctrl-G). PicoTerm and minicom match exactly when I have both running at the same time. The TP3 manual says that del should remove the character. I'd welcome your thoughts on this.

PicoTerm v1.1 is now available here: https://peacockmedia.software/RC2014/picoterm/

Please grab the appropriate textmode version for your keymap (and enjoy using green or amber characters if you like). If you haven't updated the firmware before, that should be easy.

(One minor detail. The ANSI config seems to use 24 lines. this leaves half a dozen lines at the bottom of PicoTerm's screen unused which is a bit ugly. This is obviously a TP3 configuration thing, I assume that it's easy to reconfigure the ANSI one to 30 lines, although I haven't tried that yet.)

Keep in touch.

Shiela

Jean-Marc Ducretet

unread,
Jul 10, 2022, 5:33:33 AM7/10/22
to RC2014-Z80
 Hi Shiela,

The new version of your program solves the problem completely. Thank you very much for the solution and for your responsiveness!
I have changed the number of lines in the monitor to 30. Here are the current settings for my RC2014, if this is of any use to anyone else.

TINST parameters for RC2014.png
Have a nice Sunday.
Best regards.
Jean-Marc
Reply all
Reply to author
Forward
0 new messages