PLATO Character Set (pfcharset)
Utility for accessing PLATO packs and master files.
Copyright (c) 2021-2024 Steve Zoppi
This is licensed software a copy of the license should have been included in the source tree for this module. You may find a copy of the license here: https://www.gnu.org/licenses/gpl-3.0.en.html
This program operates on PLATO packs and master files. Packs are accessed as DtCyber disk images. Master files (CDC style virtual packs) can be accessed directly (if you have a master file image copy available) or as NOS files contained in a NOS disk image.
<Documentation_reference>
When accessing PLATO file structures, the host pack object needs to be instantiated and then the PlatoFile class may be used to access the underlying structure.
- class pfcharset.Charset[source]
Bases:
objectCharacter Set Class used for different types of manipulation.
- char_words
Number of words in the charset
- Type:
int
- char_slots
Dictionary of character entries
- Type:
dict
- num_blocks
Number of blocks required for the charset
Each char_slot entry is indexed by the ordinal value of the plato character. Slot 0o000 and 0o100 are reserved and always zero. Each character is composed of an 8 bit x 16 bit matrix.
- CHAR_HEADER = 16390
- property num_blocks_used: int
- property num_slots_used: int
- pfcharset.block_letters(instring: str = '{PLATO/CYBIS/system}', charset_name: str = 'standard', charsets_source: str = '.\\charsets.tutor.txt', zero: str = ' ', one: str = '#')[source]
Block Letter Banner based on PLATO Charsets.
This function reads the “charsets” lesson dump and selects any of the in-built character sets
standard,rounded,orange, etc. and enables a string of text to be rendered in a 16-row raster.Input interprets the standard ASCII characters but accesses the “meta” characters using the ‘backtick’ (
`) character. In this way, rendering the Divide symbol can be accomplished by typing`/and Micro-A can be accessed by typing`A.The _c2d translation table represents the various character states wherein a backtick causes a shift to the next series.
The result of the parser is a list of indexes into the character set which is then rasterized and pivoted into a left-to-right horizontal raster.