annotate level1/modules/clock2_messemu.asm @ 2940:824019cd8744

rb1773: Make 48 TPI floppy disks readonly in 96 TPI drives Deny the disk destroying write with the narrower heads of the 96 tpi drive when the user has placed a 48 tpi disk in the 96 tpi drive so he can read it. Double stepping the drive is then done automatically so as to stay in mechanical synch with the tracks on a 48 tpi disk. But that, until now, did not make the disk read-only, this patch does that. Patch by Gene Heskett and Robert Gault.
author Robert Gault <robert.gault@att.net>
date Sat, 25 Jan 2014 23:20:06 +0100
parents 6a7746370ffd
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1724
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
1 ********************************************************************
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
2 * Clock2 - MESS Emulator RTC Driver
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
3 *
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
4 * $Id$
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
5 *
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
6 * Edt/Rev YYYY/MM/DD Modified by
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
7 * Comment
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
8 * ------------------------------------------------------------------
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
9 * 2004/07/13 Robert Gault
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
10 * Added Vavasour/Collyer emulator & MESS (Disto) versions and relocated
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
11 * 'GetTime equ' statement so it is not within a chip heading.
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
12 *
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
13 * 1 2004/08/18 Boisy G. Pitre
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
14 * Separated clock2 modules for source clarity.
2179
6a7746370ffd Minor correction of "day of week" code. RG
robertgault
parents: 1724
diff changeset
15 *
6a7746370ffd Minor correction of "day of week" code. RG
robertgault
parents: 1724
diff changeset
16 * 2 2009/01/11 Robert Gault
6a7746370ffd Minor correction of "day of week" code. RG
robertgault
parents: 1724
diff changeset
17 * Corrected code for day of week. Was bitb #4 but should be bita #4.
1724
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
18
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
19 nam Clock2
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
20 ttl MESS Emulator RTC Driver
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
21
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
22 ifp1
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
23 use defsfile
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
24 endc
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
25
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
26 tylg set Sbrtn+Objct
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
27 atrv set ReEnt+rev
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
28 rev set $00
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
29 edition set 1
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
30
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
31 RTC.Base equ $FF50
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
32
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
33
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
34 mod eom,name,tylg,atrv,JmpTable,RTC.Base
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
35
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
36 name fcs "Clock2"
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
37 fcb edition
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
38
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
39 JmpTable
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
40 rts
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
41 nop
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
42 nop
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
43 bra GetTime
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
44 nop
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
45 rts
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
46
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
47
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
48 * MESS time update in Disto mode (ignores MPI)
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
49 * Assumes that PC clock is in AM/PM mode!!!
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
50 GetTime ldx #RTC.Base
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
51 ldy #D.Time
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
52 ldb #12 counter for data
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
53 stb 1,x
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
54 lda ,x
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
55 anda #7
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
56 IFNE Level-1
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
57 sta <D.Daywk
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
58 ENDC
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
59 decb
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
60 bsr getval
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
61 lda -1,y
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
62 cmpa #70 if >xx70 then its 19xx
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
63 bhi not20
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
64 adda #100
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
65 sta -1,y
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
66 not20 bsr getval month
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
67 bsr getval day
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
68 lda #7 AM/PM mask
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
69 stb 1,x
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
70 anda ,x
2179
6a7746370ffd Minor correction of "day of week" code. RG
robertgault
parents: 1724
diff changeset
71 bita #4
1724
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
72 pshs cc
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
73 anda #3
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
74 bsr getval1
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
75 puls cc
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
76 beq AM
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
77 lda #12 convert to 24hr time as it is PM
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
78 adda -1,y
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
79 sta -1,y
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
80 AM bsr getval minute
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
81 * and now fall through into get second
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
82 getval lda #$0f
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
83 stb 1,x
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
84 anda ,x
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
85 getval1 decb
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
86 pshs b
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
87 ldb #10
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
88 mul
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
89 stb ,y
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
90 puls b
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
91 stb 1,x
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
92 decb
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
93 lda ,x
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
94 anda #$0f
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
95 adda ,y
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
96 sta ,y+
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
97 rts
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
98
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
99 emod
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
100 eom equ *
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
101 end
f389c6bca482 New clock2_*.asm files split from single clock2.asm for more source clarity
boisy
parents:
diff changeset
102