X16 "Wall Clock" 20x15 custom fonts (BASIC)
Posted: Wed Oct 04, 2023 6:24 am
This example uses custom fonts and the tiny 20x15 text mode to display the current time and date.
In BASIC, type "MENU" on the X16 to set the time and date. Depending on the emulator configuration, they may startup with "00" time - but the "real X16" has a battery and will store the date/time once it is set.
Version 1 updates:
- Added an "animated banner" (programmatically scrolls any given font)
- Minor font revisions (on 1, 7, 0)
Version 2 updates:
- banner defaults to non-moving, press SPACE to toggle shifting the banner or not
- press S to toggle on/off the display of the SECONDS
- press C to toggle on/off playing of an hourly chime (the code is setup to have a different chime for each hour, but for now the data table is set to all the same for each hour)
- press B to toggle between some foreground/background color options
- press H (or F1) to show a brief help/status (modes that are on are highlighted; the help is mostly just a reminder on what keys do anything at all) - this HELP only appears for about 8 seconds before auto-disappearing to declutter the screen
- press P to toggle "PM" mode (i.e. showing AM/PM or instead showing 24-hour time)
- some more minor font updates (on 1, 3, 4, 5 and the slash shifted up one)
(no, the program won't "remember" your settings between restarts; sorry I tried to pick good defaults )
Try It Now!
In BASIC, type "MENU" on the X16 to set the time and date. Depending on the emulator configuration, they may startup with "00" time - but the "real X16" has a battery and will store the date/time once it is set.
Version 1 updates:
- Added an "animated banner" (programmatically scrolls any given font)
- Minor font revisions (on 1, 7, 0)
Version 2 updates:
- banner defaults to non-moving, press SPACE to toggle shifting the banner or not
- press S to toggle on/off the display of the SECONDS
- press C to toggle on/off playing of an hourly chime (the code is setup to have a different chime for each hour, but for now the data table is set to all the same for each hour)
- press B to toggle between some foreground/background color options
- press H (or F1) to show a brief help/status (modes that are on are highlighted; the help is mostly just a reminder on what keys do anything at all) - this HELP only appears for about 8 seconds before auto-disappearing to declutter the screen
- press P to toggle "PM" mode (i.e. showing AM/PM or instead showing 24-hour time)
- some more minor font updates (on 1, 3, 4, 5 and the slash shifted up one)
(no, the program won't "remember" your settings between restarts; sorry I tried to pick good defaults )
Try It Now!