commented out some problematic code
This commit is contained in:
1 parent
8e13ef4016
commit
6180472a9b
3 files changed
+24
-14
No files matched your search
@@ -8,13 +8,13 @@ lowlevel_fdc_ensure_presence_refresh:
|
|||||||
|
|
||||||
; XXX stepping head is definitely needed, but probably still not enough
|
; XXX stepping head is definitely needed, but probably still not enough
|
||||||
|
|
||||||
lda #%00011000 ; step head 1 track in (XXX: check if it is really in)
|
; lda #%00011000 ; step head 1 track in (XXX: check if it is really in)
|
||||||
sta FDC_COMMAND ; $D081
|
; sta FDC_COMMAND ; $D081
|
||||||
jsr lowlevel_fdc_wait_clr_BUSY
|
; jsr lowlevel_fdc_wait_clr_BUSY
|
||||||
|
|
||||||
lda #%00010000 ; step head 1 track out (XXX: check if it is really out)
|
; lda #%00010000 ; step head 1 track out (XXX: check if it is really out)
|
||||||
sta FDC_COMMAND ; $D081
|
; sta FDC_COMMAND ; $D081
|
||||||
jsr lowlevel_fdc_wait_clr_BUSY
|
; jsr lowlevel_fdc_wait_clr_BUSY
|
||||||
|
|
||||||
; FALLTROUGH
|
; FALLTROUGH
|
||||||
|
|
||||||
@@ -39,16 +39,22 @@ lowlevel_fdc_ensure_presence:
|
|||||||
|
|
||||||
lowlevel_fdc_motor_on:
|
lowlevel_fdc_motor_on:
|
||||||
|
|
||||||
lda #%00100000 ; enable drive motor and LED
|
lda FDC_CONTROL
|
||||||
tsb FDC_CONTROL ; $D080
|
and #%00100000
|
||||||
|
bne lowlevel_fdc_rts ; if motor already enabled, do nothing
|
||||||
|
|
||||||
|
; XXX find out why it is not disabled at all
|
||||||
|
; lda #%00100000 ; enable drive motor and LED
|
||||||
|
; tsb FDC_CONTROL ; $D080
|
||||||
|
|
||||||
; Allow some time for spin-up; according to https://wiki.osdev.org/Floppy_Disk_Controller
|
; Allow some time for spin-up; according to https://wiki.osdev.org/Floppy_Disk_Controller
|
||||||
; 300 ms should be more than enough
|
; 300 ms should be more than enough
|
||||||
|
|
||||||
phx
|
; XXX reenable this
|
||||||
ldx #$0F
|
; phx
|
||||||
jsr wait_x_bars
|
; ldx #$0F
|
||||||
plx
|
; jsr wait_x_bars
|
||||||
|
; plx
|
||||||
|
|
||||||
bra lowlevel_fdc_wait_clr_BUSY
|
bra lowlevel_fdc_wait_clr_BUSY
|
||||||
|
|
||||||
@@ -71,4 +77,8 @@ lowlevel_fdc_wait_set_RDREQ:
|
|||||||
bit FDC_STATUS_B ; $D083
|
bit FDC_STATUS_B ; $D083
|
||||||
bpl lowlevel_fdc_wait_set_RDREQ
|
bpl lowlevel_fdc_wait_set_RDREQ
|
||||||
|
|
||||||
|
; FALLTROUGH
|
||||||
|
|
||||||
|
lowlevel_fdc_rts:
|
||||||
|
|
||||||
rts
|
rts
|
||||||
@@ -85,8 +85,6 @@ lowlevel_readsector_force:
|
|||||||
cmp #%01000000 ; XXX is this correct? .A seems to stay at $40 at this point
|
cmp #%01000000 ; XXX is this correct? .A seems to stay at $40 at this point
|
||||||
bne @lp1
|
bne @lp1
|
||||||
|
|
||||||
jsr lowlevel_fdc_motor_off ; disable drive motor
|
|
||||||
|
|
||||||
; Copy sector to buffer in RAM
|
; Copy sector to buffer in RAM
|
||||||
|
|
||||||
lda #$00
|
lda #$00
|
||||||
|
|||||||
@@ -8,4 +8,6 @@ unit_fd_cmd_CLOSE:
|
|||||||
|
|
||||||
; XXX provide implementation
|
; XXX provide implementation
|
||||||
|
|
||||||
|
jsr lowlevel_fdc_motor_off ; disable drive motor XXX only do this if no channel is opened
|
||||||
|
|
||||||
jmp dos_EXIT_SEC
|
jmp dos_EXIT_SEC
|
||||||
Reference in new issue
Block a user