S-100 Console I/O Propeller firmware - switchable VGA + persistent settings
Version 29.2 enhancement build, 2026-08-13

TOP OBJECT
----------
Open and compile:
    ConsoleIO-Switchable.spin

Display hotkeys
---------------
Ctrl+Alt+F1   640x480   / 80x40 characters
Ctrl+Alt+F2   800x600   / 100x50 characters
Ctrl+Alt+F3   1024x768  / 128x64 characters
Ctrl+Alt+F4   Cycle foreground color
Ctrl+Alt+F5   Cycle background color
Ctrl+Alt+F6   Swap foreground/background
Ctrl+Alt+F7   Reset colors to white on black

Persistent settings
-------------------
The last selected resolution, foreground color, and background color are
saved automatically to the Propeller boot EEPROM and restored at startup.
No extra save keystroke is required.

The settings record is 8 bytes at EEPROM address $7FF0.  It contains a
signature, format version, mode, foreground/background colors, a trailer,
and a checksum.  Invalid/uninitialized records fall back safely to:

    1024x768 / 128x64
    white on black

The EEPROM interface uses the standard Propeller P1 boot-EEPROM pins:
    P28 = SCL
    P29 = SDA

Memory/design notes
-------------------
* One shared 8192-byte screen buffer supports all three resolutions.
* Three low-level VGA timing objects are compiled in; only one is running.
* Resolution changes stop/restart the VGA COGs and clear the terminal.
* Color changes are immediate and do not restart VGA.
* EEPROM writes occur only when the selected display settings actually change.
* The 8-byte record is written as a single small EEPROM page write.

Files
-----
ConsoleIO-Switchable.spin
VT100_Emulator-Switchable.spin
VGA_Switchable.spin
VGA_HiRes_Text_640.spin
VGA_HiRes_Text_800.spin
VGA_HiRes_Text_1024.spin
EEPROM_Settings.spin
Keyboard.spin
FullDuplexSerial.spin

V29.3 NOTE
---------
EEPROM I2C timing was corrected for Spin WAITCNT semantics.  The former
5 us delay used CNT first and could miss the target, effectively stalling
startup until the 32-bit system counter wrapped.  The EEPROM bit-bang delay
is now a conservative 100 us with CNT evaluated last.
