placeholder for write routine

This commit is contained in:
Peter Ferrie 2019-04-16 11:26:59 -07:00
parent 4e2ddef1d7
commit 8740b3447c
5 changed files with 52 additions and 28 deletions

View File

@ -20,15 +20,15 @@ Trace
cpy #$4C cpy #$4C
beq + beq +
ldx #3 ldx #3
+ ldy $B6FB ldy $B6FB
cpy #$4C cpy #$4C
bne + bne ++
sta $B6FA,x ; hi byte of callback + sta $B6FA,x ; hi byte of callback
pla pla
sta $B6F9,x ; lo byte of callback sta $B6F9,x ; lo byte of callback
jmp $B600 jmp $B600
+ pla ++ pla
lda #s_canttrace ; unknown disk controller lda #s_canttrace ; unknown disk controller
jsr PrintByID jsr PrintByID
jmp UseUniversal jmp UseUniversal

View File

@ -11,6 +11,9 @@
Choplifter Choplifter
bit gMode ; nothing to do here in verify-only mode bit gMode ; nothing to do here in verify-only mode
bpl .exit bpl .exit
;;prepare write routine at $2000-21ff first
lda #$00 lda #$00
sta gCommand sta gCommand
sta dct+1 sta dct+1
@ -27,12 +30,13 @@ Choplifter
jsr ReadChoplifter jsr ReadChoplifter
lsr gTrack lsr gTrack
jsr WriteTrackNA jsr WriteTrackNA
lda gTrack ldx gTrack
clc inx
adc #$01 txa
pha
jsr ChangeTrackNW jsr ChangeTrackNW
jsr IncProgress jsr IncProgress
lda gTrack pla
cmp #$23 cmp #$23
bne .read bne .read
@ -264,16 +268,22 @@ ReadChoplifter
nop ; timing bits nop ; timing bits
ldx #$00 ldx #$00
- jsr .read4x4 - jsr .read4x4
sta (BASEPAGE+8)<<8,x sta (BASEPAGE+$0f)<<8,x
inx inx
jsr .read4x4 jsr .read4x4
sta (BASEPAGE+8)<<8,x sta (BASEPAGE+$0f)<<8,x
inx inx
jsr .read4x4 jsr .read4x4
sta (BASEPAGE+8)<<8,x sta (BASEPAGE+$0f)<<8,x
inx inx
cmp #$EA cmp #$EA
bne - bne -
ldx #0
.copywrite1
lda $2000,x
sta (BASEPAGE+8)<<8,x
inx
bne .copywrite1
rts rts
.readtrack22 .readtrack22
@ -284,7 +294,7 @@ ReadChoplifter
dey dey
bne + bne +
dex dex
beq ++ beq .copywrite2
+ lda KEY + lda KEY
bmi .linkcancel3 bmi .linkcancel3
jsr .readnib jsr .readnib
@ -304,7 +314,13 @@ ReadChoplifter
sta BASEPAGE<<8,x sta BASEPAGE<<8,x
inx inx
bne - bne -
++ rts
.copywrite2
lda $2100,x
sta (BASEPAGE+7)<<8,x
inx
bne .copywrite2
rts
.read4x4 .read4x4
- lda $C0EC - lda $C0EC
@ -354,8 +370,18 @@ ReadChoplifter
.stage2 !pseudopc $B000 { ; high address that won't be hit on the first round of SD .stage2 !pseudopc $B000 { ; high address that won't be hit on the first round of SD
lda $c057 lda $c057
lda $c054
lda $c052 lda $c052
lda $c050 lda $c050
ldx #$42
txs
lda #>(.resume-1)
pha
lda #<(.resume-1)
pha
jmp $4000
.resume
ldy #0 ldy #0
- lda .stager,y - lda .stager,y
sta $500,y sta $500,y
@ -370,6 +396,7 @@ ReadChoplifter
sty $807 sty $807
ldy #$60 ; rts ldy #$60 ; rts
sty $84c sty $84c
ldx $2b
jsr .callSD ; including original $8xx to $7xx jsr .callSD ; including original $8xx to $7xx
asl $807 ; 4xx, second table asl $807 ; 4xx, second table
jmp $500 jmp $500
@ -379,9 +406,11 @@ ReadChoplifter
jsr .step jsr .step
lda #$60 lda #$60
sta $801 sta $801
lda #4 lda #2
sta $27 sta $27
jsr $823 ; read patch table jsr $823 ; read half of write routine to $200 (but starts at $207)
inc $27
jsr $823 ; read patch table to $400
ldy #0 ; avoid CFFA bug ldy #0 ; avoid CFFA bug
- lda $400,y - lda $400,y
sta .patcher+1 sta .patcher+1
@ -400,13 +429,7 @@ ReadChoplifter
sta $3d sta $3d
dec $27 dec $27
jsr $823 ; read high scores jsr $823 ; read high scores
lsr $27 inc $27
lda #7
sta $26
jsr $823 ; read half of write routine to $207
asl $27
lda #0
sta $26
jsr $823 ; read half of write routine to $600 jsr $823 ; read half of write routine to $600
ldy #0 ; avoid CFFA bug ldy #0 ; avoid CFFA bug
- lda ($26),y - lda ($26),y
@ -415,6 +438,7 @@ ReadChoplifter
sta $300,y sta $300,y
iny iny
bne - bne -
lda $C088,x
jmp ($20) jmp ($20)
.callSD .callSD

View File

@ -10,8 +10,8 @@
bpl .exit bpl .exit
lda gIsDOS32 lda gIsDOS32
bne .exit bne .exit
lda gTrack ldx gTrack
cmp #$01 dex
bne .exit bne .exit
lda #$08 lda #$08
ldx #$D6 ldx #$D6

View File

@ -11,8 +11,8 @@
bpl .exit bpl .exit
lda gIsBoot0 lda gIsBoot0
bne .exit bne .exit
lda gTrack ldx gTrack
cmp #$01 dex
bne .exit bne .exit
ldy #(@search1end-@search1start) ldy #(@search1end-@search1start)

View File

@ -12,8 +12,8 @@
!zone { !zone {
bit gMode ; nothing to do here in verify-only mode bit gMode ; nothing to do here in verify-only mode
bpl .exit bpl .exit
lda gTrack ; and track 1 ldx gTrack ; and track 1
cmp #$01 dex
bne .exit bne .exit
lda #$04 lda #$04
ldx #$52 ldx #$52