-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage-about.s
executable file
·150 lines (140 loc) · 4.74 KB
/
page-about.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
******************************************************************************************
*
* About Page / Help Page
*
******************************************************************************************
*
* ABOUT page interface
*
* Build array of line pointers in INBUF.
AboutInit ; Returns with A:Y = max lines, C = scrolling
jsr PRINT
asc _INVERSE,_MT_ON,_U_ARROW,_D_ARROW,_MT_OFF,_NORMAL," Scroll / "
asc _INVERSE,_MT_ON,_O_APPLE,_NORMAL,"-",_INVERSE,_U_ARROW,_D_ARROW,_MT_OFF,_NORMAL," Page"
dfb 0
lda #<:lines
sta PTR
lda #>:lines
sta PTR+1
ldy #0 ; max lines
ldx #0 ; buffer offset
:save lda PTR
sta inbuf,x
inx
lda PTR+1
sta inbuf,x
inx
iny
:loop lda (PTR)
bne :incr
dey ; we're one past...
lda #0 ; high byte of max lines; Y = low byte
clc ; we need scrolling
rts
:incr lda (PTR)
pha
inc PTR
bne :skip
inc PTR+1
:skip pla
beq :save
bne :incr
* Guide 00000000011111111112222222222333333333344444444445555555555666666666677777777778
* 12345678901234567890123456789012345678901234567890123456789012345678901234567890
* | + + + + + + + +|
:lines asc _INVERSE," Address Field Scanner ",_NORMAL,$00
asc "Version 2.0beta",$00
asc " ",$00
asc "This application is my lame attempt to understand the old Apple Disk II",$00
asc "interface.",$00
asc " ",$00
asc "As of Version 2 of AFSCANNER, multiple pages have been introduced to better",$00
asc "review the contents of a disk buffer and analyze a disk.",$00
asc " ",$00
asc "Use the ",_INVERSE,_MT_ON,_O_APPLE,_MT_OFF,_NORMAL,"-key combinations to toggle pages.",$00
asc " ",$00
asc _INVERSE,_MT_ON,_O_APPLE,_MT_OFF,_NORMAL,"A = This about page.",$00
asc _INVERSE,_MT_ON,_O_APPLE,_MT_OFF,_NORMAL,"B = Browse track buffer.",$00
asc _INVERSE,_MT_ON,_O_APPLE,_MT_OFF,_NORMAL,"C = Display buffer counts.",$00
asc _INVERSE,_MT_ON,_O_APPLE,_MT_OFF,_NORMAL,"F = Address field display. " ; (cont)
asc "(Assuming 'good' address fields on disk.)",$00
asc _INVERSE,_MT_ON,_O_APPLE,_MT_OFF,_NORMAL,"G = Graphical disk display.",$00
asc " ",$00
asc _INVERSE,_MT_ON,_O_APPLE,_MT_OFF,_NORMAL,"* = Enter Apple monitor.",$00
asc " ",$00
asc "Source available at https://github.com/a2geek/afscanner",$00
asc " ",$00
asc "Global Keys",$00
asc "===========",$00
asc " ",$00
asc _INVERSE,_MT_ON,_D_ARROW,_MT_OFF,_NORMAL," Scroll down 1 line",$00
asc _INVERSE,_MT_ON,_U_ARROW,_MT_OFF,_NORMAL," Scroll up 1 line",$00
asc _INVERSE,_MT_ON,_O_APPLE,_D_ARROW,_MT_OFF,_NORMAL," Page down 15 lines",$00
asc _INVERSE,_MT_ON,_O_APPLE,_U_ARROW,_MT_OFF,_NORMAL," Page up 15 lines",$00
asc _INVERSE,_MT_ON,_O_APPLE,_MT_OFF,_NORMAL,"Q Quit to ProDOS",$00
asc " ",$00
asc "Address Field Display",$00
asc "=====================",$00
asc " ",$00
asc "Display the list of Address Fields, the disk bytes, as well as the decoded",$00
asc "values to indicate what sectors are phyiscally present and their order on disk.",$00
asc "Note that the buffer is $2000 (8192) bytes long and some sectors will be",$00
asc "repeated.",$00
asc " ",$00
asc "Headers are currently set to "
dfb 1
da AddressFieldPrologue
dfb " ",1
da AddressFieldPrologue+1
dfb " ",1
da AddressFieldPrologue+2
dfb $00
asc " ",$00
asc "Browse Track Buffer",$00
asc "===================",$00
asc " ",$00
asc "Browse the raw track buffer. Header fields are hilighted. Note that the ",$00
asc "buffer is $2000 (8192) bytes long and some sectors will be repeated.",$00
asc " ",$00
asc "Headers are currently set to "
dfb 1
da AddressFieldPrologue
dfb " ",1
da AddressFieldPrologue+1
dfb " ",1
da AddressFieldPrologue+2
dfb $00
asc " ",$00
asc "Graphical Disk Display",$00
asc "======================",$00
asc " ",$00
asc "Scans an entire disk and graphically displays where sync ($FF) bytes appear on",$00
asc "disk. Note that the length of each bar indicates how many sync bytes were in",$00
asc "that section of the disk. Each bar represents approximately 46 bytes.",$00
asc " ",$00
asc "Display Buffer Counts",$00
asc "=====================",$00
asc " ",$00
asc "Count the number of disk bytes in the buffer and display totals. This may be",$00
asc "helpful when trying to determine address field bytes.",$00
asc " ",$00
asc "To assist with identification, non-zero values or 13-sector bytes or 16-sector",$00
asc "bytes may be highlighted.",$00
asc " ",$00
asc "-END-",$00
dfb 0
AboutDisplay ; Called with A:Y = line
phy ; assuming < 256 lines
lda #_CLREOL
jsr COUT
pla
asl
tay
lda inbuf,y
tax
lda inbuf+1,y
jsr PRINTP
jmp PRCR
AboutKeypress ; Called with Acc = key
; Do Nothing, continue loop
jmp KeyboardWait