[comp.sys.amiga] Amiga 500/2000 Clock...

jimh@hpsadla.HP (Jim Horn) (04/21/87)

Hi Gang -

     Does anyone know how the battery-backed real time clock in the Amiga
500 and 2000 is addressed?  I assume it is used to set the interrupt-driven
clock used by the operating system after /Reset, but am curious about where
the code resides - is it called by the s/Startup-Sequence, or is the code
in the Kickstart ROMs?

     Since I'm kludging up a 2Meg RAM board with a clock on it, I'd like it
to look the same as the 500's (and 2000's) clock to the system.  We now
have a more complete standard in the new machines, and I'd like to follow
it (yes, I have the old Schematics & Expansion Specs).

	Jim Horn	{The World}!hplabs!hpspdla!hpsadla!jimh
	1212 Valley House Drive		(707) 794-3130
	Rohnert Park, CA  95401
		[So many signals, so little bandwidth...]

lachac@topaz.UUCP (04/23/87)

In article <2300005@hpsadla.HP> jimh@hpsadla.HP (Jim Horn) writes:
>
>     Does anyone know how the battery-backed real time clock in the Amiga
>500 and 2000 is addressed?  I assume it is used to set the interrupt-driven
>clock used by the operating system after /Reset, but am curious about where
>the code resides - is it called by the s/Startup-Sequence, or is the code
>in the Kickstart ROMs?

According to the Amazing Computing article (I think, it was one of those
reviews),  they said the clock is set thru the s/Startup-Sequence.

They could be wrong, but I don't think so...



-- 
		"Truth is false and logic lost..."
					- Neil Peart
	(who at the time didn't realize he was talking about RU)
lachac@topaz.rutgers.edu <--------OR--------> {seismo|ames}!rutgers!topaz!lachac

eric@cbmvax.cbm.UUCP (Eric Cotton) (04/23/87)

In article <11335@topaz.RUTGERS.EDU> lachac@topaz.rutgers.edu (Gerard Lachac) writes:
>In article <2300005@hpsadla.HP> jimh@hpsadla.HP (Jim Horn) writes:
>>
>>     Does anyone know how the battery-backed real time clock in the Amiga
>>500 and 2000 is addressed?  I assume it is used to set the interrupt-driven
>>clock used by the operating system after /Reset, but am curious about where
>>the code resides - is it called by the s/Startup-Sequence, or is the code
>>in the Kickstart ROMs?
>
>According to the Amazing Computing article (I think, it was one of those
>reviews),  they said the clock is set thru the s/Startup-Sequence.
>
>They could be wrong, but I don't think so...

But in fact they are correct.  The SetClock command (found in the c: dir-
ectory) has been added to the Startup-Sequence to set the Amiga's system
time from that in the battery backed-up clock.  The SetClock command can
also be used to save the system time to the bbc.  Usage is as follows:

		setclock opt load|save
		    opt load   loads system time/date from clock
		    opt save   saves system time/date to clock
-- 
	Eric Cotton
	Commodore-Amiga

"I don't find this stuff amusing anymore."
/*========================================================================*/
/*====    UUCP: {ihnp4|allegra|seismo|pyramid!amiga}!cbmvax!eric      ====*/
/*====    ARPA: cbmvax!eric@seismo                                    ====*/
/*==== US mail: Commodore Technology / 1200 Wilson Drive              ====*/
/*====          West Chester, PA 19380                                ====*/
/*====   phone: (215) 431-9180                                        ====*/
/*========================================================================*/

grr@cbmvax.cbm.UUCP (George Robbins) (04/27/87)

In article <2300005@hpsadla.HP> jimh@hpsadla.HP (Jim Horn) writes:
>
>     Does anyone know how the battery-backed real time clock in the Amiga
>500 and 2000 is addressed?  I assume it is used to set the interrupt-driven
>clock used by the operating system after /Reset, but am curious about where
>the code resides - is it called by the s/Startup-Sequence, or is the code
>in the Kickstart ROMs?

	The clock code is present only in a utility invoked by that startup
	sequence.  It sets the normal system time of day which rules until
	the utility is invoked again.

>     Since I'm kludging up a 2Meg RAM board with a clock on it, I'd like it
>to look the same as the 500's (and 2000's) clock to the system.  We now
>have a more complete standard in the new machines, and I'd like to follow
>it (yes, I have the old Schematics & Expansion Specs).

	The clock chip is an OKI MSM6242B Bus Attached Clock Chip.  It is
	selected in the address range starting at DC0000, however the
	four address lines are attached to A2 thru A5 and the data lines
	are attached to D0 thru D3 which (if I'm not confused) means the
	registers are addressed at DC0001, DC0005, DC0009....

	On a machine not equipped with a real-time clock, these locations
	will normally be occupied by a tiling of the custom chip registers.
	This means a certain degree of care is needed in verifying the
	presence of the clock.

	Hardware-wise, to make your clock chip appear at this location, you
	will either have to use the (officially not supported for this purpose)
	OVR line or modify the system decode PALs.

-- 
George Robbins - now working for,	uucp: {ihnp4|seismo|rutgers}!cbmvax!grr
but no way officially representing	arpa: cbmvax!grr@seismo.css.GOV
Commodore, Engineering Department	fone: 215-431-9255 (only by moonlite)