revised universal RWTS to support DOS 3.2 to 3.3 conversions

This commit is contained in:
4am 2017-08-15 17:17:14 -04:00
parent 2dcd475e08
commit bcff14c086
14 changed files with 222 additions and 327 deletions

Binary file not shown.

BIN
res/Universal RWTS.dsk Executable file

Binary file not shown.

View File

@ -77,9 +77,9 @@ foundea
.checktrk
ldy #0
lda .prologtbl, y
sta $B8F1
sta UNIV_D2
lda .prologtbl+2, y
sta $B8FC
sta UNIV_D3
jsr $B8DC
bcc +

View File

@ -12,6 +12,7 @@ IDBootloader
; These are used as filters later so irrelevant patchers can be skipped.
;
lda #FALSE
sta gIsDOS32
sta gIsBoot0
sta gIsBoot1
sta gIsMaster

View File

@ -56,13 +56,13 @@ TraceLaureate
sta modsrc+1
ldy #$E7
lda (modsrc),y
sta $B8E7
sta UNIV_D1
ldy #$F1
lda (modsrc),y
sta $B8F1
sta UNIV_D2
ldy #$FC
lda (modsrc),y
sta $B8FC
sta UNIV_D3
inc modsrc+1
ldy #$44
- lda (modsrc),y

View File

@ -93,22 +93,22 @@ foundmecc1
ldy #$08
lda (modsrc),y
lsr
sta $B956
sta UNIV_A1
ldy #$12
lda (modsrc),y
sta $B966
sta UNIV_A2
ldy #$1D
lda (modsrc),y
sta $B96F
sta UNIV_A3
ldy #$8F
lda (modsrc),y
sta $B8E7
sta UNIV_D1
ldy #$99
lda (modsrc),y
sta $B8F1
sta UNIV_D2
ldy #$A3
lda (modsrc),y
sta $B8FC
sta UNIV_D3
jmp ADStyle
}
@ -177,22 +177,22 @@ foundmecc4a
ldy #$83
lda (modsrc),y
lsr
sta $B956
sta UNIV_A1
ldy #$8D
lda (modsrc),y
sta $B966
sta UNIV_A2
ldy #$98
lda (modsrc),y
sta $B96F
sta UNIV_A3
ldy #$15
lda (modsrc),y
sta $B8E7
sta UNIV_D1
ldy #$1F
lda (modsrc),y
sta $B8F1
sta UNIV_D2
ldy #$2A
lda (modsrc),y
sta $B8FC
sta UNIV_D3
jmp ADStyle
}
@ -260,23 +260,23 @@ foundmecc3
ldy #$E8
lda (modsrc),y
lsr
sta $B956
sta UNIV_A1
ldy #$F2
lda (modsrc),y
sta $B966
sta UNIV_A2
ldy #$FD
lda (modsrc),y
sta $B96F
sta UNIV_A3
inc modsrc+1
ldy #$6F
lda (modsrc),y
sta $B8E7
sta UNIV_D1
ldy #$79
lda (modsrc),y
sta $B8F1
sta UNIV_D2
ldy #$83
lda (modsrc),y
sta $B8FC
sta UNIV_D3
jmp ADStyle
}

View File

@ -147,13 +147,18 @@ TraceDOS32d
dex
bpl .A
; skip T00,S01-S0A
; skip T00,S00-S0A
; since we're going to construct our own bootloader later
ldy #$0A
- sta T00,y
dey
bne -
bpl -
; set flag for patcher
lda #TRUE
sta gIsDOS32
; read the rest of the disk with the original RWTS

View File

@ -145,6 +145,8 @@ SDsuccess
lda #<SD_DOS33p
ldx #>SD_DOS33p
jsr ConstructStandardDelivery
lda #s_bootwrite
jsr PrintByID
; now manually write out track 0 with Standard Delivery
; bootloader

View File

@ -95,7 +95,7 @@ flag = $FF ; byte
}
; Application constants (not zero addresses)
RELBASE = $5900 ; address to move Passport code
RELBASE = $5800 ; address to move Passport code
; so that it's out of the way
LOWPOINT = $4300 ; lowest available address for code
BASEPAGE = $10 ; Special Delivery tracer assumes
@ -766,6 +766,10 @@ gLastTrack
; they write out the first few DOS tracks
; manually before seeking up to T22 to convert
; the rest of the disk
gIsDOS32
!byte FALSE ; 0=true, 1=false
; reset before each operation
; set in IDBootloader() after reading T00,S00
gIsBoot0
!byte FALSE ; 0=true, 1=false
; reset before each operation

View File

@ -4,34 +4,36 @@
; for converted DOS 3.2 disks
;-------------------------------
!zone {
jsr IDDOS32
bcs .exit
bcc +
lda gIsDOS32
bne .exit
.sectors
!byte $00,$00,$02,$02,$02,$02,$02,$02,$02,$02
.offsets
!byte $02,$5C,$0A,$0E,$10,$20,$25,$CA,$CE,$D2
.values
!byte $C7,$B7,$BC,$BC,$00,$BC,$BC,$00,$BC,$BC
; sectors 2-9
+ lda #$09
sta .loop+1
ldx #$B8
ldy #$10
jsr modify
!byte $00,$0D,$0B,$09,$07,$05,$03,$01
!byte $0E,$0C,$0A,$08,$06,$04,$02,$0F
lda #>universalrwts
ldx #$12 ; #BASEPAGE+2
ldy #$08
jsr CopyMemory
lda #$38
sta $1656 ; #BASEPAGE+6
.loop ldy #$d1
lda .values,y
sta .value
lda .sectors,y
ldx .offsets,y
; sector 1
lda #$B7 ; TODO might be #$37
ldx #$11 ; #BASEPAGE+1
ldy #$01
jsr modify
.value !byte $d1
dec .loop+1
bpl .loop
jsr CopyMemory
lda #$2C
sta $1138 ; #BASEPAGE+1
; sector 0
lda #<SD_DOS32
ldx #>SD_DOS32
jsr ConstructStandardDelivery
lda #s_bootwrite
jsr PrintByID
inc gPatchCount
.exit
}

View File

@ -6,7 +6,7 @@ PREFSFILE !byte prefs_e-prefs_b
prefs_b
!text "PASSPORT.CONF"
prefs_e
PREFSBUFFER = $B000
PREFSBUFFER = $B600
PREFSREADLEN = $0003
PREFSVER !byte $FF
@ -114,4 +114,4 @@ ValidatePrefs
.done
cpx #$01 ; set carry if anything changed
rts
}
}

View File

@ -32,11 +32,12 @@ InitSectorMap
; 00 = ignore this sector (don't even read it)
; 80 = sector is optional -- read, but ignore any errors
; FE = sector is required, and switch to the built-in RWTS
; after reading it (if we haven't already)
; before reading it (if we haven't already)
; FF = sector is required -- read, and any error is fatal
; (this is the default value for all sectors)
;-------------------------------
sectormap
T00S00
T00 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
T00S09 !byte $FF
T00S0A !byte $FF

View File

@ -105,7 +105,8 @@ s_writeram = $56
s_d5timing = $57
s_advint = $58
s_dos32b0 = $59
STRINGCOUNT = $5A
s_bootwrite = $5A
STRINGCOUNT = $5B
!zone {
StringTable
@ -199,6 +200,7 @@ StringTable
!word .d5timing
!word .advint
!word .dos32boot0
!word .bootwrite
;
; Text can contain substitution strings, which
; are replaced by current values at runtime. Each
@ -497,4 +499,6 @@ StringTable
.advint
!text "T%t,S%0 Found Adventure International",$8D
!text "protection check",$8D,$00
.bootwrite
!text "T00 Writing Standard Delivery bootloader",$00
}

View File

@ -1,290 +1,166 @@
;-------------------------------
; Universal RWTS
; Binary dump of a modified DOS 3.3-style RWTS
; that reads 16-sector (6-and-2 encoded) disks
; - address prologue "D4 AA 96", "D5 AA 96", or
; "D5" followed by a timing bit
; 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 data field checksum byte, but it
; ignores the address field checksum. It waits
; significantly 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 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..$BFFF. It uses the
; standard RWTS entry point at $BD00.
; It must be loaded at $B800. It uses the standard RWTS entry point at $BD00.
;
; Write and format support have been removed.
; Any attempt to pass $02 or $04 RWTS commands
; 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 = $B95E
UNIV_A3 = $B968
UNIV_D1 = $B8E7
UNIV_D2 = $B8F1
UNIV_D3 = $B8FC
;;!align 255, 0 ;ACME bug ignores second parm
!if (* & 255) > 0 {
!fill 256-(* & 255), 0
}
universalrwts
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$a0,$00,$a2,$56,$ca,$30
!byte $fb,$b9,$00,$bb,$5e,$00,$bc,$2a
!byte $5e,$00,$bc,$2a,$91,$3e,$c8,$c4
!byte $26,$d0,$eb,$60,$a0,$20,$88,$f0
!byte $61,$bd,$8c,$c0,$10,$fb,$49,$d5
!byte $d0,$f4,$ea,$bd,$8c,$c0,$10,$fb
!byte $c9,$aa,$d0,$f2,$a0,$56,$bd,$8c
!byte $c0,$10,$fb,$c9,$ad,$d0,$e7,$a9
!byte $00,$88,$84,$26,$bc,$8c,$c0,$10
!byte $fb,$59,$00,$ba,$a4,$26,$99,$00
!byte $bc,$d0,$ee,$84,$26,$bc,$8c,$c0
!byte $10,$fb,$59,$00,$ba,$a4,$26,$99
!byte $00,$bb,$c8,$d0,$ee,$bc,$8c,$c0
!byte $10,$fb,$d9,$00,$ba,$d0,$13,$18
!byte $60,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$38,$60,$a0,$f7,$84,$26
!byte $c8,$d0,$04,$e6,$26,$f0,$f3,$bd
!byte $8c,$c0,$10,$fb,$4a,$c9,$6a,$d0
!byte $ef,$f0,$05,$00,$00,$00,$00,$00
!byte $bd,$8c,$c0,$10,$fb,$c9,$aa,$d0
!byte $df,$bd,$8c,$c0,$10,$fb,$c9,$96
!byte $d0,$d6,$a0,$03,$a9,$00,$85,$27
!byte $bd,$8c,$c0,$10,$fb,$2a,$85,$26
!byte $bd,$8c,$c0,$10,$fb,$25,$26,$99
!byte $2c,$00,$45,$27,$88,$10,$e7,$a8
!byte $d0,$02,$18,$60,$38,$60,$00,$00
!byte $00,$00,$00,$00,$00,$00,$18,$60
!byte $86,$2b,$85,$2a,$cd,$78,$04,$f0
!byte $53,$a9,$00,$85,$26,$ad,$78,$04
!byte $85,$27,$38,$e5,$2a,$f0,$33,$b0
!byte $07,$49,$ff,$ee,$78,$04,$90,$05
!byte $69,$fe,$ce,$78,$04,$c5,$26,$90
!byte $02,$a5,$26,$c9,$0c,$b0,$01,$a8
!byte $38,$20,$ee,$b9,$b9,$11,$ba,$20
!byte $00,$ba,$a5,$27,$18,$20,$f1,$b9
!byte $b9,$1d,$ba,$20,$00,$ba,$e6,$26
!byte $d0,$c3,$20,$00,$ba,$18,$ad,$78
!byte $04,$29,$03,$2a,$05,$2b,$aa,$bd
!byte $80,$c0,$a6,$2b,$60,$aa,$a0,$a0
nibtable !byte $a2,$11,$ca,$d0,$fd,$e6,$46,$d0
!byte $02,$e6,$47,$38,$e9,$01,$d0,$f0
!byte $60,$01,$30,$28,$24,$20,$1e,$1d
!byte $1c,$1c,$1c,$1c,$1c,$70,$2c,$26
!byte $22,$1f,$1e,$1d,$1c,$1c,$1c,$1c
!byte $1c,$96,$97,$9a,$9b,$9d,$9e,$9f
!byte $a6,$a7,$ab,$ac,$ad,$ae,$af,$b2
!byte $b3,$b4,$b5,$b6,$b7,$b9,$ba,$bb
!byte $bc,$bd,$be,$bf,$cb,$cd,$ce,$cf
!byte $d3,$d6,$d7,$d9,$da,$db,$dc,$dd
!byte $de,$df,$e5,$e6,$e7,$e9,$ea,$eb
!byte $ec,$ed,$ee,$ef,$f2,$f3,$f4,$f5
!byte $f6,$f7,$f9,$fa,$fb,$fc,$fd,$fe
!byte $ff,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
; these $FF bytes (at $BA80..$BA94) are used by the
!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,$B7,$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
!byte $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
!byte $ff,$ff,$ff,$ff,$ff,$ff,$00,$01
!byte $98,$99,$02,$03,$9c,$04,$05,$06
!byte $a0,$a1,$a2,$a3,$a4,$a5,$07,$08
!byte $a8,$a9,$aa,$09,$0a,$0b,$0c,$0d
!byte $b0,$b1,$0e,$0f,$10,$11,$12,$13
!byte $b8,$14,$15,$16,$17,$18,$19,$1a
!byte $c0,$c1,$c2,$c3,$c4,$c5,$c6,$c7
!byte $c8,$c9,$ca,$1b,$cc,$1c,$1d,$1e
!byte $d0,$d1,$d2,$1f,$d4,$d5,$20,$21
!byte $d8,$22,$23,$24,$25,$26,$27,$28
!byte $e0,$e1,$e2,$e3,$e4,$29,$2a,$2b
!byte $e8,$2c,$2d,$2e,$2f,$30,$31,$32
!byte $f0,$f1,$33,$34,$35,$36,$37,$38
!byte $f8,$39,$3a,$3b,$3c,$3d,$3e
!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
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $84,$48,$85,$49,$a0,$02,$8c,$f8
!byte $06,$a0,$04,$8c,$f8,$04,$a0,$01
!byte $b1,$48,$aa,$a0,$0f,$d1,$48,$f0
!byte $1b,$8a,$48,$b1,$48,$aa,$68,$48
!byte $91,$48,$bd,$8e,$c0,$a0,$08,$bd
!byte $8c,$c0,$dd,$8c,$c0,$d0,$f6,$88
!byte $d0,$f8,$68,$aa,$bd,$8e,$c0,$bd
!byte $8c,$c0,$a0,$08,$bd,$8c,$c0,$48
!byte $68,$48,$68,$8e,$f8,$05,$dd,$8c
!byte $c0,$d0,$03,$88,$d0,$ee,$08,$bd
!byte $89,$c0,$a0,$06,$b1,$48,$99,$36
!byte $00,$c8,$c0,$0a,$d0,$f6,$a0,$03
!byte $b1,$3c,$85,$47,$a0,$02,$b1,$48
!byte $a0,$10,$d1,$48,$f0,$06,$91,$48
!byte $28,$a0,$00,$08,$6a,$90,$05,$bd
!byte $8a,$c0,$b0,$03,$bd,$8b,$c0,$66
!byte $35,$28,$08,$d0,$0b,$a0,$07,$20
!byte $00,$ba,$88,$d0,$fa,$ae,$f8,$05
!byte $a0,$04,$b1,$48,$20,$5a,$be,$28
!byte $d0,$11,$a4,$47,$10,$0d,$a0,$12
!byte $88,$d0,$fd,$e6,$46,$d0,$f7,$e6
!byte $47,$d0,$f3,$a0,$0c,$b1,$48,$f0
!byte $5a,$c9,$04,$f0,$58,$6a,$08,$b0
!byte $03,$20,$00,$b8,$a0,$30,$8c,$78
!byte $05,$ae,$f8,$05,$20,$44,$b9,$90
!byte $24,$ce,$78,$05,$10,$f3,$ad,$78
!byte $04,$48,$a9,$60,$20,$95,$be,$ce
!byte $f8,$06,$f0,$28,$a9,$04,$8d,$f8
!byte $04,$a9,$00,$20,$5a,$be,$68,$20
!byte $5a,$be,$4c,$bc,$bd,$a4,$2e,$cc
!byte $78,$04,$f0,$1c,$ad,$78,$04,$48
!byte $98,$20,$95,$be,$68,$ce,$f8,$04
!byte $d0,$e5,$f0,$ca,$68,$a9,$40,$28
!byte $4c,$48,$be,$f0,$39,$4c,$af,$be
!byte $a0,$03,$b1,$48,$48,$a5,$2f,$a0
!byte $0e,$91,$48,$68,$f0,$08,$c5,$2f
!byte $f0,$04,$a9,$20,$d0,$e1,$a0,$05
!byte $b1,$48,$a8,$b9,$b8,$bf,$c5,$2d
!byte $d0,$97,$28,$90,$1c,$20,$dc,$b8
!byte $08,$b0,$8e,$28,$a2,$00,$86,$26
!byte $20,$c2,$b8,$ae,$f8,$05,$18,$24
!byte $38,$a0,$0d,$91,$48,$bd,$88,$c0
!byte $60,$20,$2a,$b8,$90,$f0,$a9,$10
!byte $b0,$ee,$48,$a0,$01,$b1,$3c,$6a
!byte $68,$90,$08,$0a,$20,$6b,$be,$4e
!byte $78,$04,$60,$85,$2a,$20,$8e,$be
!byte $b9,$78,$04,$24,$35,$30,$03,$b9
!byte $f8,$04,$8d,$78,$04,$a5,$2a,$24
!byte $35,$30,$05,$99,$f8,$04,$10,$03
!byte $99,$78,$04,$4c,$a0,$b9,$8a,$4a
!byte $4a,$4a,$4a,$a8,$60,$48,$a0,$02
!byte $b1,$48,$6a,$66,$35,$20,$8e,$be
!byte $68,$0a,$24,$35,$30,$05,$99,$f8
!byte $04,$10,$03,$99,$78,$04,$60,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$0d,$0b,$09,$07,$05,$03,$01
!byte $0e,$0c,$0a,$08,$06,$04,$02,$0f
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!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