English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 03 September 2007, 18:04   #1
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,115
Reading the Real Time Clock

I'm looking for info on how to directly (= not using the OS) detect and read the RTC chips found in many big box Amigas and accelerator boards. There's a good archive on Aminet - ClockPeek.lha - that explains how to read the A2000 and A1200 clocks, but it leaves a couple of things out:
  1. How to detect which RTC is installed, if any.
  2. How to read the A3000 / A4000 clocks
  3. What are the possible clock types?
Does anyone have any other info? Thanks!
girv is offline  
Old 03 September 2007, 18:08   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,519
There are 2 different clock chips and they are semi-documented in WinUAE sources, cia.c but it may be quite difficult to understand
Toni Wilen is offline  
Old 04 September 2007, 10:26   #3
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,115
Not that difficult I've had a look at cia.c and also, FWIW, the Linux68k kernel sources, but there's still a couple of questions

Those two chip types cover all Amiga models ?

ClockPeek docs say that the clock chip registers are mapped to different addresses depending if you're on a 16-bit or 32-bit Amiga. Is that true? Does it depend on the processor being 16 (000/010) or 32 bit (020+), the chipram bus or something else?

How do you tell if a RTC is installed or not, and at which address ?

I guess I'll have to ReSource battclock ... erm ... resource
girv is offline  
Old 04 September 2007, 14:24   #4
Duke
HOL-Team
 
Duke's Avatar
 
Join Date: Apr 2002
Location: Germany
Age: 43
Posts: 520
Send a message via ICQ to Duke
Attached is the datasheet for the MSM6242B RTC, used in 16 bit Amigas and normally mapped at 0xdc0000 to 0xdc003f. Some A2000 models map it somewhere else though, need to check my books.
Attached Files
File Type: pdf msm6242b.pdf (295.2 KB, 593 views)
Duke is offline  
Old 04 September 2007, 16:33   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,519
Quote:
Originally Posted by girv View Post
Those two chip types cover all Amiga models ?
As far as i know (Haven't seen nothing else in schematics)

Both datasheets are easy to find.

Quote:
ClockPeek docs say that the clock chip registers are mapped to different addresses depending if you're on a 16-bit or 32-bit Amiga. Is that true? Does it depend on the processor being 16 (000/010) or 32 bit (020+), the chipram bus or something else?
???

A500, A1200 without expansions and A1200/68060 all show same results:

00DC0000 XX X0 XX X0 XX X1 XX X1 XX X2 XX X2 ...
...

X = garbage, "garbage type" depends on CPU, accelerator card etc..
Number = memory mapped clock register number

A2000 ("original" A2000 with DIP Agnus) has clock at 0x00d80000, other models have it at 0x00dc0000.


Quote:
I guess I'll have to ReSource battclock ... erm ... resource
Probably safest solution.
Toni Wilen is offline  
Old 04 September 2007, 18:30   #6
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,115
Cheers all, plenty to go on
girv is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Amiga Real-Time 3D Graphics Jherek Carnelia Coders. Tutorials 14 13 April 2023 00:01
How do I enable RTG? (was: real time graphics) methodman support.WinUAE 15 24 February 2020 09:41
[FS] RICOH RP5C01A - Real Time Clock (RTC) - NOS LTAC MarketPlace 0 25 March 2012 17:23
time clock prob a2000 source Hardware mods 11 07 August 2011 13:16
A1200 Real Time Clock Eclipse support.Hardware 4 22 March 2011 02:18

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:33.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.06912 seconds with 14 queries