diff --git a/src/patchers/choplifter.a b/src/patchers/choplifter.a index 3e7f08b..ce70a51 100644 --- a/src/patchers/choplifter.a +++ b/src/patchers/choplifter.a @@ -6,15 +6,9 @@ ; module by qkumba ;------------------------------- !zone { -.exit rts ; reachable only via inspect + rts ; reachable only via inspect Choplifter - bit gMode ; nothing to do here in verify-only mode - bpl .exit - -;; prepare write routine at $2000 for relocated address at $207 -;; the difficulty here is to find three spare pages across all games - lda #$00 sta gCommand sta dct+1 @@ -36,6 +30,9 @@ Choplifter cmp #$23 bne .read + bit gMode ; done if in verify-only mode + bpl .exit + ; start with RDOS as a minimal SD base ; and copy SD code for free @@ -91,6 +88,8 @@ Choplifter sta gTrack jsr WriteTrackNA inc gPatchCount + +.exit jsr .cleanup jmp Pass @@ -236,10 +235,15 @@ ReadChoplifter sta .prolog2+1 lda (BASEPAGE<<8)+$D3 sta .prolog3+1 --- jsr .readnib + +.checkkey2 + lda KEY + bmi .linkcancel2 + jsr .readnib + .prolog1 - cmp #$D1 ; SMC - bne -- + bne .checkkey2 jsr .readnib .prolog2 cmp #$D1 ; SMC @@ -256,10 +260,10 @@ ReadChoplifter sta tmp jsr .readnib and tmp - sta (BASEPAGE+$0f)<<8,x + sta (BASEPAGE+8)<<8,x inx jsr .read4x4 - sta (BASEPAGE+$0f)<<8,x + sta (BASEPAGE+8)<<8,x inx jsr .readnib sec @@ -268,19 +272,10 @@ ReadChoplifter - lda $C0EC bpl - and tmp - sta (BASEPAGE+$0f)<<8,x + sta (BASEPAGE+8)<<8,x inx cmp #$EA bne -- -;; future work, just disable for now -;; ldx #0 -;;.copywrite -;; lda .writeroutine,x -;; sta (BASEPAGE+8)<<8,x -;; inx -;; bne .copywrite - lda #$60 ; rts - sta ((BASEPAGE+8)<<8)+7 rts .readtrack22 @@ -389,12 +384,17 @@ ReadChoplifter .stager !pseudopc $500 { jsr .callSD jsr .step - lda #$60 + lda #$60 ; rts sta $801 - lda #2 + + ; to enable writing requires finding three spare pages + ; that is common to all games. I did not succeed. + ; for that reason, auto-crack is read-only. + + sta $207 + + lda #4 sta $27 - jsr $823 ; read write routine to $200 (but starts at $207) - inc $27 jsr $823 ; read patch table to $400 ldy #0 ; avoid CFFA bug (Y is not zero on return) - lda $400,y