Quantcast
Channel: stardot.org.uk
Viewing all articles
Browse latest Browse all 3345

8-bit acorn software: other • Re: ADFS for multiple SCSI drives

$
0
0
And my Acorn Winchester 130 with drive 0 only:

<---SNIP--->

I'm not sure how much of this timing is the Adaptec controller and how much ADFS. I suspect it's a combination of multiple retries by ADFS after receiving the not ready message from the controller. The number of retries in ADFS can be reduced, I did this in the "IDFS" build as it was resulting in ridiculously long delays accessing an LV-ROM disc with a disc error.
I've just tried the same with non patched ADFS and a single Fujitsu M2681SAM SCSI drive with embedded controller (set to SCSI ID 0) hooked up to my host adaptor, and I get a Disc error when I try to mount a non existent LUN. So, I think the timeout you are seeing is likely down to the Adaptec controller.
capture299.png
I've just had a quick look at the code again, and there are four places where it actually checks for the presence of a HDD (service 1, service 3, service 4 & service 12), but it seems to be checking for the presence of a host adaptor more than it is looking for a specific HDD:

Code:

; &9a63 referenced 3 times by &9ad7, &9b4b, &9bfb.check_for_hdd    lda #&5a ; 'Z'                                                    ; 9a63: a9 5a       .Z    jsr sub_c9a6c                                                     ; 9a65: 20 6c 9a     l.    bne c9a77                                                         ; 9a68: d0 0d       ..    lda #&a5                                                          ; 9a6a: a9 a5       ..; &9a6c referenced 1 time by &9a65.sub_c9a6c    sta scsi_data_reg                                                 ; 9a6c: 8d 40 fc    .@.    ldx #0                                                            ; 9a6f: a2 00       ..    stx scsi_irq_reg                                                  ; 9a71: 8e 43 fc    .C.    cmp scsi_data_reg                                                 ; 9a74: cd 40 fc    .@.; &9a77 referenced 2 times by &9a68, &9c9c.c9a77    rts                                                               ; 9a77: 60          `
So that's not going to help me much when I'm trying to access a non present drive. I suspect I need to break into that tight loop I posted earlier, and put a timeout into it, which would generate the Drive not ready error if trying to mount a non existent drive, or just skip it if trying to do a *BYE command (the *BYE command issues a SCSI STOP to all 4 drives - &60, &40, &20 and 0, regardless of whether they're actually there or not, and my patched ADFS gets hung up there, as well as the *MOUNT):

Code:

.bye_command    lda drive_number_stored_hi                                        ; a0c3: ad 17 11    ...    pha                                                               ; a0c6: 48          H    tax                                                               ; a0c7: aa          .    inx                                                               ; a0c8: e8          .    beq ca0ce                                                         ; a0c9: f0 03       ..    jsr close_command                                                 ; a0cb: 20 b3 b1     ..; &a0ce referenced 1 time by &a0c9.ca0ce    lda #&60 ; '`'                                                    ; a0ce: a9 60       .`    sta drive_number_stored_hi                                        ; a0d0: 8d 17 11    ...; &a0d3 referenced 1 time by &a0e3.loop_ca0d3    ldx #<osword_table_1b_stop                                        ; a0d3: a2 ea       ..    ldy #>osword_table_1b_stop                                        ; a0d5: a0 a0       ..    jsr do_osword_command_with_control_block_in_xy                    ; a0d7: 20 89 80     ..    lda drive_number_stored_hi                                        ; a0da: ad 17 11    ...    sec                                                               ; a0dd: 38          8    sbc #&20 ; ' '                                                    ; a0de: e9 20       .    sta drive_number_stored_hi                                        ; a0e0: 8d 17 11    ...    bcs loop_ca0d3                                                    ; a0e3: b0 ee       ..    pla                                                               ; a0e5: 68          h    sta drive_number_stored_hi                                        ; a0e6: 8d 17 11    ...    rts                                                               ; a0e9: 60          `.osword_table_1b_stop    equb   0,   0, &17, &ff, &ff, &1b,   0,   0,   0,   0,   0        ; a0ea: 00 00 17... ...
As a workaround, I've currently patched *BYE (see code in first post) so it only stops the currently mounted drive.

Statistics: Posted by KenLowe — Sat Feb 08, 2025 8:33 pm



Viewing all articles
Browse latest Browse all 3345

Trending Articles