[comp.sys.apple2] Inverse characters

UD041948@NDSUVM1.BITNET (07/10/90)

During a recent programming session, I was trying to type INVERSE characters,
and the worked fine in capital letters, but lowercase letters got screwed up,
so the word "Name" in inverse looked something like "N%&!" (in inverse letters
of course).  Anyone knows what causes this phenomena, and better yet, how to
fix it?
-------
*******************************************************************
   Joe Carlin      Don't Panic!         ud041948@ndsuvm1.bitnet
 "I seem to be having this terrible difficulty with my lifestyle."
                                        - Arthur Dent, HGTTG
*******************************************************************

stephens@latcs1.oz.au (Philip J Stephens) (07/11/90)

In article <4274UD041948@NDSUVM1>, UD041948@NDSUVM1.BITNET writes:
> During a recent programming session, I was trying to type INVERSE characters,
> and the worked fine in capital letters, but lowercase letters got screwed up,
> so the word "Name" in inverse looked something like "N%&!" (in inverse letters
> of course).  Anyone knows what causes this phenomena, and better yet, how to
> fix it?

  You didn't mention what computer you own.  However, a stock Apple ][+ (and
I think also an unenhanced Apple //e, but I might be wrong) do not support
inverse lower case letters in their character set, or flashing lower case for
that matter.  This is because the normal ASCII character set is 128 characters
in size (including control characters), so to include both inverse and flashing
modes they had to restrict the available number of characters to 64 for each
mode.  Besides, the Apple ][+ doesn't have normal lower case either, for no
good reason :-) 
  The Apple //e is suppose to have an extended character set (called mousetext
or something) in which inverse lower case appears.  However, since I only own
an Apple ][+ I'm not an expert on how to invoke the additional characters.
Someone else with more knowledge will have to step in with that information...

</\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\></\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\>
<  Philip J. Stephens                ><   "Many views yield the truth."        >
<  Hons. student, Computer Science   ><   "Therefore, be not alone."           >
<  La Trobe University, Melbourne    ><          - Prime Song of the viggies   >
<\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/><\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/>

rond@pro-grouch.cts.com (Ron Dippold) (07/12/90)

In-Reply-To: message from UD041948@NDSUVM1.BITNET

> During a recent programming session, I was trying to type INVERSE
> characters, and the worked fine in capital letters, but lowercase
> letters got screwed up, so the word "Name" in inverse looked something
> like "N%&!" (in inverse letters of course).  Anyone knows what causes
> this phenomena, and better yet, how to fix it?
 
Your problem is that the //e, //c, and //gs have two different character sets
in video ROM...  Mousetext and normal.  To display inverse lowercase at all
you need to be in mousetext mode, so if it gets turned off, all you will see
is the same characters from the normal set, which happen to be flashing
symbols and numbers.  To turn mousetext back on, just store something into
$C00F.  Or you can "PRINT CHR$(27)" from BASIC.

UUCP: crash!pro-grouch!rond
ARPA: crash!pro-grouch!rond@nosc.mil
INET: rond@pro-grouch.cts.com

bchurch@oucsace.cs.OHIOU.EDU (Bob Church) (07/12/90)

In article <4274UD041948@NDSUVM1>, UD041948@NDSUVM1.BITNET writes:
> During a recent programming session, I was trying to type INVERSE characters,
> and the worked fine in capital letters, but lowercase letters got screwed up,
> so the word "Name" in inverse looked something like "N%&!" (in inverse letters
> of course).  Anyone knows what causes this phenomena, and better yet, how to
> fix it?
> -------
> *******************************************************************
>    Joe Carlin      Don't Panic!         ud041948@ndsuvm1.bitnet
>  "I seem to be having this terrible difficulty with my lifestyle."
>                                         - Arthur Dent, HGTTG
> *******************************************************************

On the //c you have a primary and alternate character set. The alternate
set is the one with the mouse characters. Primary can display flashing and
inverse upper case letters but not lower case. The alternative set can
display inverse upper or lower case letters but no flashing letters.

$C00E is ALTCHARSETOFF
$C00F is ALTCHARSETON
$C01E IS ALTCHARSET; This willreturn a value ( >= $80 if alternative set
is on)


********************************************************************
*                                                                  *
*   bob church  bchurch@oucsace.cs.ohiou.edu                       *
*                                                                  *
*  If economics isn't an "exact" science why do computers crash    *
*  so much more often than the stock market?                       *
*                                          bc                      *
********************************************************************

ung@felix.UUCP (Bill Ung) (07/14/90)

In article <4274UD041948@NDSUVM1> UD041948@NDSUVM1.BITNET writes:
>During a recent programming session, I was trying to type INVERSE characters,
>and the worked fine in capital letters, but lowercase letters got screwed up,
>so the word "Name" in inverse looked something like "N%&!" (in inverse letters
>of course).  Anyone knows what causes this phenomena, and better yet, how to
>fix it?

The phenomena is caused because the Apple // wasn't designed to print
lower-case letters in inverse.  You'll notice a similiar phenomenon
when using flashing characters as well.

As far as fixing it, it would be helpful to know which Apple // you had.
At least for the //e and possibly //c & //c+ (I don't know about the
IIgs), you should simply turn on the 80-column card (provided your //e
has one).  Then of course, you're in 80 columns and don't want to be
there, right?  At that point, I think you print a chr$(17) (ctrl-Q, right?)
to put it into 40 column mode, using the 80-column card.  If you do it
correctly, your lower-case inverse characters will show up exactly as you
would like them to be!

Bill Ung
  ung@felix.UUCP

UD041948@NDSUVM1.BITNET (07/17/90)

Okay, I'm sorry for not being more specific the first time, but here goes:

Me and a friend have been working on this program.  We're using an Apple
IIGS with a 45 Meg hard drive, and the program runs in 40 column mode.
We wrote a line that looks something like this:

3030 INVERSE : PRINT "Name:"

Well, it's in inverse alright, but the lowercase characters get screwed
up, and look something like "N%&!" in inverse characters (and no, they
aren't mousetext, I know what mousetext looks like).  It seems to me
that BASIC is trying to shift the character's bits (one of them, I
haven't really looked at the ascii chart to find out), but not
the right one(s).  Something may have done this earlier in the program
(the things a monster, a few thousand lines of code get run before this)
but is there a ?chr$(x) command that turns this off?  We've tried a
few, but no avail.
-------
*******************************************************************
Joe Carlin (FWA)     Don't Panic!     ud041948@ndsuvm1.bitnet
"I seem to be having this terrible difficulty with my lifestyle."
- Arthur Dent, HGTTG
"Hello, I know that you've been feeling tired.
I bring you love and deeper understanding."    - Kate Bush
*******************************************************************

dlyons@Apple.COM (David A. Lyons) (07/18/90)

In article <4307UD041948@NDSUVM1> UD041948@NDSUVM1.BITNET writes:
>Okay, I'm sorry for not being more specific the first time, but here goes:
>
>Me and a friend have been working on this program.  We're using an Apple
>IIGS with a 45 Meg hard drive, and the program runs in 40 column mode.
>We wrote a line that looks something like this:
>
>3030 INVERSE : PRINT "Name:"
>
>Well, it's in inverse alright, but the lowercase characters get screwed
>up, and look something like "N%&!" in inverse characters (and no, they
>aren't mousetext, I know what mousetext looks like). [...]

I believe the previous responses to your first message were correct,
but I didn't study them too closely.

There are TWO character sets available.  The standard one has flashing
characters, but it does *not* have inverse lower case!

The other one, which you WANT, is the one that has MouseText in it.
It also happens to have inverse lowercase letters in it.

If you turn on the 80-column firmware, even if you go to 40-column
mode with the firmware still on (a solid cursor instead of a
checkerboard cursor) you will get lowercase letters juse fine.

The 80-column firmware *does* do some shifting-around of the
character codes to make things work right.

If you do this, life will be Good for your inverse lowercase letters:

100 PRINT CHR$(4);"PR#3"
110 PRINT CHR$(17);    : REM switch to 40-columns leaving the 80-col
                             firmware ACTIVE!

-- 
David A. Lyons, Apple Computer, Inc.      |   DAL Systems
Apple II Developer Technical Support      |   P.O. Box 875
America Online: Dave Lyons                |   Cupertino, CA 95015-0875
GEnie: D.LYONS2 or DAVE.LYONS         CompuServe: 72177,3233
Internet/BITNET:  dlyons@apple.com    UUCP:  ...!ames!apple!dlyons
   
My opinions are my own, not Apple's.

jce@pro-abilink.cts.com (Joe Engledow) (07/18/90)

In-Reply-To: message from ung@felix.UUCP

Well, after you turn on the 80-col card, to get back into 40-col, you need to
hit ESC, _then_ do a CTRL-Q. But I tried that on my //e (w/ an original Apple
80-col card) and it doesn't work...
--------------------------------------
Joe Engledow, Jr.         Proline: jce@pro-abilink
4825 Circle Twenty        UUCP: crash!pro-abilink!jce
Abilene, TX 79606         ARPA: crash!pro-abilink!jce@nosc.mil
(915) 695-0092            INET: jce@pro-abilink.cts.com
                          Bitnet: jce%pro-abilink.cts.com@nosc.mil
"You've got a pet halibut?"
"Yes -- I chose 'im out of thousands. Didn't like the others; they were all
too flat." -- Michael Palin and John Cleese, "Fish Licence" - a Monty Python
sketch

estell@m.cs.uiuc.edu (07/19/90)

>There are TWO character sets available.  The standard one has flashing
>characters, but it does *not* have inverse lower case!

Is there any documentation available for this
floating around somewhere in some tech. note?

mdj@pro-beagle.cts.com (Mark de Jong) (07/19/90)

In-Reply-To: message from UD041948@NDSUVM1.BITNET

To print inverse characters in 40 column mode on a IIGS, do the following:

        10 PRINT CHR$(4)"PR#3" : REM Turn on 80-column mode
        20 PRINT CHR$(17) : REM Switch to 40-column mode 
                                PRINT CHR$(18) switches back to 80-columns
        30 INVERSE : PRINT "Hello" : NORMAL

Running this program will print your 40-column text in inverse the way you
want them to.

        -- Mark

toddpw@tybalt.caltech.edu (Todd P. Whitesel) (07/19/90)

estell@m.cs.uiuc.edu writes:

>>There are TWO character sets available.  The standard one has flashing
>>characters, but it does *not* have inverse lower case!

>Is there any documentation available for this
>floating around somewhere in some tech. note?

Yes, there is documentation available.

NO, it is not in a tech note.

The standard one was documented in the original Apple II Reference manual.
Both standard & mousetext are documented in the Apple //e Technical Reference
and the Apple //c Technical Reference.

Getting the alternate character set by turning on the 80 column firmware
(whether or not you use 80 columns) is documented in the manual that comes with
the //e's 80 column card... I have one somewhere.

It is probably also documented in the IIgs Hardware & Firmware references, but
I hardly ever refer to that section so I don't know what kind of treatment they
give it.

Todd Whitesel
toddpw @ tybalt.caltech.edu

rond@pro-grouch.cts.com (Ron Dippold) (07/19/90)

In-Reply-To: message from UD041948@NDSUVM1.BITNET


> 3030 INVERSE : PRINT "Name:" 
> Well, it's in inverse alright, but the lowercase characters get screwed 
> up, and look something like "N%&!" in inverse characters (and no, they 
> mousetext, I know what mousetext looks like).  It seems to me 
 
The first replies to your message were correct... you need to get INTO
mousetext mode.  The standard apple // character set does not have inverse
lower characters.

UUCP: crash!pro-grouch!rond
ARPA: crash!pro-grouch!rond@nosc.mil
INET: rond@pro-grouch.cts.com

toddpw@tybalt.caltech.edu (Todd P. Whitesel) (07/21/90)

jce@pro-abilink.cts.com (Joe Engledow) writes:

>In-Reply-To: message from ung@felix.UUCP

>Well, after you turn on the 80-col card, to get back into 40-col, you need to
>hit ESC, _then_ do a CTRL-Q. But I tried that on my //e (w/ an original Apple
>80-col card) and it doesn't work...

No No No. If you hit escape first then you are telling the 80 column firmware
to disconnect itself. You get the original character set back.

Todd Whitesel
toddpw @ tybalt.caltech.edu

greg@hoss.unl.edu (Hammer) (07/22/90)

In article <1990Jul20.200816.19293@laguna.ccsf.caltech.edu> toddpw@tybalt.caltech.edu (Todd P. Whitesel) writes:
>jce@pro-abilink.cts.com (Joe Engledow) writes:
>
>>In-Reply-To: message from ung@felix.UUCP
>
>>Well, after you turn on the 80-col card, to get back into 40-col, you need to
>>hit ESC, _then_ do a CTRL-Q. But I tried that on my //e (w/ an original Apple
>>80-col card) and it doesn't work...
>
>No No No. If you hit escape first then you are telling the 80 column firmware
>to disconnect itself. You get the original character set back.
>
>Todd Whitesel
>toddpw @ tybalt.caltech.edu

Perhaps you can try ESC 4 to get back to 40 columns, instead of ESC
Control-Q.  Not all 80 column cards work the same.  At my old high school,
there were at least three different things you had to try to get some
things to work, since not all of the IIe's had the same card, and not all
of them were the same model (from Rev. A unenhanced to Platinum IIe's).
There are discrepancies between cards... even Apple's.
  _____________________________________________________________________
 |    __  ___________  __    |                                         |
 |   /_/\/_/_______\_\/\_\   | Hammer's first law of Macintosh usage:  |
 |   \ \_\ \__   __/ /_/ /   |                             ____________|
 |    \  __ \ | | / __  /    |       System errors occur. |            |
 |     \_\/\_\|_|/_/\/_/     |____________________________| This space |
 |     / /_/ /| |\ \_\ \     |                            | intention- |
 |    /greg@hoss.unl.edu\    | "This data is raw!"  ___   | ally left  |
 |   /_/ /_/_______\_\ \_\   |                    \-\|/-/ | blank...   |
 |___________________________|____________________________|____________|

dlyons@Apple.COM (David A. Lyons) (07/23/90)

In article <1990Jul21.180434.23445@hoss.unl.edu> greg@hoss.unl.edu (Hammer) writes:
>[...] Not all 80 column cards work the same.  At my old high school,
>there were at least three different things you had to try to get some
>things to work, since not all of the IIe's had the same card, and not all
>of them were the same model (from Rev. A unenhanced to Platinum IIe's).
>There are discrepancies between cards... even Apple's.

The differences are due to the computer's ROM, not the 80-column card.
The card itself has no ROM on it, just 1K or 64K of RAM (1K on the
regular 80-column card, 64K on the "extended" 80-column card).  These
days you can't buy the 1K version, which had only enough of the
"auxiliary bank" of RAM for the text screen.

The difference was just that some of your Apple IIe machines were
"enhanced" and some were not.  (The enhancement is 3 parts: replacing
the ROM, replacing the 6502 with a 65C02, and replacing the character
generator with one that has MouseText in there.)
-- 
David A. Lyons, Apple Computer, Inc.      |   DAL Systems
Apple II Developer Technical Support      |   P.O. Box 875
America Online: Dave Lyons                |   Cupertino, CA 95015-0875
GEnie: D.LYONS2 or DAVE.LYONS         CompuServe: 72177,3233
Internet/BITNET:  dlyons@apple.com    UUCP:  ...!ames!apple!dlyons
   
My opinions are my own, not Apple's.

brianw@microsoft.UUCP (Brian WILLOUGHBY) (07/26/90)

In article <43258@apple.Apple.COM> dlyons@Apple.COM (David A. Lyons) writes:
>The difference was just that some of your Apple IIe machines were
>"enhanced" and some were not.  (The enhancement is 3 parts: replacing
>the ROM, replacing the 6502 with a 65C02, and replacing the character
>generator with one that has MouseText in there.)
>-- 
>David A. Lyons, Apple Computer, Inc.      |   DAL Systems

As far as inverse characters are concerned, both the "enhanced" and
unenhanced IIe machines were capable of inverse lower case.  MouseText is
an addition which is not necessary for inverse lower case.  Referring to
your IIe reference manual will reveal a soft switch which will enable
the alternate character set (including inverse lower case and sometimes
MouseText), although the 80 column firmware will probably reset this
switch without warning.

The default text ROM soft switch setting enabled the II+ character set,
which allows (in upper case characters) 64 inverse, 64 flash, 64 normal,
32 control and 32 normal lower case.  There was not enough room for
inverse lower case, so the IIe has a second set of 256 text characters
which do not include FLASHing text.  At first, only 32 were used for
inverse lower case, but then the //c added 32 MouseText characters in the
space where inverse upper case was repeated.

An interesting side note (well, it was interesting to me):
The older Wizardry games actually stored control character codes into
text screen memory (i.e. hex codes $80 through $9F), even though these
codes were never used by the normal Apple ROM COUT routines.  I found
this out on my II+ after I got the bright idea of using codes $80-$9F
for my own inverse lower case (available at the same time as FLASHing, I
had already added normal lower case with the proper ASCII codes of
$E0-$FF).  $80-$9F is essentially a wasted area of text ROM, so I didn't
think it would hurt.  Apparently, at the time Wizardry was written, there
were lower case adaptors which used codes $80-$9F for lower case.  I
don't see why they chose to locate lower case characters at codes which
were not ASCII standard (which caused the software to convert text files
from other computers), but there is the advantage that machines without
the lower case ROM would see upper case normal characters for codes
$80-$9F.  I guess that is an important feature, since this thread started
when someone got funky numeric/special characters instead of lower case,
because their character generator ROM was not set right.

Brian Willoughby

dlyons@Apple.COM (David A. Lyons) (07/26/90)

In article <56073@microsoft.UUCP> brianw@microsoft.UUCP (Brian WILLOUGHBY) writes:
>As far as inverse characters are concerned, both the "enhanced" and
>unenhanced IIe machines were capable of inverse lower case.  MouseText is
>an addition which is not necessary for inverse lower case.  Referring to
>your IIe reference manual will reveal a soft switch which will enable
>the alternate character set (including inverse lower case and sometimes
>MouseText) [...]

I stand corrected--the alternate character set was around before MouseText;
the alternate set differs between machines with and without MouseText.
-- 
David A. Lyons, Apple Computer, Inc.      |   DAL Systems
Apple II Developer Technical Support      |   P.O. Box 875
America Online: Dave Lyons                |   Cupertino, CA 95015-0875
GEnie: D.LYONS2 or DAVE.LYONS         CompuServe: 72177,3233
Internet/BITNET:  dlyons@apple.com    UUCP:  ...!ames!apple!dlyons
   
My opinions are my own, not Apple's.