Syncing ST/STE clock with host

A forum about the Hatari ST/STE/Falcon emulator - the current version is v2.2.0

Moderators: simonsunnyboy, thothy, Moderator Team

Count
Atari nerd
Atari nerd
Posts: 47
Joined: Sat Sep 16, 2017 9:15 am
Location: Castrop-Rauxel, Germany

Syncing ST/STE clock with host

Postby Count » Tue Dec 31, 2019 5:35 pm

Is it possible to synchronize the clock of an ST/STE with the host to have the current time? As these machines don't have native RTC, I would like to use an AUTO folder programme, for example, as I used to do back in 1990 to read the RTC of the attached hard disk host adapter. Maybe Hatari offers a native feature I could use. Unfortunately I couldn't find any information in the docs.

czietz
Hardware Guru
Hardware Guru
Posts: 1130
Joined: Tue May 24, 2016 6:47 pm

Re: Syncing ST/STE clock with host

Postby czietz » Tue Dec 31, 2019 5:43 pm

Switch Hatari to MegaST (or MegaSTE) and you get an emulated RTC that is sync'ed to the host.

Count
Atari nerd
Atari nerd
Posts: 47
Joined: Sat Sep 16, 2017 9:15 am
Location: Castrop-Rauxel, Germany

Re: Syncing ST/STE clock with host

Postby Count » Tue Dec 31, 2019 5:52 pm

That's what I am doing so far. But I cannot run a Mega STE with TOS 1.62, for example.

DoG
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 116
Joined: Sun Apr 01, 2018 11:02 pm

Re: Syncing ST/STE clock with host

Postby DoG » Tue Dec 31, 2019 6:34 pm

Run Mega STe with TOS 2.06.

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 5215
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: Syncing ST/STE clock with host

Postby simonsunnyboy » Wed Jan 01, 2020 10:41 am

Anything requiring TOS 1.62 will not care about a clock anyway being games and demos.
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

Count
Atari nerd
Atari nerd
Posts: 47
Joined: Sat Sep 16, 2017 9:15 am
Location: Castrop-Rauxel, Germany

Re: Syncing ST/STE clock with host

Postby Count » Wed Jan 01, 2020 1:30 pm

I just want to ensure compatibility. But I think I can solve this problem with a host process (e.g. shell script) which writes the time to a file every two seconds and an AUTO folder program that reads this file.

User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2043
Joined: Sun Jul 31, 2011 1:11 pm

Re: Syncing ST/STE clock with host

Postby Eero Tamminen » Wed Jan 01, 2020 3:48 pm

Count wrote:, I would like to use an AUTO folder programme, for example, as I used to do back in 1990 to read the RTC of the attached hard disk host adapter. Maybe Hatari offers a native feature I could use. Unfortunately I couldn't find any information in the docs.


HW interface to ST real time clock devices differs from the RTC used in Mega ST and newer machines, and nobody has developed support for former. Mainly because they need both HW & auto-folder SW, there's no TOS version supporting them directly. I don't how well /whether the actual HW interfaces were even documented, or whether any of the SW came with (freely distributable) sources.

If you would still like NatFeats host time API, send you API spec proposal to hatari-devel mailing list (some patches to implement and test it would help too).

Count
Atari nerd
Atari nerd
Posts: 47
Joined: Sat Sep 16, 2017 9:15 am
Location: Castrop-Rauxel, Germany

Re: Syncing ST/STE clock with host

Postby Count » Wed Jan 01, 2020 4:30 pm

I think that isn't necessary anymore. My "hack" described above works pretty well.

tzok
Captain Atari
Captain Atari
Posts: 194
Joined: Fri Jun 30, 2017 7:22 pm
Location: Bielsko-Biala, PL
Contact:

Re: Syncing ST/STE clock with host

Postby tzok » Thu Jan 02, 2020 10:51 am

Count wrote:As these machines don't have native RTC, I would like to use an AUTO folder programme, for example, as I used to do back in 1990 to read the RTC of the attached hard disk host adapter.
That's not true, these machines do have RTC, it is only not battery backed up.

Using the inbuilt RTC is also a little bit tricky, because the main clock is GEMDOS software RTC, but XBIOS queries the hardware RTC each time current time info is requested by GEMDOS function. The problem is the hardware RTC is not Y2K compliant.

Please read more here: https://www.exxoshost.co.uk/forum/viewt ... 281#p28281

Based upon that information STeven has adopted the host clock synchronization in STEeM SSE:
Image

User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2043
Joined: Sun Jul 31, 2011 1:11 pm

Re: Syncing ST/STE clock with host

Postby Eero Tamminen » Sun Jan 12, 2020 4:41 pm

Originally emulated Hatari clock was synched to host, but that breaks some (ST) demos [1]. So, nowadays ST & STE clocks aren't synced to host, only emulated Mega and TT/Falcon models are (which have RTC + battery).

[1] Host clock can slightly change when synched to network time, and there's anyway some run-time drift between host clock and what's being emulated, at least when emulation is speeded up or slowed down.

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2626
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

Re: Syncing ST/STE clock with host

Postby charles » Sun Jan 12, 2020 10:18 pm

should be able to sync because st timer uses delay or pulse mode
The radioactive half-life : )
Atari is a lifestyle,not a hobby.
HOLD ON ! ! ! Im printing unreadable characters ...!


Social Media

     

Return to “Hatari”

Who is online

Users browsing this forum: No registered users and 2 guests