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!
X16 "Wall Clock" 20x15 custom fonts (BASIC)
X16 "Wall Clock" 20x15 custom fonts (BASIC)
- Attachments
-
- X16CLOCKV2.ZIP
- (21.29 KiB) Downloaded 423 times
-
- x16clock2_1.png (4.76 KiB) Viewed 5618 times
-
- X16CLOCK.PRG
- (21.92 KiB) Downloaded 395 times
-
- X16CLOCK.BAS
- (27.61 KiB) Downloaded 526 times
Last edited by Xiphod on Sat Oct 07, 2023 7:43 am, edited 3 times in total.
Re: X16 "Wall Clock" 20x15 custom fonts (BASIC)
Shades of the old BIGCLOCK program for the PET.
- ahenry3068
- Posts: 1192
- Joined: Tue Apr 04, 2023 9:57 pm
Re: X16 "Wall Clock" 20x15 custom fonts (BASIC)
VPOKE 1,$F200,$ 0F:REM 00001111 Could easily be condensed to
VPOKE 1,$F200, %00001111 The leading % means binary the same way a leading $ means HEX and though it is not an issue for your code really, REM statements do take up some BASIC memory.
VPOKE 1,$F200, %00001111 The leading % means binary the same way a leading $ means HEX and though it is not an issue for your code really, REM statements do take up some BASIC memory.
Re: X16 "Wall Clock" 20x15 custom fonts (BASIC)
Good call, plus the binary as part of the code makes it easier to adjust in-place for minor touch-up.
All that was auto-generated out of the X16FONTS tool here
<viewtopic.php?p=29499#p29499>
So i've updated that tool to do this binary format output as you've recommended.
All that was auto-generated out of the X16FONTS tool here
<viewtopic.php?p=29499#p29499>
So i've updated that tool to do this binary format output as you've recommended.
- ahenry3068
- Posts: 1192
- Joined: Tue Apr 04, 2023 9:57 pm
Re: X16 "Wall Clock" 20x15 custom fonts (BASIC)
I've been meaning to check out your font tool. But so many side projects
Re: X16 "Wall Clock" 20x15 custom fonts (BASIC)
Various feature updates on the clock tool! Including some pre-selected FG/BG color options and using FMFREQ for an hourly chime.
Check it out in "V2" (updated in first post)
Check it out in "V2" (updated in first post)
- Attachments
-
- x16clock2.png (4.99 KiB) Viewed 5616 times