11 KiB
;——————————- ; Universal RWTS ; a modified DOS 3.3-style RWTS that reads 16-sector (6-and-2 encoded) disks ; - address prologue "D4 AA 96" or "D5 AA 96" ; - any address epilogue ; - data prologue "D5 AA AD" ; - any data epilogue ; ; It verifies the data field checksum byte, but it ignores the address field ; checksum. It waits longer than a normal RWTS to find an address prologue – ; long enough that it will find the prologue even if there is only one sector ; on a track. ; ; It must be loaded at $B800. It uses the standard RWTS entry point at $BD00. ; ; Write support has been disabled. Any attempt to pass $02 or $04 RWTS commands ; will crash. ;——————————-
UNIV_A1 = $B956 ; must LSR before setting UNIV_A2 = $B95F UNIV_A3 = $B968 UNIV_D1 = $B8E7 UNIV_D2 = $B8F1 UNIV_D3 = $B8FC
universalrwts !byte $A2,$00,$A0,$02,$88,$B1,$3E,$4A,$3E,$00,$BC,$4A,$3E,$00,$BC,$99 !byte $00,$BB,$E8,$E0,$56,$90,$ED,$A2,$00,$98,$D0,$E8,$A2,$55,$BD,$00 !byte $BC,$29,$3F,$9D,$00,$BC,$CA,$10,$F5,$60,$38,$86,$27,$8E,$78,$06 !byte $BD,$8D,$C0,$BD,$8E,$C0,$30,$7C,$AD,$00,$BC,$85,$26,$A9,$FF,$9D !byte $8F,$C0,$1D,$8C,$C0,$48,$68,$EA,$A0,$04,$48,$68,$20,$B9,$B8,$88 !byte $D0,$F8,$A9,$D5,$20,$B8,$B8,$A9,$AA,$20,$B8,$B8,$A9,$AD,$20,$B8 !byte $B8,$98,$A0,$56,$D0,$03,$B9,$00,$BC,$59,$FF,$BB,$AA,$BD,$29,$BA !byte $A6,$27,$9D,$8D,$C0,$BD,$8C,$C0,$88,$D0,$EB,$A5,$26,$EA,$59,$00 !byte $BB,$AA,$BD,$29,$BA,$AE,$78,$06,$9D,$8D,$C0,$BD,$8C,$C0,$B9,$00 !byte $BB,$C8,$D0,$EA,$AA,$BD,$29,$BA,$A6,$27,$20,$BB,$B8,$A9,$DE,$20 !byte $B8,$B8,$A9,$AA,$20,$B8,$B8,$A9,$EB,$20,$B8,$B8,$A9,$FF,$20,$B8 !byte $B8,$BD,$8E,$C0,$BD,$8C,$C0,$60,$18,$48,$68,$9D,$8D,$C0,$1D,$8C !byte $C0,$60,$A0,$00,$A2,$56,$CA,$30,$FB,$B9,$00,$BB,$5E,$00,$BC,$2A !byte $5E,$00,$BC,$2A,$91,$3E,$C8,$C4,$26,$D0,$EB,$60,$A0,$20,$88,$F0 !byte $61,$BD,$8C,$C0,$10,$FB,$49,$D5,$D0,$F4,$EA,$BD,$8C,$C0,$10,$FB !byte $C9,$AA,$D0,$F2,$A0,$56,$BD,$8C,$C0,$10,$FB,$C9,$AD,$D0,$E7,$A9 !byte $00,$88,$84,$26,$BC,$8C,$C0,$10,$FB,$59,$00,$BA,$A4,$26,$99,$00 !byte $BC,$D0,$EE,$84,$26,$BC,$8C,$C0,$10,$FB,$59,$00,$BA,$A4,$26,$99 !byte $00,$BB,$C8,$D0,$EE,$BC,$8C,$C0,$10,$FB,$D9,$00,$BA,$D0,$13,$BD !byte $8C,$C0,$10,$FB,$C9,$00,$D0,$00,$EA,$BD,$8C,$C0,$10,$FB,$C9,$00 !byte $D0,$5C,$38,$60,$A0,$F7,$84,$26,$C8,$D0,$04,$E6,$26,$F0,$F3,$BD !byte $8C,$C0,$10,$FB,$4A,$C9,$6A,$D0,$EF,$BD,$8C,$C0,$10,$FB,$C9,$AA !byte $D0,$F2,$BD,$8C,$C0,$10,$FB,$C9,$96,$D0,$E7,$A0,$03,$A9,$00,$85 !byte $27,$BD,$8C,$C0,$10,$FB,$2A,$85,$26,$BD,$8C,$C0,$10,$FB,$25,$26 !byte $99,$2C,$00,$45,$27,$88,$10,$E7,$A8,$D0,$00,$BD,$8C,$C0,$10,$FB !byte $C9,$00,$D0,$00,$EA,$BD,$8C,$C0,$10,$FB,$C9,$00,$D0,$00,$18,$60 !byte $86,$2B,$85,$2A,$CD,$78,$04,$F0,$53,$A9,$00,$85,$26,$AD,$78,$04 !byte $85,$27,$38,$E5,$2A,$F0,$33,$B0,$07,$49,$FF,$EE,$78,$04,$90,$05 !byte $69,$FE,$CE,$78,$04,$C5,$26,$90,$02,$A5,$26,$C9,$0C,$B0,$01,$A8 !byte $38,$20,$EE,$B9,$B9,$11,$BA,$20,$00,$BA,$A5,$27,$18,$20,$F1,$B9 !byte $B9,$1D,$BA,$20,$00,$BA,$E6,$26,$D0,$C3,$20,$00,$BA,$18,$AD,$78 !byte $04,$29,$03,$2A,$05,$2B,$AA,$BD,$80,$C0,$A6,$2B,$60,$AA,$A0,$A0 nibtable !byte $A2,$11,$CA,$D0,$FD,$E6,$46,$D0,$02,$E6,$47,$38,$E9,$01,$D0,$F0 !byte $60,$01,$30,$28,$24,$20,$1E,$1D,$1C,$1C,$1C,$1C,$1C,$70,$2C,$26 !byte $22,$1F,$1E,$1D,$1C,$1C,$1C,$1C,$1C,$96,$97,$9A,$9B,$9D,$9E,$9F !byte $A6,$A7,$AB,$AC,$AD,$AE,$AF,$B2,$B3,$B4,$B5,$B6,$B7,$B9,$BA,$BB !byte $BC,$BD,$BE,$BF,$CB,$CD,$CE,$CF,$D3,$D6,$D7,$D9,$DA,$DB,$DC,$DD !byte $DE,$DF,$E5,$E6,$E7,$E9,$EA,$EB,$EC,$ED,$EE,$EF,$F2,$F3,$F4,$F5 !byte $F6,$F7,$F9,$FA,$FB,$FC,$FD,$FE,$FF,$00,$00,$00,$00,$00,$00,$00 !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; these $FF bytes (at $BA80..$BA95) are used by the ; routine that checks whether a track is formatted !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF !byte $FF,$FF,$FF,$FF,$FF,$FF,$00,$01,$98,$99,$02,$03,$9C,$04,$05,$06 !byte $A0,$A1,$A2,$A3,$A4,$A5,$07,$08,$A8,$A9,$AA,$09,$0A,$0B,$0C,$0D !byte $B0,$B1,$0E,$0F,$10,$11,$12,$13,$B8,$14,$15,$16,$17,$18,$19,$1A !byte $C0,$C1,$C2,$C3,$C4,$C5,$C6,$C7,$C8,$C9,$CA,$1B,$CC,$1C,$1D,$1E !byte $D0,$D1,$D2,$1F,$D4,$D5,$20,$21,$D8,$22,$23,$24,$25,$26,$27,$28 !byte $E0,$E1,$E2,$E3,$E4,$29,$2A,$2B,$E8,$2C,$2D,$2E,$2F,$30,$31,$32 !byte $F0,$F1,$33,$34,$35,$36,$37,$38,$F8,$39,$3A,$3B,$3C,$3D,$3E nibtableff !byte $3F !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 !byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; write support is disabled here ($BC56 is a BRK instruction) ; set $BC56 to #$38 to re-enable !byte $00,$00,$00,$00,$00,$00,$00,$BD,$8D,$C0,$BD,$8E,$C0,$30,$5E,$A9 !byte $FF,$9D,$8F,$C0,$DD,$8C,$C0,$48,$68,$20,$C3,$BC,$20,$C3,$BC,$9D !byte $8D,$C0,$DD,$8C,$C0,$EA,$88,$D0,$F0,$A9,$D5,$20,$D5,$BC,$A9,$AA !byte $20,$D5,$BC,$A9,$96,$20,$D5,$BC,$A5,$41,$20,$C4,$BC,$A5,$44,$20 !byte $C4,$BC,$A5,$3F,$20,$C4,$BC,$A5,$41,$45,$44,$45,$3F,$48,$4A,$05 !byte $3E,$9D,$8D,$C0,$BD,$8C,$C0,$68,$09,$AA,$20,$D4,$BC,$A9,$DE,$20 !byte $D5,$BC,$A9,$AA,$20,$D5,$BC,$A9,$EB,$20,$D5,$BC,$18,$BD,$8E,$C0 !byte $BD,$8C,$C0,$60,$48,$4A,$05,$3E,$9D,$8D,$C0,$DD,$8C,$C0,$68,$EA !byte $EA,$EA,$09,$AA,$EA,$EA,$48,$68,$9D,$8D,$C0,$DD,$8C,$C0,$60,$88 !byte $A5,$E8,$91,$A0,$94,$88,$96,$E8,$91,$A0,$94,$88,$96,$91,$91,$C8 !byte $94,$D0,$96,$91,$91,$C8,$94,$D0,$96,$91,$A3,$C8,$A0,$A5,$85,$A4 !byte $84,$48,$85,$49,$A0,$02,$8C,$F8,$06,$A0,$04,$8C,$F8,$04,$A0,$01 !byte $B1,$48,$AA,$A0,$0F,$D1,$48,$F0,$1B,$8A,$48,$B1,$48,$AA,$68,$48 !byte $91,$48,$BD,$8E,$C0,$A0,$08,$BD,$8C,$C0,$DD,$8C,$C0,$D0,$F6,$88 !byte $D0,$F8,$68,$AA,$BD,$8E,$C0,$BD,$8C,$C0,$A0,$08,$BD,$8C,$C0,$48 !byte $68,$48,$68,$8E,$F8,$05,$DD,$8C,$C0,$D0,$03,$88,$D0,$EE,$08,$BD !byte $89,$C0,$A0,$06,$B1,$48,$99,$36,$00,$C8,$C0,$0A,$D0,$F6,$A0,$03 !byte $B1,$3C,$85,$47,$A0,$02,$B1,$48,$A0,$10,$D1,$48,$F0,$06,$91,$48 !byte $28,$A0,$00,$08,$6A,$90,$05,$BD,$8A,$C0,$B0,$03,$BD,$8B,$C0,$66 !byte $35,$28,$08,$D0,$0B,$A0,$07,$20,$00,$BA,$88,$D0,$FA,$AE,$F8,$05 !byte $A0,$04,$B1,$48,$20,$5A,$BE,$28,$D0,$11,$A4,$47,$10,$0D,$A0,$12 !byte $88,$D0,$FD,$E6,$46,$D0,$F7,$E6,$47,$D0,$F3,$A0,$0C,$B1,$48,$F0 !byte $5A,$C9,$04,$F0,$58,$6A,$08,$B0,$03,$20,$00,$B8,$A0,$30,$8C,$78 !byte $05,$AE,$F8,$05,$20,$44,$B9,$90,$24,$CE,$78,$05,$10,$F3,$AD,$78 !byte $04,$48,$A9,$60,$20,$95,$BE,$CE,$F8,$06,$F0,$28,$A9,$04,$8D,$F8 !byte $04,$A9,$00,$20,$5A,$BE,$68,$20,$5A,$BE,$4C,$BC,$BD,$A4,$2E,$CC !byte $78,$04,$F0,$1C,$AD,$78,$04,$48,$98,$20,$95,$BE,$68,$CE,$F8,$04 !byte $D0,$E5,$F0,$CA,$68,$A9,$40,$28,$4C,$48,$BE,$F0,$39,$4C,$AF,$BE !byte $A0,$03,$A9,$00,$48,$A5,$2F,$A0,$0E,$91,$48,$68,$F0,$08,$C5,$2F !byte $F0,$04,$A9,$20,$D0,$E1,$A0,$05,$B1,$48,$A8,$B9,$B8,$BF,$C5,$2D !byte $D0,$97,$28,$90,$1C,$20,$DC,$B8,$08,$B0,$8E,$28,$A2,$00,$86,$26 !byte $20,$C2,$B8,$AE,$F8,$05,$18,$24,$38,$A0,$0D,$91,$48,$BD,$88,$C0 !byte $60,$20,$2A,$B8,$90,$F0,$A9,$10,$B0,$EE,$48,$A0,$01,$B1,$3C,$6A !byte $68,$90,$08,$0A,$20,$6B,$BE,$4E,$78,$04,$60,$85,$2A,$20,$8E,$BE !byte $B9,$78,$04,$24,$35,$30,$03,$B9,$F8,$04,$8D,$78,$04,$A5,$2A,$24 !byte $35,$30,$05,$99,$F8,$04,$10,$03,$99,$78,$04,$4C,$A0,$B9,$8A,$4A !byte $4A,$4A,$4A,$A8,$60,$48,$A0,$02,$B1,$48,$6A,$66,$35,$20,$8E,$BE !byte $68,$0A,$24,$35,$30,$05,$99,$F8,$04,$10,$03,$99,$78,$04,$60,$A0 !byte $03,$B1,$48,$85,$41,$A9,$AA,$85,$3E,$A0,$56,$A9,$00,$85,$44,$99 !byte $FF,$BB,$88,$D0,$FA,$99,$00,$BB,$88,$D0,$FA,$A9,$50,$20,$95,$BE !byte $A9,$28,$85,$45,$A5,$44,$20,$5A,$BE,$20,$0D,$BF,$A9,$08,$B0,$24 !byte $A9,$30,$8D,$78,$05,$38,$CE,$78,$05,$F0,$19,$20,$44,$B9,$B0,$F5 !byte $A5,$2D,$D0,$F1,$20,$DC,$B8,$B0,$EC,$E6,$44,$A5,$44,$C9,$23,$90 !byte $D3,$18,$90,$05,$A0,$0D,$91,$48,$38,$BD,$88,$C0,$60,$A9,$00,$85 !byte $3F,$A0,$80,$D0,$02,$A4,$45,$20,$56,$BC,$B0,$6B,$20,$2A,$B8,$B0 !byte $66,$E6,$3F,$A5,$3F,$C9,$10,$90,$EC,$A0,$0F,$84,$3F,$A9,$30,$8D !byte $78,$05,$99,$A8,$BF,$88,$10,$FA,$A4,$45,$20,$87,$BF,$20,$87,$BF !byte $20,$87,$BF,$48,$68,$EA,$88,$D0,$F1,$20,$44,$B9,$B0,$23,$A5,$2D !byte $F0,$15,$A9,$10,$C5,$45,$A5,$45,$E9,$01,$85,$45,$C9,$05,$B0,$11 !byte $38,$60,$20,$44,$B9,$B0,$05,$20,$DC,$B8,$90,$1C,$CE,$78,$05,$D0 !byte $F1,$20,$44,$B9,$B0,$0B,$A5,$2D,$C9,$0F,$D0,$05,$20,$DC,$B8,$90 !byte $8C,$CE,$78,$05,$D0,$EB,$38,$60,$A4,$2D,$B9,$A8,$BF,$30,$DD,$A9 !byte $FF,$99,$A8,$BF,$C6,$3F,$10,$CA,$A5,$44,$D0,$0A,$A5,$45,$C9,$10 !byte $90,$E5,$C6,$45,$C6,$45,$18,$60,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$00,$0D,$0B,$09,$07,$05,$03,$01 !byte $0E,$0C,$0A,$08,$06,$04,$02,$0F,$20,$93,$FE,$AD,$81,$C0,$AD,$81 !byte $C0,$A9,$00,$8D,$00,$E0,$4C,$44,$B7,$00,$00,$00,$8D,$63,$AA,$8D !byte $70,$AA,$8D,$71,$AA,$60,$20,$5B,$A7,$8C,$B7,$AA,$60,$20,$7E,$AE !byte $AE,$9B,$B3,$9A,$20,$16,$A3,$BA,$8E,$9B,$B3,$A9,$09,$4C,$85,$B3