passport/src/sectormap.a

118 lines
5.9 KiB
Plaintext
Raw Normal View History

2017-01-08 03:35:35 +00:00
;-------------------------------
; Passport maintains a table of codes for each sector on the disk.
; One byte per sector, arranged in increasing logical sector order
; from T00,S00 to T22,S0F. Some sectors have their own individual
; labels for convenience, but you can use math to find any specific
; sector.
; e.g.
; LDA #kSectorOptional
2017-01-08 03:35:35 +00:00
; STA T00S0A
; will mark T00,S0A as optional
;
; LDA #kSectorOptional
; LDY #$0A
; STA T00,Y
; will also mark T00,S0A as optional
;
; The sector map is reset for each disk (to #kSectorRequired for
; all sectors), then modified based on boot sector identification
; and other factors.
;
; Codes are opaque values, not bit flags.
; Some codes are grouped into ranges that are compared as integers.
; Always use labels for comparison.
;
kSectorIgnore = $00 ; ignore this sector (don't even read it)
kSectorOptional = $01 ; sector is optional (read, but errors are non-fatal)
kSectorSwitchToBuiltinRWTS = $FE ; sector is required, and switch to built-in RWTS before reading it
kSectorRequired = $FF ; sector is required (errors are fatal)
; range of codes that trigger various custom routines before reading a sector
kSectorCustomFirst = $C0
kSectorCustomLast = $D0
; specific codes
kSectorResetAdaptiveRWTS = $C0 ; will accept any epilogue on next sector, then remember it
kSectorIgnoreAddressChecksum = $C1 ; will ignore address field checksum
kSectorCustomDOS32B4BB = $C2 ; DOS 3.2 / JMP B4BB RWTS swapper
2017-01-08 03:35:35 +00:00
;-------------------------------
!zone {
InitSectorMapWithIgnore
lda #kSectorOptional
!byte $2C
InitSectorMap
lda #kSectorRequired
ldx #<sectormap
stx .B+1
ldx #>sectormap
stx .B+2
ldx #$22
.A ldy #$0F
.B sta $FFFF
inc .B+1
bne +
inc .B+2
+ dey
bpl .B
dex
bpl .A
rts
}
2017-01-08 03:35:35 +00:00
sectormap
T00S00
T00 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
T00S08 !byte $FF
2017-04-05 01:20:05 +00:00
T00S09 !byte $FF
T00S0A !byte $FF
T00S0B !byte $FF
T00S0C !byte $FF
T00S0D !byte $FF
T00S0E !byte $FF
T00S0F !byte $FF
2017-04-05 01:20:05 +00:00
T01 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
T01S0F !byte $FF
T02 !byte $FF,$FF,$FF,$FF
T02S04 !byte $FF
2017-04-05 01:20:05 +00:00
T02S05 !byte $FF
!byte $FF,$FF,$FF,$FF
T02S0A !byte $FF,$FF
T02S0C !byte $FF
!byte $FF,$FF
T02S0F !byte $FF
2017-04-05 01:20:05 +00:00
T03 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
T04 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
T05 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
T06 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
T07 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
T08 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
T09 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
T0A !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
T0B !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
T0C !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
T0D !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF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