diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 56f9634..70ae992 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -7,6 +7,7 @@ * Current time shown on right side of menu bar, if system has a clock. (#7) * Up to 13 volumes are shown on the desktop. (#20) * Up to 12 Desk Accessories are shown in the menu. (#90) +* Add Special > Check Drive command to refresh a single drive. (#97) * Show Text File DA: Keyboard support. Escape quits, arrows scroll. (#4) * Icon bitmap improvements. (#74) diff --git a/desktop/desktop_aux.s b/desktop/desktop_aux.s index 0559bd1..e5d4e75 100644 --- a/desktop/desktop_aux.s +++ b/desktop/desktop_aux.s @@ -2718,8 +2718,10 @@ label_by_size: label_by_type: PASCAL_STRING "By Type" -label_check_drives: - PASCAL_STRING "Check Drives" +label_check_all_drives: + PASCAL_STRING "Check All Drives" +label_check_drive: + PASCAL_STRING "Check Drive" label_format_disk: PASCAL_STRING "Format a Disk ..." label_erase_disk: @@ -2786,8 +2788,9 @@ view_menu: menu_item_id_view_by_type := 5 special_menu: - DEFINE_MENU 13 - DEFINE_MENU_ITEM label_check_drives + DEFINE_MENU 14 + DEFINE_MENU_ITEM label_check_all_drives + DEFINE_MENU_ITEM label_check_drive DEFINE_MENU_SEPARATOR DEFINE_MENU_ITEM label_format_disk, 'S', 's' DEFINE_MENU_ITEM label_erase_disk, 'Z', 'z' @@ -2801,15 +2804,16 @@ special_menu: DEFINE_MENU_SEPARATOR DEFINE_MENU_ITEM label_rename_icon - menu_item_id_check_drives := 1 - menu_item_id_format_disk := 3 - menu_item_id_erase_disk := 4 - menu_item_id_disk_copy := 5 - menu_item_id_lock := 7 - menu_item_id_unlock := 8 - menu_item_id_get_info := 10 - menu_item_id_get_size := 11 - menu_item_id_rename_icon := 13 + menu_item_id_check_all := 1 + menu_item_id_check_drive := 2 + menu_item_id_format_disk := 4 + menu_item_id_erase_disk := 5 + menu_item_id_disk_copy := 6 + menu_item_id_lock := 8 + menu_item_id_unlock := 9 + menu_item_id_get_info := 11 + menu_item_id_get_size := 12 + menu_item_id_rename_icon := 14 .addr $0000,$0000 diff --git a/desktop/desktop_main.s b/desktop/desktop_main.s index 4dd2da7..378c0c1 100644 --- a/desktop/desktop_main.s +++ b/desktop/desktop_main.s @@ -396,6 +396,7 @@ dispatch_table: ;; Special menu (5) menu5_start := * .addr cmd_check_drives + .addr cmd_check_drive .addr cmd_noop ; -------- .addr cmd_format_disk .addr cmd_erase_disk @@ -2088,9 +2089,17 @@ L504F: .byte 0 ;;; ============================================================ -.proc cmd_eject +.proc cmd_check_or_eject buffer := $1800 +eject: + lda #$80 + bne common ; always + +check: lda #0 + +common: sta eject_flag + ;; Ensure that volumes are selected lda selected_window_index beq :+ @@ -2121,7 +2130,10 @@ loop1: lda selected_icon_list,y stx count ;; Do the ejection + bit eject_flag + bpl :+ jsr jt_eject +: ;; Check each of the recorded volumes loop2: ldx count @@ -2136,7 +2148,11 @@ loop2: ldx count count: .byte 0 +eject_flag: + .byte 0 .endproc + cmd_eject := cmd_check_or_eject::eject + cmd_check_drive := cmd_check_or_eject::check ;;; ============================================================ @@ -4711,20 +4727,20 @@ enable_menu_item: .proc toggle_eject_menu_item enable: - lda #MGTK::disableitem_enable - sta disableitem_params::disable + copy #MGTK::disableitem_enable, disableitem_params::disable jmp :+ disable: - lda #MGTK::disableitem_disable - sta disableitem_params::disable + copy #MGTK::disableitem_disable, disableitem_params::disable -: lda #menu_id_file - sta disableitem_params::menu_id - - lda #11 ; > Eject - sta disableitem_params::menu_item +: copy #menu_id_file, disableitem_params::menu_id + copy #desktop_aux::menu_item_id_eject, disableitem_params::menu_item MGTK_RELAY_CALL MGTK::DisableItem, disableitem_params + + copy #menu_id_special, disableitem_params::menu_id + copy #desktop_aux::menu_item_id_check_drive, disableitem_params::menu_item + MGTK_RELAY_CALL MGTK::DisableItem, disableitem_params + rts .endproc @@ -6880,8 +6896,6 @@ nonzero_flag: ; high bit set once a non-zero digit seen .endproc ; int_to_string - PAD_TO $7B5F - ;;; ============================================================ L7B5F: .word 0