Index: alcyon/ptdisp.s
===================================================================
--- alcyon/ptdisp.s	(revision 7bf3856f4ff505a2174d89c937caf328029e3574)
+++ alcyon/ptdisp.s	(revision 7bf3856f4ff505a2174d89c937caf328029e3574)
@@ -0,0 +1,892 @@
+.globl _io_time
+.globl _io_lcd
+.globl _io_ser
+.globl _io_midi
+.globl _io_disk
+.globl _io_tone
+.globl _io_leds
+.globl _io_kbrd
+.globl _lcd_a0
+.globl _lcd_a1
+.globl _io_vreg
+.globl _io_vraw
+.globl _io_vram
+.globl _io_fpu
+.globl _v_regs
+.globl _v_odtab
+.globl _v_actab
+.globl _v_ct0
+.globl _v_gt1
+.globl _v_score
+.globl _v_cgtab
+.globl _v_curs0
+.globl _v_curs1
+.globl _v_curs2
+.globl _v_curs3
+.globl _v_curs4
+.globl _v_curs5
+.globl _v_curs6
+.globl _v_curs7
+.globl _v_tcur
+.globl _v_kbobj
+.globl _v_lnobj
+.globl _v_win0
+.globl _v_cur
+.globl _fc_sw
+.globl _fc_val
+.globl _stmptr
+.globl _defptr
+.globl _patches
+.globl _defents
+.globl _seqtab
+.globl _seqflag
+.globl _seqline
+.globl _seqstim
+.globl _seqtime
+.globl _sregval
+.globl _trstate
+.globl _BakLine
+.globl _FwdLine
+.globl _obj8
+.globl _obj9
+.globl _obj10
+.globl _obj11
+.globl _LineBuf
+.globl _ScObAdr
+.globl _OldLine
+.globl _LineAtr
+.globl _CurLine
+.globl _CurScan
+.globl _ScrlObj
+.globl _SmScNsl
+.globl _PdScDnF
+.globl _PdScUpF
+.globl _ctcsw
+.globl _submenu
+.globl _cxval
+.globl _cg3
+.globl _seqflag
+.comm _seqflag,32
+.globl _seqline
+.comm _seqline,32
+.globl _seqstim
+.comm _seqstim,32
+.globl _seqtime
+.comm _seqtime,32
+.globl _sregval
+.comm _sregval,32
+.globl _trstate
+.comm _trstate,32
+.globl _seqtab
+.comm _seqtab,14000
+.globl _pthead
+.data
+_pthead:
+.dc.b $B0,$20,$44,$65,$66,$69,$6E,$65,$72,$20,$70,$20,$63,$68,$20,$53,$74,$6D,$75,$6C,$75,$73,$20,$70,$20,$63,$68,$20,$44,$65
+.dc.b $73,$74,$6E,$61,$74,$69,$6F,$6E,$20,$BD,$BE,$20,$44,$61,$74,$75,$6D,$20,$B0,$20,$4E,$6F,$20,$53,$65,$71,$20,$52,$67,$20
+.dc.b $54,$20,$B0,$0
+.globl _ptmcon
+.data
+_ptmcon:
+*line 53
+.dc.l L2
+*line 54
+.dc.l L3
+*line 55
+.dc.l L4
+*line 56
+.dc.l L5
+*line 58
+.dc.l L6
+.globl _ptabpal
+.data
+_ptabpal:
+.dc.w $0
+.dc.w $0
+.dc.w $0
+.dc.w $2
+.dc.w $3
+.dc.w $3
+.dc.w $0
+.dc.w $0
+.dc.w $1
+.dc.w $2
+.dc.w $0
+.dc.w $2
+.dc.w $0
+.dc.w $0
+.dc.w $3
+.dc.w $3
+.dc.w $0
+.dc.w $0
+.dc.w $3
+.dc.w $3
+.dc.w $0
+.dc.w $1
+.dc.w $2
+.dc.w $0
+.dc.w $0
+.dc.w $3
+.dc.w $3
+.dc.w $2
+.dc.w $2
+.dc.w $2
+.dc.w $0
+.dc.w $3
+.dc.w $0
+.dc.w $3
+.dc.w $1
+.dc.w $2
+.dc.w $0
+.dc.w $2
+.dc.w $3
+.dc.w $2
+.dc.w $0
+.dc.w $0
+.dc.w $1
+.dc.w $1
+.dc.w $2
+.dc.w $3
+.dc.w $3
+.dc.w $3
+.globl _ptwin
+.text
+_ptwin:
+~~ptwin:
+~n=8
+link R14,#-194
+movem.l R5-R7,-(sp)
+~i=R7
+~j=R6
+~atrbuf=-128
+~linbuf=-194
+*line 96
+*line 97
+clr R0
+move 10+_v_regs,R0
+and #384,R0
+beq L8
+*line 97
+clr (sp)
+jsr _vbank
+*line 98
+L8:
+*line 99
+move 8(R14),R0
+bra L10
+*line 100
+L11:
+*line 101
+*line 102
+*line 103
+*line 104
+*line 105
+move #63,(sp)
+move #177,-(sp)
+move.l R14,-(sp)
+add.l #-194,(sp)
+jsr _memset
+addq.l #6,sp
+*line 106
+move.b #186,-194(R14)
+*line 107
+move.b #183,-146(R14)
+*line 108
+move.b #187,-132(R14)
+*line 109
+clr.b -131(R14)
+*line 110
+*line 111
+move #63,(sp)
+move #226,-(sp)
+move.l R14,-(sp)
+add.l #-128,(sp)
+jsr _memsetw
+addq.l #6,sp
+*line 112
+clr -2(R14)
+*line 113
+*line 114
+move.l R14,(sp)
+add.l #-128,(sp)
+move.l R14,-(sp)
+add.l #-194,(sp)
+clr -(sp)
+clr -(sp)
+move.l _obj8,-(sp)
+jsr _vputsa
+adda.l #12,sp
+*line 115
+*line 116
+*line 117
+*line 118
+move #64,(sp)
+move #274,-(sp)
+move.l R14,-(sp)
+add.l #-128,(sp)
+jsr _memsetw
+addq.l #6,sp
+*line 119
+move #226,-128(R14)
+*line 120
+move #18,-126(R14)
+*line 121
+move #18,-100(R14)
+*line 122
+move #18,-74(R14)
+*line 123
+move #18,-46(R14)
+*line 124
+move #18,-34(R14)
+*line 125
+move #226,-32(R14)
+*line 126
+move #18,-30(R14)
+*line 127
+move #18,-24(R14)
+*line 128
+move #18,-16(R14)
+*line 129
+move #18,-10(R14)
+*line 130
+move #18,-6(R14)
+*line 131
+move #226,-4(R14)
+*line 132
+clr -2(R14)
+*line 133
+*line 134
+move.l R14,(sp)
+add.l #-128,(sp)
+move.l #_pthead,-(sp)
+clr -(sp)
+move #1,-(sp)
+move.l _obj8,-(sp)
+jsr _vputsa
+adda.l #12,sp
+*line 135
+*line 136
+*line 137
+*line 138
+*line 139
+move #63,(sp)
+move #177,-(sp)
+move.l R14,-(sp)
+add.l #-194,(sp)
+jsr _memset
+addq.l #6,sp
+*line 140
+move.b #182,-194(R14)
+*line 141
+move.b #181,-146(R14)
+*line 142
+move.b #180,-132(R14)
+*line 143
+clr.b -131(R14)
+*line 144
+*line 145
+move #63,(sp)
+move #226,-(sp)
+move.l R14,-(sp)
+add.l #-128,(sp)
+jsr _memsetw
+addq.l #6,sp
+*line 146
+clr -2(R14)
+*line 147
+*line 148
+move.l R14,(sp)
+add.l #-128,(sp)
+move.l R14,-(sp)
+add.l #-194,(sp)
+clr -(sp)
+clr -(sp)
+move.l _obj11,-(sp)
+jsr _vputsa
+adda.l #12,sp
+*line 149
+*line 150
+*line 151
+*line 152
+move #63,(sp)
+move #177,-(sp)
+move.l R14,-(sp)
+add.l #-194,(sp)
+jsr _memset
+addq.l #6,sp
+*line 153
+move.b #185,-194(R14)
+*line 154
+move.b #184,-132(R14)
+*line 155
+clr.b -131(R14)
+*line 156
+*line 157
+move #63,(sp)
+move #226,-(sp)
+move.l R14,-(sp)
+add.l #-128,(sp)
+jsr _memsetw
+addq.l #6,sp
+*line 158
+clr -2(R14)
+*line 159
+*line 160
+move.l R14,(sp)
+add.l #-128,(sp)
+move.l R14,-(sp)
+add.l #-194,(sp)
+clr -(sp)
+move #6,-(sp)
+move.l _obj11,-(sp)
+jsr _vputsa
+adda.l #12,sp
+*line 161
+bra L9
+*line 162
+*line 163
+*line 164
+L12:
+*line 165
+*line 166
+*line 167
+move #13,(sp)
+clr -(sp)
+jsr _SetDTop
+addq.l #2,sp
+*line 168
+*line 169
+clr R7
+bra L15
+L16:
+*line 170
+*line 171
+clr R6
+bra L19
+L20:
+*line 172
+move R6,R8
+add.l R14,R8
+move.b #32,-194(R8)
+L18:
+*line 171
+add #1,R6
+L19:
+*line 171
+cmp #47,R6
+blt L20
+L17:
+*line 172
+*line 173
+*line 174
+clr.b -147(R14)
+*line 175
+*line 176
+move #226,(sp)
+move.l #L21,-(sp)
+clr -(sp)
+move R7,-(sp)
+jsr _UpdVid
+addq.l #8,sp
+*line 177
+*line 178
+*line 179
+cmp #7,R7
+bne L10000
+move #18,(sp)
+bra L10002
+L10000:move #18,(sp)
+L10002:move.l R14,-(sp)
+add.l #-194,(sp)
+move #1,-(sp)
+move R7,-(sp)
+jsr _UpdVid
+addq.l #8,sp
+L14:
+*line 169
+add #1,R7
+L15:
+*line 169
+cmp #16,R7
+blt L16
+L13:
+*line 180
+*line 181
+*line 182
+jsr _dptw
+*line 183
+bra L9
+*line 184
+*line 185
+*line 186
+L22:
+*line 187
+*line 188
+*line 189
+clr R7
+bra L25
+L26:
+*line 190
+*line 191
+*line 192
+move R7,R8
+add.l R8,R8
+move.l #_trstate,R9
+move 0(R8,R9.l),(sp)
+move R7,R8
+add.l R8,R8
+move.l #_sregval,R9
+move 0(R8,R9.l),-(sp)
+move R7,R8
+add.l R8,R8
+move.l #_seqline,R9
+move 0(R8,R9.l),-(sp)
+move.l #L27,-(sp)
+move.l R14,-(sp)
+add.l #-194,(sp)
+jsr _sprintf
+adda.l #12,sp
+*line 193
+*line 194
+*line 195
+move.l #_cg3,(sp)
+move #14,-(sp)
+move #14,-(sp)
+move.l #L28,-(sp)
+clr -(sp)
+move R7,-(sp)
+move #2,-(sp)
+move #14,-(sp)
+move #16,-(sp)
+move.l _obj10,-(sp)
+jsr _vvputsv
+adda.l #22,sp
+*line 196
+*line 197
+*line 198
+move.l #_cg3,(sp)
+move #14,-(sp)
+move #14,-(sp)
+move.l R14,-(sp)
+add.l #-194,(sp)
+move #1,-(sp)
+move R7,-(sp)
+move #2,-(sp)
+move #1,-(sp)
+move #16,-(sp)
+move.l _obj10,-(sp)
+jsr _vvputsv
+adda.l #22,sp
+*line 199
+*line 200
+*line 201
+move.l #_cg3,(sp)
+move #14,-(sp)
+move #14,-(sp)
+move.l #L29,-(sp)
+move #14,-(sp)
+move R7,-(sp)
+move #2,-(sp)
+move #14,-(sp)
+move #16,-(sp)
+move.l _obj10,-(sp)
+jsr _vvputsv
+adda.l #22,sp
+*line 202
+*line 203
+*line 203
+cmp #7,R7
+bne L30
+*line 204
+*line 205
+*line 205
+move _cxval,R0
+asr #3,R0
+cmp #48,R0
+bne L31
+*line 206
+*line 207
+*line 208
+move.l #_cg3,(sp)
+move #14,-(sp)
+move #14,-(sp)
+move.l #L32,-(sp)
+clr -(sp)
+move R7,-(sp)
+move #6,-(sp)
+move #16,-(sp)
+move.l _obj10,-(sp)
+jsr _vsplot4
+adda.l #20,sp
+*line 209
+bra L33
+L31:
+*line 210
+*line 211
+*line 212
+*line 213
+move.l #_cg3,(sp)
+move #14,-(sp)
+move #14,-(sp)
+move.l #L34,-(sp)
+clr -(sp)
+move R7,-(sp)
+move #6,-(sp)
+move #16,-(sp)
+move.l _obj10,-(sp)
+jsr _vsplot4
+adda.l #20,sp
+L33:
+*line 214
+*line 215
+*line 216
+L30:
+*line 217
+move R7,(sp)
+add #1,(sp)
+move.l #L35,-(sp)
+move.l R14,-(sp)
+add.l #-194,(sp)
+jsr _sprintf
+addq.l #8,sp
+*line 218
+*line 219
+*line 220
+*line 221
+move.l #_cg3,(sp)
+move #14,-(sp)
+move #14,-(sp)
+move.l R14,-(sp)
+add.l #-194,(sp)
+move #2,-(sp)
+move R7,-(sp)
+move #2,-(sp)
+move R7,R8
+add.l R8,R8
+move.l #_seqflag,R9
+clr R0
+move 0(R8,R9.l),R0
+and #-32768,R0
+beq L10003
+move #6,-(sp)
+bra L10005
+L10003:move #1,-(sp)
+L10005:move #16,-(sp)
+move.l _obj10,-(sp)
+jsr _vvputsv
+adda.l #22,sp
+L24:
+*line 189
+add #1,R7
+L25:
+*line 189
+cmp #16,R7
+blt L26
+L23:
+*line 222
+*line 223
+bra L9
+*line 224
+*line 225
+L36:
+*line 226
+*line 227
+*line 228
+move #64,(sp)
+move #146,-(sp)
+move.l R14,-(sp)
+add.l #-128,(sp)
+jsr _memsetw
+addq.l #6,sp
+*line 229
+move #226,-128(R14)
+*line 230
+move #226,-4(R14)
+*line 231
+clr -2(R14)
+*line 232
+*line 233
+clr R7
+bra L39
+L40:
+*line 234
+move.l R14,(sp)
+add.l #-128,(sp)
+move R7,R8
+add.l R8,R8
+add.l R8,R8
+move.l #_ptmcon,R9
+move.l 0(R8,R9.l),-(sp)
+clr -(sp)
+move R7,-(sp)
+add #1,(sp)
+move.l _obj11,-(sp)
+jsr _vputsa
+adda.l #12,sp
+L38:
+*line 233
+add #1,R7
+L39:
+*line 233
+cmp #5,R7
+blt L40
+L37:
+*line 234
+*line 235
+bra L9
+*line 236
+bra L9
+L10:tst R0
+beq L11
+cmp #1,R0
+beq L12
+cmp #2,R0
+beq L22
+cmp #3,R0
+beq L36
+bra L9
+L9:L7:tst.l (sp)+
+movem.l (sp)+,R6-R7
+unlk R14
+rts
+.globl _ptwins
+.text
+_ptwins:
+~~ptwins:
+link R14,#0
+movem.l R6-R7,-(sp)
+~i=R7
+*line 253
+clr R7
+bra L44
+L45:
+*line 254
+move R7,(sp)
+jsr _ptwin
+L43:
+*line 253
+add #1,R7
+L44:
+*line 253
+cmp #4,R7
+blt L45
+L42:L41:tst.l (sp)+
+movem.l (sp)+,R7-R7
+unlk R14
+rts
+.globl _ptdisp
+.text
+_ptdisp:
+~~ptdisp:
+link R14,#-4
+*line 265
+jsr _dswap
+*line 267
+move.l #_LineBak,_BakLine
+*line 268
+move.l #_LineFwd,_FwdLine
+*line 272
+move.l #_v_score,_obj8
+*line 273
+move.l #2048+_v_score,_obj9
+*line 274
+move.l #16384+_v_score,_obj10
+*line 275
+move.l #8192+_v_score,_obj11
+*line 277
+move #9,_ScrlObj
+*line 278
+move.l _obj9,_ScObAdr
+*line 279
+move.l _obj9,_LineBuf
+*line 280
+clr.l _OldLine
+*line 281
+move #18,_LineAtr
+*line 283
+clr _CurLine
+*line 284
+move #13,_CurScan
+*line 286
+clr _PdScDnF
+*line 287
+clr _PdScUpF
+*line 292
+move #-1,(sp)
+move #72,-(sp)
+clr -(sp)
+clr -(sp)
+move #28,-(sp)
+move #512,-(sp)
+move.l _obj8,-(sp)
+clr -(sp)
+move #1,-(sp)
+move #8,-(sp)
+jsr _SetObj
+adda.l #20,sp
+*line 293
+move #-1,(sp)
+move #72,-(sp)
+move #28,-(sp)
+clr -(sp)
+move #224,-(sp)
+move #384,-(sp)
+move.l _obj9,-(sp)
+clr -(sp)
+move #1,-(sp)
+move #9,-(sp)
+jsr _SetObj
+adda.l #20,sp
+*line 294
+move #-1,(sp)
+move #1536,-(sp)
+move #28,-(sp)
+move #384,-(sp)
+move #224,-(sp)
+move #128,-(sp)
+move.l _obj10,-(sp)
+clr -(sp)
+clr -(sp)
+move #10,-(sp)
+jsr _SetObj
+adda.l #20,sp
+*line 295
+move #-1,(sp)
+move #72,-(sp)
+move #252,-(sp)
+clr -(sp)
+move #98,-(sp)
+move #512,-(sp)
+move.l _obj11,-(sp)
+clr -(sp)
+move #1,-(sp)
+move #11,-(sp)
+jsr _SetObj
+adda.l #20,sp
+*line 297
+*line 298
+clr R0
+move 10+_v_regs,R0
+and #384,R0
+beq L47
+*line 298
+clr (sp)
+jsr _vbank
+*line 299
+L47:
+*line 300
+move #32767,(sp)
+clr -(sp)
+move.l #_v_score,-(sp)
+jsr _memsetw
+addq.l #6,sp
+*line 301
+move #24577,(sp)
+clr -(sp)
+move.l #65534+_v_score,-(sp)
+jsr _memsetw
+addq.l #6,sp
+*line 303
+jsr _voidpb
+*line 304
+jsr _ptwins
+*line 310
+move #8,(sp)
+move #8,-(sp)
+jsr _SetPri
+addq.l #2,sp
+*line 311
+move #9,(sp)
+move #9,-(sp)
+jsr _SetPri
+addq.l #2,sp
+*line 312
+move #10,(sp)
+move #10,-(sp)
+jsr _SetPri
+addq.l #2,sp
+*line 313
+move #11,(sp)
+move #11,-(sp)
+jsr _SetPri
+addq.l #2,sp
+*line 315
+*line 316
+clr R0
+move 10+_v_regs,R0
+and #384,R0
+beq L48
+*line 316
+clr (sp)
+jsr _vbank
+*line 317
+L48:
+*line 318
+move #3584,(sp)
+move.l #_cg3,-(sp)
+move.l #_v_cgtab,-(sp)
+jsr _memcpyw
+addq.l #8,sp
+*line 319
+clr R0
+move 2+_v_regs,R0
+and #4095,R0
+or #-8192,R0
+move R0,2+_v_regs
+*line 323
+clr R0
+move 64+_v_odtab,R0
+and #4095,R0
+or #-12288,R0
+move R0,64+_v_odtab
+*line 324
+clr R0
+move 72+_v_odtab,R0
+and #4095,R0
+or #-12288,R0
+move R0,72+_v_odtab
+*line 326
+clr R0
+move 88+_v_odtab,R0
+and #4095,R0
+or #-12288,R0
+move R0,88+_v_odtab
+*line 328
+clr _submenu
+*line 330
+move #1,_ctcsw
+*line 331
+move #2,(sp)
+move #9,-(sp)
+jsr _ctcpos
+addq.l #2,sp
+*line 332
+jsr _aftercm
+*line 334
+move.l #_ptabpal,(sp)
+jsr _vsndpal
+L46:unlk R14
+rts
+.data
+L2:.dc.b $B0,$20,$4B,$65,$79,$20,$20,$53,$65,$71,$4C,$69,$6E,$20,$20,$49,$6E,$73,$74,$72,$20,$20,$49,$6E,$64,$65,$78,$20,$20,$4C
+.dc.b $65,$76,$65,$6C,$20,$20,$56,$20,$4F,$75,$74,$20,$20,$53,$72,$63,$65,$20,$20,$50,$63,$68,$57,$68,$20,$20,$50,$69,$74,$63
+.dc.b $68,$20,$B0,$0
+L3:.dc.b $B0,$20,$52,$65,$6C,$20,$20,$53,$65,$71,$43,$74,$6C,$20,$20,$4F,$73,$63,$20,$20,$20,$20,$46,$72,$65,$71,$20,$20,$20,$4C
+.dc.b $6F,$63,$74,$6E,$20,$20,$44,$65,$70,$74,$68,$20,$20,$4D,$75,$6C,$74,$20,$20,$4D,$6F,$64,$57,$68,$20,$20,$46,$72,$65,$71
+.dc.b $20,$20,$B0,$0
+L4:.dc.b $B0,$20,$54,$72,$67,$20,$20,$54,$75,$6E,$69,$6E,$67,$20,$20,$57,$61,$76,$65,$41,$20,$20,$50,$69,$74,$63,$68,$20,$20,$46
+.dc.b $69,$6C,$74,$72,$20,$20,$52,$61,$74,$65,$20,$20,$20,$54,$69,$6D,$65,$20,$20,$42,$72,$65,$74,$68,$20,$20,$4B,$65,$79,$56
+.dc.b $6C,$20,$B0,$0
+L5:.dc.b $B0,$20,$50,$6C,$73,$20,$20,$52,$65,$67,$53,$65,$74,$20,$20,$57,$61,$76,$65,$42,$20,$20,$49,$6E,$74,$76,$6C,$20,$20,$46
+.dc.b $69,$6C,$20,$51,$20,$20,$49,$6E,$74,$65,$6E,$20,$20,$56,$61,$6C,$75,$20,$20,$50,$65,$64,$61,$6C,$20,$20,$4B,$65,$79,$50
+.dc.b $72,$20,$B0,$0
+L6:.dc.b $B0,$20,$4C,$45,$44,$20,$20,$52,$65,$67,$41,$64,$64,$20,$20,$43,$6F,$6E,$66,$67,$20,$20,$52,$61,$74,$69,$6F,$20,$20,$44
+.dc.b $79,$6E,$6D,$63,$20,$20,$41,$75,$78,$20,$20,$20,$20,$46,$75,$6E,$63,$20,$20,$47,$50,$43,$2F,$56,$20,$20,$52,$61,$6E,$64
+.dc.b $6D,$20,$B0,$0
+L21:.dc.b $B0,$0
+L27:.dc.b $20,$20,$20,$20,$25,$30,$33,$64,$20,$25,$30,$32,$64,$20,$25,$64,$20,$0
+L28:.dc.b $B0,$0
+L29:.dc.b $B0,$0
+L32:.dc.b $BF,$0
+L34:.dc.b $BC,$0
+L35:.dc.b $25,$30,$32,$64,$0
