Comments & Bug Reports — C-128 80 Column Display Manager

Started by RobertB, November 28, 2008, 01:17 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

RobertB

     Thanks!  As soon as I get back to California, I will download it and try it out.

             Now in Canby, Oregon,
             Robert Bernardo
             Fresno Commodore User Group
             http://videocam.net.au/fcug
             The Other Group of Amigoids
             http://www.calweb.com/~rabel1/
             Southern California Commodore/Amiga Network
             http://www.sccaners.org/

BigDumbDinosaur

A feature found in most large system display terminals, such as the Wyse 60 and DEC VT-100 (from whence ANSI escape sequences were derived) is something called "clear foreground" (CF).  CF's effect is similar to that of clearing the screen but only affects text that has been displayed in what is referred to as normal or foreground intensity.  Text that has been displayed in background or low intensity is not affected at all.

The most common use for CF is in handling data entry screens.  In such screens, the application prints text to the screen that describes the various entry fields.  For example, an initialized entry screen might appear as follows:

                               XYZ SALES PROCESSING

Locator:                       Name:
--------------------------------------------------------------------------------
Address:

City   :                       State:      ZIP:      -
Office : (   )          Ext:       Hours:         -
A/P    : (   )          Ext:       Hours:         -
FAX    : (   )
================================================================================

The above is variously referred to as a template or background.

After the user has entered the data, the screen might appear as follows:

                               XYZ SALES PROCESSING

Locator: Amalgamated Meat      Name: Amalgamated Meat & Potatoes Inc 
--------------------------------------------------------------------------------
Address: 1234 Skidrow St
         Suite 3A
City   : Nowhere               State: AK   ZIP: 12345-6789
Office : (123) 456-7890 Ext: 1234  Hours: 08:00 A - 04:30 P
A/P    : (123) 456-7890 Ext: 1234  Hours: 08:30 A - 05:00 P
FAX    : (123) 456-7890
================================================================================

The bold text represents data printed in foreground intensity.

When the terminal is told to clear foreground, only the data will be cleared and the screen will revert to its initialized state:

                               XYZ SALES PROCESSING

Locator:                       Name:
--------------------------------------------------------------------------------
Address:

City   :                       State:      ZIP:      -
Office : (   )          Ext:       Hours:         -
A/P    : (   )          Ext:       Hours:         -
FAX    : (   )
================================================================================

There's obviously an advantage to being able to clear the foreground in this way.  If such a feature didn't exist it would be necessary to clear the screen and redisplay all of the background text, incurring both processing overhead and extra programming work.  Using clear foreground, a simple escape sequence is all that needs to be sent to the terminal, which does the actual work of finding and clearing the foreground text.

Unfortunately, while the C-128 has a number of escape sequences that may be used to manipulate the display, it doesn't have a CF escape sequence (one could be implemented in machine language, of course).  However, if you are running the 80 column display manager you can simulate CF.  The steps are simple:


  • Use 80CDM function number 3 to redirect the display to screen 1.  Be sure to clear the screen after doing so, since screen 1 may be in an unknown state.


  • Prepare your background display as required.  To make it obvious to the user as to which areas are background and which are data, use low intensity colors for the background text and high intensity colors for the data.  A good choice, if you are going for that retro green-screen terminal look, might be COLOR 5,6 for background and COLOR 5,14 for foreground.  Another color pair that might look good is COLOR 5,10 for background and COLOR 5,4 for foreground.


  • Use function number 1 to copy screen 1 to screen 0.  This will make your entry screen visible and ready for data.


  • Start accepting input data.  As data is accepted and displayed be sure to use your foreground color.


  • After the user has saved the entry data, perform a "clear foreground."  Use function number 1 to copy screen 1 to screen 0 again.  The previously displayed data will instantly disappear but the background will not have appeared to change in anyway.

For the most realistic simulation of clear foreground you should enable vertical retrace delay when you copy screen 1 to screen 0.

If your C-128 has only 16K of video RAM, you could initially print your template to the live screen and then export the screen to RAM-0 instead of using screen 1.  Later on when you want to perform clear foreground, import the screen.  It won't be as fast as a screen 1 to screen 0 copy, but will still perform with alacrity.
x86?  We ain't got no x86.  We don't need no stinking x86!

BigDumbDinosaur

Haven't read any feedback on this program and am wondering if anyone has used it with their software and if so, how it's working for them.
x86?  We ain't got no x86.  We don't need no stinking x86!