Real Time Clock for ZX81
Real Time Clock for ZX81
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.
RELOGIO (2004) http://zx81.eu5.org/toddysofte.html
I have adapted it to English. The source code shows the machine language.
- Attachments
-
- RELOGIOE.zip
- RELOGIO English P file and ASM file
- (2.55 KiB) Downloaded 440 times
Re: Real Time Clock for ZX81
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.
Just tried this on one zeddy and it lost 10 seconds in the first three minutes so a nice novelty but not very practical.
Last edited by Moggy on Tue Jan 27, 2015 1:40 pm, edited 2 times in total.
Re: Real Time Clock for ZX81
It also demonstrates how to run two "apps" at the same time. Very interesting.
Re: Real Time Clock for ZX81
Speaking of watches, this maybe you'll find it interesting...
Even if (maybe) "off-topic".
http://www.pictureviewerpro.com/hosting/zx81/wilfr.htm
Even if (maybe) "off-topic".
http://www.pictureviewerpro.com/hosting/zx81/wilfr.htm
Re: Real Time Clock for ZX81
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).
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
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
ZeddyNet may be emulated (under Linux) with http://rullf2.xs4all.nl/sz81
Last edited by olofsen on Thu Aug 02, 2018 9:36 pm, edited 1 time in total.
Re: Real Time Clock for ZX81
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.
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
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
A cool mesh-up of ideas and contributions, I like it !
Re: Real Time Clock for ZX81
This would also be a nice version of a ZeddyNet clock (at least in German speaking countries):
https://www.monsterzeug.de/Wortuhr.html
Siggi
Addendum: English version
https://www.amazon.de/WORTUHR-Tisch-Wor ... word+clock
https://www.monsterzeug.de/Wortuhr.html
Siggi
Addendum: English version
https://www.amazon.de/WORTUHR-Tisch-Wor ... word+clock
My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
http://zx81.ddns.net/ZxTeaM