Page 1 of 1

Real Time Clock for ZX81

Posted: Thu Jul 31, 2014 8:04 am
by David G
K. Murta wrote a nice app that shows a real-time clock on the ZX81 then proceeds to run a BASIC app in the foreground.

RELOGIO (2004) http://zx81.eu5.org/toddysofte.html

I have adapted it to English. The source code shows the machine language.

Re: Real Time Clock for ZX81

Posted: Thu Jul 31, 2014 12:08 pm
by Moggy
A nice idea but like the "real time clock" used with the Husband or H4th ROM it's not really very accurate due to the varying oscillation rates between different ZX81's ceramic timepieces.
Just tried this on one zeddy and it lost 10 seconds in the first three minutes so a nice novelty but not very practical. :D

Re: Real Time Clock for ZX81

Posted: Fri Aug 01, 2014 12:59 am
by David G
It also demonstrates how to run two "apps" at the same time. Very interesting.

Re: Real Time Clock for ZX81

Posted: Tue Jan 27, 2015 12:29 am
by user@lab1
Speaking of watches, this maybe you'll find it interesting...
Even if (maybe) "off-topic". :)

http://www.pictureviewerpro.com/hosting/zx81/wilfr.htm

Re: Real Time Clock for ZX81

Posted: Mon Jul 13, 2015 10:17 am
by stefano
I'm wondering if such interrupt drivers could hold a parallel counter to handle some sort of experimentally determined bias.
So the ZX81 user could POKE somewhere a value to be added or subtracted to the actual FRAMES counter after a given number of ticks. Determining the right setting for such values could be done with a test application looping long enough, asking the user for his own time measurements and computing the optimal values for the 2 parameters (hoping the thermal drift impact and the components age effect are low enough).

Re: Real Time Clock for ZX81

Posted: Tue Jul 14, 2015 9:08 am
by olofsen
This is a version that uses z88dk, ZeddyNet, and ntp, with a very simple algorithm: http://rullf2.xs4all.nl/sg/clock.zip

ZeddyNet may be emulated (under Linux) with http://rullf2.xs4all.nl/sz81

Re: Real Time Clock for ZX81

Posted: Fri Jul 17, 2015 3:48 pm
by stefano
Very professional !
You might integrate the graphics too, borrowing my clock.c example in the z88dk tree.
The default look-and-feel is naked to permit the low resolution devices to act good, but it is possibe to pass a #define and get a graceful HR quadrant.

Re: Real Time Clock for ZX81

Posted: Sat Jul 18, 2015 8:06 am
by olofsen
Thank you - I've added a hires version to the above zip, incorporating your clock example :) There is some room for improvement; for example, It crashes not too gracefully if there is no network. The timer interrupt routine is a bit different to obtain 1% control.

Re: Real Time Clock for ZX81

Posted: Sat Jul 18, 2015 6:43 pm
by stefano
A cool mesh-up of ideas and contributions, I like it !

Re: Real Time Clock for ZX81

Posted: Thu Aug 02, 2018 12:22 pm
by siggi
This would also be a nice version of a ZeddyNet clock (at least in German speaking countries):

https://www.monsterzeug.de/Wortuhr.html

:mrgreen:
Siggi

Addendum: English version
https://www.amazon.de/WORTUHR-Tisch-Wor ... word+clock