mirror of
https://github.com/a2-4am/passport.git
synced 2024-10-05 09:57:10 +00:00
67 lines
1.8 KiB
Plaintext
67 lines
1.8 KiB
Plaintext
;-------------------------------
|
|
; #DOS32
|
|
; construct new bootloader and RWTS for converted DOS 3.2 disks
|
|
;-------------------------------
|
|
!zone {
|
|
lda gIsDOS32
|
|
bne .exit
|
|
lda gIsRDOS13
|
|
beq .exit
|
|
|
|
; sector 1
|
|
|
|
lda jCallRWTS+2
|
|
sta .cr+1
|
|
sec
|
|
sbc #$06 ; #$B7 or #$37
|
|
ldx #$11 ; #BASEPAGE+1
|
|
ldy #$01
|
|
jsr CopyMemory
|
|
|
|
; sectors 2-9
|
|
|
|
lda #$12 ; #BASEPAGE+2
|
|
jsr CopyUniversalAnywhere
|
|
lda #$38
|
|
sta $1656 ; #BASEPAGE+6
|
|
|
|
lda #s_rwtswrite
|
|
jsr PrintByID
|
|
|
|
; If original disk loads boot1 into $B700, Standard Delivery only needs to
|
|
; load boot1+RWTS (into $B700..$BFFF) and transfer control to boot1 at $B700.
|
|
;
|
|
; If original disk loads boot1 into $3700 (and expects the RWTS at $3800),
|
|
; we let Standard Delivery load boot1+RWTS+DOS and patch boot1 here so it
|
|
; doesn't try to call the RWTS itself. Boot1 will exit via the standard
|
|
; relocation routine at $1B03, after which both RWTS and DOS will be
|
|
; in higher memory. This will fail horribly if the relocation routine decides
|
|
; not to relocate (on old Apple II machines with less than 48K), and I have
|
|
; made peace with that.
|
|
|
|
lda #$01
|
|
ldx #$38
|
|
ldy #$03
|
|
jsr compare
|
|
!byte $20,$93,$37
|
|
bcs + ; passport-test-suite/Bellhop.woz [C=0] matches
|
|
ldy #$01
|
|
jsr modify
|
|
!byte $2C
|
|
+
|
|
|
|
; sector 0
|
|
|
|
ldx #ID_DOS32LO
|
|
.cr lda #$d1 ; set at runtime
|
|
cmp #$3D
|
|
beq +
|
|
ldx #ID_DOS32
|
|
+ jsr ConstructStandardDelivery
|
|
|
|
lda #s_bootwrite
|
|
jsr PrintByID
|
|
inc gPatchCount
|
|
.exit
|
|
}
|