From 426f493612a4a5fbbf14043bb6541ad4f5e4a041 Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Thu, 18 Jan 2018 09:32:25 -0800 Subject: [PATCH] DeskTop: notes about unit numbers --- desktop/desktop.s | 19 +++++++++++-------- inc/prodos.inc | 10 +++++++++- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/desktop/desktop.s b/desktop/desktop.s index b80bd26..0c010ec 100644 --- a/desktop/desktop.s +++ b/desktop/desktop.s @@ -13817,7 +13817,7 @@ buffer: .addr $800 .endproc .proc get_device_info - sta device_id + sta unit_number sty device_num and #$F0 sta on_line_params::unit @@ -13875,19 +13875,21 @@ L8A22: lda $0801,x adc #$02 sta ($06),y - lda device_id + lda unit_number cmp #$3E ; ??? Special case? Maybe RamWorks? beq use_ramdisk_icon and #$0F ; lower nibble - cmp #4 ; 0 = Disk II, 4 = ProFile, $F = /RAM + cmp #DT_PROFILE ; ProFile or Slinky-style RAM ? bne use_floppy_icon ;; BUG: This defaults SmartPort hard drives to use floppy icons. - ;; https://github.com/inexorabletash/a2d/issues/6 + ;; See https://github.com/inexorabletash/a2d/issues/6 for more + ;; context; this code is basically unsalvageable per ProDOS + ;; Tech Note #21. ;; Either ProFile or a "Slinky"/RamFactor-style Disk - lda device_id ; bit 7 = drive (0=1, 1=2); 5-7 = slot + lda unit_number ; bit 7 = drive (0=1, 1=2); 5-7 = slot and #%01110000 ; mask off slot lsr a lsr a @@ -13920,7 +13922,7 @@ use_profile_icon: jmp selected_device_icon use_floppy_icon: - cmp #$B ; SmartPort device ??? + cmp #$B ; removable / 4 volumes bne use_floppy140_icon ldy #7 lda #