ANSI terminal control [message #7579] |
Thu, 30 April 2020 05:25  |
lb-hobby
Messages: 17 Registered: March 2020
|
Junior Member |
|
|
Why do these codes only effect the terminal emulator (Tera Term) thru serial I/O P3. How do you change the screen attributes on the ParPortProp VGA terminal? I'm a newbie (1 month old).
|
|
|
|
|
|
Re: ANSI terminal control [message #7588 is a reply to message #7584] |
Fri, 01 May 2020 09:55   |
 |
Wayne W
Messages: 385 Registered: October 2015 Location: Fallbrook, California, US...
|
Senior Member |
|
|
Hi Larry,
lb-hobby wrote on Fri, 01 May 2020 05:51This is an old problem for me raising it's ugly head again. As we have discussed in the past month, my preferred LCD monitor for the VGA connection is a Planar which only likes a refresh freq. of 60hz (69hz makes it choke). I found that the parportprop firmware from package "RomWBW-2.9.0-Package" outputs at 60hz. But, all versions above don't. No problem right. Just use the older version. But now if I want to use ANSI escape sequences on the VGA output I need to use a version above v2.9.0.
Not exactly. The old version supports ANSI escape sequences just fine. It just does not handle color or character attributes. Essentially a monochrome terminal. Now, if you meant color and character attributes when you said ANSI escape sequences, then you would be totally correct.
lb-hobby wrote on Fri, 01 May 2020 05:51When we talked about changing the vertical freq. in code you said it would be too involved. I don't understand why there's not a single equate that can have different values for various freq./resolutions. Change 1 equate and Bada Bing Bada Boom.
If you look at the source file called "vgacolour.spin" currently driving the display (in RomWBW v3.X), you will see the display parameters listed at the top. You could certainly try modifying them to suit your needs. I think I tried this once and it failed completely. If you look at the Propeller assembly code, I get the impression it is carefully designed around the exact display clock rate and refresh rate from the top of the file. I could be wrong, I am really not that competent in Propeller assembler.
Just for reference, if you look at the source file called "VGA_HiRes_Text.spin" (which is the display driver used by RomWBW v2.9.0), you will find it has multiple alternative display configurations with alternative refresh rates at the top of the file. All are commented out except the active one (640 x 480 @ 60Hz settings, 80 x 40 characters). So, in that display driver you can just pick the VGA timings you want and recompile. However, this is the driver that does not support per-character colors and attributes.
It is my general understanding that the Propeller is doing all it can to handle these displays at the required speeds. I think that the author of "vgacolour.spin" is using clever coding to eek out per-character color and attributes and this code is tightly tied to the display timing from the top of the file. What I don't understand is why the refresh rate in this case is higher. It seems like a lower refresh rate would be easier to implement in a tight timing scenario.
So... I would definitely suggest you try changing the signal timing parameters at the top of the file to 60Hz. You could literally just cut and paste the "640 x 480 @ 60Hz" parameters from "VGA_HiRes_Text.spin" into "vgacolour.spin". I would love to hear if this works because, if so, I would prefer to use the 60Hz configuration. I hope it does work!
Thanks,
Wayne
|
|
|
|
Re: ANSI terminal control [message #7596 is a reply to message #7595] |
Sun, 03 May 2020 18:33  |
 |
Wayne W
Messages: 385 Registered: October 2015 Location: Fallbrook, California, US...
|
Senior Member |
|
|
lb-hobby wrote on Sun, 03 May 2020 14:08The cut and paste worked as you suggested. I had tried earlier uncommenting the last block of code for the 640x480 @ 60hz setting in the file "VGA_HiRes_Text.spin" in v2.9.0 but it did not work. But using that same block of code to replace the 69hz code in "vgacolour.spin" v3.0.0 worked a treat. Great. Now I have character attributes that v2.9.0 didn't have.
Good to know. I am going to update the official distribution with this change since I believe 60Hz is much more standard.
lb-hobby wrote on Sun, 03 May 2020 14:08Using the VGA LCD output there's an area at the bottom of the screen that has the banner "ParPortProp" and room for several lines of text below it. I read somewhere that this is a "Status" area. It would be great for displaying help messages and personal program info. But using ANSI direct cursor addressing I can't seem to display anything in that spot. What am I doing wrong this time?
Indeed it is considered a status area, but it is "outside" of the actual terminal window. The only area that can be addressed by the incoming character stream is the actual 80x25 terminal window. Think of it like a terminal window on a PC. All the stuff surrounding the terminal window is part of the host windowing system. With that said, you could certainly add additional API functions in the Propeller code that allow writing to this status area. I always intended to do just that, but never got to it.
lb-hobby wrote on Sun, 03 May 2020 14:08I can send an ASCII 7 bell code from a program and will hear the speaker go beep. Again, in some source code I see that the frequency and duration can be set for speaker also. But how? A special SYSCALL?
So, there is "beep" code in both RomWBW Z80 source code and in the Propeller source code. The beep you are getting from the ParPortProp is generated by the Propeller code. Should not be hard to track that bit of code down and change it.
lb-hobby wrote on Sun, 03 May 2020 14:08Sorry for the pile of questions. Hope you can help.
No problem, doing my best.
-Wayne
|
|
|