# HG changeset patch # User boisy # Date 1046092053 0 # Node ID 2115299c96127eb1bc64a89d298e88a353babaca # Parent 4df2fdb9045f409072c0986566bfb886aba3ef10 Added DriveWire support diff -r 4df2fdb9045f -r 2115299c9612 level2/modules/clock.asm --- a/level2/modules/clock.asm Mon Feb 24 13:07:15 2003 +0000 +++ b/level2/modules/clock.asm Mon Feb 24 13:07:33 2003 +0000 @@ -34,6 +34,10 @@ * * Setup for specific RTC chip * + IFNE RTCDriveWire +RTC.Base equ $0000 + ENDC + IFNE RTCElim RTC.Sped equ $20 32.768 KHz, rate=0 RTC.Strt equ $06 binary, 24 Hour, DST disabled @@ -407,6 +411,42 @@ * +* Update time from DriveWire +* + IFNE RTCDriveWire + + use bbwrite.asm + +UpdTime pshs y,x,cc + lda #'# Time packet + orcc #IntMasks Disable interrupts + lbsr SerWrite + bsr SerRead Read year byte + bcs UpdLeave + sta