LOAD command is now able to load file from drive 8
This commit is contained in:
1 parent
f911eed0c3
commit
3039c108cb
4 files changed
+23
-13
No files matched your search
BIN
Binary file not shown.
+13
-11
@@ -32,23 +32,15 @@ iec_rx_clk_wait:
|
|||||||
jsr iec_wait60us
|
jsr iec_wait60us
|
||||||
lda CI2PRA
|
lda CI2PRA
|
||||||
rol
|
rol
|
||||||
bmi iec_rx_no_eoi_confirmation
|
bmi iec_rx_set_eoi
|
||||||
|
|
||||||
|
jsr iec_rx_set_eoi
|
||||||
|
|
||||||
;; Pull data for 60 usec to confirm
|
;; Pull data for 60 usec to confirm
|
||||||
jsr iec_release_clk_pull_data
|
jsr iec_release_clk_pull_data
|
||||||
jsr iec_wait60us
|
jsr iec_wait60us
|
||||||
jsr iec_release_clk_data
|
jsr iec_release_clk_data
|
||||||
|
|
||||||
iec_rx_no_eoi_confirmation:
|
|
||||||
|
|
||||||
;; Store EOI information in IOSTATUS - XXX this should be done by the caller!
|
|
||||||
lda IOSTATUS
|
|
||||||
ora #$40
|
|
||||||
sta IOSTATUS
|
|
||||||
|
|
||||||
sec
|
|
||||||
rts
|
|
||||||
|
|
||||||
iec_rx_not_eoi:
|
iec_rx_not_eoi:
|
||||||
|
|
||||||
;; Latch input bits in on rising edge of CLK, eight times for eight bits.
|
;; Latch input bits in on rising edge of CLK, eight times for eight bits.
|
||||||
@@ -84,6 +76,7 @@ iec_rx_bit_loop:
|
|||||||
|
|
||||||
;; Move data bit into C flag, and loop until bit 6 clears
|
;; Move data bit into C flag, and loop until bit 6 clears
|
||||||
;; i.e., the clock has been released.
|
;; i.e., the clock has been released.
|
||||||
|
|
||||||
* lda CI2PRA
|
* lda CI2PRA
|
||||||
rol
|
rol
|
||||||
bpl -
|
bpl -
|
||||||
@@ -113,3 +106,12 @@ iec_rx_bit_loop:
|
|||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
iec_rx_set_eoi:
|
||||||
|
|
||||||
|
;; Store EOI information in IOSTATUS
|
||||||
|
lda IOSTATUS
|
||||||
|
ora #$40
|
||||||
|
sta IOSTATUS
|
||||||
|
|
||||||
|
clc
|
||||||
|
rts
|
||||||
+10
-2
@@ -158,7 +158,7 @@ load_loop:
|
|||||||
bne +
|
bne +
|
||||||
inc load_save_start_ptr+1
|
inc load_save_start_ptr+1
|
||||||
;; If we wrap around to $0000, then this is bad.
|
;; If we wrap around to $0000, then this is bad.
|
||||||
beq load_error
|
beq load_error
|
||||||
*
|
*
|
||||||
;; Check for EOI -- if so, read one last byte
|
;; Check for EOI -- if so, read one last byte
|
||||||
lda IOSTATUS
|
lda IOSTATUS
|
||||||
@@ -167,13 +167,21 @@ load_loop:
|
|||||||
|
|
||||||
load_done:
|
load_done:
|
||||||
;; Close file on drive
|
;; Close file on drive
|
||||||
|
|
||||||
;; Command drive to stop talking and to close the file
|
;; Command drive to stop talking and to close the file
|
||||||
jsr untlk
|
jsr untlk
|
||||||
|
|
||||||
|
;; XXX XXX code below runs into infinite loop - so for now just quit
|
||||||
|
clc
|
||||||
|
cli
|
||||||
|
rts
|
||||||
|
|
||||||
lda current_device_number
|
lda current_device_number
|
||||||
jsr listen
|
jsr listen
|
||||||
|
|
||||||
lda #$e0
|
lda #$e0
|
||||||
jsr iec_tx_command
|
jsr iec_tx_command
|
||||||
|
|
||||||
;; Tell drive to unlisten
|
;; Tell drive to unlisten
|
||||||
jsr unlsn
|
jsr unlsn
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user