Commits (4)
  • Jeffrey Lee's avatar
    Avoid unnecessary remainder calculations · 34b861d4
    Jeffrey Lee authored
    Detail:
      s/Backup, s/Format - Avoid unnecessary remainder calculation in DivRem macro
    Admin:
      Tested on Cortex-A15
    
    
    Version 1.09. Tagged as 'ADFSFiler-1_09'
    34b861d4
  • Robert Sprowson's avatar
    Remove use of RESOURCEEXTRA & PRIVATEMSGS · 9a765cd8
    Robert Sprowson authored
    Requires BuildSys-6_91.
    
    Version 1.10. Tagged as 'ADFSFiler-1_10'
    9a765cd8
  • Robert Sprowson's avatar
    Standardise drag-to-iconbar system variable name · 4f75a3b2
    Robert Sprowson authored
    While the behaviour introduced with Ursula whereby files can be dropped on the iconbar filer icon to start a copy/move operation, there is a hidden bit of functionality that you can set an alternative destination directory other than the root.
    This is governed by a system variable, however Acorn's implementation erroneously called this a path, when in fact it's a directory (no trailing dot). RISC OS Ltd fixed this by the time RISC OS 4.00 came along, so this change brings this filer into sync.
    For reference, the variable is "FSTitle + Filer$DefaultDir", where FSTitle can be found by calling OS_FSControl 33. eg. SCSIFiler$DefaultDir SDFSFiler$DefaultDir ADFSFiler$DefaultDir
    
    Version 1.11. Tagged as 'ADFSFiler-1_11'
    4f75a3b2
  • Jeffrey Lee's avatar
    Fix null pointer dereference when building floppy Format menu · fc930421
    Jeffrey Lee authored
    Detail:
      s/ADFSFiler - The commenting out of the MOV R5,#0 line in a previous bug fix left a null pointer dereference in the code when EnumFormats_Flags is checked. Examination of the code suggests the intent was to use the MOV R5,#0 to skip the EnumFormats_Flags check, so modify the preceeding CMP to check for R5=0 or R0=0.
    Admin:
      Tested in Iyonix ROM softload
      Fixes issue #436
      https://www.riscosopen.org/tracker/tickets/436
    
    
    Version 1.12. Tagged as 'ADFSFiler-1_12'
    fc930421
......@@ -22,74 +22,71 @@
# 25-May-94 AMcC Created.
#
COMPONENT ?= ADFSFiler
ROM_SOURCE = s.ADFSFiler
RESOURCEEXTRA = resources_${COMPONENT}
PRIVATEMSGS = yes
COMPONENT ?= ADFSFiler
ROM_SOURCE = s.ADFSFiler
CUSTOMRES = custom
ifeq (${TEMPLATES},yes)
PRIVATETEMPLATES = resources_templates
WANTTEMPLATES = resources_templates
endif
ifeq (${TARGET},ThemeDefs)
CUSTOMSA = custom
CUSTOMEXP = custom
ifeq (${COMPONENT},SCSIFiler)
SUFFIX = S
else
ifeq (${COMPONENT},SDFSFiler)
SUFFIX = SD
endif
endif
ifeq (${TARGET},ThemeDefs)
CUSTOMSA = custom
CUSTOMEXP = custom
install:
${MKDIR} ${INSTDIR}.${USERIF}
| Give the sprites for the requested theme if present
IfThere Resources.SCSI.${USERIF} Then ${CP} Resources.SCSI.${USERIF} ${INSTDIR}.${USERIF}.SCSIFiler ${CPFLAGS}
IfThere Resources.SDFS.${USERIF} Then ${CP} Resources.SDFS.${USERIF} ${INSTDIR}.${USERIF}.SDFSFiler ${CPFLAGS}
@${ECHO} ${COMPONENT}: disc theme resources installed
export:
@${ECHO} ${COMPONENT}: nothing to export when target is ${TARGET}
endif
include StdTools
include AAsmModule
${MERGEDMSGS}::
${MKDIR} ${MERGEDRDIR}.${TARGET}
${TOKENCHECK} LocalRes:Messages${SUFFIX}
${CP} LocalRes:Messages${SUFFIX} $@ ${CPFLAGS}
IfThere LocalRes:CmdHelp${SUFFIX} Then ${TOKENCHECK} LocalRes:CmdHelp${SUFFIX}
IfThere LocalRes:CmdHelp${SUFFIX} Then ${FAPPEND} $@ LocalRes:Messages LocalRes:CmdHelp${SUFFIX}
#
# For all:
#
resources: resources_${COMPONENT} ${MERGEDMSGS} resources_mkdir
${CP} ${MERGEDMSGS} ${RESFSDIR}.Messages ${CPFLAGS}
resources_mkdir:
${MKDIR} ${RESFSDIR}
resources_templates:
${CP} LocalRes:Templates ${RESFSDIR}.Templates ${CPFLAGS}
#
# For ADFSFiler: templates + merged messages, sprites are in the Wimp pool
#
resources_ADFSFiler: resources_templates
${NOP}
@${NOP}
#
# For SCSIFiler: sprites + merged messages, templates shared with ADFS unless requested explicitly
#
resources_SCSIFiler: ${MERGEDMSGS} ${PRIVATETEMPLATES}
${CP} ${MERGEDMSGS} ${RESFSDIR}.Messages ${CPFLAGS}
resources_SCSIFiler: ${WANTTEMPLATES}
${CP} Resources.SCSI.${USERIF} ${RESFSDIR}.Sprites ${CPFLAGS}
#
# For SDFSFiler: sprites + merged messages, templates shared with ADFS unless requested explicitly
#
resources_SDFSFiler: ${MERGEDMSGS} ${PRIVATETEMPLATES}
${CP} ${MERGEDMSGS} ${RESFSDIR}.Messages ${CPFLAGS}
resources_SDFSFiler: ${WANTTEMPLATES}
${CP} Resources.SDFS.${USERIF} ${RESFSDIR}.Sprites ${CPFLAGS}
#
# Static dependencies:
#
o.${MACHINE}._Messages_.ADFSFiler:
${MKDIR} ${MERGEDMDIR}
${TOUCH} $@
IfThere LocalRes:Messages Then ${CP} LocalRes:Messages $@ ${CPFLAGS}
IfThere LocalRes:CmdHelp Then ${TOKENCHECK} LocalRes:CmdHelp
IfThere LocalRes:CmdHelp Then ${CAT} LocalRes:CmdHelp { >> $@ }
o.${MACHINE}._Messages_.SCSIFiler:
${MKDIR} ${MERGEDMDIR}
${TOUCH} $@
IfThere LocalRes:MessagesS Then ${CP} LocalRes:MessagesS $@ ${CPFLAGS}
IfThere LocalRes:CmdHelpS Then ${TOKENCHECK} LocalRes:CmdHelpS
IfThere LocalRes:CmdHelpS Then ${CAT} LocalRes:CmdHelpS { >> $@ }
o.${MACHINE}._Messages_.SDFSFiler:
${MKDIR} ${MERGEDMDIR}
${TOUCH} $@
IfThere LocalRes:MessagesSD Then ${CP} LocalRes:MessagesSD $@ ${CPFLAGS}
IfThere LocalRes:CmdHelpSD Then ${TOKENCHECK} LocalRes:CmdHelpSD
IfThere LocalRes:CmdHelpSD Then ${CAT} LocalRes:CmdHelpSD { >> $@ }
# Dynamic dependencies:
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "1.08"
Module_Version SETA 108
Module_MajorVersion SETS "1.12"
Module_Version SETA 112
Module_MinorVersion SETS ""
Module_Date SETS "20 Feb 2015"
Module_ApplicationDate SETS "20-Feb-15"
Module_Date SETS "26 Mar 2017"
Module_ApplicationDate SETS "26-Mar-17"
Module_ComponentName SETS "ADFSFiler"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/ADFS/ADFSFiler"
Module_FullVersion SETS "1.08"
Module_HelpVersion SETS "1.08 (20 Feb 2015)"
Module_FullVersion SETS "1.12"
Module_HelpVersion SETS "1.12 (26 Mar 2017)"
END
/* (1.08)
/* (1.12)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 1.08
#define Module_MajorVersion_CMHG 1.12
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 20 Feb 2015
#define Module_Date_CMHG 26 Mar 2017
#define Module_MajorVersion "1.08"
#define Module_Version 108
#define Module_MajorVersion "1.12"
#define Module_Version 112
#define Module_MinorVersion ""
#define Module_Date "20 Feb 2015"
#define Module_Date "26 Mar 2017"
#define Module_ApplicationDate "20-Feb-15"
#define Module_ApplicationDate "26-Mar-17"
#define Module_ComponentName "ADFSFiler"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/ADFS/ADFSFiler"
#define Module_FullVersion "1.08"
#define Module_HelpVersion "1.08 (20 Feb 2015)"
#define Module_LibraryVersionInfo "1:8"
#define Module_FullVersion "1.12"
#define Module_HelpVersion "1.12 (26 Mar 2017)"
#define Module_LibraryVersionInfo "1:12"
......@@ -4088,9 +4088,10 @@ BuildFormatMenu ROUT
; If longer than longest so far, update menu header
MOV R14,R1,ASL #4 ; *16
ADD R14,R14,#16 ; +16 = Half a char at each end in OS Units
CMP r5,#0
CMP r5,#0 ; r5=0 if this is the "Current format" entry
CMPNE r0,#0 ; r0=0 if this is the "Other formats" entry
BEQ %FT80
LDR R9,[r0,#EnumFormats_Flags]
LDR R9,[r0,#EnumFormats_Flags] ; Else it must be a format entry, so check which menu it's going in
TST R9,#EnumFormats_IsNative
BEQ %FT81
80
......@@ -4119,6 +4120,7 @@ NextItem
CMP r0,#0
BNE %BT01
; Add the "Other formats" entry
; OSS is_shaded
MOV R1,#mi_it_lastitem ; Menu flags.
......@@ -4141,16 +4143,14 @@ NextItem
ADR r2,OtherFormatsText
MOV r3,#OtherFormatsTextLength
SWI XMessageTrans_Lookup
ADDVS SP,SP,#9 *4 ;r0-r4, r0;
ADDVS SP,SP,#9 *4 ;r0-r7, r0;
Pull "r0-r7",VC
Pull "r1-r6,r11,PC",VS
ADR r9,OtherFormatsText
STR r9,[r3],#4
MOV r1,r9
MOV r2,r3
; ECN - This seems to 0 the menu width for some reason
; MOV r5,#0 ; <<<<< ************************************** ??????????????????
B %BT02 ; Don't zap menu width !
B %BT02 ; Go back around to update menu width
03
; Mark last item as such
......@@ -4519,8 +4519,8 @@ message_datasave
BL strcpy_advance ; do the copy
ADR r2, dotdollar3
BL strcpy_advance ; add a '.$' to the medianame (eg. 'ADFS::Flibble.$.')
MOV r2, #256 ; maximum length for append_dotdefaultpath
BL append_dotdefaultpath ; add '.<ADFSFiler$DefaultPath>' (if it exists)
MOV r2, #256 ; maximum length for append_dotdefaultdir
BL append_dotdefaultdir ; add '.<ADFSFiler$DefaultDir>' (if it exists)
MOV r0, #46
STRB r0, [r1], #1 ; add a '.'
ADR r2, filenamebuffer
......@@ -4584,8 +4584,8 @@ message_dataload
BL strcpy_advance ; copy media name into the message block
ADR r2, dotdollar3
BL strcpy_advance ; add a .$
MOV r2, #256 ; maximum size we'll allow for append_dotdefaultpath
BL append_dotdefaultpath ; Add the value of ADFSFiler$DefaultPath if it exists
MOV r2, #256 ; maximum size we'll allow for append_dotdefaultdir
BL append_dotdefaultdir ; Add the value of ADFSFiler$DefaultDir if it exists
MOV r1, r5 ; location of message data
MOV r2, r6 ; task handle of sender (to send back to)
......@@ -4618,19 +4618,19 @@ message_dataload
ADR r2, dotdollar3
BL strcpy_advance ; add a '.$'
MOV r2, #256
BL append_dotdefaultpath ; Add the value of ADFSFiler$DefaultPath if it exists
BL append_dotdefaultdir ; Add the value of ADFSFiler$DefaultDir if it exists
ADR r0,userdata
SWI XOS_CLI ; Execute command
Pull "pc"
adfsfiler_defaultpath DCB "$FSTitle.Filer$$DefaultPath",0
adfsfiler_defaultdir DCB "$FSTitle.Filer$$DefaultDir",0
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; append_dotdefaultpath
; append_dotdefaultdir
;
; Read value of ADFSFiler$DefaultPath and append it to the path in r1
; Read value of ADFSFiler$DefaultDir and append it to the path in r1
; (ie. does string1 becomes string1.value)
;
; In: r1 -> destination buffer
......@@ -4641,12 +4641,12 @@ adfsfiler_defaultpath DCB "$FSTitle.Filer$$DefaultPath",0
; r2 = corrupted.
; All other regs preserved.
append_dotdefaultpath Entry "r3-r7"
append_dotdefaultdir Entry "r3-r7"
MOV r7, r1
MOV r6, r2
ADR r0, adfsfiler_defaultpath
ADR r0, adfsfiler_defaultdir
MOV r2, #-1
MOV r3, #0
MOV r4, #0
......@@ -4659,7 +4659,7 @@ append_dotdefaultpath Entry "r3-r7"
CMP r0, r6
EXIT GT ; exit if buffer not big enough
ADR r0, adfsfiler_defaultpath
ADR r0, adfsfiler_defaultdir
ADD r1, r7, #1
MOV r2, #256
MOV r3, #0
......
......@@ -743,14 +743,14 @@ ReadTrack
LDR r1, [r8, #bkp_bitdiscsize]
MOV r3,#100
MUL r2,r0,r3
DivRem r0,r2,r1,r14
DivRem r0,r2,r1,r14,norem
; dreg r0," Done %"
LDR r14,[r8, #bkp_MaxFormatBarLength]
MUL r14,r0,r14
MOV r2,#100
DivRem r1,r14,r2,r3
DivRem r1,r14,r2,r3,norem
LDR r0,[r8,#bkp_handle]
MOV r2,#10
BL SetBar
......@@ -1135,14 +1135,14 @@ WriteTrack
LDR r1, [r8, #bkp_bitdiscsize]
MOV r3,#100
MUL r2,r0,r3
DivRem r0,r2,r1,r14
DivRem r0,r2,r1,r14,norem
; dreg r0," (Write) Done %"
LDR r14, [r8, #bkp_MaxFormatBarLength]
MUL r14,r0,r14
MOV r2,#100
DivRem r1,r14,r2,r3
DivRem r1,r14,r2,r3,norem
LDR r0,[r8,#bkp_handle]
MOV r2,#11
BL SetBar
......
......@@ -1004,7 +1004,7 @@ FormatTrack ROUT
LDR r5,[r8,#fw_numberoftracks]
LDR r14,[r8, #fw_MaxFormatBarLength]
MUL r14,r4,r14
DivRem r1,r14,r5,r7
DivRem r1,r14,r5,r7,norem
LDR r0,[r8,#fw_handle]
MOV r2,#11
BL SetBar
......