Commit 79d02dfe authored by Jeffrey Lee's avatar Jeffrey Lee

Make SCSI formatting less confusing

Detail:
  bas/!RunImage - Change PROCGetDriveToUse to list SCSI devices in SCSIFS drive order, and ask for a SCSIFS drive number.
  Asking for a FS drive number makes SCSI formatting consistent with ADFS & SDFS formatting.
  Previously devices would have been listed in the order they were found by the SCSI bus enumeration code, and the code would have asked for an index into that list, without giving any indication of the SCSIFS drive numbers that are assigned to each device. Until, that is, the SCSIFS drive number is shown to the user at the final "Are you sure?" prompt, potentially resulting in confusion because in many cases the SCSIFS drive number won't match the device number assigned by HForm.
Admin:
  Tested on BB-xM with a mix of 'hard' and 'floppy' devices connected


Version 2.75. Tagged as 'HForm-2_75'
parent b26f5b2c
/* (2.74)
/* (2.75)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 2.74
#define Module_MajorVersion_CMHG 2.75
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 06 Jul 2017
#define Module_Date_CMHG 09 Dec 2017
#define Module_MajorVersion "2.74"
#define Module_Version 274
#define Module_MajorVersion "2.75"
#define Module_Version 275
#define Module_MinorVersion ""
#define Module_Date "06 Jul 2017"
#define Module_Date "09 Dec 2017"
#define Module_ApplicationDate "06-Jul-17"
#define Module_ApplicationDate "09-Dec-17"
#define Module_ComponentName "HForm"
#define Module_ComponentPath "castle/RiscOS/Sources/Utilities/HForm"
#define Module_FullVersion "2.74"
#define Module_HelpVersion "2.74 (06 Jul 2017)"
#define Module_LibraryVersionInfo "2:74"
#define Module_FullVersion "2.75"
#define Module_HelpVersion "2.75 (09 Dec 2017)"
#define Module_LibraryVersionInfo "2:75"
......@@ -264,9 +264,9 @@ ENDPROC
REM *****************************************************************
DEF PROCGetDriveToUse
LOCAL i%,j%,k%,l%,select%
LOCAL i%,j%,k%,select%
DIM buf% 128
DIM Dev%(256)
DIM Dev%(7)
CASE myfs% OF
WHEN fsnumber_adfs:
......@@ -281,7 +281,7 @@ CASE myfs% OF
select%=Drive%-4:REM Make 0s based
WHEN fsnumber_SCSIFS:
PROCmessage_print_0("DriveList")
l%=0
Dev%()=-1
FOR i%=0 TO 31:REM For each of 8 devices on 4 SCSI cards
SYS"XSCSI_Initialise",2,i%,buf% TO;F%
IF ((F%AND1)=0) AND (?buf%<>&7F) THEN
......@@ -290,29 +290,35 @@ CASE myfs% OF
IF (F%AND1)=1 THEN
k%=&100:REM Nothing attached, exit FOR
ELSE
REM Only consider 'Direct-access' devices
IF ?buf%=0 THEN
REM Type 'Direct-access', get its human readable name
Dev%(l%)=k%
SYS"SCSI_Initialise",3,k%,buf%,128
PRINT STR$~l%+" : ";
SYS"OS_Write0",buf%
SYS"OS_NewLine"
l%+=1
REM Only consider devices SCSIFS knows about
SYS"SCSIFS_Partitions",1,k% TO,,j%
IF j%>=0 AND j%<8 THEN Dev%(j%)=k%
ENDIF
ENDIF
NEXT
ENDIF
NEXT
Dev%(l%)=256
Drive%=-1
SCSIID%=8
IFl%=0 THENPROCmessage_print_0("NoHardDiscs"):PROCfinish
WHILE SCSIID% > l%-1
SCSIID%=FNAsk("DriveAskFddHdd",0,0)
ENDWHILE
SCSIID%=Dev%(SCSIID%)
SYS"SCSIFS_Partitions",1,SCSIID% TO,,Drive%
REM List out devices in SCSIFS order
j%=TRUE
FOR i%=0 TO 7
k%=Dev%(i%)
IF k%<>-1 THEN
REM Get its human readable name
SYS"SCSI_Initialise",3,k%,buf%,128
PRINT "SCSI::";i%;" : ";
SYS"OS_Write0",buf%
SYS"OS_NewLine"
j%=FALSE
ENDIF
NEXT
IFj% THENPROCmessage_print_0("NoHardDiscs"):PROCfinish
SCSIID%=-1
REPEAT
Drive%=FNAsk("DriveAskFddHdd",0,0)
IF Drive%>=0 AND Drive%<8 THEN SCSIID%=Dev%(Drive%)
UNTIL SCSIID%<>-1
select%=Drive%
WHEN fsnumber_SDFS:
REPEAT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment