[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Smartwatch driver
jruschme@sed.csc.com (John Ruschmeyer) writes:
>While going through some junked equipment, I came across a couple of
>smartwatches (Smartclocks?)- the clock chips that sit under a ROM.
>I'd like put these back into service on my "period" systems, so I have
>a couple of questions...
>1) Do there exist drivers for either Apple ProDos 8 or OS-9 for the
> smartwatch?
Yes - here is mine (for a //e with a DS1216E under the CD ROM):
org $2000
2000 lda $c08b ; write enable ProDOS image in language card
2003 lda $c08b
2006 lda $3a ; save zero page pair on stack
2008 pha
2009 lda $3b
200b pha
200c lda $bf07 ; get clock driver address
200f sta $3a
2011 lda $bf08
2014 sta $3b
2016 ldy #$76 ; copy new code over old
2018 lda $205c,y
201b sta ($3a),y
201d dey
201e bpl $2018
2020 ldy #$0f ; adjust adsolute addresses
2022 clc
2023 lda ($3a),y
2025 adc $3a
2027 sta ($3a),y
2029 iny
202a lda ($3a),y
202c adc $3b
202e sta ($3a),y
2030 lda $c081 ; disable language card
2033 lda #$4c
2035 sta $bf06 ; enable clock driver
2038 lda $bf98 ; set clock present bit in machine id byte
203b ora #$01
203d sta $bf98
2040 ldy #$09 ; display message on splash screen
2042 lda $2052,y
2045 sta $0735,y
2048 dey
2049 bpl $2042
204b pla ; restore zp memory
204c sta $3b
204e pla
204f sta $3a
2051 rts ; all done
msb on
2052 dc "Smartwatch"
205c cld ; ProDOS tech ref says to start with CLD
205d bit $c015 ; remember current INTCX switch state
2060 php
2061 sei ; we do not want to be interrupted
2062 sta $c007
2065 lda $c104 ; reset clock reading sequence
2068 ldx #$07
206a lda $006f,x ; magic pattern access to enable clock
206d sec
206e ror a
206f pha
2070 lda #$00
2072 rol a
2073 tay
2074 lda $c100,y
2077 pla
2078 lsr a
2079 bne $206f
207b dex
207c bpl $206a
207e ldx #$07 ; read the clock
2080 ldy #$07
2082 lda $c104
2085 lsr a
2086 ror $0200,x ; save bits in keyboard buffer
2089 dey ; it must be safe - Thuderclock driver does
208a bpl $2082
208c lda $0200,x ; extract bits and pack for ProDOS global page
208f and #$f0
2091 lsr a
2092 lsr a
2093 sta $3a
2095 lsr a
2096 adc $3a
2098 sbc $0200,x
209b eor #$ff
209d sta $0200,x
20a0 dex
20a1 bpl $2080
20a3 lda $0205
20a6 sta $bf92
20a9 lda $0204
20ac sta $bf93
20af lda $0201
20b2 asl a
20b3 asl a
20b4 asl a
20b5 asl a
20b6 asl a
20b7 ora $0202
20ba sta $bf90
20bd lda $0200
20c0 rol a
20c1 sta $bf91
20c4 plp
20c5 bmi $20ca
20c7 sta $c006 ; reset INTCX switch if needed
20ca rts
20cb dcb $5c ; magic turn on pattern
20cc dcb $a3
20cd dcb $3a
20ce dcb $c5
20cf dcb $5c
20d0 dcb $a3
20d1 dcb $3a
20d2 dcb $c5
>2) Where can I find a copy of the drivers (and other utilities)?
If you buy the Smartwatch chip from Tandy/Radio Shack it comes with an MS-DOS
disk with source & binaries for setting & reading the chip (only 80x86 code).
If you get the Dallas databook it explains the access method used by the chip.
>3) How do I go about installing one of them in an Apple ][+ or
> Tandy Color Computer 3? I know I'd need to lift a ROM, but which one?
That I cannot help you with. The best one for a ][+ would be under a 28 pin
(E)PROM on a card in a slot. I do not think it would work under the 24 pin
ROMs on the motherboard due to the non standard chip selects. I have never
even seen a CoCo 3.