Page 1 of 1

CBM Key Character Arrangement

Posted: Sat Mar 23, 2024 1:48 am
by SparkyNZ
When I look at the character ROM glyphs, I can see easy correlation between the letters and the shift key symbols associated with them:

dzIYRhB.png
dzIYRhB.png (9.14 KiB) Viewed 2043 times

The difference between A and the spade is 97 - 65 = 32, the difference between S and the heart is 32

The CBM key characters don't seem to follow the same simple rules. Below the "rule of 32" doesn't apply - the A & S CBM modified keys are -2 apart:

MTFQGYQ.png
MTFQGYQ.png (8.55 KiB) Viewed 2043 times

What algorithm is used to pull out the CBM character glyphs from the character ROM?

(Sorry my img links don't seem to be appearing so I've copied the links as well)

(mod: Images repaired. Please use the attachment facility of the forum software for that kind of stuff. Check this post in the editor to see how to do this.)

Re: CBM Key Character Arrangement

Posted: Sat Mar 23, 2024 2:15 am
by Mike
You need to differentiate clearly between PETSCII codes (i.e. what is used with CHROUT and CHRIN), screen codes (what is stored in the text screen RAM) and glyphs (the actual definition of a character matrix in the character ROM or as user defined character in RAM).
SparkyNZ wrote:What algorithm is used to pull out the CBM character glyphs from the character ROM?
Simply put, none. Regarding PETSCII, the CBM character codes are read from a table in the keyboard decoding section and bear no recognizable relation to the unshifted codes. For more details, check out the threads "Keyboard Buffer and Ctrl/Shift/CBM etc" and "Standards for quoted PETSCII?".