mirror of
https://github.com/a2-4am/passport.git
synced 2024-05-28 21:41:27 +00:00
42 lines
1017 B
Plaintext
42 lines
1017 B
Plaintext
;-------------------------------
|
|
; #JSR8B3
|
|
; patch insane bootloader that
|
|
; alters the nibble table used
|
|
; by the drive firmware, reads
|
|
; sectors in the wrong order,
|
|
; and decodes nibbles in the
|
|
; wrong order
|
|
; e.g. English Achievement I
|
|
;-------------------------------
|
|
!zone {
|
|
lda gIs8b3
|
|
bne .exit
|
|
beq + ; passport-test-suite/Ardy the Aardvark.woz [Z=1] reaches here
|
|
|
|
.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
|
|
|
|
+ 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
|
|
|
|
.loop ldy #$d1
|
|
lda .values,y
|
|
sta .value
|
|
lda .sectors,y
|
|
ldx .offsets,y
|
|
jsr modify1
|
|
.value !byte $d1
|
|
dec .loop+1
|
|
bpl .loop
|
|
.exit
|
|
}
|