OMAP3 Changes 5.28 to 5.30
Changes: OMAP3 5.28 to 5.30
Components changed
- RiscOS/Apps/!Perl from Perl-0_04 to Perl-1_52-1-g7d73054a
- RiscOS/Apps/!Prepare from PlingPrepare-0_06 to PlingPrepare-0_07
- RiscOS/BuildSys from BuildSys-7_50-1-gca85c288 to BuildSys-7_99
- RiscOS/Env from Env-1_44 to Env-1_49
- RiscOS/Library from Library-2_04 to Library-2_09
- RiscOS/Sources/Apps/Alarm from Alarm-2_95 to Alarm-2_96
- RiscOS/Sources/Apps/Chars from Chars-2_05 to Chars-2_06
- RiscOS/Sources/Apps/Draw from Draw-1_41 to Draw-1_46
- RiscOS/Sources/Apps/Help2 from Help2-3_26 to Help2-3_27
- RiscOS/Sources/Apps/Paint from Paint-2_37 to Paint-2_54
- RiscOS/Sources/Desktop/Desktop from Desktop-2_77 to Desktop-2_77-1
- RiscOS/Sources/Desktop/DragAnObj from DragAnObj-0_09-2 to DragAnObj-0_10
- RiscOS/Sources/Desktop/Filer from Filer-2_48 to Filer-2_49
- RiscOS/Sources/Desktop/FilerAct from FilerAct-0_62-3-g75233663 to FilerAct-0_64
- RiscOS/Sources/Desktop/Filter from Filter-0_29-1-gfc7abb71 to Filter-0_30
- RiscOS/Sources/Desktop/Pinboard from Pinboard-1_05 to Pinboard-1_07
- RiscOS/Sources/Desktop/ShellCLI from ShellCLI-0_37 to ShellCLI-0_39
- RiscOS/Sources/Desktop/Switcher from Switcher-1_53 to Switcher-1_54
- RiscOS/Sources/Desktop/TaskWindow from TaskWindow-0_81 to TaskWindow-0_85
- RiscOS/Sources/Desktop/Wimp from Wimp-5_80 to Wimp-5_87-1
- RiscOS/Sources/FileSys/ADFS/ADFS from ADFS-3_55 to ADFS-3_56-1
- RiscOS/Sources/FileSys/ADFS/ADFSFiler from ADFSFiler-1_15 to ADFSFiler-1_16
- RiscOS/Sources/FileSys/CDFS/CDFSFiler from CDFSFiler-2_52 to CDFSFiler-2_53
- RiscOS/Sources/FileSys/FSLock from FSLock-1_25 to FSLock-1_26-1
- RiscOS/Sources/FileSys/FileCore from FileCore-3_75-1-g04030b45 to FileCore-3_78
- RiscOS/Sources/FileSys/FileSwitch from FileSwitch-2_87-1-gdc166065 to FileSwitch-2_92
- RiscOS/Sources/FileSys/ImageFS/DOSFS from DOSFS-1_14-1-g774c67f3 to DOSFS-1_15
- RiscOS/Sources/FileSys/PipeFS from PipeFS-0_24 to PipeFS-0_25
- RiscOS/Sources/FileSys/RAMFS/RAMFS from RAMFS-2_32 to RAMFS-2_33
- RiscOS/Sources/FileSys/SDFS/SDFS from SDFS-0_10-1-ge51e62d5 to SDFS-0_12
- RiscOS/Sources/HAL/HAL_OMAP3 from HAL_OMAP3-1_20 to HAL_OMAP3-1_20-1-g1beb79aa
- RiscOS/Sources/HWSupport/FPASC from FPASC-4_37-1-g6a0dd699 to FPASC-4_39-1
- RiscOS/Sources/HWSupport/GPIO from GPIO-1_00-1_11_2_5 to GPIO-1_00-1_11_2_5-1-g7d387037
- RiscOS/Sources/HWSupport/SD/SDCMOS from SDCMOS-0_20 to SDCMOS-0_21
- RiscOS/Sources/HWSupport/SD/SDIODriver from SDIODriver-0_16 to SDIODriver-0_20
- RiscOS/Sources/HWSupport/Serial from Serial-0_47 to Serial-0_48
- RiscOS/Sources/HWSupport/Sound/Sound1 from Sound1-1_42 to Sound1-1_43-1
- RiscOS/Sources/HWSupport/Sound/Sound2 from Sound2-1_33 to Sound2-1_34
- RiscOS/Sources/HWSupport/Sound/Voices/Percussion from Percussion-1_18 to Percussion-1_19
- RiscOS/Sources/HWSupport/Sound/Voices/StringLib from StringLib-1_19 to StringLib-1_20
- RiscOS/Sources/HWSupport/SystemDevs from SystemDevs-1_33 to SystemDevs-1_34
- RiscOS/Sources/HWSupport/USB/USBDriver from USBDriver-1_31 to USBDriver-1_32-1
- RiscOS/Sources/HWSupport/VFPSupport from VFPSupport-0_13 to VFPSupport-0_18
- RiscOS/Sources/Internat/IntKey from IntKey-0_99 to IntKey-1_00-1-gbf1678de
- RiscOS/Sources/Internat/Inter from Inter-1_69-1-g08cc6462 to Inter-1_70
- RiscOS/Sources/Internat/Territory/TerritoryManager from Manager-0_57 to TerritoryManager-0_58
- RiscOS/Sources/Internat/Territory/TerritoryModule from Module-0_63 to TerritoryModule-0_64-1
- RiscOS/Sources/Kernel from Kernel-6_43-1 to Kernel-6_70-2
- RiscOS/Sources/Lib/AsmUtils from AsmUtils-0_19 to AsmUtils-0_21
- RiscOS/Sources/Lib/DebugLib from DebugLib-0_72 to DebugLib-0_73
- RiscOS/Sources/Lib/OSLib from OSLib-6_90-1 to OSLib-6_90-2
- RiscOS/Sources/Lib/RISC_OSLib from RISC_OSLib-6_08 to RISC_OSLib-6_23
- RiscOS/Sources/Lib/SyncLib from SyncLib-0_05 to SyncLib-0_07
- RiscOS/Sources/Lib/TCPIPLibs from TCPIPLibs-5_69 to TCPIPLibs-5_78
- RiscOS/Sources/Lib/UnicodeLib from Unicode-0_63-1-gf47d7578 to Unicode-0_63-2-g1b8b080f
- RiscOS/Sources/Lib/remotedb from remotedb-0_12 to remotedb-0_12-1-gc06162f1
- RiscOS/Sources/Networking/AUN/Access/Freeway from Freeway-0_41 to Freeway-0_42
- RiscOS/Sources/Networking/AUN/Access/ShareFSBlob from ShareFSBlob-3_60 to ShareFSBlob-3_62-1
- RiscOS/Sources/Networking/AUN/Internet from Internet-5_65 to Internet-5_67
- RiscOS/Sources/Networking/AUN/Net from Net-6_26 to Net-6_27
- RiscOS/Sources/Networking/DHCP from DHCP-0_27 to DHCP-0_27-1
- RiscOS/Sources/Networking/Econet from Econet-5_80-1-g691d0361 to Econet-5_81
- RiscOS/Sources/Networking/Ethernet/EtherUSB from EtherUSB-0_42 to EtherUSB-0_44
- RiscOS/Sources/Networking/NetStatus from NetStatus-2_09 to NetStatus-2_09-1
- RiscOS/Sources/Networking/Omni/Protocols/OmniLanManFS from OmniLanManFS-2_66 to OmniLanManFS-2_70
- RiscOS/Sources/Networking/ResolverBlob from Resolver-0_72-2 to ResolverBlob-0_74
- RiscOS/Sources/Programmer/BASIC from BASIC-1_81 to BASIC-1_85
- RiscOS/Sources/Programmer/BootCmds from BootCmds-1_49-1 to BootCmds-1_53
- RiscOS/Sources/Programmer/Debugger from Debugger-2_07-1-g4ffc3ea2 to Debugger-2_08
- RiscOS/Sources/Programmer/HdrSrc from HdrSrc-2_91 to HdrSrc-3_05
- RiscOS/Sources/Programmer/HostFS from HostFS-0_02-4_2_2_1 to HostFS-0_04
- RiscOS/Sources/Programmer/Obey from Obey-0_40 to Obey-0_41
- RiscOS/Sources/Programmer/RTSupport from RTSupport-0_17-1 to RTSupport-0_18
- RiscOS/Sources/Programmer/Squash from Squash-0_30 to Squash-0_31
- RiscOS/Sources/SystemRes/InetRes from InetRes-5_77 to InetRes-6_07
- RiscOS/Sources/Toolbox/ColourDbox from ColourDbox-0_22 to ColourDbox-0_23-1-g1f71f18f
- RiscOS/Sources/Toolbox/ColourMenu from ColourMenu-0_23 to ColourMenu-0_23-1-g0ebd1df1
- RiscOS/Sources/Toolbox/DCS from DCS-1_14 to DCS-1_14-1-g903311eb
- RiscOS/Sources/Toolbox/FileInfo from FileInfo-0_21 to FileInfo-0_21-1-g85327f1c
- RiscOS/Sources/Toolbox/FontDbox from FontDbox-0_19 to FontDbox-0_19-1-gde1f3adf
- RiscOS/Sources/Toolbox/FontMenu from FontMenu-0_26 to FontMenu-0_26-1-g2996b917
- RiscOS/Sources/Toolbox/Gadgets from Gadgets-0_44 to Gadgets-0_45-1-gbcc89530
- RiscOS/Sources/Toolbox/IconBar from IconBar-1_23 to IconBar-1_23-1-gda3bfcef
- RiscOS/Sources/Toolbox/Menu from Menu-0_40 to Menu-0_42
- RiscOS/Sources/Toolbox/PrintDbox from PrintDbox-0_18 to PrintDbox-0_18-1-g1b2c91be
- RiscOS/Sources/Toolbox/ProgInfo from ProgInfo-0_19 to ProgInfo-0_19-1-g50d7b5ca
- RiscOS/Sources/Toolbox/SaveAs from SaveAs-0_21 to SaveAs-0_21-1-gc7132cfd
- RiscOS/Sources/Toolbox/Scale from Scale-0_16 to Scale-0_18-1-g053eadbd
- RiscOS/Sources/Toolbox/ToolAction from ToolAction-0_38 to ToolAction-0_38-1
- RiscOS/Sources/Toolbox/Toolbox from Toolbox-1_59 to Toolbox-1_60
- RiscOS/Sources/Toolbox/ToolboxLib from ToolboxLib-1_18 to ToolboxLib-1_21
- RiscOS/Sources/Toolbox/Window from Window-1_80 to Window-1_81
- RiscOS/Sources/Toolbox/tboxlib from Common-0_26-1 to tboxlib-0_29
- RiscOS/Sources/Video/Render/Colours from Colours-1_95 to Colours-1_97
- RiscOS/Sources/Video/Render/DrawFile from DrawFile-1_60 to DrawFile-1_62
- RiscOS/Sources/Video/Render/Fonts/ROMFonts from ROMFonts-0_77 to ROMFonts-0_78
- RiscOS/Sources/Video/Render/SprExtend from SprExtend-1_84 to SprExtend-1_86-1-gf0ed23f7
- RiscOS/Sources/Video/Render/Super from Super-0_16 to Super-0_16-1-g5cb068cf
- RiscOS/Sources/Video/UserI/Picker from Picker-0_56-2-g2ddd12e7 to Picker-0_59
- RiscOS/Utilities/Autobuild/ABRelease from ABRelease-1_00 to ABRelease-1_12
Components added
- RiscOS/Sources/Lib/SDIOLib version SDIOLib-0_03
- RiscOS/Sources/Video/Render/CompressPNG version CompressPNG-0_07-1
Components removed
- RiscOS/Sources/HWSupport/NVRAM version 1602de9b
- RiscOS/Sources/HWSupport/PortMan version 046e26de
- RiscOS/Sources/Printing/Modules/MakePSFont version 8a046b89
- RiscOS/Sources/Printing/PDumpers version 694bec64
- RiscOS/Sources/Programmer/DDTHdr version e93e977d
Full Change Logs
Logs for RiscOS/Apps/!Perl from Perl-0_04 to Perl-1_52-1-g7d73054a
!Perl binary updated
Admin: From Perl-1_52 built with cc 5.86 in the Disc environment. Tagged as 'Perl-1_52'
Correct reformatting of one Perl module
During the import to Git from CVS in 2019, some files (including the one affected here) were accidentally reformatted, on the assumption that they were Makefiles, to use leading tabs for indents. This has no functional effect in this case, but it is still desirable to restore the formatting to its original style. If you wish to obtain a version of any earlier commit with this correction applied, first check that commit out, then either git cherry-pick <this commit> which will create a new commit with the correction applied, or git checkout <this commit> Lib/ExtUtils/pm/MakeMaker,102 which will only update your working tree and the index.
Logs for RiscOS/Apps/!Prepare from PlingPrepare-0_06 to PlingPrepare-0_07
Accept SetPaths or SetPaths32 during transition
Before warning the tools are missing, check both old and new system variables. Ref: https://www.riscosopen.org/forum/forums/4/topics/16630 Version 0.07. Tagged as 'PlingPrepare-0_07'
Logs for RiscOS/BuildSys from BuildSys-7_50-1-gca85c288 to BuildSys-7_99
Add RMVersion
To CTools, for Installer, fixes build as for BuildSys-7_48. Version 7.51. Tagged as 'BuildSys-7_51'
Fix to module-wrapped LIBS SYMS
Exercising the new library/symbols selector on a more complex case (Help2) showed that the selection never triggered, because where it is placed ${RLIB} is unset. Move the test to after ModuleLibs/AppLibs are set, and invert the sense (it should have been ifneq). Version 7.52. Tagged as 'BuildSys-7_52'
Set component type of Help2
Help2-3_27 now uses the CApp shared makefile. Version 7.53. Tagged as 'BuildSys-7_53'
Change component type of Obey and ShellCLI
Detail: ModuleDB updated to make Obey and Shell as 'C' for ROM builds Version 7.54. Tagged as 'BuildSys-7_54'
Add CompressPNG to ModuleDB & Disc
Version 7.55. Tagged as 'BuildSys-7_55'
Rename INCLUDE_OSLIB to OSINC
Build !SDCreate from sources in CTools
Version 7.56. Tagged as 'BuildSys-7_56'
Add NetMonitor to the bonus binaries
Save 32k of ROM in IOMD
Requires Env-1_46
Build !CreateSEC from sources in CTools
Add Player to ModuleDB & BonusBin
Add CompressPNG to ROMs for header exports for Paint
For iMx6, remove DDEUtils to match the other ROMs (it's in the HardDisc4 image). Version 7.57. Tagged as 'BuildSys-7_57'
Add MBEDTLS definitions to GNU make versions of AppLibs and ModuleLibs, to match BuildSys-7_31
Split library include paths into separate included Makefile
This de-duplicates some of the information from AppLibs and ModuleLibs, which now include the new Makefile fragment in order to ensure compatibility. It also means that the definitions can be used for building other library components, which by definition do not perform a link step, without having to choose either AppLibs or ModuleLibs when most of either one is unused for a library build.
Allow components using CLibrary shared Makefile to specify additional exports
Occasionally, a library needs to export additional files that don't live in either an h or hdr directory and (when cross compiling) shouldn't have a .h suffix added to their exported version. A typical example would be where the licence conditions of the library require a licence header to be attached to all copies. To achieve this, CLibrary now uses EXPORTS in a similar manner to how AAsmModule does, simply as a dependency of export_hdrs, which can expand to any additional targets you need to define. By default, it overrides the internal targets EXPORTING_HDRS and EXPORTING_ASMHDRS (derived from HDRS and ASMHDRS supplied by the master makefile), but you can always include them in your definition of EXPORTS if desired.
Support application and module targets with differing compiler flags
Typically useful for libraries where you have both types of target, and you want the application build to contain function names (for meaningful backtraces) but the module build not to (to save ROM space). This is achieved as follows: * CAPPFLAGS and CMODFLAGS contain additional flags to be passed to application and module builds, respectively * C_FNAMES is initialised to a compiler-agnostic build switch to enable function names in the binary Therefore a master makefile will often use the line CAPPFLAGS = ${C_FNAMES} although CAPPFLAGS and CMODFLAGS are not limited to this usage.
Define cross-platform specifier for -ITCPIPLibs:
Use `${TCPIPINC}` instead. Although there is only a single directory on TCPIPLibs$Path, all ported BSD sockets code assumes their headers are already directly on the include path.
Define cross-platform specifier for -Itbox:
Use `${TBOXINC}` instead.
Define cross-platform specifiers for 7 additional library includes
TCPIPLibs export rpc_data(zm) is an object file not a library
Fix merging of CmdHelp/Messages files when cross-compiling
Define Tokenise tool for cross-compilation
There are at least 19 components that use this tool to autogenerate a source file. Needs initial capitalisation on case-sensitive filesystems.
Permit makefiles using CLibrary to cross-compile `export` target
This brings it into line with AAsmModule and CModule shared makefiles
Define SUFFIX_PERL
This allows Perl files with filetype 102 to be referenced identically whether native or cross-compiling (it expands to an empty string when used natively).
Document TOKHELPSRC and related inputs to AAsmModule makefile fragment
Add tokenised help file functionality to `CModule`
`TOKHELPSRC`, `HELPSRC` and `TOKENS` have the same meaning as in `AAsmModule`. Because `CModule`, unlike `AAsmModule`, can build a binary from multiple linked object files, it is also necessary to specify which object file(s) depend on the autogenerated source file. This is achieved with the new input variable `TOKHELPDEPENDS`. This defaults to `OBJS` which in turn defaults to `TARGET`, which should mean that any components converted from `AAsmModule` will not require any such line to be specified in their master makefile. Requires RiscOS/Sources/Programmer/Debugger!4
Define PARENT
This allows makefiles to refer to the parent directory in an OS-neutral way.
Compatibility fix for amu < 5.32
Earlier versions couldn't cope with RES_OBJ being set to an empty string.
Tweak definition of `${MAKE}` when cross-compiling
When executing the makefile from within the `objs` directory, this now includes an implicit `-C..` option. This makes it simpler to write agnostic makefiles. For example, ${MAKE} -f other${EXT}mk other_target rather than ifeq (,${MAKE_VERSION}) ${MAKE} -f other/mk other_target else ${MAKE} -f ../other.mk other_target endif
Add a few definitions required to cross-compile TerritoryManager
Correct capitalisation of AsmUtilszm library
Allow cross-compile C++FLAGS to be inherited from environment
Occasionally, it is useful to be able to set C++FLAGS from the calling environment, for example when building a 32-bit x86 target from a 64-bit x86-64 host. This works fine for CFLAGS and LDFLAGS, but C++FLAGS is not a valid Posix environment variable name. Import setting from CXXFLAGS instead when cross-compiling.
Pass `-tgcc` to `cmunge`
This tells it to use gcc for preprocessing the CMHG file (if enabled) and asasm for the backend (which means the object file is an ELF file, required in order to link with GCC objects).
Always implicitly include StdTools when cross-compiling
`AAsmModule`, `CApp`, `CLibrary` and `CModule` implicitly include various other shared makefile fragments to permit simpler master makefiles. However, when cross-compiling, they were only included when invoked from within the `objs` subdirectory, which in particular meant you couldn't rely on any of the definitions from `StdTools` when extending the `clean` rule unless you explicitly included it from the master makefile, thereby defeating the purpose of the implicit inclusion. Change them so that `StdTools` is included for all rules.
Define `export` rule for `CApp` shared makefile
With GNU `make` unlike with `amu`, it is considered an error to make a target for which no rule is defined. Therefore we need an explicit no-op `export` rule in the cross-compiling `CApp` makefile.
Support links for extension-less files in subdirectories
This only applies to cross-compilation builds. The `make links` rules don't know a pre-determined list of subdirectories that need to be converted into filename extensions. Instead, files that should have no filename extension are usually simply identified by the absence of a `/` in their specification in `SOURCES_TO_SYMLINK`. However, this is insufficient to handle some rarer cases, such as a `Makefile` within a `Test` subdirectory. To handle this, we introduce explicit support for specifying such files in `SOURCES_TO_SYMLINK`, using a double slash where there would otherwise be a filetype subdirectory name, such as `Test//Makefile`. (Conveniently, this is also valid Posix filename syntax anyway.) The way this is achieved is to tweak the regular expressions to require the directory and leafnames between slashes to be at least one character long. Version 7.58. Tagged as 'BuildSys-7_58'
Implement stripdepnd for cross-compilation use
Define SUFFIX_DATA
This allows RISC OS abstract data files with filetype ffd to be referenced identically whether native or cross-compiling (it expands to an empty string when used natively).
Fix typo
Missing `$` character before `{LOCALE}` would have caused UK resources to be selected instead of non-UK ones, if anyone were to be doing an internationalised cross-compiled build.
Add Squish to ModuleDB and BuildHost components file
Introduce new shared makefile fragments for BASIC components
The `BasicApp` fragment is analogous to the `CApp` fragment in that it supports both single-file executables and application directories. Rules are included for building any such application directories into ROMs, with files destined for `Resources:$.Resources` being exported to the Messages module during the `resources` phase, and those destinated for `Resources:$.Apps` being built into a position-independent module, so that when the module is killed or unplugged, those files disappear from ResourceFS. Because the module is position-independent, the makefile fragment implements the `install_rom` rule rather than the `rom_link` rule used by `CApp`. This is consistent with how `srcbuild` already installs ROM components listed in the ModuleDB as being of type `BAS`. The other main difference from `CApp` is that there is no compilation or linking step. Tokenisation, crunching and squishing of the (untokenised) source files are roughly analogous to the compilation steps, except that multiple source files are concatenated (if applicable) as the first step. There is also no debug build variant, and so no `debug` rule. Crunching is performed (on native builds) using the `BasCrunch` tool, so if you are converting an existing component which includes its own Command script to perform tokenisation and crunching, this will no longer be needed. Cross-"compilation" is fully suported. This uses the new `toffb` tool for tokenisation (apologies for the wheel-reinvention, but this was developed in ignorance about Steve Fryatt's `Tokenize` tool; `toffb` also does do a more faithful job of replicating BASIC's `CRUNCH` options, so is more useful for ensuring cross-compilation builds remain identical to the native builds). It also uses Matrix Brandy (V1.22.9 or later) to execute Squish (at least RiscOS/Tools/Sources/Squish!1). We pass the new `-nosavepath` option to Squish to ensure that the results are identical for cross-compile builds compared to native ones. However, Squish ignores unrecognised command-line options, so this does not introduce a dependency on a newer Squish tool for native builds. One subtle enhancement over previous makefiles is that we create dynamic dependencies between the crunched-and-squished program and its untokenised source files. Version 7.59. Tagged as 'BuildSys-7_59'
Change detail of `C_EXP_HDR` for CModule clients
This macro is used to define the root directory for exported C header files. Previously, when native-compiling, the default setting, if not otherwise overridden by the master makefile, was `<cexport$dir>.Interface.h`. This is at odds with the cross-compiling case, which defaults to the equivalent string, but without the `h` subdirectory, for obvious reasons. Only one component, DHCP, currently overrides `C_EXP_HDR`, although more will be joining it in the near future. The macro is used internally within rules defined by `CModule`, but a few components also use it within rules in their master makefiles. We hereby change the default value to omit the `h` subdirectory, and permit master makefiles to specify an override value which also omits it (in future it wil be deprecated to include it, and its use will be phased out). There are two reasons for this: 1) It assists with cross-compilation, since the override can then be expressed identically for both native and cross builds. 2) It permits the `.exphdr.h` suffix rule to be re-used when one or more headers need to be exported to a subdirectory of `C_EXP_HDR`, so long as the headers are present at an equivalent subdirectory in the component source tree, and that subdirectory is on `VPATH`. This is because `$<` is set up to include the element of `VPATH` that matched the rule - but this needs to go before the `.h`, not after it. To prepare for this MR, the following must all be merged: * RiscOS/Sources/FileSys/ADFS/ADFS4!2 * RiscOS/Sources/HWSupport/ATA/SATADriver!2 * RiscOS/Sources/HWSupport/SD/SDIODriver!5 * RiscOS/Sources/HWSupport/SPIDriver!1 * RiscOS/Sources/HWSupport/USB/USBDriver!9 Version 7.60. Tagged as 'BuildSys-7_60'
Add a couple of extra exports to Disc build
These make it possible to build softload versions of several extra modules. Requires Products/Disc!8 Version 7.61. Tagged as 'BuildSys-7_61'
Add WimpMan to ModuleDB and Disc and CTools build
Version 7.62. Tagged as 'BuildSys-7_62'
Allow clients of CLibrary to use LibIncludes variables
The comment in LibIncludes mentions libraries that depend on other libraries may find those path variables useful, but since CLibrary doesn't itself include ModuleLibs or AppLibs, they expand as empty. Add LibIncludes. Version 7.63. Tagged as 'BuildSys-7_63'
Simplify debug and CUSTOMSA use
AppLibs/ModuleLibs: DebugLib requires remotedb to link, and both are present, but remotedb requires InetLib and SockLib. Currently client makefiles must specify this, but can't do via DBG_LIBS because of the ordering, so end up having to mess around with LIBS in a conditional. Simplify this by providing the libraries in DEBUGLIBS. CModule: Add a new SA_TARGET_RULE variable so that when CUSTOMSA is in use it is still possible to invoke the standalone build without needing to know about the differences between GNU and native makefiles (one uses 'MyModule,ffa' the other 'rm.MyModule'). This will allow the 5 uses of CModule to be simplified in future, the 5 uses of AAsmModule for CUSTOMSA are just to stop a module being output.
Retire old OSINC alias
Use same names for CExport$Dir and Export$Dir as GNUmakefiles
The CEXPDIR and EXPDIR names are the wild so hang around as aliases until those components are visited. Purely for symmetry add the same to AAsmModule. Version 7.64. Tagged as 'BuildSys-7_64'
Add CDPlayer to the bonus binaries
Version 7.65. Tagged as 'BuildSys-7_65'
Add WebCache and SerialUtils to ModuleDB
Version 7.66. Tagged as 'BuildSys-7_66'
Support Machine=CortexA53
Version 7.67. Tagged as 'BuildSys-7_67'
Add two SDIO-related libraries
Added to Components files for all ROM builds that could, in theory, have WiFi drivers, and to Disc so that softloadable builds are possible. Version 7.68. Tagged as 'BuildSys-7_68'
Create shared makefile for building HALs
This de-duplicates a lot of HAL makefiles, and also allows us to introduce a cross-compilation variant for them all at once. APCS specifiers are deliberately omitted; this is in order to facilitate some HALs linking with libraries compiled to the usual APCS variant without resulting in link-time warnings. Version 7.69. Tagged as 'BuildSys-7_69'
Add SDIODriver header export to Disc build
This facilitates softloadable modules that interface to the SD subsystem (such as pretty much every Linux-derived WiFi driver module since they can't be linked into a ROM) and also permits GitLab CI to build soft-loadable versions of ROM WiFi drivers or SDFS. Version 7.70. Tagged as 'BuildSys-7_70'
Update ModuleDB with PineA64 modules
Add PineA64 components
Version 7.71. Tagged as 'BuildSys-7_71'
Add Tabs and TreeView gadgets to Disc build
Version 7.72. Tagged as 'BuildSys-7_72'
Add VFPSupport to header exports for Disc builds
This is required to resolve softload builds of any component that uses a VFP SWI, for example as part of a CI job. Version 7.73. Tagged as 'BuildSys-7_73'
Add missing components for Browse
Change ImageLib components to type EXP in Browse builds
Version 7.74. Tagged as 'BuildSys-7_74'
Add initial support for HAL & kernel library builds
Extend the CLibrary shared makefile to add support for building HAL and kernel versions of libraries, with 'h' and 'k' suffixes respectively. These are built with stack limit checking & frame pointers disabled, and with RISCOS_HAL and RISCOS_KERNEL defines enabled as appropriate. Note that currently there's nothing done to protect the SB register in HAL builds of libraries, or to deal with references to data sections.
Add RISCOS_ZM assembler variable
This is intended to act as a replacement for the zM variable, which is hard to search for. zM will be removed in 2024.
Add RISCOS_MODULE defines
These go hand-in-hand with the RISCOS_HAL and RISCOS_KERNEL defines, to allow code to identify when it's being built for inclusion in a module.
Attempt to document the different defines
There are a number of different defines/variables which the makefile fragments pass into the compiler/assembler when building code. Add a new document (Makefile.Docs.Defines) which attempts to document them and their intended use. Version 7.75. Tagged as 'BuildSys-7_75'
Movements to make Components files easier to compare
Detail: Move Portable export up in IOMD32 to match Tungsten/S3C2440/S3C6410. Move SCSIFS/PCI to equivalent place in the exports at the top of file. Remove some extra # in separator blocks for Titanium. Admin: Based on a submission from Timothy E Baldwin
Remove unneeded components
Detail: Remove NVRAM/PortManager from builds where unused. Remove MakePSFont/PDumperDM/DDT from ROM builds. For ROMs where some install a component and others only export it, settle on a common place to put the component in the list from a majority vote. Admin: Based on a submission from Timothy E Baldwin BCM2835/BonusBin/BuildEnv/Disc/IOMD32/OMAP3/4/5/PineA64/PlingSystem/Titanium Tungten/iMx6 builds checked. Unmaintained S3C2440/6410/BCM2835Pico not checked.
Add ImageLibJPEG to Disc
Without this ImageLib fails the export libs phase with an error, ideally ImageLib needs fixing so it isn't split in this fashion. No change to build output (the contents of HardDisc4). Version 7.76. Tagged as 'BuildSys-7_76'
rpcgen was migrated to Git
Remove SDCreate, add WinEdit
Detail: SDCreate is now provided in the respective nightly downloads. Offer WinEdit instead as a utility more pertinent to the DDE.
[560] Add DHCP to PlingSystem
Version 7.77. Tagged as 'BuildSys-7_77'
Add XOLIB variable to AppLibs & ModuleLibs
Detail: Also build it for those components which depend on InetRes Admin: Required by InetRes-5_97 and later. Version 7.78. Tagged as 'BuildSys-7_78'
Paint and Draw Disc components edits
Don't use TARGET= for getting the theme sprites, to avoid 2 things overriding it. Don't append !Paint or !Draw for the install path, the shared makefiles does this. Version 7.78. Not tagged
Add Clock to the bonus binaries
Version 7.79. Tagged as 'BuildSys-7_79'
Add Internet 5 variant of rpclib
Admin: Also keep GNUmakefiles in sync by adding ${XOLIB} variables. Version 7.80. Tagged as 'BuildSys-7_80'
Add HostApp makefile fragments
The HostApp fragment is designed to be used for building apps/tools for running on the build host. It's currently fairly basic (just a stripped-down and tweaked version of CApp), but it should be sufficient for most purposes. The main advantage of this over HostTools+CApp (as used previously) is that HostApp will make sure to use the host's version of the CLib stubs, avoiding any incompatibilities between the host and target CLib versions. RISC OS version has been tested with a Disc build (after modifying the relevant HostTools-using components), GNU version is untested. Version 7.81. Tagged as 'BuildSys-7_81'
Change default RAMASMDEFINES to mirror AAsmModule
The AAsmModule shared makefile fragment predefines two assembly variables by default when targeting a softload binary: `standalone` (set to {TRUE}) and `MergedMsgs` (set to the path to the merged `CmdHelp`/`Messages` file). It's reasonably common for components to migrate over time from AAsmModule to CModule; to assist with this process, change the default setting for `RAMASMDEFINES` to match. Once this is merged, the following components could have their Makefiles simplified: Debugger, MakePSFont, NVidia and VFPSupport. Version 7.82. Tagged as 'BuildSys-7_82'
Split out SparkFS into component parts
Version 7.83. Tagged as 'BuildSys-7_83'
Updates to library file defines
* Add symbolic names for ImageLib libraries.
Updates to library include path defines
* Define cross-platform name for ConfigLib header include path. * Undefine `${TCPIPINC}` when building with GCC (as with the standard C headers, the headers in TCPIPLibs conflict with those on the default include path when compiling with GCC. Our TCPIPLibs headers appear to be incompatible with GCC, so resolve the conflict by removing TCPIPLibs from the path).
Add missing phony targets
* Add `standalone` target for CApp makefile clients. This is analogous to `standalone` for CModule clients, and is implemented as an alias for the `all` target. This is useful because cppcheck CI jobs need a consistent way to ensure that all local autogenerated source and header files have been created, so that cppcheck can fully analyse the source code. * Enable install target for cross-compiling CLibrary components. `install` was missing from the list of targets that need to be re-run from within the `objs` subdirectory.
Regularise default SOURCES_TO_SYMLINK
* Add `hdr/*` to `CApp` - such components can use assembly, which might have need for assembly header files. Brings this in line with `CModule`. * Add `c++/*`, `hdr/*`, `VersionNum` and `VersionASM` to `CLibrary`. Brings this in line with `CApp` and `CModule`, means `SyncLib` doesn't need to explicitly add `hdr/*` and `NBLib` doesn't need to explicitly add `c++/*` or `VersionNum`. Strictly speaking, as a special case, `VersionNum` isn't required for `CLibrary` clients, since a copy is always available under `Export` renamed as `LibVersion`, but it's nice to be consistent. * Remove `Resources` from `AAsmModule` - it needs (and already has) special handling because it's a directory rather than a file.
Build SparkFSApp from sources
Version 7.84. Tagged as 'BuildSys-7_84'
Further library type changes
Detail: * Case correct FetchLib's object filename, and prevent applications linking against the module variant * Add SPARKLIB * For CTools - Remove unused Common and NBLib exports - Ensure inetlib/rpclib/unixlib/socklib install phases are run following the makefile changes in TCPIPLibs-5_75
Move SparkFS, reference 9 codec modules
Version 7.85. Tagged as 'BuildSys-7_85'
Fix cross-compile `install` rule for `AAsmModule`
This was accidentally stripping the `,ffa` from the filename at the final copy step.
Enable `CmdHelp` merging rule when `CUSTOMRES=no` and cross-compiling
In the cross-compiling case, a rule is defined targeting `MERGEDMSGS`, which the phony target `resources_cmdhelp` depends on, but the definition is conditional on `CUSTOMRES` not being `custom` or `no`. In a use-case which is believed to be unique to LanManFS, it is required that the resource files not be registered to ResourceFS via the Messages module, but by LanManFS itself, both for RAM and ROM builds, but the merging of `CmdHelp` and `Messages` files is still required. To leverage the `Messages` merging code in `CModule`, re-enable the `MERGEDMSGS` rule when `CUSTOMRES=no` (which is arguably the correct setting for LanManFS) but leave it disabled for `CUSTOMRES=custom` to permit full customisation if required.
Build 6x SparkFS codecs from sources
Version 7.86. Tagged as 'BuildSys-7_86'
Build 2x SparkFS codecs from sources
Version 7.87. Tagged as 'BuildSys-7_87'
Add RealTime to the bonus binaries
Version 7.88. Tagged as 'BuildSys-7_88'
Install CompressPNG as PCompMod
Detail: In order to fit within a 10 letter FileCore limit pre RISC OS 4, shorten the on disc module name following the lead of CompressJPEG (JCompMod). Version 7.89. Tagged as 'BuildSys-7_89'
Add symbolic names for additional compiler warnings
Norcroft's `-We` option suppresses warnings about casts between function pointers and non-function objects. Norcroft's `-Wn` option suppresses warnings about implicit narrowing casts. GCC doesn't have equivalents to these warnings, so they expand to an empty string if that's the selected compiler.
Define SUFFIX_TEMPLATE
This allows RISC OS Wimp template files with filetype fec to be referenced identically whether native or cross-compiling (it expands to an empty string when used natively).
Report errors encountered during version number insertion
The use of ';' between subcommands threw away the status of earlier ones. Replace with '&&'.
Add IZipFS, PPADriverJ, build SparkLzh
CTools: add BootCommands to the developer !System, since its SysMerge script checks for its presence for the X command. Disc: activate SparkLzh to build the Lzh codec from sources. Version 7.90. Tagged as 'BuildSys-7_90'
Change how top-level phony rules are overridden
A common pattern previously in use was for a shared makefile to define a top-level phony rule (the sort of thing that srcbuild or a !Mk file would use as the target to pass to amu) but with a macro expansion within the rule name. This allowed clients to override the rule by assigning any value to the macro. However, this approach makes it relatively difficult for clients to be adapted to support cross-compilation. This is because when cross-compiling, the shared makefiles utilise nested invocations of the make tool in order to facilitate an out-of-tree build directory layout. Therefore, clients need to determine whether they are cross-compiling, and if so, whether they are in the context of the inner or outer make invocation, before they can decide whether or not to redefine the phony target. This can be achieved in as little as 3 extra lines: CURDIR ?= objs ifeq (objs,$(notdir ${CURDIR})) # redefinitions of top-level phony rules placed here endif but this wasn't universally popular. Instead, taking inspiration from INSTTYPE, we can chain from each ${PHONY} rule to a ${PHONY}_custom rule and have the client makefile define the ${PHONY}_custom rule instead. Crucially, in the cross-compiling case, the shared makefile can then take care of ensuring this only happens on the inner make invocation. In summary: When setting `CUSTOMEXP` to `custom`, clients should henceforth * define `export_hdrs_custom` and `export_libs_custom` rather than redefine `export` * define `export_hdrs_custom` rather than redefine `export_hdrs` * define `export_libs_custom` rather than redefine `export_libs` When setting `CUSTOMROM` to `custom`, clients should henceforth * define `install_rom_custom` rather than redefine `install_rom` * define `rom_custom` rather than redefine `rom` * define `rom_link_custom` rather than redefine `rom_link` When setting `CUSTOMSA` to `custom`, clients should henceforth * define `install_custom` rather than redefine `install` * define `standalone_custom` rather than redefine `standalone` `CUSTOMDBG` and `CUSTOMGPA` are now removed. These were not being used by any client makefiles, but it seems probable that the rules they related to (`debug` and `gpa_debug` respectively) would have needed overriding in precisely the same circumstances as `install` and `standalone`, so in future `CUSTOMSA` should be used for these also. Version 7.91. Tagged as 'BuildSys-7_91'
Fix 'install_rom' rule for 'HAL'
Detail: Since srcbuild treats HAL type components as "not C" during the install ROM phase, yet the HAL fragment inherits most of its rules from CModule, there's no install_rom rule to override (as there is with AAsmModule, for example) so no need to suffix it with ${CUSTOM_ROM}. This was preventing the link and copy step for clients of the HAL fragment. Version 7.91. Not tagged
Assorted ModuleDB changes
Detail: * MakeInstrument and MakeInstrumentApp added * Relocate MIDIPlayer * Split ARLib to produce two targets * Add entry for 310Support Version 7.92. Tagged as 'BuildSys-7_92'
Add MakeIns to bonus binaries and 310Support to PlingSystem
Detail: Adds !MakeIns MIDI app from ESP. Build 310Support from recently discovered sources. Version 7.93. Tagged as 'BuildSys-7_93'
Fix ModuleDB path for PPADriverJ
Path for PPADriverJ had an extra "RiscOS" prefix meaning builds adding it to their Components file would fail. Version 7.93. Not tagged
Build 1x SparkFS codec from sources
Version 7.94. Tagged as 'BuildSys-7_94'
Add ARLib to Disc and BonusBin
Also add application library variables by which they may be referred. Version 7.95. Tagged as 'BuildSys-7_95'
Add ARWork, ARPlayer, and AREncode to BonusBin
Version 7.96. Tagged as 'BuildSys-7_96'
Add NVMeFS/Filer/Driver to ModuleDB
Also add NVMeFS header to Disc build for swis.h (required by HForm). Version 7.97. Tagged as 'BuildSys-7_97'
Add NVMeDriver header exports to the Disc build
Also remove KeyWatch (not required by Disc or BuildEnv for swis.h generation). Version 7.98. Tagged as 'BuildSys-7_98'
Line up PineA64 components with the other platforms
Version 7.99. Tagged as 'BuildSys-7_99'
Logs for RiscOS/Env from Env-1_44 to Env-1_49
Backfill missing cross-compilation Env files
Change format of APCS specifier to asasm
It appears that recent versions have moved to a more standardised syntax, matching other tools.
Define AMUMACHINE when cross-compiling
This environment variable is required by srcbuild.
Define HDR_PATH
This variable allows cross-compiling asasm to parse file specs with a `Hdr:` prefix. This facility should be mirrored in cross-compiling objasm soon. Version 1.45. Tagged as 'Env-1_45'
Save 32k of ROM in IOMD
Requires HdrSrc-2_94 Version 1.46. Tagged as 'Env-1_46'
Improvements to `!Common.sh` script (for cross-compiling)
* `make` is changed from an alias to a function. This allows many CI scripts to be simplified, since they will no longer require `shopt expand_aliases`. It also allows us to be `source`d from within a subshell, when alias definitions have no effect, which is useful in certain special cases. * `mk` function now uses `trap` to clean up whatever the manner in which it is exited. It also runs in `-e` mode (and uses an OR operator to avoid `grep` failures being considered fatal) so that `mk` behaves the same, whether the calling shell was in `-e` mode or not. (This is useful because CI scripts are run in `-e` mode by default.) * `mk` now builds the `make` arguments using an array, to avoid any issues with special characters in any of the strings used. * Now passes ShellCheck tests. * Set correct tool options for cross-compiling Raspberry Pi ROMs (reflects addition of `Machine=RPi` from Library-1_76). Version 1.47. Tagged as 'Env-1_47'
Add PineA64 envfile
Version 1.48. Tagged as 'Env-1_48'
Set Build$HostLibs
Required by the HostApp makefile fragment, to allow it to find the host versions of CLib/C++Lib that were installed by InstallTools
Update SharedUnixLibrary RMEnsure to 1.14
GCC 4.7.4r3 ships with 1.14, but it only appears to RMEnsure 1.12. Bump our RMEnsure up to 1.14 just in case it really does need the newer version.
Clean up !Common,feb a bit
Delete a few commented out lines that appear to relate to pre-2008 versions of the file. Version 1.49. Tagged as 'Env-1_49'
Logs for RiscOS/Library from Library-2_04 to Library-2_09
Rename variable
Use SetPaths$Dir, but during a transition period still allow SetPaths32$Dir from older issue DDEs. Version 2.05. Tagged as 'Library-2_05'
Tidy docs
Detail: Remove old copies of amu/cc/cmhg/resgen docs, see Documents.DDE.ChangeLogs for the maintained copies. xpand is now a component in its own right, point the docs there.
Resqueeze stripdepnd/chmod
Admin: Using squeeze 5.13, so RISC OS 6 doesn't refuse to expand them with AIF checking enabled.
Updated srcbuild binary
Admin: srcbuild-0_58 built with cc 5.86. Version 2.06. Tagged as 'Library-2_06'
Support Machine=CortexA53
Version 2.07. Tagged as 'Library-2_07'
Install host versions of CLib & C++Lib
Update InstallTools to install the host versions of CLib & C++Lib (headers & libraries) in Library.Acorn.HostLibs. This will provide the HostTools makefile (& friends) access to them, shielding them against any incompatibilities between (e.g.) the host CLib stubs and the target CLib stubs. Version 2.08. Tagged as 'Library-2_08'
Correct corruption of one tokenised BASIC file
During the import to Git from CVS in 2019, some files (including the one affected here) were accidentally reformatted, on the assumption that they were Makefiles, to use leading tabs for indents (if you interpret it as ASCII text). In a tokenised BASIC file like this one, this is a syntax error. If you wish to obtain a version of any earlier commit with this correction applied, first check that commit out, then either git cherry-pick <this commit> which will create a new commit with the correction applied, or git checkout <this commit> Build/Make8Bit,ffb which will only update your working tree and the index. Version 2.08. Not tagged
Updated romlinker binary
Admin: romlinker-0_07 built with cc 5.91. Version 2.09. Tagged as 'Library-2_09'
Logs for RiscOS/Sources/Apps/Alarm from Alarm-2_95 to Alarm-2_96
Modernise build structure
Detail: * Rewrite `Makefile` to use shared makefile fragments * Uses `modgen` to create the !Alarm module, which obsoletes some source files * Rename a couple of resource files to match their names when installed * All the files in `Resources:$.Apps.!Alarm` are now registered by the !Alarm module, so you can kill or unplug the module to hide it * The `Code` blob used to be installed in ResourceFS both by the Messages module and by the !Alarm module - now de-duplicated (only in Messages) * Consolidate `.gitignore` files * Enable GitLab CI Admin: Requires BuildSys-7_59 Version 2.96. Tagged as 'Alarm-2_96'
Logs for RiscOS/Sources/Apps/Chars from Chars-2_05 to Chars-2_06
Fix crash on systems without Unicode font support
Version 2.06. Tagged as 'Chars-2_06'
Logs for RiscOS/Sources/Apps/Draw from Draw-1_41 to Draw-1_46
Fix for multiple column text area scaling
Detail: With the D option for more than 1 column, text areas need the handler for scaling, which was removed in Draw-1_39. Put it back. Admin: From an investigation by David Pitt. Ref https://www.riscosopen.org/forum/forums/4/topics/16556 Version 1.42. Tagged as 'Draw-1_42'
Intermediate Makefile install phase
Detail: In order to unblock some other changes in BuildSys adapt the Makefile to key off INSTTYPE for theme install, and for INSTDIR to be the dir in which !Draw is installed.
Retire unmaintained DXF support
Recognising that very few DXF files load faithfully (without error, and where the image is correct) remove the importer from the core application - this code could be further developed as an external helper along with other vector formats such as PostScript and SVG. As support for ctl was dropped a long time ago also remove debug !Draw.Control. Following !Paint's example, the disc copy of the application includes a minimal set of !Sprites and !Sprites22 taken from the Morris4 theme. Version 1.43. Tagged as 'Draw-1_43'
Fix debug build and add Reporter support
Detail: This also makes !Make and !Debug work again. There is a new !Debug option; "*Set Trace$To r" will output to Reporter.
Paste from menu inserts where pointer was when main menu opened
Detail: Ctrl-V still pastes wherever pointer is, even if outside window. Admin: Reported on forum, https://www.riscosopen.org/forum/forums/4/topics/16632 Version 1.44. Tagged as 'Draw-1_44'
Use constants from HdrSrc to define draw_tagtyp
To define the enum values for draw_tagtyp, use the constants defined in Global/DrawObj.h
Save y-spacing, subdivision for rect. grid, and colour too
Detail: Write out a new object type so that all the grid options are retained. Doc/Grid - describe new object type DrawCheck.c - copy existing draw_OPTIONS entries DrawFileIO.c - functions to read and write new object type. If not present, will fall back to using a square grid. Admin: Ticket #295 Version 1.45. Tagged as 'Draw-1_45'
Correct mangling of test programs
Four of the test programs were always BASICTxt (i.e. ASCII) files, but assigned filetype FFB (which is intended only for tokenised BASIC). Whenever these files have had licence headers inserted (both prior to initial release under the Castle shared source licence, and again when they were relicensed to Apache) the headers were inserted as though they were tokenised BASIC, resulting in an unusable file. Correct this by changing the filetype to FD1 and replacing the licence header with an ASCII version. This also requires a minor update to .gitattributes to inform GitLab that they are still BASIC files. If you wish to obtain a version of any earlier commit with this correction applied, first check that commit out, then either git cherry-pick <this commit> which will create a new commit with the correction applied, or git checkout <this commit> .gitattributes git checkout <this commit> Test/FontTest3,fd1 git checkout <this commit> Test/TestPDriv+,fd1 git checkout <this commit> Test/fonttest,fd1 git checkout <this commit> Test/fonttest2,fd1 git rm Test/FontTest3,ffb git rm Test/TestPDriv+,ffb git rm Test/fonttest,ffb git rm Test/fonttest2,ffb which will only update your working tree and the index. Version 1.45. Not tagged
[577] Fix for autoscroll of tools pane
In the template 'pane' minimise the work area so it can't autoscroll.
[582] Fix for abort when parsing font size near end of slot
When text is loaded into a diagram, and that text happens to be near the end of the Wimp slot, and there's no intervening 0 byte (Draw text areas use \n as terminators), then when getting the font size the call to strtod() could abort in a hidden library call to strlen() when it scans forwards looking for a terminator. Much of the time you'd get away with it if the previous use of that page happened to contain a 0 byte. Play it safe and copy the text to convert to a buffer before using the C library functions. The conversion buffer is set to be larger than the longest possible value, rather than clipping the text exactly, so that LONG_MAX and HUGE_VAL can be returned in the error case. Version 1.46. Tagged as 'Draw-1_46'
Logs for RiscOS/Sources/Apps/Help2 from Help2-3_26 to Help2-3_27
Makefile recreated from fragments
Now it executes in place from ROM, reduce the wimpslot accordingly. Add a VersionASM, AppName.s, ResFiles.s (needed by modulewrap.s). Change references to Toolbox headers to use explicit paths in the #includes. Requires RiscOS/BuildSys!28. Version 3.27. Tagged as 'Help2-3_27'
Logs for RiscOS/Sources/Apps/Paint from Paint-2_37 to Paint-2_54
Don't release the clipboard when caret claims go past
Detail: Look at the Message_ClaimEntity flags and only release the clipboard if it's a clipboard claim, not if the caret flags are set. Version 2.38. Tagged as 'Paint-2_38'
Add PNG and JPEG output options
Detail: Alongside the familiar Sprite save box, there are now options to convert to PNG or JPEG too. Both exporters offer (simplified) sub options to determine the compression level. Export is disabled in the event that the supporting modules CompressJPEG or CompressPNG are missing. Updated interactive help messages and menus, templates for the new save as dialogues. Admin: Submission for PNG bounty. Version 2.39. Tagged as 'Paint-2_39'
Remove dead variable
Fixes for failure to export some sprites as PNG
Detail: Buffer overflow fix for certain 24bpp + alpha sprites Ref: https://www.riscosopen.org/forum/forums/8/topics/2146?page=24#posts-121254 Attempt to write invalid output when 8bpp paletted + alpha sprite, 8bpp with per-pixel alpha is not a combination PNG allows, so this is now upscaled to 24bpp + alpha first Ref: https://www.riscosopen.org/forum/forums/5/topics/16425?page=1#posts-121264 Admin: Submission for PNG bounty. Version 2.40. Tagged as 'Paint-2_40'
Ensure latest support module
Add export handlers for RGB sprite types
Detail: Missing handlers for RGB (versus BGR) sprites. Fix for dropping of rightmost column in some 1bpp test sprites. Improve colour dynamic range exported for 4k/32k/64k images (no longer shifts in 0's). Admin: Submission for PNG bounty.
Save time & space in export converters
Detail: Precalculate the source and destination pixel addresses at the top of the loop. Combine BGR and RGB for 16bpp sprites by means of a component swap at the output step. Together, saves approx 300 bytes, and lots of repeated address calculations. Actively reject non-RGB family sprites; Paint doesn't support these more generally. Version 2.41. Tagged as 'Paint-2_41'
Brush tool enhancements
Detail: A visual brush 'palette' now makes it easy to see the internal shapes or chosen sprite. More clear brush tool window layout. Adds an opacity slider. Tint of a sprite using the currently selected colour using a ColourTrans transfer function. Use alpha channel sprite as the brush sprite. Fix to colours_entry() in Colours.c for 16M colour sprites. Notes - The non-100% opacity features are disabled if supporting modules are missing/too old. Translucent painting is performed into an off screen buffer, then the result merged onto the sprite once the mouse is idle. Admin: Submission for Paint bounty. Version 2.42. Tagged as 'Paint-2_42'
Brush pane tweaks
Detail: Hide the scrollbar under the brushes if the pane is narrow enough to show all. Remove excess space after interactive help token.
Fix for cancelling a scale/shear still going ahead with the operation
Detail: The shortcuts F4 (Scale X), Shift-F4 (Scale Y) and Ctrl-H (Shear) could not be cancelled. Pressing ESC (or clicking outside the window) performs the action as if you had pressed Enter, which is not the case if reached via the menus. Admin: Ref: https://www.riscosopen.org/forum/forums/4/topics/16541#posts-124210 Version 2.43. Tagged as 'Paint-2_43'
Improvement to zoom functionality
Detail: Previously, when using Ctrl + scrollwheel to zoom out it's possible for the window to shrink and no longer lie under the mouse, meaning you have to keep chasing it around the screen. The code now attempts to keep the same pixel under the mouse pointer first with the scroll bars and then by moving the window if that's insufficient, but it avoids moving window furniture off the edges of the screen. Zooming initiated by keyboard, mouse wheel or magnifier keeps the window the same size and shape whenever possible. Zoom in coarse steps in the form x:1 or 1:x is now possible by Ctrl-Shift-resize. Admin: Ref https://www.riscosopen.org/forum/forums/8/topics/2146?page=21#posts-99304 Submmission for Paint bounty. Version 2.44. Tagged as 'Paint-2_44'
Fix colour issue painting with a brush at reduced opacity
Detail: Certain colours on a 256-colour sprite were appearing wrong when brush painting at reduced opacity. For example, the grey colour 208 appeared blueish. This was caused by a sign propagation problem in colours_entry_from_gcol().
Fix for cosmetic rubout issue on changing to/from artist friendly colours in choices
Detail: Changing the Colour window layout in choices would immediately affect all open colour windows, and not redraw them. The corrected behaviour keeps the colour choice on a per psprite basis, so only newly opened Colours follow the choices (in common with the other choices).
Keep a per-table copy of the transfer function workspace
Detail: Brush translation table code changed to keep a copy of the four word workspace (for the ColourTrans transfer function) with each translation table. This avoids situations where changes to the brush settings weren't causing the translation table to be rebuilt. For example: this may have caused the brush colour to get stuck after toggling the palette a few times via the menu.
Reduce flicker when changing aspect preserving zoom level
Detail: Avoid unnecessary redraws. Admin: Submission for Paint bounty. Version 2.45. Tagged as 'Paint-2_45'
Initial alpha transparency editing support
Detail: * Allow creation of new format sprites: - Alpha mask sprites - Alpha channel sprites * Enhanced Brush tool ideas: - Alpha channel sprite support + sprite brushes effectively provide airbrush support New brushes are provided in the brush tool with Gaussian blur. By relying on the underlying OS_SpriteOp calls, only RGB blending of alpha sprites is supported; when you paint over a transparent or translucent region of a sprite, it always turns fully opaque, except when using the Transparent colour. On an alpha masked sprite, painting in the transparent colour always turns the affected pixels fully transparent. Admin: Submmission for Paint bounty. Version 2.46. Tagged as 'Paint-2_46'
[546] Don't hide 'Bad sprite file' errors
Rather than use wimpt_complain for those SpriteOps involved in loading a file (which leads to a 'Paint has gone wrong' style error box), use werr tp show the message in one step.
Lookup missed message tokens
A few calls to werr() were passing tokens rather than looking them up first.
[545] Keep create dialogue open after error
Take note whether create_create_sprite() succeeds or not, only dispose of the dbox on success. Common up the disposal of the 'Create' dbox via psprite_close_createbox(), previously there were several copies of the same code and some of them leaked the transparency_menu menu. In psprite_create_show() nothing uses auto_open == -1 any more, delete unused submenu support.
[493] Bring to top when opening the same file twice
Follow the same logic as Draw and Edit, in that if a file is already open of the same name and unmodified, just bring the existing file to the top rather than open a confusing second copy in memory. Version 2.47. Tagged as 'Paint-2_47'
Fix for crash double clicking in sprite window
Detail: Making 1 new sprite and repeatedly double clicking on it in the sprite window would cause a fatal internal error. A bug introduced in Paint 2.24 was not checking whether the tag was a window before proceeding. Admin: Submission for Paint bounty. Version 2.48. Tagged as 'Paint-2_48'
Remove workaround for bug #540
Fix for crashes on use of brush tool
Detail: When trying to drop the brush translation table pointer Paint would often crash depending on previous tool selections (because the workspace is shared between tools) with data aborts. Ensure that on deselection the toolspace is explicitly set to NULL. Admin: Submission for Paint bounty. Version 2.49. Tagged as 'Paint-2_49'
Intermediate Makefile install phase
Detail: In order to unblock some other changes in BuildSys adapt the Makefile to key off INSTTYPE for theme install, and for INSTDIR to be the dir in which !Paint is installed.
Fix for soft brush use on 256 colour sprite with no mask
Detail: Using a soft brush on a 256 colour sprite with no mask at all caused the screen to flash and wipes the whole sprite (seen in sprite file window, the sprite window itself not updated). Admin: Ref https://www.riscosopen.org/forum/forums/8/topics/2146?page=26#posts-130727 Submission for Paint bounty. Version 2.50. Tagged as 'Paint-2_50'
Add editable DPI facility for sprites
Detail: New menu entry allows the sprite mode word to be changed without changing the contents of the bitmap image. Admin: Submission for Paint bounty. Version 2.51. Tagged as 'Paint-2_51'
Enable translucent brush with sprite into 256 colour sprites
Detail: Previously this combination was disabled due to painting in odd colours when the target sprite was 256 colours but with no palette. From ColourTrans 1.96 and later a default palette is substituted. Add a runtime check that the appropriate version is available; implicitly it will be since Paint is in the same ROM as ColourTrans, but for the disc copy provided for RISC OS 3.50 it isn't. Admin: Submission for Paint bounty. Version 2.52. Tagged as 'Paint-2_52'
Correct mangling of test programs
Eleven of the test programs were always BASICTxt (i.e. ASCII) files, but assigned filetype FFB (which is intended only for tokenised BASIC). Whenever these files have had licence headers inserted (both prior to initial release under the Castle shared source licence, and again when they were relicensed to Apache) the headers were inserted as though they were tokenised BASIC, resulting in an unusable file. Correct this by changing the filetype to FD1 and replacing the licence header with an ASCII version. This also requires a minor update to .gitattributes to inform GitLab that they are still BASIC files. If you wish to obtain a version of any earlier commit with this correction applied, first check that commit out, then either git cherry-pick <this commit> which will create a new commit with the correction applied, or git checkout <this commit> .gitattributes git checkout <this commit> Test/CTransTest,fd1 git checkout <this commit> Test/FloodTest,fd1 git checkout <this commit> Test/GenTab,fd1 git checkout <this commit> Test/InsColTest,fd1 git checkout <this commit> Test/InsertTest,fd1 git checkout <this commit> Test/SelTab2,fd1 git checkout <this commit> Test/SelTab3,fd1 git checkout <this commit> Test/SelTab4,fd1 git checkout <this commit> Test/TSumner/SizeChTes2,fd1 git checkout <this commit> Test/TSumner/SizeChTest,fd1 git checkout <this commit> Test/TestInsCol,fd1 git rm Test/CTransTest,ffb git rm Test/FloodTest,ffb git rm Test/GenTab,ffb git rm Test/InsColTest,ffb git rm Test/InsertTest,ffb git rm Test/SelTab2,ffb git rm Test/SelTab3,ffb git rm Test/SelTab4,ffb git rm Test/TSumner/SizeChTes2,ffb git rm Test/TSumner/SizeChTest,ffb git rm Test/TestInsCol,ffb which will only update your working tree and the index. Version 2.52. Not tagged
Reword mask name repetition
Detail: When viewed in the create sprite dialogue the word mask appeared twice "Mask Simple Mask" change this so the name in the pop-up are all merely types of mask. Admin: Spotted during review of User Guide chapter for Paint.
Remove editable DPI facility for sprites
Admin: This feature needs more work under the Paint bounty.
[563] Shorten name of CompressPNG module on disc
Version 2.53. Tagged as 'Paint-2_53'
[554] Tile in all modes even if no matching tile is not in the Wimp pool
Detail: Use a similar search algorithm to the Wimp when looking for a tool sprite: first try for one of the same bit depth, else fall back to 'tile_1', else give up and fill with grey. Use ColourTrans to map colours from any arbitrary source sprite to the current screen mode. Introduce a new 'fully qualified mode' structure to hold the tuple of values which specify a given mode.
Fix for 2nd use of insert/delete rows/columns not completing on click
Detail: Open a sprite, menu Paint->Edit->Delete columns, drag out a few columns, then select click to confirm the deletion (works). Repeat the process, the 2nd use doesn't do anything when select clicking to confirm. This was caused by Paint now tracking gain/lose caret events, the gain caret caused by clicking in the sprite window resulted in a call to menus_insdel_frig() which cancelled the insert/delete action before the mouse click event was delivered. Since the gain caret event isn't wanted, just return early at line 1266.
Use flags in place of hex constants
Detail: Use Wimp window flags where available. Combine mouse bbit flags were sensible to do so.
Insert default palette when translucent merging into <= 256 colours
Detail: This locally replicates what ColourTrans 1.96 did, without the side effects which that caused. When stamping/tinting with a translucent shade of a sprite into a <= 256 colour target which has no palette, temporarily add one. As memory moving an entire sprite file is expensive, instead 1. clone the sprite header on the stack 2. append a palette 3. fix up the pointers to point at the original sprite/mask data 4. do the paint operation 5. adjust the pointers back to the original (unpaletted) sprite header Also remove the test of ColourTrans 1.96 since this is no longer needed.
Fix for ignoring Ctrl-Scroll & Shift-Scroll on sprite windows
Detail: With the WindowScroll module present, and 'Line multiple' option off, no wimp_ESCROLL events were being delivered as the WindowScroll module was handling up/down scrolling itself. Now, Paint requests extended scroll information so that it can interpret the state of Ctrl and Shift to do alternative actions. Version 2.54. Tagged as 'Paint-2_54'
Logs for RiscOS/Sources/Desktop/Desktop from Desktop-2_77 to Desktop-2_77-1
Rewrite rules for install
BuildSys 7.91 changes how top-level phony rules are overridden. In this component, the install target is redefined after AAsmModule is included, so it will be affected. The install rule is only used for copying the theme sprites in a Disc build. Version 2.77. Not tagged
Logs for RiscOS/Sources/Desktop/DragAnObj from DragAnObj-0_09-2 to DragAnObj-0_10
[568] Fix DragAnObjectStart when SVC stack is not USR mode accessible
Detail: Load the DragAnObject rendering userfunc parameters and address before switching to USR mode. Version 0.10. Tagged as 'DragAnObj-0_10'
Logs for RiscOS/Sources/Desktop/Filer from Filer-2_48 to Filer-2_49
Minor edits
SussApplic.s: Reunite a lost comment StrUtils.s: the strcmpTS alternate entry is used in 2 places
Add option to hide special OS applications
A new command, Filer_Visibility allows various special OS applications such as !Boot to be hidden from the Filer display. This is modelled on the "Hide OS files" option in Windows Explorer. Notes: * Candidates for matching are !Boot, !Choices, !Scrap and !Territory (so allowing Choices and !Scrap to be moved out of !Boot in future). * Matches must reside in the root of the drive on which <Boot$Dir> lives. * Presently all can be hidden or none, but the command matcher allows for up to 255 arguments so in future other subsets could be added. * Even when filtered from the root display, they can be manually opened such as through !ShowScrap. This is not attempting to make them totally vanish, just prevent accidental moves/deletes. * The current "Hide OS files" setting is passed to Filer_Action via a new options flag Action_OptionExcludeOS so that it can suspend any action which might attempt to overwrite these special OS applications, and 2 new reason codes to Message_FilerControlAction keep any in progress operations in sync. Version 2.49. Tagged as 'Filer-2_49'
Logs for RiscOS/Sources/Desktop/FilerAct from FilerAct-0_62-3-g75233663 to FilerAct-0_64
Use "Resources:$...." not "Resources:..."
If the current directory is not it's root these are not equivalent. Version 0.63. Tagged as 'FilerAct-0_63'
Retire undocumented Filer_Action$Skip CVS filter
Once used within Acorn to skip over CVS control directories copied from NFS.
Add intercept for writes to special OS applications
When Filer_Visibility is set to hide special OS applications (!Boot, !Choices, !Scrap, !Territory), monitor attempts to copy or move similarly named objects into their place. Without this they would appear to vanish into a black hole. If hidden, and an attempt to overwrite one of the special OS apps is made, the operation is halted with a warning box similar to the read only warning. The operation can be aborted entirely, that 1 clashing object can be skipped, or the operation retried. A new subreason to Message_FilerControlAction allows the visibility state to be tracked "live", so while halted the user can go to !Configure and unhide them, then click on Retry to complete the task. Fix an issue that the error messages (ER0-ER3) were after a {DictTokens} directive, but the messages are looked up using msgs_lookup() which doesn't use MessageTrans and so doesn't understand tokenised strings. Version 0.64. Tagged as 'FilerAct-0_64'
Logs for RiscOS/Sources/Desktop/Filter from Filter-0_29-1-gfc7abb71 to Filter-0_30
Error improvements
Don't return untrappable error numbers of 0. Do use the error returning form of Wimp_ReadSysInfo. Version 0.30. Tagged as 'Filter-0_30'
Logs for RiscOS/Sources/Desktop/Pinboard from Pinboard-1_05 to Pinboard-1_07
[574] Pop configure plug-in to top rather than running another
Copy the same logic from !Alarm, and check before running !PinSetup that it's not already running. If it is send a Wimp message to pop to top. Delete unused 2D templates. Move command help into CmdHelp and delete (unused) syntax tokens. Version 1.06. Tagged as 'Pinboard-1_06'
Support WimpVisualFlag for no icon bar border
Ensure the backdrop extends all the way down to the top of the icon bar when it has no border. Version 1.07. Tagged as 'Pinboard-1_07'
Logs for RiscOS/Sources/Desktop/ShellCLI from ShellCLI-0_37 to ShellCLI-0_39
Translate module to C
Detail: Replace s.ShellCLI with C source and header files and assmbler veneers and CMHG file. Change Makefile to build for C. Version 0.38. Tagged as 'ShellCLI-0_38'
Set date from VersionNum
Admin: Ensures the date is consistent for anyone who doesn't run the git-mtime.py script locally. Version 0.38. Not tagged
Switch to _swix for SWI calls
Detail: Saves 15% of code space, partly through use of CLib stubs rather than linking with OSLib, and partly by recent versions of Norcroft inlining many common calls via _swix. Also removes the need for many casts from os_error to _kernel_oserror.
Enable CI
Detail: Stop using quoted string Module_ComponentName in CMHG file Reflect new languages used in `.gitattributes` Move `.gitignore` to the top level and complete it Resolve some signed/unsigned comparison warnings
Logs for RiscOS/Sources/Desktop/Switcher from Switcher-1_53 to Switcher-1_54
Take into account size of kernel RW/zero-init area
Add the size of the kernel's RW/zero-init area (as reported by OS_Memory 16) into the total for the "Hardware/system" category. Version 1.54. Tagged as 'Switcher-1_54'
Logs for RiscOS/Sources/Desktop/TaskWindow from TaskWindow-0_81 to TaskWindow-0_85
Fix SWI calls not returning when TaskWindow_Morite received
Was calling OS_Exit immediately upon TaskWindow_Morite being received, even if in a SWI call. Instead flag for later attention like Message_Quit. This results in error being returned from sleeping SWI calls, and OS_Exit being called in a callback after supervisor mode code has had a chance to clean up. Version 0.82. Tagged as 'TaskWindow-0_82'
Don't crash on "%TaskWindow -display -ctrl"
Detail: s.TaskMan: Alter initial value of PassOnVectors in inittask This fixes a bug, that if an editor is not currently running then starting a task window with "%TaskWindow -display -ctrl" from the new task option in the task manager causes a branch through zero. Whilst I have not worked out the exact detail of the crash, the cause appears to be that PassOnVectors is set to false before GetParentTask is called. In GetParentTask, Wimp_StartTask is called, which emits control characters. This causes GetParentTask to be re-entered (this time via MyWrchV rather than the start-up -display code). It gets hazy what happens after to branch through zero, but changing it to set PassOnVectors=true before the initial GetParentTask fixes the issue. If an editor is already running then the crash doesn't occur because it responds to the Message_TW_NewTask, so Wimp_StartTask is never called. If the -ctrl switch is absent then the control characters from Wimp_StartTask are ignored by MyWrchV. If -display is absent then it never calls GetParentTask during the start-up code. Admin: Tested standalone on RPCEmu and RPi3B+ Version 0.83. Tagged as 'TaskWindow-0_83'
[532] Map missing TaskWindow$Server variable to a nice error
* Check TaskWindow$Server exists first to avoid misleading error trying to run it * Delete leftover Help (see CmdHelp) * Add safety range check to SWI handler Version 0.84. Tagged as 'TaskWindow-0_84'
[468] Fix INKEY requiring an extra key press if Escape key pressed
Detail: Escape being pressed whilst in an OS_Byte 129 call (MyByteV) was not being handled on return to MyRdChV before the TaskWindow suspended itself via a Wimp_Poll. Added check for Escape on entry to MyRdChV. Admin: Remove redundant RestPSR just before OS_ReadEscapeState. Extended reach of title string ADR when CMDHELP=None. Version 0.85. Tagged as 'TaskWindow-0_85'
Logs for RiscOS/Sources/Desktop/Wimp from Wimp-5_80 to Wimp-5_87-1
[378] Extra switches to set button true colours
WimpVisualFlags gains -ButtonColour -ButtonWellColour -ButtonHighlightColour to allow a theme designer to set the button/well/pressed colours for R1-R7 slabbing to some other colour, and -ButtonBorderFaceColour -ButtonBorderOppColour -ButtonBorderShallowColour for the outlines. The given colours are only used when there is no 'C' validation.
Add themeable icon bar tiles
Allow theme designers to use a different sprite for the background tile of the iconbar, distinct from the other windows. This looks for 'tile_i' before falling back to 'tile_1' as before, in addition to the existing 'tile_m' for menus. Version 5.81. Tagged as 'Wimp-5_81'
Fix Message_TaskInitialise reporting wrong slot size
Message_TaskInitialise was reporting that MemoryLimit was the slot size of the application, which was resulting in the task manager showing the wrong slot size if for some reason MemoryLimit had been artificially reduced below ApplicationSpaceSize (e.g. due to the task being a child of a C system() call). And because MemoryLimit is lower than ApplicationSpaceSize, any attempt the task makes to grow/shrink its wimp slot is denied, so task manager will be stuck showing the wrong value for the entire lifetime of the task. Fix Message_TaskInitialise to use ApplicationSpaceSize instead, so that the total size of the slot is reported instead of just the usable area. This fixes task manager incorrectly showing that Fat32Fs has a slot size of 0 on some of my Raspberry Pis, when really it has a size of 256K. This discrepancy was also causing the "System memory allocation" numbers to not total up correctly (the sum was 256K lower than the displayed total).
Crunch ROM icon sprites
Save around 50KB of ROM space by converting the icon sprites to use RISC OS 3.5 mode words instead of numbered modes, reducing the size of the mask data to around a quarter of its old value. Tested in IOMD ROM, with boot sequence disabled (to ensure the ROM sprites get used). Version 5.82. Tagged as 'Wimp-5_82'
Abandon set caret position if the window or menu isn't there
During destruction of the menu tree, if set caret position fails when resetting the caret to the old position (ie. illegal window handle as the window has been deleted) then destroying the menu tree also fails with catastrophic results. Therefore * Do not fault SetCaretPosition to invalid window handle, just change it to -1 * Do not try to redraw areas of an invalid window when moving caret Version 5.82. Not tagged
Fix to invalidate entire tile cache
A hardwired 18 in reset_all_tiling_sprites meant that one slot was never cleared, so a change in the Wimp's sprite pool could leave a cached sprite pointer pointing to something invalid. Ref https://www.riscosopen.org/forum/forums/5/topics/16708 Version 5.83. Tagged as 'Wimp-5_83'
[539] Add missing PNG file type icon to ROM sprites
For each of the 5 actively maintained ROM sprite sets add file_b60 and small_b60. Also copy it into the disc based Morris4 theme. Version 5.83. Not tagged
Fix crash on closing menu containing a writeable icon with focus as part of the menu tree
* When closing menus, set_caret_position is called to remove the caret from the menu tree which tries to redraw the icon without a caret as the window is still defined and valid * This happens after clearing the menutaskhandle though, so the redraw can't page in the right task * The redraw then fails badly trying to access memory from the wrong task Version 5.84. Tagged as 'Wimp-5_84'
[555] Fix for corrupt registers in Service_ModeChange
Service_ModeChange -> recalcmodevars -> readvduvars2 but readvduvars2 uses r5 and r6.
[519] Wimp crash on bad title bar validation
Reset the redrawhandle when creating a new window, so an empty title validation string doesn't cause an unwanted page in of another task. This could lead to a subsequent abort if the wrongly paged in task had a smaller slot when attempting to dereference the pointer.
[509] Fix abort autoscrolling off a window with no icons
When looking up the user icon button type passed in R3/R4, use the window handle in R3 rather than 'handle' which is the window in which autoscrolling started. This caused an abort if that window contained no icons (because w_icons = -1, and R4 != -1 leading to R5 = 15 and invariably an address in zero page somewhere).
Fix for zombie task preventing desktop exit after shutdown
When the last task closes down have the clipboard manager task go dormant rather than pending. Otherwise, we get stuck in a race condition wanting to start back up again when the Task Manager's shutdown dialogue quits (Ctrl-Shift-F12 then Ctrl-Shift-F12). Wimp01.s: Define symbolic names for the special values if clipboard_taskhandle for states pending/run now/dormant. Wimp02.s: When the final task closes down, *now* it is safe to go to the pending state. Wimp07.s: Tidy up runthetask, and use Wimp version of 200 for the temporary task initialised rather than pass an undefined R3 to Wimp_Initialise. Share a common OS_CLI tail. CBTask.s: When asked to quit via user message 0, set the state to dormant. Version 5.85. Tagged as 'Wimp-5_85'
Add HTML and GIF icons to Morris4 disc sprites
file_faf and file_695 taken from !Browse.
[581] Revise assumption that ROM toolsprites are always unmasked
Wimp-3_99o introduced an assumption that any toolsprites in ROM are to be plotted unmasked, and that holds for Ursula and later where the ROM set don't need the underlying colour (gadgets are always grey and rely on the tintfunc to make the focus titlebar cream). The toolsprites in the RISC OS 3.10 ROM however are almost entirely transparent as their 2D look just plots pixels on top of the underlying fill colour. Change the logic to look at all the toolsprites and only use the solid plot SpriteOp if they are all truly solid (skipping the titlebar, since those are already special cased by dofunkytitlebar and the tintfunc).
[580] Fix for excessive RMA jumps when *IconSprites on RISC OS 3.10
Pre Medusa sprites are held in the RMA. Wimp 5.26 adjusted the RMA behaviour where previously after *IconSprites a resize of -256MB would surprise apps that wanted some RMA for things in their !Boot or !Run files but found there was none due to having looked at their sprites. However, the resize of -256MB does not always result in 0kB free space, so each *IconSprites command ended up net growing the RMA by whatever the shrink left *plus* the previous free amount. Fix this by reading the free space in the RMA and adjusting up or down as needed to always end up with a safe free space position.
Add WimpVisualFlag to turn off icon bar borders
Given it's now possible to have a different tile sprite for the icon bar background, it may look wrong to have a black border around that window. Allow it to be turned off.
Add !Choices application icon to disc sprite pool
One each for the maintained themes. Special thanks to Richard Hallas for contributing the RISC OS 5 design.
[603] Add missing low res Morris4 icons
taskmanager & user2 (copied from switcher). vdivider (copied from Ursula set). And, less mission critical, ic_alarm & ic_chars & ic_configure created. Version 5.86. Tagged as 'Wimp-5_86'
Rewrite rules for resources
BuildSys 7.91 changes how top-level phony rules are overridden. In this component, the `resources` target is redefined after `AAsmModule` is included, so it will be affected. Rewrite the rules so that they will continue to work the same (at least for native builds) both before and after BuildSys is updated. Version 5.86. Not tagged
[627] Fix for malformed Message_DataRequest
The message was being correctly formulated in memory, but the declared length omitted the terminator word. Version 5.87. Tagged as 'Wimp-5_87'
Add vcddisc icon to the sprite pool
One each for the maintained themes. Special thanks to Richard Hallas for contributing the RISC OS 5 design, along with re-rendered versions of cddisc/acddisc/pcddisc with an alternative blend to the background.
Make use of button well colour option for Raspberry theme
Wimp 5.81 and later support a set of WimpVisualFlags which allow the button colours to be customised per theme. While the faces and shadow in the Raspberry theme have a similar tone to tile_1, the yellow well around a default action button jars with the focus window title bar yellow. Use a -ButtonWellColour switch to match them. Version 5.87. Not tagged
Logs for RiscOS/Sources/FileSys/ADFS/ADFS from ADFS-3_55 to ADFS-3_56-1
FIQ routine cache flush fixes
In the HAL case, the 3 args for OS_SynchroniseCodeAreas were being loaded in exactly reverse order, ending up copying immediate #1 to R0+R1+R2. In the non-HAL case, some over-zealous cleanup in ADFS-3_45 had deleted the line label 02 so it no longer assembled. Fixes instruction abort seen when copying from floppy to Econet filestore. Version 3.56. Tagged as 'ADFS-3_56'
Add Lazarus (Bush Internet TV set-top series) machine support
Detail: Currently, this is just a copy of the IOMD machine setup. Version 3.56. Not tagged
Logs for RiscOS/Sources/FileSys/ADFS/ADFSFiler from ADFSFiler-1_15 to ADFSFiler-1_16
Rewrite rules for resources
BuildSys 7.91 changes how top-level phony rules are overridden. In this component, the `resources` target is redefined after `AAsmModule` is included, so it will be affected. Rewrite the rules so that they will continue to work the same (at least for native builds) both before and after BuildSys is updated. Version 1.15. Not tagged
New build variant for NVMeFS
Detail: * Added the ability to build NVMeFiler. * Backup and format menu items are always shaded for NVMeFS since these filing systems are not currently supported by the backup code. Version 1.16. Tagged as 'ADFSFiler-1_16'
Logs for RiscOS/Sources/FileSys/CDFS/CDFSFiler from CDFSFiler-2_52 to CDFSFiler-2_53
Normalise resources phase in makefile
This was hijacking the CMDHELP variable to insert its extra 2 files, when CUSTOMRES would be more normal. But since BuildSys 6.48 we can simply add these using INSTRES_FILES. Enable CI job now all the RISC OS paths aren't used.
Display a video icon if the disc is a video DVD
Look for the required VIDEO_TS.IFO file and use a different sprite if present. Replace longhand SETV's with macro SETV. Version 2.53. Tagged as 'CDFSFiler-2_53'
Logs for RiscOS/Sources/FileSys/FSLock from FSLock-1_25 to FSLock-1_26-1
Allow for !Scrap in the root of the boot drive
Add an extra lookup step so that !Scrap can live outside of !Boot on the locked drive. Version 1.26. Tagged as 'FSLock-1_26'
Use HostApp makefile fragment
Also fix MkClean to strip dependencies from scrambler/mk Version 1.26. Not tagged
Rewrite rules for rom install
BuildSys 7.91 changes how top-level phony rules are overridden. In this component, the `install_rom` and `rom` targets are redefined after `AAsmModule` is included, so they will be affected. Version 1.26. Not tagged
Logs for RiscOS/Sources/FileSys/FileCore from FileCore-3_75-1-g04030b45 to FileCore-3_78
Fix check-byte for laying out defect list on big discs
Detail: s.FormSWIs LayoutBootBlock: Calculate the checkbyte for the second defect list (>512M) in accordance with the PRM: "The byte yy is a check-byte calculated from the previous words in the second defect list" Currently the code includes all of the first defect list including its terminator when calculating the check-byte for the second defect list. As a result an empty defect list goes from &20000000 &40000020 to &20000000 &40000000 I do not believe this code would ever have been used before, since FileCore_LayoutStructure is only used in the OS 1) To format floppies, which are smaller than 512MB and 2) To format the RAM disc, which up till now has been smaller than 512MB. FileCore never looks at the >512M defect list outside of FileCore_LayoutStructure, the defect command is not able to add defects to the second list. HForm already calculates the checkbyte in accordance with the PRM, and this change ensures that large RAM discs will conform. Admin: Tested by examining 600MB RamDisc0. Version 3.76. Tagged as 'FileCore-3_76'
Use symbolic names for DA operations
Tighten DA access permissions
Given not all page table formats can represent user mode RO + privileged R/W, and there's no reason for FileCore to let the user peek its internal structures, tighten this up and remove user mode access entirely. Tested in a Titanium ROM with SCSIFS/RamFS/SDFS/ADFS. Version 3.77. Tagged as 'FileCore-3_77'
Fix file extensions not being zeroed on removable discs
Here's a bug that's probably been around forever, but was recently observed when running FSBash on Raspberry Pi. When a file is extended by OS_Args, either by setting the extent directly or by setting the file pointer beyond the current end of the file, FileCore is the entity that is responsible for filling the intervening space with zeros. This it does by constructing a scatter list in the scratch space. However, there's a problem with that, because if it has to mount the discs in one or more drives in order to establish which drive contains the disc which holds the file being extended, then that mount operation also needs to use the scratch space. This happens particularly frequently on platforms like Raspberry Pi where there is no hardware media insertion detection, which means that we have to assume the media might have changed after a timeout since the last sucecssful data operation. However, it would also affect any other removable drive if the media was removed and reinserted since the last DiscOp. What appears to have ended up happening is that the boot block of the mounted disc was loaded to the scratch space, then interpreted as a scatter list. The defect list terminator, &20000000, happens to point at the base of the RMA, so rather than extending the file with zero bytes, the start of the RMA got copied there instead. Fixed by explicitly calling FindDisc just before we start to construct the scatter list in scratch space. Successfully soak tested with FSBash for 6 hours. Version 3.78. Tagged as 'FileCore-3_78'
Logs for RiscOS/Sources/FileSys/FileSwitch from FileSwitch-2_87-1-gdc166065 to FileSwitch-2_92
Add BASICTxt filetype
Programmer's Reference Manual Volume 4 Table C defines a filetype for non-tokenised BASIC programs. Add support for this to FileSwitch with a Filetype name, load and run action. Version 2.88. Tagged as 'FileSwitch-2_88'
Remove quotes from @Run/LoadType_FFB/FD1
Detail: Quotes in an alias mean If "<Alias$@RunType_FD1>" = "" Then ... doesn't work. The quotes aren't necessary, because filenames can't have spaces in anyway. Admin: Tested on Linux and RPCEmu. Boots and fixes above problem. Version 2.88. Not tagged
Revert "Remove quotes from @Run/LoadType_FFB/FD1"
This reverts commit ec553fef722a2c06095d6b8b724016ec08d4fa60. The above commit causes various BASIC programs to fail as they rely on the location of quotes in order to parse their command line. Version 2.88. Not tagged
Cross-compilable
Detail: * Makefile: get directory separator and header extension from shared makefiles. * Build variable ImageSize (inherited by amu/make from environment) needs passing to objasm on command line. * Consolidated .gitignore to root. * Enable GitLab CI. Version 2.88. Not tagged
Fix for NULL pointer dereference with Count/Copy/Wipe ops on duff FS
Each of the 3 wildcard accepting OS_FSControl options takes its own copies of the paths in Util_CommonStart then frees the PassedFilename (and co). This is generally OK because the src name is kept in a 'copy block' struct relative to R7 (and, for Copy, the dst in a second struct relative to R8). However, when needing to get info on objects or other low level operations, if the FS is marked in the 'DuffFS' table it would then do a safety check for multiple $'s in the PassedFilename and in doing so dereferences a NULL pointer. Ref https://www.riscosopen.org/forum/forums/4/topics/17259 Since the filenames constructed by resolving wildcards for Count/Copy/Wipe are all sanitised by Process_WildPathname we can skip the safety check; there will only be 1 $ by then. FSUtils3.s: Correct misleading comment LowLevel.s: Avoid NULL pointer dereference, drop noisy debug on every FS lookup Version 2.89. Tagged as 'FileSwitch-2_89'
Use OS_TaskControl 0 to reset the SVC stack
Instead of manually resetting the SVC stack pointer when starting a new task, prefer to use the stack reset routine that's exposed by OS_TaskControl 0 in RISC OS Select / 5. If that routine isn't available, fall back to the old method of doing it manually. Requires Kernel-6_61 to build.
[480] Make use of fsfile_ReadInfoNoLen
Update EnsureCanonicalObject so that it can optionally skip reading the file/object length, based on the new argument R7. Then trace back through the callers to have them pass in an appropriate value based on whether they care about the length or not. TopPath_DoBusinessToPath has also gained a new flag bit to suppress reading the length, but so far I've only updated DoThePath to use it. Result: If you have a file in PipeFS which is open for writing, and then attempt to open it for reading using OS_Find, it'll now open immediately instead of PipeFS trying to block/sleep until it's no longer open for writing. Why: Since at least as far back as RISC OS 3.6, PipeFS tries to sleep inside fsfile_ReadInfo if the file is open for writing. But a combination of buggy sleep logic and TaskWindow's lazy approach to UpCall 6 meant that (prior to TaskWindow 0.65) it wouldn't sleep for long and would instead allow the open to proceed while the file is still open for write. The ability to have both a reader & writer active at the same time is basically the whole point of PipeFS, so this change restores that pre-TaskWindow 0.65 behaviour without having to remove the sleep logic from PipeFS (it's a well-intentioned feature, even though it's been broken for decades) Tested by performing a ROM build, checking that it works, and running some PipeFS tests. This fixes the original issue described in ticket 480: https://www.riscosopen.org/tracker/tickets/480 Version 2.90. Tagged as 'FileSwitch-2_90'
Replace magic constant
Trim some dead code
Add option to track CallFSFile_Given stats
Track how many of each fsfile op is handled, and how many OS_File 5 cache hits occur, to help judge the effectiveness of the caching
Update OS_File to use fsfile_ReadInfoNoLen where possible
One of the fixes in PipeFS 0.25 was to fix the fsfile_ReadInfo operation to block until the pipe is no longer open for write (instead of failing with a "file not found" error, as it had done previously). This fix had some knock-ons for FileSwitch, since the contemporary version (2.89) only made use of fsfile_ReadInfo. E.g. trying to open a pipe for read while it's open for write would block due to TopPath_DoBusinessToPath using fsfile_ReadInfo when FileSwitch is checking whether the file exists. This specific issue was fixed in FileSwitch 2.90 by changing some areas of FileSwitch to use fsfile_ReadInfoNoLen instead. Further testing has revealed a few more areas which are making unnecessary use of fsfile_ReadInfo and have the potential to break programs. Specifically, with FileSwitch 2.90 & PipeFS 0.25, programs which use GCC's UnixLib will get stuck if they try to open a PipeFS file for write while running in a taskwindow. E.g. the call to GNU.gawk in Env.!Common. This happens because after opening the file, UnixLib attempts to set its attributes using OS_File 4, which in turn causes FileSwitch to attempt to examine the file using fsfile_ReadInfo. Fix this issue by changing OS_File 4 to use fsfile_ReadInfoNoLen, along with all the other applicable OS_Files: 0-3, 7-11, 18, and 24. For OS_File, this leaves just OS_File 5, 6, 12-17, 20-23 and 255 using fsfile_ReadInfo, since they all need to return the length to the caller, and OS_File 19, which doesn't use fsfile_ReadInfo at all.
Change ChangeDirectory to use fsfile_ReadInfoNoLen
It doesn't care about the object length, so don't bother trying to read it.
Change OS_FSControl to use fsfile_ReadInfoNoLen where possible
CanonicalisePathEntry and RenameEntry changed to use fsfile_ReadInfoNoLen, since neither of them care about the length of the object
Change TopPath_DoBusinessForDirectoryRead to use fsfile_ReadInfoNoLen
This call doesn't return the directory length, so there's no reason for it to attempt to read it Version 2.91. Tagged as 'FileSwitch-2_91'
Fix register corruption in CopyFile_EnsureDestFileWriteable
FileSwitch 2.90 introduced a register corruption bug in *Copy which would (typically) result in an abort if the copy isn't going ahead because the destination exists. This was down to the (undocumented) input of R7 being corrupted by the call to EnsureCanonicalObject, and not being restored before it gets used later on by the call to Util_PrintName. Fix the code to restore R7 before calling Util_PrintName, and update the comments surrounding a couple of functions to make sure at least some of the undocumented inputs are documented. Fixes issue reported on forums: https://www.riscosopen.org/forum/forums/4/topics/17802 Version 2.92. Tagged as 'FileSwitch-2_92'
Logs for RiscOS/Sources/FileSys/ImageFS/DOSFS from DOSFS-1_14-1-g774c67f3 to DOSFS-1_15
Reintroduce ARMv2 support for disc builds
DOSFSctl.s: Use macros to expand into the 3 possible variants we want. MFSmacros.s: Swap round CLRV NE/SETV EQ pair because SETV also clears Z as a side effect, so would have activated the CLRV as well. Simplify the Ccall macro as only the state of V is significant (and preserving lr), there's no need to preserve all the other flags.
Enable CI
Renames for filename case sensitivity Minor Makefile tidy up
Eliminate 2.5k of repeated code
Each of 41 uses of Ccall has a common tail. Split that tail off and call it like a function instead, saving ~2.5k. Version 1.15. Tagged as 'DOSFS-1_15'
Logs for RiscOS/Sources/FileSys/PipeFS from PipeFS-0_24 to PipeFS-0_25
Add a couple of extra comments to PipeFS_Close
Separate PipeFile_readblocked from PipeFile_Size
This separates the "reads blocked" pollword from the Size variable, without altering the behaviour. This is to allow for future changes which will alter the behaviour of the readblocked pollword.
Unblock reader when closing writer
This fixes a problem where a reader which is asleep waiting for more data to arrive won't be woken when the writer closes its end of the pipe. Behaviour 1: * Two taskwindows open the same pipe, one for reading, one for writing * Writer writes data to the pipe * Writer closes the pipe * Reader enters an OS_BGet loop to read until EOF Following the above steps, the reader will be able to read all of the data and the read loop will terminate. Behaviour 2: * Two taskwindows open the same pipe, one for reading, one for writing * Writer writes data to the pipe * Reader enters an OS_BGet loop to read until EOF * Wait for the reader to read all the data; it'll go to sleep waiting for more * Writer closes the pipe Following the above steps, the reader will remain asleep inside OS_BGet, even through the writer has signalled that it's finished with the pipe by closing it. This looks like a textbook race condition bug; if the writer closed the file with slightly different timing (e.g. while there are still unread bytes in the pipe, or while the pipe is empty but before the reader calls OS_BGet and is put to sleep) then the reader will behave correctly. This change fixes things so that any reader will be woken when the writer closes its end of the pipe.
Debug improvements
Add debug messages to all FS entry points, and call Debug_Open & Debug_Close
Fix fsfile_ReadInfo blockifwriting logic
When handling fsfile_ReadInfo, PipeFS wants to wait for any writer to close the file before returning the file information. To do this it repeatedly calls FindFileOrDirectory & blockifwriting in a loop until that condition is reached (or the file ceases to exist). However the call to FindFileOrDirectory was replacing the filename in R1 with a the internal file handle (i.e. a pointer to a struct), so on the second loop round it would always exit out with a "file not found" response. This bug had the effect that attempting to read the size of a file (e.g. using OS_File 5 or *FileInfo) which is open for write would always report that the file doesn't exist, even if the blockifwriting call successfully blocks until the writer closes the file. Restoring R1 before looping back round will give the behaviour the programmer originally intended, for better or worse (e.g. current versions of FileSwitch use fsfile_ReadInfo to check the file before trying to open it, so trying to use OPENIN on a file which is open for write will unintentionally block - a bug that was hidden on earlier versions of RISC OS because prior to TaskWindow 0.65, TaskWindow didn't make any attempt to wait until the pollword was non-zero before returning, so PipeFS would pretty quickly exit out with a harmless "file not found" response due to the register corruption bug)
Protect the dynamic area
The PipeFS dynamic area was being created with AP 0, granting usermode full read/write/execute access. Attempt to restrict it to just the minimum required permissions - privileged read/write for PipeFS access, and usermode read for TaskWindow (or other potential UpCall_Sleep handlers) checking pollwords. This isn't an ideal situation, both because we're exposing the contents to everyone, and because systems which are using the long descriptor page table format will be forced to use the kernel's AP1 emulation to provide usermode read access, adding unnecessary overhead to pollword checks. Moving the pollwords to the RMA could be one solution to this (although it will re-introducing the possibility for user code to scribble on them) Version 0.25. Tagged as 'PipeFS-0_25'
Logs for RiscOS/Sources/FileSys/RAMFS/RAMFS from RAMFS-2_32 to RAMFS-2_33
Allow disc sizes 512MB - 2GB
Detail: s.RamFS50: - Add patch-through for RamFS_SectorDiscOp - Put stars next to NZones2 fields in disc record as this needs filling in now - In InitDiscRec, increase the maximum number of zones to 127 The maximum was previously 16, so this concerns me because I don't know why that was! However, raising the maximum like this give smalller minimum fragment sizes at every size of RAM disc tested, and enables discs bigger than 512MB. (Defined as min frag size in bytes = (idlen + 1) * LFAU size in bytes) - Also in InitDiscRec, after the algorithm has completed, save only the LSB of the number of zones (r2) in NZones, and save the MSB in NZones2. s.RamFS15: In MiscOp Mount, don't convert address from sectors to bytes, as it is passed to us in bytes already for this operation. s.Defns: Enable BigDiscs2 work Admin: Tested at a variety of sizes, including doing ChangeDynamicArea -RamFSSize nM, then create a file for n = 10 to 900 step 10. RamFS_SectorDiscOp tested by running *DiscKnight -v RamFS 0 which calls by name and examining sectors through Zap which calls by number. Tested by others up to 2GB - 4kB Version 2.33. Tagged as 'RAMFS-2_33'
Logs for RiscOS/Sources/FileSys/SDFS/SDFS from SDFS-0_10-1-ge51e62d5 to SDFS-0_12
Enable GitLab CI and address issues identified
Some genuinely dead code identified and removed, plus an out-of-bounds memory access in case all possible drives had already been allocated. Some minor printf format specifiers addressed (should have no effect) and removed useless variable.
Support controllers with lower block size limits
Some controllers (such as the eMMC controller in the Pinebook) require transfers to be limited to a smaller number of blocks per operation than is permitted by a generic SDHCI controller.
Support optional factory-fit non-removable memory devices
Some boards feature non-removable memory devices with a no-fit option that can only detected by seeing whether the device responds or not once we start trying to talk to it. To support these, defer drive allocation until the UnitAttached service call. This is already designed to dynamically add extra drives in case a shared MMC bus is found, so the only difference is that the initial number of drives is 0, not 1. Note that there is still a minimum of 1 drive per slot for removable slots, since a removable slot may be empty at module initialisation time, and there's no way to electrically distinguish an empty socket from a no-fit socket. Version 0.11. Tagged as 'SDFS-0_11'
Support for controllers that misbehave when they see CMD23
For such controllers, we terminate all multi-block transfers using a subsequent CMD12 rather than by prefixing them with CMD23. Fixes misbehaviour observed with the SDHOST controller which is now used for the SD slot on WiFi-capable Raspberry Pi models prior to the Pi 4, and for any SD card HATs on generation-4 Raspberry Pis. Version 0.12. Tagged as 'SDFS-0_12'
Logs for RiscOS/Sources/HAL/HAL_OMAP3 from HAL_OMAP3-1_20 to HAL_OMAP3-1_20-1-g1beb79aa
Switch to using shared HAL makefile fragment
Version 1.20. Not tagged
Logs for RiscOS/Sources/HWSupport/FPASC from FPASC-4_37-1-g6a0dd699 to FPASC-4_39-1
[516] Return divide by zero for non integer -ve powers of 0
Return +INF and a divide by zero exception for things like 0^-0.5 principally to match what is expected by the C standard, and also so BASIC64 matches the result for 1/SQR(0) too.
[515] Fix for loop converting packed decimal infinity/NaNs
On encountering an exponent > &4100 (or > &FE0000 for extended packed) to consider as a NaN or infinity, the emulation ends up in LDFConvert_Packed_NaNInf. However, this is written as a leaf function and returns with MOV PC,LR when the singular caller of it doesn't expect a return so the LR value is actually still pointing at the last BL around line 1926. This creates an infinite loop. Escape the loop by popping the true return value which was stacked on entry. Version 4.38. Tagged as 'FPASC-4_38'
Add support for Machine=CortexA53
Version 4.39. Tagged as 'FPASC-4_39'
Enable CI
Add Bush Internet TV set-top box support
Detail: Note that for Bush box support only, FPEmulator can be built with support for hardware FP only (the Bush box has an ARM7500FE SoC). But it's useful to be able to run this under RPCEmu for testing, so FPEmulator is set to "Both" mode (hardware and software FP support). Version 4.39. Not tagged
Logs for RiscOS/Sources/HWSupport/GPIO from GPIO-1_00-1_11_2_5 to GPIO-1_00-1_11_2_5-1-g7d387037
Adapt to different `C_EXP_HDR` settings
An upcoming change to BuildSys adjusts the default setting of `C_EXP_HDR` so that it doesn't include a trailing `.h` for native builds. Since we use the value of this variable in one of our rules, adapt accordingly (note that this implementation will work with both old and new BuildSys). Version 1.00 (HAL.7). Not tagged
Logs for RiscOS/Sources/HWSupport/SD/SDCMOS from SDCMOS-0_20 to SDCMOS-0_21
Add ability to read disc address of CMOS from a ROM location
The ROM location is initialised as part of the write-ROM-to-SD process. This enables a single ROM image to be used with loaders of different sizes on disc. Version 0.21. Tagged as 'SDCMOS-0_21'
Logs for RiscOS/Sources/HWSupport/SD/SDIODriver from SDIODriver-0_16 to SDIODriver-0_20
Adapt to different `C_EXP_HDR` settings
An upcoming change to BuildSys adjusts the default setting of `C_EXP_HDR` so that it doesn't include a trailing `.h` for native builds. Since we use the value of this variable in one of our rules, adapt accordingly (note that this implementation will work with both old and new BuildSys). Version 0.16. Not tagged
Update build structure
* Special rule for appending to the output of Hdr2H for exported SDHCIDevice.h file requires special handling to support cross-compilation * Add missing .gitignore * Enable GitLab CI, and fix some issues identified
Use AsmUtils to access CLZ functionality
SDIO tweaks
* The MMC definition of the card status (as reported in R1 responses) includes a card error indicated by bit 7. However, this bit is reserved according to the definition for SD and SDIO cards. To date, this has not been a problem because all SD cards report this bit clear. However, some SDIO devices set this bit for no obvious reason, which was resulting in us incorrectly considering any such commands to be errors. * Bit 13 of device status (ERASE_RESET) is documented as a non-error for SD cards, so only treat it as an error for MMC cards also. * Add additional device error for SD (but not MMC) memory cards, from bit 3 of card status (AKE_SEQ_ERROR). * Some SDIO devices seem to report the number of functions as zero until they have finished IO initialisation. Therefore our optimisation to skip IO initialisation for memory-only SD cards that respond to CMD5 was also skipping IO initialisation for these SDIO devices. Memory-only cards that respond to CMD5, while explicitly described in the standards, seem to be very rare (I didn't find any during my testing) so remove this optimisation in order to support these SDIO devices. * The OMAP4 host controller (and possibly others in the OMAP family) swallow the first command issued after the post-power-on magic that's performed during every bus scan. This is a particular problem for SDIO devices, because if they see a CMD0 without a preceding CMD52 reset, they assume they've been connected to an SDIO-unaware host and disable all further SDIO commands. Attempts to fix this in the OMAP4 HAL have failed, so to paper over the cracks, retry the first command issued (CMD3) if it fails.
Improvements to clock speed calculation
Reworked calculation, with the effect that: * if an SDIO device requests a clock speed above what the controller is capable of, the controller's limit takes precedence * TRAN_SPEED in SD and SDIO devices is now interpreted as a per-pin bitrate rather than directly as a clock speed (affects DDR modes) * added beginnings of support for eMMC HS400 mode
Support cards that don't complete access mode switch
It seems the Raspberry Pi bootloader does something to some SD cards that prevents them from completing the switch to 3.3V 50 MHz. Oddly, removing and reinserting them makes them behave themselves. In any case, I don't think it's safe in general to assume a switch always succeeds, so if we reach a timeout, drop back to the speed reported in the response to the CMD6.
Improve characterisation of SDIO identification
* *SDIODevices now prints more useful information about SDIO devices, including information from CIS VERS_1 and MANFID tuples. * Service_SDIOUnitAttached, Service_SDIOUnitDetached and SWI SDIO_Enumerate 1 now include the manufacturer and card codes from the CIS MANFID tuple, which are more useful for disambiguating multiple SDIO devices attached to the same machine than the FIC alone is. * Listen in to Service_SDIODescribeFIC and supply names for the FIC codes described in the SDIO standard. * Call new Service_SDIODescribeMANF to discover human-readable strings corresponding to SDIO manufacturer codes. Listen to calls of it by ourselves or others, and supply answers for a selection of manufacturers. * Add a test program for dumping out the available CIS data structures.
Fix memory card product display in *SDIODevices
Vet the product names to ensure they only contain printable characters, to match the handling of the vendor name.
Implement interrupt-driven and background transfer support
The operation state machine is now polled both when the HAL device's specified interrupt fires, and also on TickerV. TickerV is the minimum requirement to enable background transfers, since some state changes (not least timeouts) won't generate a device interrupt, so would otherwise never complete. Some existing implementations of HAL devices don't specify the interrupt number correctly. If we were to enable interrupts in the SD controller for these, we wouldn't be acking the correct interrupt in the interrupt controller. The kernel's default interrupt handler traditionally disabled unhandled interrupt sources, but this no longer seems to work and we end up in an infinite loop as kernel interrupt dispatch unwinds with the interrupt still pending. Even if this were fixed, failing to ack a genuine interrupt would still be undesirable behaviour in the case of shared interrupt lines, because then the other interrupts sharing the line would be collateral damage. To avoid this pitfall in the case where a new SDIODriver is loaded on an old HAL, we check for a new minor HAL device version number which indicates the interrupt number is known to be good. If the version number is too old, we implement background transfers using TickerV alone. Be warned that this can be quite slow - each operation wil typically then take 10 ms or longer. To improve foreground transfer performance in these cases, or with certain controllers (such as the BCM2835 "SDHOST" controller) that commonly change state without generating an interrupt, we also retain a poll loop during foreground transfers. To avoid a race condition between this poll loop and interrupt dispatch, which can cause deadlock in the uniprocessor case or an SMP case where the foreground transfer is being performed on the same core as the interrupt handler, the `doing_poll` mutex is upgraded to a spinrw write lock. Because this lock type disables IRQs on the local core, this in turn has an impact on interrupt latency during a foreground operation. To partially address this, the rate of polling is throttled (to an arbitrarily chosen 100,000 polls per second) rather than just being as fast as possible, as previously. Add a test program (implemented as a module to *RMRun) to measure the comparative speed of an example SD command issued as both foreground and background operations. To ensure this is safe for all devices, the command used is CMD0_GO_IDLE_STATE - but note that this will leave the device in question dormant, so you probably want to execute it from a non-SDFS filing system. Example timings for a Raspberry Pi driving the memory card bus look like this: SDIODriver HAL Controller Foreground frequency Background frequency Old Any SDHCI ~57,000 0 (never completes) New Old SDHCI ~37,000 100 New New SDHCI ~44,000 ~46,000 New New SDHOST ~63,000 100
Tweaks to support the BCM2835 SDHOST controller
* Correct order of soft entry points in assembler header (bring into line with struct sdhcidevice from h.SDHCIDevice, which is what SDIODriver itself uses to interpret the device) * Export constants in hdr.SDHCIDevice that describe the OpPoll state variable structure - analogous to sdhci_op_state_t from h.SDHCIDevice * Start the slot reset timeout from when we start calling PollSoftReset, rather than before calling SlotReset (since the latter can now take longer than the timeout by itself) * Support controllers specifying a lower block size limit. This is indicated at the low-level API by an additional flag group in the HAL device, and at the high-level API by a new reason code to SDIO_ControllerFeatures * Add a couple of development test harnesses
Support lower-speed identification phase
Some controllers (generally those that don't support reconfiguring the bus as open-drain vs push-pull) only have very weak pull-up resistors on the CMD line. This results in slow slew rates during open-drain commands for some devices, which in some cases is slow enough that responses are not detected and/or their data bits read incorrectly, resulting in identification failure. To combat this, allow the HAL device to request an even slower clock rate (50 kHz) to be used during identification.
Add new class of soft controllers
These are implemented as a new major HAL device API version, because for at least one platform (AllWinner A64) one of the optional features offered - making the DMA buffers cacheable - is required because otherwise the CPU can't keep up with the DMA controller during read operations, so a HAL device written according to certain algorithms must not be activated by earlier versions of SDIODriver. The optional features added are the abilities for the HAL device to request: * as aforementioned, that the RAM pages provided to it by SDIODriver are cacheable, not only bufferable * that a VFP context is activated around OpPoll calls, enabling them to use VFP and/or NEON instructions A couple of other minor enhancements: * uses spinrw_write_to_read(), which was a later addition to SyncLib * no effort is made to issue an SDIO abort command if the preceding SEND_RELATIVE_ADDRESS commands failed - this is slightly less likely to invoke undefined behaviour for non-SDIO devices * Add a simple test program for large read and write operations
SDIO card interrupt support
The SDIO specification allows IO cards to request servicing by driver software on the host by repurposing the DAT1 pin when it is not being used to transfer data blocks, i.e. during the "interrupt period". SD controllers typically take care of sampling DAT1 appropriately, and proxy the interrupt to the CPU by piggybacking on the SD host controller's interrupt. Thus SDIODriver needs to be involved in disambiguating card interrupts from other host controller interrupts. However, the servicing action required on a card interrupt varies from card to card, so SDIODriver needs to delegate this to individual card drivers. To achieve this, implement SWIs SDIO_ClaimDeviceVector and SDIO_ReleaseDeviceVector as previously specified. Note that these are function-specific, so for example a combined WiFi/Bluetooth card would have separate handlers for its WiFi and Bluetooth functions, potentially in separate driver modules. The fact that DAT1 interrupts are level-sensitive, and that servicing any interrupt by issuing further operations over the same SD bus - a lengthy process that requires the use of other SD controller interrupts - means that the card interrupt must be masked until servicing is complete. The card driver therefore needs some way to signal to SDIODriver that servicing is complete and DAT1 interrupts can be unmasked again. This is achieved using new SWI SDIOControl 7. To accelerate interrupt dispatch, SDIODriver has two optimisations: * If only one function has an installed handler for a given card, it skips polling the "Int Pending" register in the card, and immediately dispatches to the one handler. * SDIODriver now snoops the results of operations for each slot to keep track of which RCA (if any) is selected. This means if multiple functions have installed handlers, it only needs to issue CMD7 if the card is not selected. This facility appears to be beneficial more generally for driver code ported from other OSes, and so it is exposed via new SWI SDIO_Status 0. At the low level, any standard SDHCI controller is automatically supported, providing SDIODriver trusts its interrupt device number (i.e. minor version 2 or above). Soft controllers are supported via two additional functions: EnableCardInterrupt() and CardInterruptStatus(). These are assumed to be defined for all type-2 soft controllers (since these are being added at the same version of SDIOController as type-2 soft controllers were introduced, there's no need to test for their presence at runtime). Type-1 soft controllers are superseded by type-2 soft controllers, so there's no need to add equivalent functions to them. This commit also adds a test module which was used in development for testing card interrupt dispatch in a way that doesn't rely on having a genuine SDIO card interrupt working (which would require a card driver to be in a more advanced state than they are at the current time). This relies on a backdoor SWI in SDIODriver - SDIO_Control &100. Support for this is wrapped in #if conditionals, and may be disabled in future, once the system has been proved in real-world usage.
Add SDIO_Status call to query max block size from SDIO CIS data
This saves client programs the trouble of implementing a CIS parser to extract this information. Version 0.17. Tagged as 'SDIODriver-0_17'
Back out part-implemented DDR support for eMMC devices
Support for DDR signalling was further advanced with regard to eMMC devices than it was either for SD devices or controllers. This meant that if an eMMC device supports DDR signalling and the controller's capabilities reported that it also supported DDR (irrespective of the fact that driver support for DDR at the controller end is still absent), we ended up with a msimatch between the signalling at the controller and the device. The practical upshot of this was that eMMC devices don't complete enumeration on 4th-generation Raspberry Pis. As a stop-gap solution until DDR support for controllers is written, wrap the MMC DDR support in #if 0 statements. Version 0.18. Tagged as 'SDIODriver-0_18'
Support for controllers that misbehave when they see CMD23
The decision about when to use CMD23 to specify the length of multi-block transfers is made in SDFS, so we need to pass this information up to it via our service call and enumeration SWI APIs. Version 0.19. Tagged as 'SDIODriver-0_19'
Change how we interpret SDIO device bus speed capability
It appears that not all SDIO devices report a sensible MAX_TRAN_SPEED in their CIS - for example, many Cypress chips report 500 kbit/s there whilst simultaneously reporting support for high-speed bus speed (i.e. 50 MHz) in the CCCR, which makes no sense. Infer from the wording in the spec (it talks about a *minimum* value for MAX_TRAN_SPEED for a Low-Speed card, but only of a single value for other cards - one which corresponds to a non-high-speed bus, but this might be a legacy of a realy old version of the spec) that the speed from the CIS is only supposed to apply to Low-Speed cards. There's a flag in the CCCR which indicates such cards. Version 0.20. Tagged as 'SDIODriver-0_20'
Logs for RiscOS/Sources/HWSupport/Serial from Serial-0_47 to Serial-0_48
Fix serial IRQ mapping for Bush box, add more initialisation debug
Detail: * Bush IBX series (and other targets with SMC 669 super I/O) have active-high IRQs which requires remapping. This was incorrectly handled by the driver. Remap if ReassignedIOMDInterrupts is set. * Add more debugging to the 710 initialisation process Version 0.48. Tagged as 'Serial-0_48'
Logs for RiscOS/Sources/HWSupport/Sound/Sound1 from Sound1-1_42 to Sound1-1_43-1
Return an error on out of range SWI
Don't just silently return for a bad SWI, return an error. Also simplify the SWI return a little. Remove some unused/duplicated header and makefile includes. Version 1.43. Tagged as 'Sound1-1_43'
Build fix
Version 1.43. Not tagged
Logs for RiscOS/Sources/HWSupport/Sound/Sound2 from Sound2-1_33 to Sound2-1_34
Out of range SWI fixes
When scheduling a SWI, ensure the X bit is set when despatched. This used to be the case: the version in RISC OS 3.60 forced the X bit, but this was mis-translated to XOS_CallASWI for StrongARM with the X bit clear in R10. Fixes https://www.riscosopen.org/forum/forums/4/topics/6760 Report an error for attempts to call out of range SWIs from our SWI jump table. Delete unused Help/Syntax. Version 1.34. Tagged as 'Sound2-1_34'
Logs for RiscOS/Sources/HWSupport/Sound/Voices/Percussion from Percussion-1_18 to Percussion-1_19
Channel 8 RMA corruption fix
Adjust the workspace definitions so that Instance0 has the same address/offset as End_Of_Code, and so that WorkSpaceSize has the value Instance0 + 8*4. The previous version of the code made the false assumption that the AmountToCopy and WorkSpaceSize definitions wouldn't add anything to the output binary. This resulted in WorkSpaceSize being 4 bytes larger than strictly necessary (due to AmountToCopy before it), but more dangerously, Instance0 was placed 8 bytes after End_Of_Code, causing the code to write off the end of the heap block if the voice is assigned to channel 8. Fixes https://www.riscosopen.org/tracker/tickets/505 (Percussion variant) Version 1.19. Tagged as 'Percussion-1_19'
Logs for RiscOS/Sources/HWSupport/Sound/Voices/StringLib from StringLib-1_19 to StringLib-1_20
Channel 8 RMA corruption fix
Adjust the workspace definitions so that Instance0 has the same address/offset as End_Of_Code, and so that WorkSpaceSize has the value Instance0 + 8*4. The previous version of the code made the false assumption that the AmountToCopy and WorkSpaceSize definitions wouldn't add anything to the output binary. This resulted in WorkSpaceSize being 4 bytes larger than strictly necessary (due to AmountToCopy before it), but more dangerously, Instance0 was placed 8 bytes after End_Of_Code, causing the code to write off the end of the heap block if the voice is assigned to channel 8. Fixes https://www.riscosopen.org/tracker/tickets/505 (StringLib variant) Version 1.20. Tagged as 'StringLib-1_20'
Logs for RiscOS/Sources/HWSupport/SystemDevs from SystemDevs-1_33 to SystemDevs-1_34
Fix abort on OS_GBPB read from [u]random:
Detail: Preserve state around call to APCS leaf function source_Rand. Admin: Discovered during testing of Git client bounty. Version 1.34. Tagged as 'SystemDevs-1_34'
Logs for RiscOS/Sources/HWSupport/USB/USBDriver from USBDriver-1_31 to USBDriver-1_32-1
Adapt to different `C_EXP_HDR` settings
An upcoming change to BuildSys adjusts the default setting of `C_EXP_HDR` so that it doesn't include a trailing `.h` for native builds. Since we use the value of this variable in one of our rules, adapt accordingly (note that this implementation will work with both old and new BuildSys). Version 1.31. Not tagged
Use HostApp makefile fragment
Also fix makefile so that the generated usbdevs.h & usbdevs_data.h files are actually treated as dependencies for building makedevs Version 1.31. Not tagged
Add missing token for 'Isochronous'
Update USB device database
usbdevs from NetBSD 1.808. Version 1.32. Tagged as 'USBDriver-1_32'
Rewrite rules for exports
BuildSys 7.91 changes how top-level phony rules are overridden. In this component, the `export` target is redefined after `CModule` is included, so it will be affected. Version 1.32. Not tagged
Logs for RiscOS/Sources/HWSupport/VFPSupport from VFPSupport-0_13 to VFPSupport-0_18
Demark SoftFloat library changes
Wrap changes in __riscos so it's easier to see where they are. Binary identical result.
Update SoftFloat library to 2c
Library release from 2015 is almost identical to 2b, except * Lots and lots of comments improved, legalese wording changed * Fix for 128 bit shift in softfloat-macros * A few 32->32 and 64->64 casts which do nothing on ARM Version 0.14. Tagged as 'VFPSupport-0_14'
Minor fixes and enhancements
Makefile: Add A53 to the list that don't need any support GetAll.s: Trim some unneeded headers Macros.s: Use instruction directly now ObjAsm supports it Module.s: Fix stack imbalance in SupportHandlerTemplateSV, add Cortex-A72 table entry Salvaged from a previous concept when FMACs would be fixed up by the abort handler.
Fix for garbled 'No such SWI' message
Remember to fill in the module title for %0.
Add accelerated elementary functions
In order to reduce reliance on FPA, where we rely on the FPA transcendentals in various places which are subsequently caught and emulated via FPEmulator, expose VFP implementations of these for wider use. They are the base elementary functions corresponding to SIN/COS/TAN/ASN/ACS/ATN/POL/LOG/LGN/EXP/POW and as a bonus an FMA for pre-VFPv4 variants. Function signatures follow their C standard definition and a generic APCS to allow their use from high level languages. The FMA implementation comes from OpenLibm, translated by hand from C, and the accompanying test bed checks for bit identical results to ARM's instruction. For that to make sense clearly it needs to be run on something with VFPv4 otherwise it's comparing itself with itself! When not available in hardware the elementary functions call across to these slower software implementations via a VFused macro. Makefile: Add the new object files VFPSupport: New SWI name, and reason flags GetAll.s: Get the maths helpers Macros.s: Some helper macros for bit manipulation of FP numbers Module.s: New SWI SupportCode.s: Error handler to recover R12 and optionally throw an error Tested with a special version of BASICVFP which replaces the FPA transcendentals with a call to VFPSupport instead. Version 0.15. Tagged as 'VFPSupport-0_15'
Fix ANY_NAN classification macro
The Test/Elementary test bed could allow some infinities to erroneously be matched on NaN. Re-ran the tests, VFP variants still pass.
Ensure exception error blocks are always available
For those machine types that don't need the C support code (currently, Cortex-A8 and A53) the SupportCode.s source file is skipped. However, the elementary functions want the exception error blocks contained within. Transplant those error blocks into the globally visible Errors.s source file. Version 0.16. Tagged as 'VFPSupport-0_16'
Fix for double precision pow() with NaN argument(s)
Detail: A stack imbalance resulted when NaN was encountered. Version 0.17. Tagged as 'VFPSupport-0_17'
Fix to fp32atan2 in certain special cases
Detail: fp32atan2 would give wrong results for special cases. For all of these the sign of x was copied onto the result (rather than the sign of y as intended); where both were ±INF a register with unknown value was used to determine whether to add ±pi/2. Version 0.18. Tagged as 'VFPSupport-0_18'
Logs for RiscOS/Sources/Internat/IntKey from IntKey-0_99 to IntKey-1_00-1-gbf1678de
Added Colemak (UK) keyboard layout
Detail: Added a new layout.ColemakUK Updated makefiles, and Source files with new target and dependency Added DrawFile describing the layout Admin: Tested on IOMDHAL under RPCEmu and BCM2835 on Pi 3B and 1. Version 1.00. Tagged as 'IntKey-1_00'
Use HostApp makefile fragment
Also fix the keyconvert makefile rule Version 1.00. Not tagged
Logs for RiscOS/Sources/Internat/Inter from Inter-1_69-1-g08cc6462 to Inter-1_70
Added Colemak (UK) keyboard layout and some Swedish l10n
Detail: Added Colemak to s.InterBody (requires IntKey-1_00) Added some Swedish command help etc. Admin: Tested on IOMDHAL under RPCEmu and BCM2835 on Pi 3B and 1. Version 1.70. Tagged as 'Inter-1_70'
Logs for RiscOS/Sources/Internat/Territory/TerritoryManager from Manager-0_57 to TerritoryManager-0_58
Added Colemak (UK) keyboard layout and some Swedish l10n
Detail: Added Colemak where pertinent (requires corresponding change in IntKey) Added some Swedish help text Admin: Tested on IOMDHAL under RPCEmu and BCM2835 on Pi 3B and 1. Version 0.58. Tagged as 'TerritoryManager-0_58'
Logs for RiscOS/Sources/Internat/Territory/TerritoryModule from Module-0_63 to TerritoryModule-0_64-1
Added Colemak (UK) keyboard layout
Detail: Added Colemak (UK) keyboard layout where pertinent (requires corresponding change in IntKey) Admin: Tested on IOMDHAL under RPCEmu and BCM2835 on Pi 3B and 1. Version 0.64. Tagged as 'TerritoryModule-0_64'
Rewrite rules for resources install
BuildSys 7.91 changes how top-level phony rules are overridden. In this component, the `resources` target is redefined after `AAsmModule` is included, so it will be affected. Rewrite the rules so that they will continue to work the same (at least for native builds) both before and after BuildSys is updated. Version 0.64. Not tagged
Logs for RiscOS/Sources/Kernel from Kernel-6_43-1 to Kernel-6_70-2
Back to odd numbered development
Version 6.43. Not tagged
Remove remains of led setting from PageTest
This was introduced on 2002-10-07 in Kernel-5_35-4_79_2_48 the removed on 2002-11-30 in Kernel-5_35-4_79_2_51 as it was "liable to crash".
Remove pointless double test of Ctrl and Shift
Eliminate callback check to Portable_Idle races
Previously both `RdchInkey` and `PageTest` enabled interrupts after running callbacks before calling Portable_Idle with the result that callback could be delayed until the next interrupt. * Change `process_callback_chain` to leave interrupts disabled, and rename accordingly. * Remove redundant check of CallBack_Flag. * In `PageTest` move running calbacks into `CtrlShiftTest`, so that it is immediately before the test. * Re-enable interrupts at appropriate locations. Tested on StrongARM Risc PC. Version 6.44. Tagged as 'Kernel-6_44'
Build fix to DebugTerminal
Changes in Kernel-6_44 left an undefined symbol in s.HAL in DebugTerminal_Rdch. These mods resolve that, and also add a note in s.Kernel to reflect this usage. Version 6.45. Tagged as 'Kernel-6_45'
Increase RamFS limit to 2GB
Detail: RamFS now supports disc sizes up to 2GB-4KB, so raise the dynamic area limit from 508MB. Admin: Tested with a disc size up to 928MB Version 6.46. Tagged as 'Kernel-6_46'
Fix Service_ModeTranslation memory corruption
In HandleServiceModeTranslation, make sure WsPtr is initialised correctly before trying to use it. Fixes system heap corruption when responding to Service_ModeTranslation (most likely overwriting part of ChocolateMABlocks, and causing a crash when loading future modules) Fixes issue reported on forums: https://www.riscosopen.org/forum/forums/11/topics/15973 Version 6.47. Tagged as 'Kernel-6_47'
Allow the kernel workspace to be easily relocated
Rather than specifing absolute addresses for the workspace, use ObjASM's storage layout support.
Move ROM constant and add ASSERT
Move ROM constant to KernelWS with the reset of the memory layout. Add ASSERT to guard against workspace colliding with ROM.
Fix ROM check for callbacks
Check now works if ROMLimit is precisely at the end of ROM causing ROMLimit to not be a valid immediate.
Allow ZeroPage at any 64K aligned address
Change ZeroPage calculation so that ZeroPage can be at any 64K aligned address. Version 6.47. Not tagged
Make supervisor stack inaccessible to user mode
Previously the supervisor stack was read-only in user mode, but since the supervisor stack is typically empty when the CPU is in user mode, it's questionable whether any software actually makes use of this facility. To simplify support for the long descriptor page table format (which doesn't support the user-RO + privileged-RW access mode), let's try and remove usermode SVC stack access completely. Tested on Raspberry Pi 4 Version 6.48. Tagged as 'Kernel-6_48'
Preserve LR and CPSR in DebugTX
This ensures that the debug macros may be freeley placed without concern for if LR and CPSR contain important values, and avoid the of code only working because the debug code changes the flags with the effect of a bug appearing when debugging is enabled. Version 6.49. Tagged as 'Kernel-6_49'
More declarative memory map
Although storage maps are useful for allowing the fixed areas of the memory map to be relocated, it isn't clear in the current definition what the size of each area is, and it's hard to ensure that all the areas are kept at the correct alignment. Replace the current basic workspace definition with one which makes use of the new ASpace macro, to allow addresses to be calculated automatically based on the size & alignment of each area. Also output the address of each area in the build log for easy debugging/verification. Binary unchanged.
Remove some quirks from the memory map
The correct amount of space is now reserved for Kbuffs, and there's no need to have a 1MB gap where the old PhysicalAccess window was. Tested on Raspberry Pi 4
Expose ABTSTK via OS_ReadSysInfo 6
It's the only privileged-mode stack which doesn't have its address exposed via OS_ReadSysInfo 6. Expose it so that software which wants to know its address can read it instead of relying on hardcoded values. Tested on Raspberry Pi 4 Version 6.50. Tagged as 'Kernel-6_50'
Fix GSTrans of quoted macro variable
*BASIC *SetMacro Macro Test SYS "OS_GSTrans", """<Macro>""", &10000, &100 Would result in an erroneous "String not recognised" error as the end of macro variable was reached before closing quote. Fix by reordering the checks.
Fix OS_EvaluateExpression
OS_EvaluateExpression is documented as applying GSTrans to any strings within the expression, but did instead GSTrans the entire expression. This would result in a sequence such as: *Set Alias$@RunType_FD1 "Basic -quit ""%0"" %*1" *If "<Alias$@RunType_FD1>"="" Then Set Alias$@RunType_FD1 @RunType_FFB %*0 raising a "Unknown operand" error as the quote in the variable were interpreted as expression syntax. See https://www.riscosopen.org/forum/forums/5/topics/16127 Unfortunately skipping the initial GSTrans breaks common code such as: If "<StrED_cfg$Dir>" = "" AND <Ctrl$Pressed> = 0 Then ... If "<Zap$OSVsn>" <> "" Then SetEval ZapFonts$OSVsn <Zap$OSVsn> Fix by applying a GSTrans transformation over unquoted parts of the expression, then applying GSTrans over the quoted strings. Version 6.51. Tagged as 'Kernel-6_51'
Prepare logical_to_physical for 64bit phys addrs
ppn_to_physical, logical_to_physical, physical_to_ppn & ppn_to_physical have now all been changed to accept/receive 64bit physical addresses in R8,R9 instead of a 32bit address in R5. However, where a phys addr is being provided as an input, they may currently only pay attention to the bottom 32 bits of the address.
Start moving page table code into s.ShortDesc
In preparation for the addition of long descriptor page table support, start moving low-level page table routines into their own file (s.ShortDesc) so that we can add a corresponding long descriptor implementation in the future. * logical_to_physical, MakePageTablesCacheable, MakePageTablesNonCacheable, AllocateBackingLevel2, AMB_movepagesin_L2PT, AMB_movecacheablepagesout_L2PT, AMB_moveuncacheablepagesout_L2PT routines, and PageNumToL2PT macros, all moved to s.ShortDesc with no changes. * Add new UpdateL1PTForPageReplacement routine (by splitting some code out of s.ChangeDyn)
OS_FindMemMapEntries now uses logical_to_physical
Reduce the number of routines which directly examine the page tables, by changing OS_FindMemMapEntries to use logical_to_physical.
More code uses logical_to_physical & physical_to_ppn
GetPageFlagsForR0IntoR6 & MoveCAMatR0toR3 changed to use logical_to_physical & physical_to_ppn, to reduce the number of routines which are performing direct page table access.
DecodeL1/L2Entry -> LoadAndDecodeL1/L2Entry
Change the DecodeL1/L2Entry routines so that instead of accepting a page table entry as input, they accept a (suitable-aligned) logical address and fetch the page table entry themselves. This helps insulate the calling code from the finer details of the page table format.
Remove more direct page table access
RISCOS_LogToPhys and OS_Memory 20 (compatibility page) changed to use suitable subroutines for reading the page tables instead of accessing them directly.
Remove unused BangCam routine
Somewhere along the way, BangCam became redundant. Get rid of it.
[RISCOS_]AccessPhysicalAddress uses page flags
Currently RISCOS_AccessPhysicalAddress allows the caller to specify the permissions/properties of the mapped memory by directly specifying some of the L1 page table entry flags. This will complicate things when adding support for more page table formats, so change it so that standard RISC OS page flags are used instead (like the alternate entry point, RISCOS_AccessPhysicalAddressUnchecked, already uses). Also, drop the "RISCOS_" prefix from RISCOS_AccessPhysicalAddress and RISCOS_ReleasePhysicalAddress, and remove the references to these routines from the HAL docs. These routines have never been exposed to the HAL, so renaming them and removing them from the docs should make their status clearer. Version 6.52. Tagged as 'Kernel-6_52'
Remove SysCommsModule pseudo-module
Historically many commands of BBC Micro heritage were not included in UitilyModules, but were separated out into a separate pseudo-module, SysCommsModule, to allow for them to be terminated by any non-letter for compatibility with the BBC Micro. However with the introduction of `Oscli_HashedCommands` in August 1999 (and earlier in Ursula branch) this was broken except for *FX, *KEY, *OPT and *TV, which are handled by a special case making SysCommsModule redundant. SysCommsModule is an obsitcle to making the kernel assemble to relocatable AOF as it requires Module_BaseAddr to have 2 different values and therefore be a absolute varaible instead of a section relative symbol. This commit does not change behaviour with `Oscli_HashedCommands` enabled which is the default, except for listing the command under UtilityModule in *Help output. Which `Oscli_HashedCommands` disable this change removes the special behaviour. Version 6.53. Tagged as 'Kernel-6_53'
Ensure PhysIllegalMask is initialised correctly
Remove the lazy initialisation of PhysIllegalMask and instead manually initialise it during MMU init. This fixes some situations where the lazy initialisation doesn't work (PhysIllegalMask isn't in a zero-initialised area of workspace, so if the HAL isn't doing a RAM clear then it could be garbage)
Adjust alignment of PageShifts
PageShifts is only accessed with "ADRL xx, PageShifts-1"; adjust the alignment so that PageShifts-1 is word aligned, to try and avoid us hitting any ADRL range limits (which has happened with the runtime ShortDesc vs. LongDesc selection from future commits)
Initial long descriptor support
This adds initial support for the "long descriptor" MMU page table format, which allows the CPU to (flexibly) use a 40-bit physical address space. There are still some features that need fixing (e.g. RISCOS_MapInIO flags), and the OS doesn't yet support RAM above the 32bit limit, but this set of changes is enough to allow for working ROMs to be produced. Also, move MMUControlSoftCopy initialisation out of ClearWkspRAM, since it's unrelated to whether the HAL has cleared the RAM or not.
Remove CAM size limit
Previously the CAM sat inside a fixed 16MB window, restricting it to storing the details of 1 million pages, i.e. 4GB of RAM. Shuffle things around a bit to allow this restriction to be removed: the CAM is now located just above the IO region, and the CAM start address / IO top will calculated appropriately during kernel init. This change paves the way for us to support machines with over 4GB of RAM. FixedAreasTable has also been removed, since it's no longer really necessary (DAs can only be created between the top of application space and the bottom of the used IO space, and it's been a long time since we've had any fixed bits in the middle of there)
Initial large phys addr support for RISCOS_AddRAM
Define that bit 12 of the RISCOS_AddRAM flags indicates that the supplied start, end, and sigbits values are in 4KB units instead of byte units. This allows a 44 bit address space to be used, higher than the 40 bit LPAE limit. The page list that RISCOS_AddRAM constructs will now store everything in 4KB page units, however any RAM above 4GB will currently be thrown away when the list is later transferred to the PhysRamTable which the OS uses at runtime. Version 6.54. Tagged as 'Kernel-6_54'
Fix MaxInterrupts for Pi 4
Value needs to be increased from 256 to 320, so that the IRQ table is large enough to allow the core 2 & 3 private interrupts to be managed.
Ensure IIC bus list is fully initialised
IICInit only initialises the entries for valid IIC buses (i.e up to the limit returned by HAL_IICBuses), but some code accesses the array without checking against the HAL_IICBuses limit. This causes problems because the array lives in the SkippedTables area of workspace, meaning it isn't zero-initialised automatically. Ensure that the entries for the invalid bus numbers are zero-initialised, so that code which doesn't check against HAL_IICBuses won't mistake the invalid entries for valid IRQ-driven buses (InitialiseIRQ1Vtable, Reset_IRQ_Handler, etc.) Also, protect against overwriting the end of the array if HAL_IICBuses is more than the OS supports. Fixes hang on startup on Pi 4 if memory is filled with -1 (and OS is told that RAM isn't clear), and on Pi400 with normal memory: https://www.riscosopen.org/forum/forums/11/topics/16313 Version 6.55. Tagged as 'Kernel-6_55'
Fix RISCOS_AddRAM memory table description
There are 20 length bits per entry, not 22
Support RAM banks with high physical addresses
This changes PhysRamTable to store the address of each RAM bank in terms of (4KB) pages instead of bytes, effectively allowing it to support a 44 bit physical address space. This means that (when the long descriptor page table format is used) the OS can now make use of memory located outside the lower 4GB of the physical address space. However some public APIs still need extending to allow for all operations to be supported on high RAM (e.g. OS_Memory logical to physical address lookups) OS_Memory 12 (RecommendPage) has been extended to allow R4-R7 to be used to specify a (64bit) physical address range which the recommended pages must lie within. For backwards compatibility this defaults to 0-4GB.
Add MaxCamEntry32 & CPUFlag_HighRAM
MaxCamEntry32 is an internal variable which the kernel can use to quickly determine whether a RAM page has a 32bit physical address or something larger, by comparing with the physical page number (currently entries in PhysRamTable are sorted such that all 32bit pages come first) CPUFlag_HighRAM (aka OS_PlatformFeatures 0 bit 21) is a flag that external code can use to detect whether any high RAM is present, and thus whether 64bit physical address APIs should be preferred over 32bit ones (once the new APIs are implemented!). Using APIs which only support 32bit physical addresses will result in functionality being limited.
Define OS_Memory 0 page block format
Add to s.ChangeDyn a definition of the OS_Memory 0 page block format, and update all relevant code to use those definitions instead of hardcoded offsets.
Add OS_Memory 64, to supersede OS_Memory 0
OS_Memory 64 is an extended form of OS_Memory 0 which uses 64bit addresses instead of 32bit. Using 64bit physical addresses allows conversions to/from physical addresses to be performed on pages with large physical addresses. Using 64bit logical addresses provides us some future-proofing for an AArch64 version of RISC OS, with a 64bit logical memory map.
Extend OS_Memory 19 for 64bit phys addresses
Bit 11 of R0 can be used to indicate that the callback functions use 64bit physical addresses instead of 32bit ones.
Update OS_Memory 19 to understand non-DMAable memory
If the HAL has flagged a chunk of RAM as non-DMAable, OS_Memory 19 (DMAPrep) will now indicate that DMA to/from that region should use a bounce buffer.
Add Service_PagesUnsafe64 & PagesSafe64
These use a page block with a 64bit address fields (matching OS_Memory 64). The page list(s) contain the full list of pages involved in the operation, unlike the 32bit PagesUnsafe / PagesSafe calls, which only list pages which have 32bit addresses. The kernel issues the service calls in the following order: 1. Service_PagesUnsafe64 2. Service_PagesUnsafe 3. Service_PagesSafe 4. Service_PagesSafe64 Since only one PagesUnsafe operation can occur at a time, a program which supports both service calls can safely ignore the PagesUnsafe / PagesSafe calls if a PagesUnsafe64 operation is in progress (the PagesUnsafe call will only list a subset of the pages from the PagesUnsafe64 call). The 32bit PagesUnsafe / PagesSafe calls will be skipped if no 32bit pages are being replaced. The addition of these calls means that NeedsSpecificPages DAs (and PMPs) can now request pages which have large physical addresses. Note that the page replacement logic now has the restriction that pages which have 32bit physical addresses can only be replaced by other pages which have 32bit physical addresses. This is necessary to ensure that users of the old 32bit APIs see the page replacement take place. However it does mean that programs will be unable to claim pages of low RAM which are in use if there are not enough free low RAM pages in the free pool. A future optimisation would be to update the service calls so that they don't list required pages which are in the free pool; if all the required pages are in the free pool this would allow the service calls (and FIQ claiming) to be skipped completely.
Remove 1MB bodge from LongDesc LoadAndDecodeL1Entry
LoadAndDecodeL1Entry will now always return the size/alignment of the entry. This allows ConstructCAMfromPageTables to walk over a 2MB long descriptor page table pointer in one go, instead of splitting it into two 1MB chunks (as if short descriptor page tables were in use) and calling LoadAndDecodeL1Entry twice. This has allowed the 1MB result alignment bodge to be removed from the LongDesc version of LoadAndDecodeL1Entry.
Support runtime selection of pagetable format
Runtime selection between long descriptor and short descriptor page table format is now possible (with the decision based on whether the HAL registers any high RAM or not). The main source changes are as follows: * LongDesc and ShortDesc switches are in hdr.Options to control what kernel variant is built * PTOp and PTWhich macros introduced in hdr.ARMops to allow for invocation of functions / code blocks which are specific to the page table format. If the kernel is being built with only one page table format enabled, PTOp is just a BL instruction, ensuring there's no performance loss compared to the old code. * _LongDesc and _ShortDesc suffixes added to various function names, to allow both versions of the function to be included at once if runtime selection is enabled * Most of the kernel / MMU initialisation code in s.HAL is now encased in a big WHILE loop, allowing it to be duplicated if runtime switching is enabled (easier than adding dynamic branches all over the place, and only costs a few KB of ROM/RAM) * Some more functions (notably AccessPhysicalAddress, ReleasePhysicalAddress, and MapInIO) have been moved to s.ShortDesc / s.LongDesc since they were already 90% specific to page table format
Log -> phys conversion improvements
* RISCOS_LogToPhys upgraded to allow it to cope with all page types (added support for 64KB "large" pages and lazily-mapped pages) * Added OS_Memory 65, which calls through to RISCOS_LogToPhys, to allow regular software to do logical-to-physical conversions for all page types (other calls, like OS_Memory 0/64, typically only work with 4KB pages) * LoadAndDecodeL2Entry updated to always return a page/entry size, like LoadAndDecodeL1Entry Version 6.56. Tagged as 'Kernel-6_56'
Fix compressed ROM support
When PhysRamTable was updated to store addresses in page units instead of byte units (commit df4efb6), the code which allocates the ROM decompression workspace didn't get updated, causing it to break. Add a few extra shifts to the code in order to account for the changes. Fixes issue reported on forums with (compressed) OMAP3 ROM failing to boot: https://www.riscosopen.org/forum/forums/5/topics/16446 Version 6.57. Tagged as 'Kernel-6_57'
Build kernel using relocatable AOF
* Add KernelBaseA absolute symbol. * Use KernelBase - KernelBaseA to convert some expressions to/from AREA relative form. * Link to correct address. * Remove ORG directive * Move EndOfKernel to separate AREA
Support multiple source files
Allow RW/ZI sections to be used
* Instruct the linker to place any RW/ZI data sections in the last ~16MB of the memory map, starting from &ff000000 (with the current toolchain, giving it a fixed base address is much easier than giving it a variable base address) * The RW/ZI section is mapped as completely inaccessible to user mode * The initial content of the RW section is copied over shortly after MMU startup (in Continue_after_HALInit) * Since link's -bin option produces a file containing a copy of the (zero-initialised) ZI section, the kernel binary is now produced from a "binary with AIF header" AIF with the help of the new 'kstrip' tool. kstrip extracts just the RO and RW sections, ensuring the ROM doesn't contain a redundant block of zeros for the ZI section. This should make it easier to use C code & arbitrary libraries within the kernel, providing they're compiled with suitable settings (e.g. non-module, no FP, no stack checking, like HALs typically use)
Tidy up data abort handling
There was some redundant code needlessly pushing & popping various registers to the stack, left behind from when we removed the code that dealt with 26-bit processor vector reads on StrongARM & processed the proto-OS_AbortTrap "abort indirection nodes".
Add extra LTORG to s.HAL
Needed to resolve some literal pool range issues when long descriptor page table support is enabled
Allow arbitrary errors to be fed into DumpyTheRegisters
Improve LibKern
Add kalloc (malloc with an error pointer), free, _kernel_irqs_disabled, _kernel_irqs_off, _kernel_irqs_on, and a simple memcpy implementation. Export the symbols so they're actually usable from other object files.
Split AMB_LazyFixUp in two
If lazy task swapping is active, but it isn't a lazy task swapping abort, AMB_LazyFixUp will force all of application space to be mapped in, in order to protect the data/prefetech abort environment handlers from triggering unexpected recursive aborts (which could easily happen if the handlers make use of application space in any way). Recursive aborts generally aren't tolerated by these handlers because they're entered in ABT32 mode and may rely on the DFSR/DFAR registers being correct. To allow for more stages to be added to the abort handler inbetween lazy task swapping fixup & invoking the abort environment handler, AMB_LazyFixUp has now been split in two so that the code which maps in all of application space can be excuted at a more suitable time.
Add extra ops to hdr/Copro15ops
More data & prefetch abort registers
OS_PlatformFeatures 34: Report presence of some CP15 regs
Report whether: * DFAR & DFSR are writable * IFAR, IFSR, AIFSR, ADFSR are implemented
Add OS_AbortTrap implementation
This supports all the load/store instructions, including FPA & VFP/NEON. Most instructions are handled directly via the base version of the AbortTrap API that was first implemented in RISC OS Select. However, to properly cope with LDREX/STREX, and future support for prefetch aborts, the API has been extended to allow the kernel to request that a block of memory is mapped in with certain permissions. For LDREX/STREX the kernel will then rewind the PC so that the instruction can be retried directly. Test code in Dev/AbortTrap exists in order to allow checking of all major functionality, along with code for building the code in a softloadable module for easier/quicker testing.
Use decgen cache files
Sadly we need one file per combination of action files, but by adding these pre-generated cache files to git we can speed up building the kernel from clean by a significant amount.
Add abortable DA support
This implementation should be compatible with RISCOS Ltd's implementation.
Fix OS_ReadSysInfo 7 to record prefetch abort details
OS_ReadSysInfo 7 is meant to record the details of the last data or prefetch abort that was passed to the environment handlers. This was implemented in Ursula, but the code for recording the prefetch abort details got lost somewhere during the 32 bit conversion process. Restore it.
AbortTrap prefetch abort support
Also make lazy task swapping aborts to use IFAR where possible, to ensure any Thumb-2/Jazelle instructions which cross page boundaries are handled correctly.
Add AP 1 emulation for long descriptor page tables
The long descriptor page table format doesn't support RISC OS access privilege 1 (user RX, privileged RWX). Previously we were downgrading this to AP 0 (user RWX, privielged RWX), which obviously weakens the security of the memory. However now that we have an AbortTrap implementation, we can map the memory as "user none, privileged RWX" and provide user read support via AbortTrap's instruction decode & execute logic. There's no support for executing usermode code from the memory, but the compatibility issues caused by that are likely to be minimal.
Make OS_Memory 24 report Abortable DAs
Version 6.58. Tagged as 'Kernel-6_58'
Fix a couple of comment typos
Allocate OS_PlatformFeatures 0 bit 22
Pyromaniac doesn't allow low-level control or examination of the memory map; allocate an OS_PlatformFeatures bit to allow software to directly detect this limitation instead of having to rely on the affected SWIs erroring. https://www.riscosopen.org/forum/forums/3/topics/16609
Add safety checks to s.CPUFeatures
To avoid CallASWI's CPUFeatures implementation getting dangerously out of sync with the kernel, add extra asserts to both sets of sources to check try and make sure both sets of sources get updated when new flags are added.
Fix AbortTrap's handling of LDA instruction for emulated AP1
When AP1 memory is being emulated (long descriptor page tables are in use), the AbortTrap machinery is used to emulate usermode read access. This provides coverage for all read instructions except those that AbortTrap handles via MemMap requests - LDREX, LDA, LDAEX, LDF & LFM. LDREX & LDAEX request both read & write access, so are fine (the MemMap request will get passed through to the registered AbortTrap handlers). LDF & LFM are irrelevant, since they only exist on ARM7500FE (on other machines FPEmulator will translate them to regular LDR/LDM, which are handled correctly) LDA however, will generate a plain "memmap with usermode read" request. When AbortTrap looks at the permissions of emulated AP1 it doesn't take into account the fact that the usermode read permission is being emulated, so it thinks that everything is fine and claims the memmap was successful, causing the abort handler to retry the instruction without making any changes, resulting in an infinite abort loop. Deal with this by detecting the above situation and also requesting usermode execute access. This will avoid the kernel (and hopefully the registered AbortTrap handlers) from thinking that the emulated AP1 is acceptable, without adversely affecting the behaviour of other instructions or access privileges. If no handler is present or the memmap request is denied, the abort will get passed on to the next stage of the abort handler (i.e. you'll get a standard data abort from trying to LDA from arbitrary emulated AP1 memory) The new test program (Dev/AbortTrap/attest_ap1) will check that this edge case is dealt with correctly. Tested on Pi 4, for both long & short page tables Version 6.59. Tagged as 'Kernel-6_59'
Add symbols for access privileges to Hdr:OSMem
These are the 4 common access privilege values in bits 0-3 of OS_DynamicArea 0 and word 3 of the entries used with OS_Read/SetMemMapEntries. They are equivalent to the kernel's internal OSAP_* symbols. Version 6.59. Not tagged
[549] Fix untranslated OS_SetVarVal error message
Deleting a non-existent system variable resulted in the error message: System variable '%0' not found. Version 6.60. Tagged as 'Kernel-6_60'
Resync with allocations database
Version 6.61. Tagged as 'Kernel-6_61'
Define RISCOS_KERNEL when building the kernel
To match BuildSys 7.76
Use kernel build of SyncLib
SyncLib use is still disabled by default, but this ensures that when we do enable it we'll be using the right version of the library.
Align HAL workspace to doubleword boundary
Will be useful for HALs that want to use LDREXD/STREXD to workspace locations
Mark a few bytes of unused workspace as spare
Implement OS_TaskControl 0
Add an implementation of RISCOS Ltd's OS_TaskControl 0. In addition to the documented Select behaviour of resetting the IRQ and SVC stacks, under RISC OS 5 it resets ABT+UND, and some other important kernel variables (IRQsema + CDASemaphore)
Change *Go to use TaskControl_ResetStacks
Change OS_Module 0 to use TaskControl_ResetStacks
Change ErrHandler to use TaskControl_ResetStacks
Change OS_Exit to use TaskControl_ResetStacks
Change OS_BreakPt to use TaskControl_ResetStacks
Change DumpyTheRegisters to use TaskControl_ResetStacks
Version 6.62. Tagged as 'Kernel-6_62'
Add LTORG to s.TaskControl
Needed for BCM2835 builds, at least. Guess I should have checked that things built correctly after all the rebasing & cherry-picking that went into preparing the MR.
[498] Fix memory corruption when shrinking appspace too far
If lazy task swapping is disabled, and appspace is an AMB node, it was possible to map out the page at &7000 and trigger an abort by attempting to shrink application space to a negative size, e.g. by using "*ChangeDyn -RamFSSize" to create a RAM disc larger than the amount of available RAM. Fix it by sanity checking the DA/AMBNode size within AMBDAHandler before passing on the request to the lower-level growpages/shrinkpages calls (shrinkpages requires the input to be valid and will break if given a negative size). Version 6.63. Tagged as 'Kernel-6_63'
Fix aborttrap for ARMv3
Was trying to use SYS mode to access user registers, which was introduced in ARMv4. Fix by using STM and LDM instead. Also support reading and writing registers for 26-bit modes. Tested on RPCEmu. Version 6.63. Not tagged
Preserve R4 in DumpyTheRegisters
R4 contains the offset to adjust the PC value to use in the error message, but was being corrupted by changes in Kernel 6.62 (commit 6baad1bcd50). Version 6.64. Tagged as 'Kernel-6_64'
Use HostApp makefile fragment
Version 6.64. Not tagged
Fix register corruption in HandleServiceEnumerateScreenModes
File this under "how did this ever work": the call to DoBasicVetMode was corrupting R5 if the VIDC list was accepted by the driver (and potentially corrupting it if it wasn't), which would then cause a crash or memory corruption if this wasn't the last pixel depth that we wanted to try for this X/Y/Hz combination. This wouldn't have affected most people since most machines will be using MDFs or EDID, but I'm not sure how this got missed during my initial testing of the feature (Service_EnumerateScreenModes implementation for legacy monitor types). Fixes issue reported on forums with *Desktop crashing in the kernel after shift-booting on Iyonix: https://www.riscosopen.org/forum/forums/5/topics/17705?page=4#posts-140181
Fix HandleServiceEnumerateScreenModes returning mostly nonsense modes
A mistake in the interlace handling changes that were made in Kernel 6.21 meant that when HandleServiceEnumerateScreenModes populates the buffer that's returned to the caller, all of the modes were getting treated as interlaced, resulting in most of them reporting a Y resolution that's twice what it should be. Attempting to use those mode entries (e.g. constructing a mode selector block and calling OS_ScreenMode 0 or OS_CheckModeValid) would then most likely fail. Fix the code to look at the correct VIDC list member when checking for interlace. This fixes things so that (when using legacy monitor types) the mode lists reported by Service_EnumerateScreenModes and the display manager are once again valid. Version 6.65. Tagged as 'Kernel-6_65'
Additional HALDevice assignments for Rockchip
Version 6.67. Tagged as 'Kernel-6_67'
Rewrite rules for export rom install
BuildSys 7.91 changes how top-level phony rules are overridden. In this component, the `export`, `install`, `install_rom` and `rom` targets are redefined after `AAsmModule` is included, so they will be affected. Version 6.67. Not tagged
Get configured language from ROM module position
There's no assured 1:1 relationship between ROM module and module chain position now some modules can be started early for keyboard detection (and even ignoring that, if you *Unplug something the module chain numbers all change), so take the configured language to mean the position in the system ROM. Version 6.68. Tagged as 'Kernel-6_68'
Add symbolic names for VIDC20 device-specific flags
Add VCO, TV, NTSC video flag to VDU VideoDevice descriptor for Bush IBX (and possibly others later). Allows the HAL to convey hardware settings to the VIDC20Driver at run time. Also add the Lazarus machine name to the list of machines for abort trap. Version 6.69. Tagged as 'Kernel-6_69'
Add OS_Exit test code
OSExitArgs checks how OS_Exit handles its arguments, whether it passes the call on to the error or exit handler, and the register state on entry to those handlers. It will currently fail on this version of the kernel due to a register corruption bug introduced when OS_Exit was changed to use TaskControl_ResetStacks (the state of R0-R2 on entry to exit handlers has never been documented, and some handlers rely on R0-R2 being in a valid state to pass into another OS_Exit call, but TaskControl was corrupting R1-R2, preventing the return code from being passed on)
Fix register corruption in OS_Exit
Although it's never been officially documented, RISC OS has historically used the following values for R0-R2 when calling the exit environment handler: R0 = 0 (or some other "safe" value) R1 = R1 from OS_Exit R2 = Return code Some exit handlers were relying on this (e.g. Shared C Library / ANSILib). Changing OS_Exit to use TaskControl_ResetStacks was causing R1 & R2 to be corrupt, with the result that non-zero, non-error-generating return codes from C programs were being lost and reset to zero. Document things more clearly and ensure R0-R2 have acceptable values so that software which relies on the old behaviour will work again.
Improve error handling in OS_Exit
The poor documentation of OS_Exit in the PRMs means there could be many pieces of software which are using it in a dangerous way. E.g. the famous issue of "OS_Exit generates a garbage error if the return code is out of range" that's documented in the OS StrongHelp manuals - where people (quite rightly) assumed that the OS would generate the "return code out of range" error, when in reality the OS has only ever used the error pointer that was supplied by the caller. Try and improve on things slightly by having OS_Exit sanity check the supplied error pointer before it tries to use it. This doesn't alter the cases where OS_Exit decides to silently ignore the supplied error pointer / return code (if R0 isn't word aligned, or historically, if R0 wasn't word aligned and wasn't in the low 64MB of address space), it just alters the logic for what error pointer gets sent to OS_GenerateError when it does decide to raise an error. If the error pointer looks bad (it's below &4000 or not pointing to at least 8 bytes of readable memory) then it will get swapped out for one of the "return code out of range" errors which get used when you *Set Sys$ReturnCode. Version 6.70. Tagged as 'Kernel-6_70'
Get a tag for 5.30
Bump date for May 2024 re-release
Logs for RiscOS/Sources/Lib/AsmUtils from AsmUtils-0_19 to AsmUtils-0_21
Enable CI
Fix only issue identified: missing .gitignore
Adapt clz (and family) to use CLZ instructions where available
Version 0.20. Tagged as 'AsmUtils-0_20'
Add 64-bit versions of clz and family
Where algorithms naturally use 64-bit quantities, these functions will lend themselves to even better optimisation under AArch64. Also opt back in to the softload_gnu CI job, since this is one of the components for which it already passes. Version 0.21. Tagged as 'AsmUtils-0_21'
Logs for RiscOS/Sources/Lib/DebugLib from DebugLib-0_72 to DebugLib-0_73
Match up vprintf and dvprintf argument qualifiers
Detail: Use the same const-ness as ANSI specify for vprintf in our prototype. Correct a surprising number of out of step comment heading blocks. Version 0.73. Tagged as 'DebugLib-0_73'
Logs for RiscOS/Sources/Lib/OSLib from OSLib-6_90-1 to OSLib-6_90-2
Support cross-compilation
While this component is stored in pre-compiled form, we need the header filenames to be converted to postfix-extension form during the export phase so that compilers and other code analysis tools will find them. Because this is a somewhat unusual component, this is achieved with a custom makefile for cross-compilation use. Support is also included for converting the object files to ELF format when exporting, if `${TOOLCHAIN}` is `GNU`. Enable GitLab CI (native `Makefile` given partial GNU make compatibility to facilite some of the CI jobs, and as a side-effect will enable correct syntax colouring in GitLab). Tagged as 'OSLib-6_90-2'
Logs for RiscOS/Sources/Lib/RISC_OSLib from RISC_OSLib-6_08 to RISC_OSLib-6_23
Use "Resources:$...." not "Resources:..."
If the current directory is not it's root these are not equivalent. Version 6.09. Tagged as 'RISC_OSLib-6_09'
Add the single precision hyperbolic math routines to the stubs
Version 6.09. Not tagged
Fix for modff() yielding wrong results
Detail: modff() single precision function yielded wrong results for both fractional and integral part for most numbers because the wrong exponent bias was subtracted. Version 6.10. Tagged as 'RISC_OSLib-6_10'
[535] fminf(x,y) / fmaxf(x,y) corrupt result for equal non-zero parameters
Detail: fminf(x,y) / fmaxf(x,y) corrupted the result when x==y and x!=0.0 due to ANDing/ORRing a single precision register with the high word of a double precision register pair when fixing up signs for mixed +/- 0 parameters in an analogous fashion to fmax/fmin (which are correct). Version 6.11. Tagged as 'RISC_OSLib-6_11'
Cross-compilation support
Detail: * GNUmakefile: add translation of Makefile to GNU make / cross-compilation requirements (this component is too non-standard to make much use of the shared makefiles) * Makefile: comment out rules for objects that aren't used for any targets, for clarity; don't clean files that are never created * Various: change to using OS-agnostic filename path syntax * Various: ensure case matches for filename paths (don't assume host filing system is case-agnostic)
Auto-create empty directories
Detail: * Remove empty directories and have the Makefiles create them * Consolidate and complete .gitignore
Enable GitLab CI/CD
Detail: * Enable GitLab CI * Address issues identified by CI jobs, excluding those related to cppcheck * Enable GitLab CD for stubs (used implicitly when linker is invoked by cc) Version 6.12. Tagged as 'RISC_OSLib-6_12'
Add VFPSupport SWIs to swis.h
Version 6.12. Not tagged
Retire StrongARM build switch
Harvard caches are here to stay - can't conceive why we'd ever want to build binaries that didn't support them again. SASTMhatbroken is now conditional on the target (i.e. lowest supported) architecture being 4 or below - i.e. the workaround for the StrongARM bug isn't needed for ROMs targeting ARMv5 or above.
Add variants of _swi and _swix that take a va_list
These are typically useful for wrapper functions that want to do something before and/or after a SWI call, and which therefore need to pass a pointer to their own variadic arguments into the guts of _swi or _swix. The pairs of functions _swi and _vswi, and _swix and _vswix, are almost identical, differing only in argument marshalling. There being only two additional entries, I didn't think it was worth introducing a whole new library chunk. Instead, I've tacked them onto the end of chunk 2 (the basic clib functions). Note that this means that any applications that use these new entries will need to take responsibility for RMEnsuring this version of the SharedCLibrary module and softloading a newer one if necessary.
Reduce _swi/_swix stack usage
The (previously StrongARM-bracketed) code was overallocating stack space by 3 words in order to retain compatibility with the now-deleted dynamic code build variant. Version 6.13. Tagged as 'RISC_OSLib-6_13'
Tweak swis.h for older C standards
Prior to C18, you couldn't have duplicate typedefs (even if identical) so if you `#include` both `<stdio.h>` and `"swis.h"` the `typedef __va_list` conflicted if you specified `-c90` or `-c99`. (The header was already incompatible with `-pcc`.) Version 6.13. Not tagged
Update PickRoutineVariant to support chained variant blocks
Add C11/C18 stdatomic.h implementation
This implementation relies heavily on a new set of _kernel_atomic_* functions which implement all the atomic operations. Multiple different implementations of the functions are provided, to cater to all machines from ARMv2 to ARMv8. When targeting multiple CPU architectures, multiple variants will be compiled into the module, and the most appropriate variant will be selected at runtime when the client's stubs are filled in (using an extended version of the existing PickRoutineVariant system). Currently ROM clients will just use the variant for the oldest enabled architecture, to avoid the performance hit of runtime switching on every function call. The 40 new routines have been placed in a new library chunk (#6), so that old CLibs will properly reject any client that tries to use them, and to avoid ~500B of stubs bloat for programs that don't use them. Test & benchmark code is provided in the test/atomic folder.
Remove ARMv8 atomic routines
They need more optimisation before they're worth using over the ARMv7 routines; probably rewriting so that there are separate instances for barriers vs. non-barriers.
More flexible handling of atomics on pre-ARMv6K
For pre-ARMv6K, we generally have two sets of atomic routines available: * Fast routines which use a SWP spinlock, but are unsafe for use from interrupt handlers and the like * Safe routines which disable IRQs, but (in usermode) are much slower due to requiring SWI calls to enable/disable IRQs. Currently CLib decides which set of routines to use: modules get the slow & safe ones, while applications get the fast & unsafe ones. This change gives control of that choice to the program, by introducing the _kernel_init_flags variable. The stub code will (weakly) import this symbol and pass the value to CLib when calling the init SWI. CLib will then use the value to decide whether to fill the stubs with the safe or unsafe versions of the routines. With this change, the default is now to use the slow & safe routines, for both modules and applications. This is to ensure that code which is written/tested for ARMv6K+ machines won't run into unexpected issues when run on older machines (since the ARMv6K+ routines are safe for use from all execution contexts). The init flags are used to opt-in to the unsafe routines. Clients which are directly linked with CLib (ROM code, ANSILib) should be unaffected by this change, and will continue to use the safe routines, as before. Version 6.14. Tagged as 'RISC_OSLib-6_14'
CLib header updates
Detail: Sync the disc copies of the compiler's internal headers from cc 5.89. Add <stdalign.h> and <stdnoreturn.h> and <uchar.h> in support of C18. Now the compiler sets __STDC_VERSION__ appropriately on the nightly builds it is no longer necessary to use predefine 'DDE' to enable those additions. Version 6.15. Tagged as 'RISC_OSLib-6_15'
Fix capturing of registers in ErrorHandler
Back in RISCOS_Lib 5.35, a bug was introduced in ErrorHandler where it would try saving the registers to a garbage address for SCL builds where SASTMhatbroken is false. This bug has gone unnoticed until now because up until a few months ago, SASTMhatbroken was always true (commit 3b7d39bd in RISCOS_Lib 6.13). Move the offending line of code out of the SASTMhatbroken block so that register capturing will work correctly for all build configs. Fixes issue reported on the forums (tested with a ROM build on Pi 4): https://www.riscosopen.org/forum/forums/4/topics/17647 Version 6.16. Tagged as 'RISC_OSLib-6_16'
Remove side-effects of failed SWP detection
CheckIfSwpAvailable currently uses an error environment handler to detect the case where SWP isn't available. However there are a number of things the OS does before it invokes the error handler which could have unwanted effects - e.g. issuing Service_Error & ErrorV, clearing the hourglass, closing redirection file handles, and setting the CAO to point to the error handler. In particular the latter was found to cause the current disc image + PlingSystem to get fatally stuck on ARM2 machines - when Boot.Desktop runs any *Repeat command, application space was being shrunk to zero when Repeat calls Wimp_Initialise. Fix these problems by changing the SWP detection to directly hook on to the undefined instruction vector. See also https://www.riscosopen.org/forum/forums/4/topics/17688#posts-137994 Version 6.16. Not tagged
Don't test for LDREX then use LDREXB
Presence of LDREX does not imply presence of LDREXB. If LDREX is not available SWP was being used, so a word sized operation is appropriate. Version 6.16. Not tagged
Let clients receive gain and lose caret events
Detail: Add case labels for gain and lose caret events in rlib/win.c Admin: This is in support of Ticket #426; To plot its own caret Draw will need to receive these events. Version 6.17. Tagged as 'RISC_OSLib-6_17'
Update RISC OS Makefile to more closely match GNUmakefile
Make use of the $<, $^ and $@ automatic variables to simplify many rules, making the makefile easier to maintain and bringing it more in line with GNUmakefile. Replace the following Makefile variables with their GNUmakefile equivalents, including using the same techniques that GNUmakefile uses to generate/specify the values: * ANSI_OBJS -> ANSILIB_OBJS * ANSI_MOD_OBJS -> ANSILIBM_OBJS * CLIB_MOD_OBJS -> SHAREDCLIB_OBJS * ROM_OBJS -> ROMSHAREDRLIB_OBJS * RLIB_OBJS -> RISCOSLIB_OBJS * RLIB_MOD_OBJS -> RISCOSLIBM_OBJS Also adopt the use of STUBS_OBJS, ROMSCTUBS_OBJS, RSTUBS_OBJS and ROMSTUBS_OBJS to specify the stub object files.
Complain if the client stubs are larger than the module stubs
If the client stubs are larger than the module stubs (i.e. might be trying to use routines which don't exist in the shared library), the old behaviour was to fill the excess entries with branches to zero, which would cause an unexpected runtime error in the middle of program execution. (Except that for 32bit builds of CLib this logic was broken and it would fill the excess entries with routine addresses, most likely causing an undefined instruction abort) Change the behaviour so that instead of planting a ticking time-bomb in the running app, the CLib init SWI will instead exit with a far more useful "Shared C Library out of date" error.
Remove unused _lib_init_table symbol
Attempting to use this symbol would be dangerous, since AFAIK the order in which the linker will place the different Stub$$Init sections is undefined. Just stick to using Stub$$Init$$Base to locate the start of the stubs, like we've been doing for the past 20 years (CLib 5.41)
Lib_Init SWI comment correction
On return, R0 will be updated with the high end of workspace (R2 from input)
Annotate the library chunks with when they were extended
Update stubs to not use dangerous library chunk entries
There are a few times over the years where existing library chunks have been extended by adding new entries onto the end. However this is an unsafe thing to do, because older CLibs which don't support those entries will do one of the following: * Fill the entries with branches to random addresses (pre-5.37) * Fill the entries with branches to zero (5.37+, APCS-R) * Fill the entries with random addresses within CLib (5.37+, APCS-32) To solve these problems, I've decided to go with the safest approach possible: * Add new library chunks containing all of the entries which had been added to existing chunks * For the stubs, the troublesome entries are only available via the new chunks, and the chunks they used to be in have been shrunk to their original sizes * For compatibility with programs built with old stubs, the CLib module supports the use of the troublesome entries by both the new chunks and their original chunks * Updated the "Add new entries ..." text in the chunk entry files to discourage people from adding new entries Programs built using these new stubs, which use the troublesome entries, will require the user to install a new CLib which supports the new chunks. Running against an old CLib will fail safely with an "Unknown library chunk" error. The new chunks are set up as follows: * Chunk 7 contains the C99 float/double math functions (63 entries) * Chunk 8 contains the C99 complex math functions (50 entries) * Chunk 9 contains the other functions which have been moved around (e.g. large file support, aligned allocs, _vswi) (24 entries) Version 6.18. Tagged as 'RISC_OSLib-6_18'
Restore RISC OS makefile
Revert commit 9d96a7e0; it looks like it adversely affected the link order of the many C$$data sections, causing the library chunks in the ROM version of CLib to have incorrect size values for the static data areas. (This also suggests that if GNUmakefile was used to build a ROM version of CLib it could be broken in the same way) Re-apply the relevant bits from 87239378 so that the new stub files are still included. Future commits will hopefully restore the safe bits of 9d96a7e0 (and hopefully make things more robust) Fixes issue reported on the forums with the ROM version of CLib rejecting all ROM C modules (and probably all RAM C modules): https://www.riscosopen.org/forum/forums/4/topics/17736 Version 6.19. Tagged as 'RISC_OSLib-6_19'
Reorganise exit routes
Detail: armsys.c, hostsys.h, clib/cl_entries.s, clib/cl_body.s * Move the init flags from stdlib.c into an _init_flags struct. * Move the finalisation function from stdlib.c into armsys namespace. * Save a word of workspace by moving the error recursion flag there too. clib/cl_spare.s * Spare workspace added stdlib.c * Library finalisation and flags moved to armsys.c
Static data clarification
* Delete clib.s.cl_statics, it appears to be unused and only serves to confuse the already complex static data handling! * Added a couple of asserts that - at least in the stubs, if not in the initialisers in the shared library - ensure the kernel and C static data areas don't diverge from the magic fixed values documented in the PRM. * Remove misleading comment in clib.s.clibdata. * Add simple documentation file describing how the statics work.
Clarifications
Detail: Add some documentation on the language descriptor and its use, following recent investigations.
Work around free failure on finalisation if module re-entered
During module finalisation, we call fclose(), and one of the things this does if to attempt to free() a pointer from the application heap. For reasons not entirely clear, the pointer is not valid if the module entry point has been called more than once, and this results in free() failing noisily. However, it's also obvious that we shouldn't be attempting to manipulate the application heap from module finalisation, as we may not even have our own application slot mapped in at the time. So the workaround presented here is to skip the free() if we are not in USR mode.
Enhancements to atexit and friends
The number of atexit callbacks you can register is now essentially unlimited. For module clients, the vector chain of callbacks is stored in the RMA, as was the previous fixed-size static buffer. Add a library atexit() function now that we have lots of room for one, and move _terminateio() call into it. This means that IO is properly cleaned up after every USR mode module entry, if it happens more than once to the same instantiation. Function pointers in the vector chain are now zeroed when called, which means the pointers won't be accidentally re-called after subsequent USR mode module entries. Note that there can now be holes left if USR mode and SVC mode atexit() calls were intermingled and one or more USR mode entry has completed. Neither atexit() nor at_quick_exit() callbacks are now issued after a call to abort().
Add support for (C++) static constructor and destructor functions
Later versions of the toolchain move on from the CFront model for static object construction and destruction (which used symbols called '__link' in object files which the linker manipulated into a linked list pointed at by the symbol '__head'). Now, global or file-scope constructors are indicated by function pointers emitted into the area C$$ctorvec, with the function bodies being emitted into the area C$$ctor. The C library supports the calling of global or file-scope destructors in two ways: either they can be registered using atexit() calls from within the corresponding constructor (these are issued first) or function pointers can be provided in the area C$$dtorvec (with function bodies in the area C$$dtor). Function- or block-scope static-storage-duration destructors are a bit more complicated, since they are only constructed when the block in which they are declared comes into scope at run-time. For a module client, this means that they may be constructed in either USR or SVC mode. However, the destruction must be deferred until module finalisation in SVC mode, since there is no way for a USR mode constructor to know whether the scope will later be re-entered from SVC mode. For this scenario, atexit() will not suffice, and new entry _clib_at_destruction() must be used. (It is also valid to use this entry from global or file-scope constructors.) We add this 1 new function to cl_entry5. This chunk has not yet appeared in a stable release, nor included in a DDE release. Annotate these events too. The locations of the C$$ctor, C$$ctorvec, C$$dtor and C$$dtorvec areas are not established until client link time, so to convey this information to the shared C library, we need to extend its interface with the stubs. This is done by adding 8 additional words onto the end of the language description struct. Furthermore, so that this information is passed from the shared library kernel to the language-specific part (clib), the InitProc() entry in the language description struct is now passed a pointer to that struct. Similarly, _clib_initialise(), which previously took no arguments, now takes that pointer (but performs sanity checks on it and its contents, so that it can confidently handle old stubs for which the value of a1 is undefined). Add test programs to exercise the new functionality, without requiring the use of a C++ compiler.
RMEnsure a newer SharedCLib in stubs if they detect ctors/dtors
Also fix what looked like an accidental commit of code that caused any errors detected during the RMEnsures to be suppressed!
Reinstate cppcheck job
This is possible because the CI job has been reworked to exclude pre-existing diagnostics. Also remove definition of WHITESPACE_WHITELIST since newer versions of the whitespace job also exclude pre-existing diagnostics automatically. Version 6.20. Tagged as 'RISC_OSLib-6_20'
CLib header updates
Detail: stdio.h - rename unused member to 'clib' namespace to avoid clash with widely used macro __unused. Admin: Disc copy of the change featured with cc 5.91.
Avoid zero-page read for assert() by clients compiled to C90
This was detected by cppcheck's nullPointerRedundantCheck diagnostic. Version 6.20. Not tagged
Format txt paragraphs regardless of starting point
Change rlib (by extension, !Edit) to behave as the User Guide describes for the 'Edit->Format text' menu entry: "Place the cursor anywhere in the paragraph, choose Edit/Format text, type in a value for width and press Return" Previously, that only worked if at or between paragraph starts. Now, for any start point, Ctrl-F6 steps through the text and reformats it. Version 6.21. Tagged as 'RISC_OSLib-6_21'
Extra flag bit defines for rlib
Detail: wimp.h: Add 6 missing window flags, and flags for Wimp_SetColour. bbc.h: Add VDU 0. Version 6.21. Not tagged
Add test code for long command line handling
The LongCmd program will try running itself with various lengths of command line, checking for any cases where the command line becomes corrupt or where a crash occurs. The 'test' script will run this test. LongCmdM is a module version of the LongCmd sub-process; LongCmd can run it in order to test handling of long command lines by runnable modules. The 'testm' script will run this test. LongCmdU is a utility for generating long command lines and injecting them into DDEUtils, so that the next LongCmd / LongCmdM instance which runs will consume them. This allows testing of the case where nothing's stopping application space from growing (testu script). Currently the tests fail due to lack of stack/buffer limit checking in _kernel_init.
Move O_ArgString initialisation to a subroutine
Initialise O_ArgString later on
Move O_ArgString initialisation to near the end of _kernel_init, so that a future version can call _kernel_malloc / _kernel_alloc in order to allocate more memory if the arg string is too long for the root stack chunk
Update CopyArgString to allocate a buffer if necessary
If the root stack chunk is too small to contain the argument string, CopyArgString will now use _kernel_malloc / _kernel_alloc to allocate a buffer which is large enough to hold it.
Improve safety of stack unwinding
* Update default_unwind_handler to reject any frame with a PC below &8000 * Update _backtrace to perform some of the same safety checks as default_unwind_handler and revert to simpler output if the frame looks dodgy
DDEUtils command line etiquette fixes
In system(), try harder to avoid leaving DDEUtils with an unwanted command line, to avoid the next DDEUtils-aware program getting confused if it starts up and finds it.
Improve kallocExtendsWS poking
In the stubs, improve the comments around the poking of _kernel_kallocExtendsWS to make it clear that 0x115 is (and always has been?) the location of the variable, and add an assert to make sure that we'll catch any cases where the variable accidentally moves. Version 6.22. Tagged as 'RISC_OSLib-6_22'
Add NVMeFS SWI numbers to swis.h
Version 6.22. Not tagged
Revert "Work around free failure on finalisation if module re-entered"
This reverts commit 2788f039635ead87e54978f1db761e73194c99e7, which had the unintended side effect of causing the buffers allocated for file descriptors that were used exclusively from privileged modes to leak when the descriptor was closed.
Fault attempts to free application heap blocks from privileged modes
When a module has an application part, malloc() and free() support both application heap blocks and RMA heap blocks. malloc() chooses which to use based on the processor mode, but free() inspects the pointer to see whether it is in the RMA. This distinction is useful in case the application part wants to free a block that was allocated from privileged mode. But the reverse is problematic, because the privileged parts of a module (SWI handlers, star command handlers, interrupt handlers, callback handlers etc) cannot, in general, assume that the application slot is paged in, or whether the application is even still running. This makes it all too easy for such free calls to subtly corrupt memory in the wrong task, or cause a data abort. One such bug is what commit 2788f039 was trying to fix. The C library's heap manager is also not re-entrant, so freeing a block from a background part of a module is also dangerous. In all, we can probably assume that any such call is a bug, so we hereby change free() so that it faults them.
Allocate IO buffers from RMA for file descriptors with module lifetime
System-managed IO buffers (those not applied using setbuf() or setvbuf()) are allocated lazily using malloc(). However, this can cause problems if a file descriptor has a whole-module lifetime - because it was opened in a privileged processor mode - but if the first fread() or fwrite() is only encountered when the module's application part is executing in USR mode, because malloc() will then allocate the pointer from the application heap, and continue to use it after the application exits. Most noticeably, this can cause data aborts during module finalisation - but if you're unlucky it can cause subtle corruption of whatever application happens to be paged in at the time. stdin was also affected, since it is automatically opened during module initialisation. However, stdout and stderr are effectively operated in unbuffered mode and use a single-character buffer within the file descriptor itself, and so are unaffected. Fix this by forcing the use of RMA if the application part of a module is reading or writing a file descriptor that was not opened in USR mode. One subtle edge case that is also addressed is to cope with the fact that if the application part is run with IO redirection specified, that only persists for as long as the application runs; stdin/stdout/stderr are normally closed and reopened (without redirection) on application exit. Any stdin accesses beyond that point need to revert to using an RMA buffer. Version 6.23. Tagged as 'RISC_OSLib-6_23'
Logs for RiscOS/Sources/Lib/SyncLib from SyncLib-0_05 to SyncLib-0_07
Cross-compilation support
* OS-independent references to hdr files
Enable GitLab CI
Also create missing `.gitignore` file, as highlighted by CI pipeline.
Improve behaviour when used with RTSupport threads
Two of the locking data types - mutex_t and spinrw_t - offer a lock-with-sleep function. These can cause the current thread to sleep until another thread releases the lock. Sleeping is achieved using OS_UpCall 6, and so supports thread suspension by either TaskWindow or RTSupport. This is usually fine, but RTSupport, unlike TaskWindow, permits threads to be assigned differing priority levels. Thus, if a lock is held by a low-priority thread when a high-priority thread attempts to lock it, the low-priority thread continues to run (this is a common feature of priority-based threading systems known as priority inversion). This is unavoidable in some situations, but ideally the high-priority thread should be resumed as soon as the shared resource (in this case the lock) is released by the low-priority thread. Previously, there was no mechanism to achieve this with either of these two lock types. One challenge is to achieve this without making the unlock functions unnecessarily slow in the common case where there is no higher-priority thread to resume. This is achieved in two ways: 1) Yielding is performed using RT_Yield to explicitly rescan pollwords for RTSupport threads only. Since TaskWindow threads are all implicitly of identical priority, we avoid using an OS_UpCall 6 yield, which would cause all TaskWindow pollwords to be rescanned as well. 2) An internal flag inside the lock struct is used to remember whether any other threads attempted to lock it when it was already locked, and a yield is only performed when unlocking if this indicates there is (or might be) another thread waiting. The situation is complicated by the fact that (despite what the SWI docs say) RT_Yield can cause IRQs to trigger even if the caller has them disabled. This can however be inferred from the entry conditions of RTSupport callback routines, which usually have IRQs enabled, so if any IRQ-enabled routine is pending when we call RT_Yield, IRQs will become enabled. This is a problem because if the calling thread also holds non-re-entrant locks (e.g. a spinlock) then we defeat those locks by pre-empting the thread in this way. To deal with this, we check that IRQs are enabled prior to calling RT_Yield, even though this will also discard many cases where a yield would have been desirable. A future enhancement would be to maintain a thread-local flag, and trigger RT_Yield when the outermost IRQ-disabling lock is released (even if that lock type wouldn't ordinarily cause other threads to sleep) but this presumes thread-local storage, which is not yet implemented for RTSupport. More sophisticated schemes are possible, such as by comparing the relative priorities of the lock holder and waiter, but these introduce additional overheads into the lock and unlock functions, so unless and until it becomes clear that they are required, they have not been implemented. Version 0.06. Tagged as 'SyncLib-0_06'
Use zero-init data areas
Change all the data areas to be zero-init, to avoid them pointlessly taking up space in binaries. Also, remove support for the short version of the Load/Store macros, since SyncLib has no way of guaranteeing that the linker won't put large amounts of other code/data inbetween the pairs of code & data sections. Considering that only the application build of SyncLib used the short versions, and most of SyncLib isn't suitable for use from usermode (including synclib_init), losing the short versions is no great loss.
Update documentation
* Mention ARMv2 isn't supported * Revise spinlock & spinrw documentation to say any privileged mode is supported, not just SVC mode * Document which functions may call SWIs
Add kernel build config, and WIP HAL config
* Add spinrw_write_unlock_noyield & spinrw_read_unlock_noyield functions which, instead of yielding, return a flag for whether there's another thread waiting. This will allow the caller to decide whether (and how) to yield. * For HAL builds, the main change is that SWIs aren't allowed, so map mutex_sleep_lock() to mutex_lock(), and disable all RT_Yield calls For the HAL build we still need to work out a way of handling the data section, so currently that config isn't enabled in the makefile. Potentially it could be conditionally enabled for the machine types where the data sections aren't needed.
Reimplement spinrw write lock functions to use spinrw_write_try_lock
This eliminates some duplicate code, at the cost of slightly slower locking
Rewrite synclib_init
* synclib_init now imports all the individual init functions as weak symbols, to avoid pulling in object files for unused features * Calculation of CPU feature flags has been moved to a separate function, synclib_get_cpuflags, in a separate object file, to allow a further reduction in binary size if none of the init functions are needed For many cases this should result in a reduction in binary sizes by allowing more unused code to be stripped out - although for Pi ROM builds this has increased the size, due to the extra overheads that have been added to the functions that are needed. Further reductions could be possible by allowing individual unused functions to be stripped out, especially if we continue to gain more variants (e.g. lock with timeout)
Avoid initialisation code + data areas for HAL/kernel builds
For HAL builds we don't have a good way of dealing with data sections, and things get even more complicated if code needs to work both pre- and post- MMU activation. Modify the library so that the HAL/kernel build configs don't require any initialisation for any of the current ROM targets, and add asserts to try and make sure no cases were missed. Currently the synclib_init function still exists for HAL/kernel configs, but the implementation should do nothing. Makefile also modified to enable building the HAL version of the library.
Use STREX result codes from Hdr:CPU.Generic32
Instead of defining our own names for the STREX result codes, use the common ones that were recently introduced in HdrSrc 2.98
Use RISCOS_ZM instead of zM
The zM variable/define is hard to search for, so replace it with the new RISCOS_ZM variable that BuildSys now provides. Version 0.07. Tagged as 'SyncLib-0_07'
Logs for RiscOS/Sources/Lib/TCPIPLibs from TCPIPLibs-5_69 to TCPIPLibs-5_78
Add numeric service name support to getaddrinfo()
Useful extra flag AI_NUMERICSERV was added in 2005 https://svnweb.freebsd.org/base?view=revision&revision=140908 as defined in RFC3493. Merge those changes to our copy. Tested with an application which used a numeric (rather than named in InetDBase:Services) service. Version 5.70. Tagged as 'TCPIPLibs-5_70'
Header file update
The change in TCPIPLibs-5_69 updated sys/time.h from FreeBSD revision 18397, but omitted the changes to the sys/stat.h header file which was in the same commit. Merge those too and bring it up to RCS revision 8.12 from 1995. Version 5.71. Tagged as 'TCPIPLibs-5_71'
LibraryDoc update
Detail: * De-emphasise COMPAT_INET4 as it is due to be removed * Warn about about "errno.h" with ANSI header of the same name Version 5.71. Not tagged
Part merge from FreeBSD 12.3 for disc based components
Detail: In support of the updated disc based utilities residing in !Internet, selected updates from the corresponding FreeBSD 12.3 headers are required to build. *headers* Makefile - now exports sctp and capsicum headers. arpa/inet.h - partial merge to add in_addr_t type. arpa/tftp.h - partial merge to update error codes. unistd.h - correction to usleep prototype. net/ethernet.h - partial merge to add ether_XtoY prototypes. net/if.h - partial merge to add LINK_STATEs and if_announcemsghdr. net/if_types.h - fully merged. net/route.h - partial merge of RTV_ and RTM_ defines. netinet/in.h - partial merge of IPPROTO defines. netinet/ip_icmp.h - partial merge of ICMP subreason codes. netinet/sctp.h - new file. netinet/sctp_constants.h - new file. netinet/sctp_header.h - new file. netinet/sctp_uio.h - new file. sys/capsicum.h - dummy header (privilege model doesn't apply on RISC OS). sys/cdefs.h - noop FBSDID for source files with that tag present. sys/param.h - partial merge to add nitems array counting macro. sys/socket.h - partial merge of CMSG defines and extra SO options. sys/sockio.h - partial merge of extra SIOC options. sys/sysctl.h - partial merge of CTLTYPE/CTL_SYSCTL lists, constify pointers. sys/time.h - partial merge of operations on timespecs and more CLOCK sources. sys/types.h - partial merge of clockid_t for CLOCK sources and 64b kvars. sys/uio.h - correction to iov_base prototype. *inetlib* ether_addr.c - new file, ether_XtoY functions. gethnad.c - updated to set h_errno correctly. getifaddrs.c - moved here from UnixLib to avoid circular link dependency. getnainfo.c - updated to FreeBSD r167121 to add AF_LINK support. sysctlbyna.c - constify pointers. inetlib.h - constify sysctl pointers. *socklib* socklib.h - constify sysctl pointers. *unixlib* alloc.c - new file, reallocf function. clockgtime.c - new file, clock_gettime function (based on gtimeofday.c). err.c - fix to verr to use variadic sprintf, add errc and warnc families. herror.c - extended to define hstrerror function for resolver errors. kvm.c - add support for 64b kvars. sleep.c - add an implementation of usleep by calling on select. strlcat.c - new file, strlcat function. strlcpy.c - new file, strlcpy function. strtonum.c - new file, strtonum function. trimdomain.c - new file, trimdomain function. unixlib.h - added new functions, as above. Note the long long variables must be hidden in pcc mode (for building rpclib). Admin: Submission for TCP/IP bounty.
Add minimalist (text only) libxo implementation
Detail: libxo is a printf-like library used by some command line tools which then have the option to write output in various textual forms. In the case of the disc based utilities only a limited subset of the library functionality is required, and this implementation provides only text generation from the various xo formatting/command strings. Its RISC OS name is xolib, and like UnixLib this is intended to assist in porting command line tools that use libxo, rather than being a full implementation. xo.h - the complete header file from Juniper Networks textonly.c - a text only implementation for RISC OS command line tools Admin: Submission for TCP/IP bounty. Version 5.72. Tagged as 'TCPIPLibs-5_72'
Administrative changes
Detail: * Reorder !ExportAll - inetlib requires socklib.h and unixlib.h to already have been exported in order to build * Vestige of RISC iX (sys/arm/fp.h) removed * Assume long filenames available to eliminate a rename during export_hdrs Admin: Derived from work by Ben Avison.
Switchover rpclib to Inet5
Detail: Updated to support Internet 5 style structures, and now built that way too. Admin: Submission for TCP/IP bounty. Version 5.73. Tagged as 'TCPIPLibs-5_73'
Change ownership of exported headers, restore filenames
Detail: Filenames restored where previously truncated at 10 characters. Have rpclib export its own headers, as socklib/xolib/inetlib/unixlib do. Don't export TCPIPLibs:rpcsvc any more (unused).
Bulk import of RPCSRC-4.0 from Solaris sources
Admin: These are the unmodified sources, to create a point to diff against, they will not build yet.
Replace Sun RPC licence with a 3-clause BSD licence (part 1)
With the explicit permission of Sun Microsystems in 2009. Citation: https://git.freebsd.org/src.git commit 2e322d37
Replace Sun RPC licence with a 3-clause BSD licence (part 2)
With the explicit permission of Wim Coekaerts, Senior Vice President, Linux and Virtualization at Oracle Corporation. Citations: * rpclib/rpcsvc/x/rnusers, rpclib/rpcsvc/x/yp: https://git.freebsd.org/src.git commit 8785398f * other files: https://spot.livejournal.com/315640.html
Replace Sun RPC licence with a 4-clause BSD licence (part 3)
This is the last remaining bit of code using the Sun licence, so remove it from the LICENSE file too. Citation: https://opensource.apple.com/source/portmap/portmap-3/portmap.c.auto.html
Clarify licence of rquota.x
This file is distributed as part of OpenSolaris under the CDDL licence. Citation: https://github.com/illumos/illumos-gate.git revision 7c478bd9
Remove demo programs
These are unused, and the licensing conditions on them are unclear.
Attribute and relicence rpclib/etc/c/getopt
The original author appears to have been William LeFebvre, and the code has been relicensed by him under the 3-clause BSD licence. Citation: https://fossies.org/linux/top/getopt.c
Port of rpclib to RISC OS
Detail: Reapply changes made for rpclib to build & run on RISC OS. Admin: Submission for TCP/IP bounty. Version 5.74. Tagged as 'TCPIPLibs-5_74'
Cross-compilable
Detail: * Makefiles rewritten to use shared makefiles * socklib/mkveneers now adapts between prefix/suffix filename extensions * fix a few cases of incorrect-case include filenames * consolidate and complete `.gitignore` * enable GitLab CI * cppcheck infinite-inclusion issue resolved by rewriting headers at export time for cross-compilation builds * added missing licence header to test/c/timeo Version 5.75. Tagged as 'TCPIPLibs-5_75'
Add __min_size to sys/cdefs.h
Version 5.76. Tagged as 'TCPIPLibs-5_76'
Retire obsolete or unused headers
Detail: Remove internal use svcdebug.h (moved to Internet component). Remove 4x headers, RISC iX vestiges of podule ("eXpansion Card Bus") support. Admin: Submission for TCP/IP bounty. Version 5.77. Tagged as 'TCPIPLibs-5_77'
Socket library updated from FreeBSD 12.4
Detail: recv5 and send5 updated from libc/net/recv.c and send.c respectively. Prototypes in socklib.h changed to use socklen_t or size_t as applicable in socket.h changed to avoid mismatch. During a transition period, and in order to avoid pointer mismatch errors at compile time for code written using 'int', the type socklen_t is currently a signed type. Admin: Submission for TCP/IP bounty.
Retire obsolete Xerox NS address family
Detail: This mirrors a change made in FreeBSD SVN revision 111926, 05-Mar-2003. Update library documentation to remove references to it too. Admin: Submission for TCP/IP bounty. Version 5.78. Tagged as 'TCPIPLibs-5_78'
Logs for RiscOS/Sources/Lib/UnicodeLib from Unicode-0_63-1-gf47d7578 to Unicode-0_63-2-g1b8b080f
Use HostApp makefile fragment
Also fix !MkClean to strip dependencies from mkunictype/mk Version 0.63. Not tagged
Logs for RiscOS/Sources/Lib/remotedb from remotedb-0_12 to remotedb-0_12-1-gc06162f1
Drop COMPAT_INET4 support
Detail: This component is only used with DebugLib, and all uses of ${DEBUGLIB} are linked with ${NET5LIBS}, so this combination wouldn't have worked anyway. Use agnostic TCPIPLibs: include path, so CI works. Version 0.12. Not tagged
Logs for RiscOS/Sources/Networking/AUN/Access/Freeway from Freeway-0_41 to Freeway-0_42
Adjust capitalisation for UpCall
Detail: Fix capitalisation of UpCall.h for case-sensitive filesystems Version 0.41. Not tagged
Drop COMPAT_INET4 support
Detail: Fill in the sockaddr_in address length, migrate msghdr initialisation, cater for varying ifconf entry size, don't hardwire the IFNAMSZ. Use agnostic TCPIPLibs: include path, so CI works. Admin: Submission for TCP/IP bounty. Version 0.42. Tagged as 'Freeway-0_42'
Logs for RiscOS/Sources/Networking/AUN/Access/ShareFSBlob from ShareFSBlob-3_60 to ShareFSBlob-3_62-1
Import of updated ShareFS binary
Detail: Drop COMPAT_INET4 support Admin: aof/ShareFS built with cc 5.89 in the All32 environment aof/ShareFSSA built with cc 5.89 in the Disc environment Version 3.61. Tagged as 'ShareFSBlob-3_61'
Import of updated ShareFS binary
Detail: Fix for latent buffer overwrite bug activated by the change to Internet 5 style structures in version 3.61, manifesting in the broadcast of share updates to clients not being sent. Admin: aof/ShareFS built with cc 5.89 in the All32 environment aof/ShareFSSA built with cc 5.89 in the Disc environment Version 3.62. Tagged as 'ShareFSBlob-3_62'
[621] Add the sprites for pre-RISC OS 3.60 to the standalone module
Version 3.62. Not tagged
Logs for RiscOS/Sources/Networking/AUN/Internet from Internet-5_65 to Internet-5_67
Preemptive casts ahead of header changes
Detail: The iov_base will be changing from char to void pointer in future, preemptively insert a cast in 'kern_subr.c' to prevent compiler errors. Move svcdebug.h here from TCPIPLibs since its only (private) implementation is this component, and remove unused includes of 'ioc.h' and 'int_hndlr.h'. Admin: Submission for TCP/IP bounty. Version 5.65. Not tagged
Increase maximum number of simultaneous sockets
Detail: Raise the maximum number of sockets that can be open from 96 to 256, the limit can be read with Socket_Gettsize. Add a compile time check, and tie the socket count to the NSTAB relationship. Admin: Submission for TCP/IP bounty. Version 5.66. Tagged as 'Internet-5_66'
Retire obsolete Xerox NS address family
Detail: This mirrors a change made in FreeBSD SVN revision 111926, 05-Mar-2003. Admin: Submission for TCP/IP bounty. Version 5.67. Tagged as 'Internet-5_67'
Logs for RiscOS/Sources/Networking/AUN/Net from Net-6_26 to Net-6_27
Drop COMPAT_INET4 support
Detail: Fill in a missed sockaddr length in gwroute/startup.c, cater for varying ifconf entry size. Admin: Use agnostic TCPIPLibs: include path so CI works. Submission for TCP/IP bounty. Version 6.27. Tagged as 'Net-6_27'
Logs for RiscOS/Sources/Networking/DHCP from DHCP-0_27 to DHCP-0_27-1
Build fix when CmdHelp=None
Detail: Messages is still required even if the OS doesn't support command help. Version 0.27. Not tagged
Logs for RiscOS/Sources/Networking/Econet from Econet-5_80-1-g691d0361 to Econet-5_81
Run time discover IO controller address
Rather than always using &3200000, try to look up IOC/IOMD's address. Pull out common FIQ downgrade accessing code as a macro. Tested on an A5000 (OS 3.10) with 0243,020 NIC and SA Risc PC (OS 5.28) with AEH60 NIC. Version 5.81. Tagged as 'Econet-5_81'
Logs for RiscOS/Sources/Networking/Ethernet/EtherUSB from EtherUSB-0_42 to EtherUSB-0_44
Adjust capitalisation for UpCall
Detail: Fix capitalisation of UpCall.h for case-sensitive filesystems Version 0.42. Not tagged
Rewrite rules for AutoSense disc install
BuildSys 7.91 changes how top-level phony rules are overridden. In this component, the `install` and `standalone` targets are redefined after `CModule` is included, so they will be affected. Version 0.42. Not tagged
Update CDC backend to complete ECM support
Change to use NetBSD's header for the CDC definitions
Improvements to CDC-ECM to increase range of supported devices
Detail: Allow class CDC-ECM and those whose top level class is 0.0:0 too. Open an interrupt pipe in order to get status notifications, use this to populate the device abilities/status more accurately. When querying the MAC address, parse the language table before requesting the string. MTU correctly calculated. Log improvements to help debugging.
Automatically set configuration of certain CDC devices
Detail: Some communication devices have several configurations, including a CDC one which is not the default selected. Add these to the the products match mechanism (using table entries, or system variables) so that EtherUSB can automatically select the correct configuration when encountered. The configuration change is made on a callback when trying to open the CDC device, which on first pass returns a failure error. This is because at the time USBDriver sends the 'Attached' service call we can't issue star commands which affect the USB stack without the risk of a reentrancy problem. Once idle the callback fires and sets the configuration and the new descriptors can be read safely for a second pass at opening. If EtherUSB is subsequently killed, restore the default device configuration so the system is back in the state in which it was found - this avoids a hang with devices which don't start up in the CDC configuration by default. Admin: Add a rule for debug to account for makefile changes in BuildSys 7.91.
Fix for race condition with ShareFS on some CDC adapters at 1Gbps
Detail: ShareFS (using UDP) could get in a race condition when pushing files > 4kB to a remote share. The transmit buffer was large enough to send multiple frames without checking for any receives, so the acknowledge from the remote share was lost. Retry logic within ShareFS concluded the frames should be resent, with the same result - no ack - followed by resending. The computer would consume 100% of CPU time retrying until the cable was unplugged. Protocols using TCP were not affected due to window size negotiation inherent in that connection type. Reduce the transmit buffer size to 2048 bytes (+1 for a workaround for DeviceFS 0.69 and earlier) to match 3 of the other EtherUSB backends. This gives chance to check the receive queue between transmitted frames. Use symbolic names for arguments to usb_control(). Increase the module version number reported to InetSetup by the AutoSense utility. This ensures that if a module with CDC support is softloaded and configured then on restart the RMEnsure in Choices:Internet.Startup will not leave the user without an interface if an older copy is present in ROM. Admin: Submission for USB bounty. Version 0.43. Tagged as 'EtherUSB-0_43'
Fix for NULL pointer dereference if options string is also NULL
In products_match() not all code paths assign 'options' to an empty string, so it is possible that it's still NULL by the time it reaches the backend. Version 0.44. Tagged as 'EtherUSB-0_44'
Logs for RiscOS/Sources/Networking/NetStatus from NetStatus-2_09 to NetStatus-2_09-1
This commit was manufactured by cvs2git to create tag 'NetStatus-2_09'.
Sprout from master 2003-12-02 17:24:30 UTC Ben Avison <bavison@gitlab.riscosopen.org> 'This is exactly what that was supposed to avoid...' Delete: MkRelease,fd7
Unused file put in attic
Retagged as NetStatus-2_09.
Logs for RiscOS/Sources/Networking/Omni/Protocols/OmniLanManFS from OmniLanManFS-2_66 to OmniLanManFS-2_70
Option to enable hidden files to be seen in LanManFS
Details: Allow name mode to select visibility of hidden files to be switched on or off. The default remains off. Resources/UK/CmdHelp, cmhg/LanMan_MH, c/LanMan and c/SMB modified. SMB_Delete, SMB_Rename and SMB_GetAttibs in c/SMB modified to work with switch. Admin: Tested with ARMX6 connected to Armbian. Version 2.67. Tagged as 'OmniLanManFS-2_67'
Preserve full load/exec for untyped files
Rather than turning any untyped file into ",lxa" suffix (and in the reverse direction giving the base address of the Kernel back), support ",llllllll-xxxxxxxx" style suffixes like RPCEmu does in order to preserve the full load and execution addresses. Xlate.c: Extra code to parse the suffix, and simplification of existing suffix checkers. CoreFn.c/Xlate.h: Need to pass on the exec address too for when creating new files via Xlt_AddROType. Makefile/LanMan_MH: Case of CMHG file changed to match sources. Version 2.68. Tagged as 'OmniLanManFS-2_68'
Drop COMPAT_INET4 support
Detail: Fill in the sockaddr_in address length. Use agnostic TCPIPLibs: include path, so CI works. Admin: Submission for TCP/IP bounty. Version 2.69. Tagged as 'OmniLanManFS-2_69'
[613] Use server timezone in timestamp conversion
Detail: The SMB protocol requires the timesstamp to be in the server's timezone. The serverTimeZone returned by SMB_Negotiates used to convert the RISC OS timestamp to SMB timestamp. Tested by reading the filestamp of a saved file on Windows, Linux and RISC OS. Tested with AMU. Compiling from a Linux server AMU now sees mods to files made from other OS as newer. Note: Connecting to a local server in the winter in the UK will not exhibit the timestamp problem as the server timezone will be 0. Version 2.70. Tagged as 'OmniLanManFS-2_70'
Logs for RiscOS/Sources/Networking/ResolverBlob from Resolver-0_72-2 to ResolverBlob-0_74
Import of updated Resolver binary
Detail: Drop COMPAT_INET4 support Admin: aof/Resolver built with cc 5.89 in the All32 environment aof/ResolverSA built with cc 5.89 in the Disc environment Version 0.73. Tagged as 'ResolverBlob-0_73'
Import of updated Resolver binary
Detail: Fix for appearing to ignore the hosts database; Resolver-0_73 was built checking for, and failing to find, /etc/hosts rather than InetDBase:Hosts. Admin: aof/Resolver built with cc 5.90 in the All32 environment aof/ResolverSA built with cc 5.90 in the Disc environment Version 0.74. Tagged as 'ResolverBlob-0_74'
Logs for RiscOS/Sources/Programmer/BASIC from BASIC-1_81 to BASIC-1_85
Fix VFNMA and VFNMS inversion
The A1 encoding uses op=1 for add & op=0 for sub (opposite to VFMA and VFMS, of course). Version 1.82. Tagged as 'BASIC-1_82'
Add missing VLD alignment options to the assembler
* "VLD single element to all lanes" had the alignment options listed incorrectly, preventing them from working. Fix by adding a dummy option for 8 bit alignment, like "VLD single element to all lanes". * "VLD single 4-element structure to all lanes" was missing support for 32 bit elements with 64 bit alignment. * Add extra instructions to TestVFP to test all the different "single to all lanes" alignment options. Version 1.83. Tagged as 'BASIC-1_83'
Use VFP transcendentals when FPOINT=2
Get table of double precision VFP elementary functions at startup. Since BASICVFP isn't offered as a standalone module, we use the error causing SWI, as the corresponding VFPSupport will be in ROM. Shrink VFPFLAGS to 1 byte, to allow VFPTRANSCENDENTALS addition to workspace without needing to move PAGE. Replace the keywords using FPAop with VFP ones, and their use in ELLIPSE. Version 1.84. Tagged as 'BASIC-1_84'
Build fix
Version 1.84. Not tagged
Don't error if BFC/BFI reaches top bit
Check the msbit field fits in 5 bits after doing the inclusive adjustment. Ref: https://www.riscosopen.org/forum/forums/4/topics/17494 Version 1.85. Tagged as 'BASIC-1_85'
Logs for RiscOS/Sources/Programmer/BootCmds from BootCmds-1_49-1 to BootCmds-1_53
Modified to open "Resources:$...." not "Resources:..."
Version 1.50. Tagged as 'BootCmds-1_50'
Add image file support to *Repeat
Previously *Repeat ignored any files FileSwitch classified as images. Since file system objects are only identified as image files if their image file system is loaded, this is inconsistent and inconvenient. Changes: * If both -files and -directories are specified, then image files are how also processed in addition to normal files and directories. * -type is now able to match image files. Version 1.51. Tagged as 'BootCmds-1_51'
Allow a leaf after a path
Split at '.' or ':', ref https://www.riscosopen.org/forum/forums/4/topics/15150 Actively report if the dir given exists but application does not, eg. *AddApp !NotPresent because if no dir is given @ is used, @ always exists, compare with *AddApp NotPresent.!Anything which errors because the dir doesn't exist (and by extension !Anything also). Also, return a descriptive error if malloc fails rather than just be silent. Version 1.52. Tagged as 'BootCmds-1_52'
Wildcarded path fix
In BootCmds-1_52 an error was added if the application being AddApp'd doesn't exist. However, that didn't take into account that AddApp can be used with a wildcard, and that the wildcard may return no matches. Be quiet in this case. The new feature to handle paths (eg. myapp:!AppName) could get 'Dir not found' from OS_GBPB. Fix this by holding the original path internally. Version 1.53. Tagged as 'BootCmds-1_53'
Logs for RiscOS/Sources/Programmer/Debugger from Debugger-2_07-1-g4ffc3ea2 to Debugger-2_08
Fix VLD2/VST2 "single lane" disassembly
Register increments were off-by-one, resulting in nonsense like "VLD2.8 {D0[3],D0[3]},[R0]"
Remove CSDB architecture version warnings
Although CSDB was only codified at around the time that ARMv8.4 was introduced, there aren't any architecture version restrictions placed on it in the ARMv8 ARM, and the encoding was even added to a new edition of the ARMv7 ARM, also without any architecture version restrictions. For ordinary instructions this would feel a lot like a documentation error, but since CSDB is a barrier instruction which fits inside a NOP-like address space (MSR which doesn't write to any PSR fields), and it was introduced as part of Arm's Spectre/Meltdown mitigations, it's likely that Arm did their homework and confirmed that the encoding has the correct behaviour on all (licensed) implementations. The ARMv7 ARM only goes back to ARMv4, but it's likely that older CPUs also implement CSDB correctly, by virtue of the fact that they'll be too old to be doing any speculative execution. With the above in mind, it should be safe to remove our "ARMv8.4 or later" warning from the disassembly. Version 2.08. Tagged as 'Debugger-2_08'
Logs for RiscOS/Sources/Programmer/HdrSrc from HdrSrc-2_91 to HdrSrc-3_05
Adjust capitalisation for UpCall
Detail: Makefile: Export to "h.UpCall" rather than "h.Upcall"; this change won't affect any builds, but if anybody includes "Global/Upcall.h" then cross-compilation fails on case-sensitive filesystems since GNUmakefile uses "UpCall". Admin: Untested Version 2.92. Tagged as 'HdrSrc-2_92'
Resync with allocations database
* Various new public filetypes * New keyboard layout Version 2.93. Tagged as 'HdrSrc-2_93'
Add 32k HAL size option
For those HALs which are << 64k this would allow 32k of space reclaim, giving the full progression 32->64->96->128 to choose from. Version 2.94. Tagged as 'HdrSrc-2_94'
ARMVv4 architecture switch correction
Looks like a copy/paste of the ARMVH switch, with the effect that [Support|No]ARMVv4 were both unset false (should be impossible) and [Support|No]ARMVH cross wired as the ARMVv4 value instead. Version 2.95. Tagged as 'HdrSrc-2_95'
Suppress warnings when UAL is in use
Detail: APCS Return macro changed when UAL is in use to remove warnings. Push and Pull in Hdr:Macros also changed for UAL. PullAPCS and single register push/pull substitute Push and Pull macros. Version 2.96. Tagged as 'HdrSrc-2_96'
Support Machine=CortexA53
Version 2.97. Tagged as 'HdrSrc-2_97'
Define STREX result codes
Add STREX_succeeded & STREX_failed to Hdr.Global.CPU.Generic32, so components don't have to define their own versions Version 2.98. Tagged as 'HdrSrc-2_98'
Resync with allocations database
Version 2.99. Tagged as 'HdrSrc-2_99'
Only include Hdr:Machine.<Machine> from Hdr:CPU.Arch if not already
The logic behind this is to permit the calling source file to override which `Machine` type is used, by `GET`ting a different one first. This can be useful for a component that can only be built for one `Machine` type (for example, many IOMD-only driver modules). Version 2.99. Not tagged
Resync with allocations database
Version 3.00. Tagged as 'HdrSrc-3_00'
Resync with allocations database
Version 3.01. Tagged as 'HdrSrc-3_01'
Add FramADR macro
While poking around in FileSwitch I spotted that (a) it currently isn't using the FramLDR/FramSTR macros (instead manually calculating offsets from Proc_LocalStack), and (b) in a few places it was using `ADD dest, sp, #Proc_LocalStack+n*4` to get the address of an argument. Add a FramADR macro which can be used to perform that task, so that everything is ready for switching FileSwitch over to using the Fram macros. Version 3.02. Tagged as 'HdrSrc-3_02'
Resync with allocations database
Version 3.03. Tagged as 'HdrSrc-3_03'
Re-add Lazarus (Bush IBX set-top box) support
Extend hdr/CPU/Arch to set up the corresponding CPU type flags. Also changes to hdr/Machine/Machine to recognise the "Lazarus" machine type as an IOMD variant using the HAL (because ARM7500FE is a SoC with an FPA-enabled ARM7 with VIDC and IOMD on a single chip). Version 3.04. Tagged as 'HdrSrc-3_04'
Resync with allocations database
Version 3.05. Tagged as 'HdrSrc-3_05'
Logs for RiscOS/Sources/Programmer/HostFS from HostFS-0_02-4_2_2_1 to HostFS-0_04
Cross-compilable
Detail: * Rewrite makefile to use shared makefiles (requires splitting off into sub-makefiles because there are both app and module targets) * Alter to support assembly with objasm, not just aasm * Enable GitLab CI * Consolidate and complete .gitignore Admin: Requires BuildSys-7_58 Version 0.02 (HAL.2). Tagged as 'HostFS-0_02-HAL_2'
Cross-compilable
Detail: * Rewrite makefile to use shared makefiles (requires splitting off into sub-makefiles because there are both app and module targets) * Alter to support assembly with objasm, not just aasm * Enable GitLab CI * Consolidate and complete .gitignore Admin: Requires BuildSys-7_58 Version 0.03. Tagged as 'HostFS-0_03'
Merge branch 'HAL'
* The target `TML_HostFS` continues to build the driver for the TML podule, as was the case previously on branch `master`. * The target `TML_HostFS` from the `HAL` branch, which is a veneer to the `DADebug` module, can now be built by using the new target `DA_HostFS`. * The target `HAL_HostFS` builds the variant that uses the HAL DebugTX API, as was the case previously on branch `HAL`. Version 0.04. Tagged as 'HostFS-0_04'
Logs for RiscOS/Sources/Programmer/Obey from Obey-0_40 to Obey-0_41
Use "Resources:$...." not "Resources:..."
If the current directory is not it's root these are not equivalent. Version 0.41. Tagged as 'Obey-0_41'
Logs for RiscOS/Sources/Programmer/RTSupport from RTSupport-0_17-1 to RTSupport-0_18
Extra protection against async aborts
Version 0.14 changed the default PSR for new threads to disable async aborts, to match how most (all?) machines run the main RISC OS thread. However there are a few other places in the code which set the PSR to constant values and could allow async aborts to slip in. Track down the places where constant PSR values are being used and make sure the A bit gets set, to avoid async aborts becoming enabled. Version 0.18. Tagged as 'RTSupport-0_18'
Logs for RiscOS/Sources/Programmer/Squash from Squash-0_30 to Squash-0_31
Cross-compilable
* Change to OS-agnostic filename specs in GET/LNK statements * Consolidate and complete .gitignore files * Enable GitLab CI
Move workspace size handling into cssr/zssr files
Create library target
By calling the makefile file with `COMPONENT=SquashLib`, we can now build the core (de)compression source files into a library suitable for linking directly with an executable.
Portability fixes
* The (de)compression code relied on `char` being unsigned. Now make this explicit, so it will still work with toolchains/platforms where this is not the case. * Bitfield members `input_caller` and `output_caller` were signed and therefore couldn't match various enum values (flagged by a gcc warning when cross-compiling; may indicate a long-standing bug). Version 0.31. Tagged as 'Squash-0_31'
Logs for RiscOS/Sources/SystemRes/InetRes from InetRes-5_77 to InetRes-6_07
Updated trusted root CA data
Version 5.78. Tagged as 'InetRes-5_78'
Updated trusted root CA data
Version 5.79. Tagged as 'InetRes-5_79'
Updated trusted root CA data
Version 5.80. Tagged as 'InetRes-5_80'
Updated trusted root CA data
Version 5.81. Tagged as 'InetRes-5_81'
Updated trusted root CA data
Version 5.82. Tagged as 'InetRes-5_82'
Perform sanity tests on certificate data
Others are possible (and may be added later) but these would have caught the recent bad update. This job is placed in the static_analysis stage, so will slot neatly in when we add the common CI jobs. Version 5.83. Tagged as 'InetRes-5_83'
Updated trusted root CA data
Version 5.84. Tagged as 'InetRes-5_84'
Updated trusted root CA data
Version 5.85. Tagged as 'InetRes-5_85'
Updated trusted root CA data
Version 5.86. Tagged as 'InetRes-5_86'
Drop arp from emergency utils
The emergency utils carry the minimal set to configure an interface. ARP isn't needed for that, nor is it referred to by ResourcesFS' Internet.!Run file, so drop it to save ~10k of ROM space. Version 5.87. Tagged as 'InetRes-5_87'
Updated trusted root CA data
Version 5.88. Tagged as 'InetRes-5_88'
Updated trusted root CA data
Version 5.89. Tagged as 'InetRes-5_89'
Updated trusted root CA data
Version 5.90. Tagged as 'InetRes-5_90'
Updated trusted root CA data
Version 5.91. Tagged as 'InetRes-5_91'
Updated trusted root CA data
Version 5.92. Tagged as 'InetRes-5_92'
Updated trusted root CA data
Version 5.93. Tagged as 'InetRes-5_93'
Updated trusted root CA data
Version 5.94. Tagged as 'InetRes-5_94'
Add MimeMap entries for ISO and CUE files
Version 5.95. Tagged as 'InetRes-5_95'
Updated trusted root CA data
Version 5.96. Tagged as 'InetRes-5_96'
Remove redundant tools
Detail: Map-MBone, MRInfo and MTrace multicast tools are obsolete. These were removed in FreeBSD 7 because DVMRP is considered legacy (and doesn't support IPv6), and replaced by PIM-SM. Admin: Update utils Makefile to use the shared makefile rules. Remove unused 'X' which is now part of BootCommands.
Bulk import of disc tools from FreeBSD 12.3 sources
Admin: These are the unmodified sources, to create a point to diff against, they will not build yet.
Port of ARP to RISC OS
Admin: Requires xolib (in TCPIPLibs)
Port of gethost to RISC OS
Port of ifconfig to RISC OS
Update of IfRConfig
Detail: Expand table of IFFBITS names. Minor C99 syntax changes.
Port of inetstat to RISC OS
Admin: Requires xolib (in TCPIPLibs)
Update of ipvars
Detail: Remove COMPAT_INET4 support. Add response to -help.
Port of md5 to RISC OS
Port of ping to RISC OS
Port of route to RISC OS
Update of showstat
Detail: Makefile rewritten.
Port of sysctl to RISC OS
Port of tftp to RISC OS
Port of traceroute to RISC OS
No longer install AUNMap to !Internet
Detail: AUNMap is now managed by InetSetup-0_61 and picked up from Choices, so the copy here is an unused duplicate. Version 5.97. Tagged as 'InetRes-5_97'
Add MimeMap entries for Z-Code and Blorb files
Version 5.98. Tagged as 'InetRes-5_98'
Updates to disc based tools in !Internet
Detail: Updates to ifconfig, inetstat, ping, sysctl integrated from FreeBSD 12.4 Includes fix for CVE-2022-23093. Version 5.99. Tagged as 'InetRes-5_99'
Updated trusted root CA data
Version 6.00. Tagged as 'InetRes-6_00'
Add MimeMap entries for MP4 and MKV files
Remove RMFind duplicate
Detail: This utility is now to be found in the DesktopBoot component. Version 6.01. Tagged as 'InetRes-6_01'
Remove definition of __min_size
Version 6.02. Tagged as 'InetRes-6_02'
Updated trusted root CA data
Version 6.03. Tagged as 'InetRes-6_03'
Rewrite rules for disc install
BuildSys 7.91 changes how top-level phony rules are overridden. In this component, the `standalone` target in the `Sources/utils` makefile is redefined after `AAsmModule` is included, so it will be affected. Rewrite the rules so that they will continue to work the same (at least for native builds) both before and after BuildSys is updated. Version 6.03. Not tagged
Updated trusted root CA data
Version 6.04. Tagged as 'InetRes-6_04'
Updated trusted root CA data
Version 6.05. Tagged as 'InetRes-6_05'
Updated trusted root CA data
Version 6.06. Tagged as 'InetRes-6_06'
Update MimeMap with more audio formats
Version 6.06. Not tagged
Backfill MIME types for recent filetype allocations
Intersect the contents of Hdr:FileTypes post 2015 with the IANA MIME type allocations, for those entries which are missing. Those being: * GEDCOM (HdrSrc 2.75) * YAML (HdrSrc 2.90) * JPEG2000, WebP (HdrSrc 2.93) * DICOM, HDR, DWG, IGES, STL (HdrSrc 3.01) Additionally: * List .vcard as an alternative extension for &ACF * Promote image/bmp to the official IANA section now it's recognised by them * Correct the hyphens to dots in the WBMP vendor type Version 6.07. Tagged as 'InetRes-6_07'
Logs for RiscOS/Sources/Toolbox/ColourDbox from ColourDbox-0_22 to ColourDbox-0_23-1-g1f71f18f
Support colour models with those with potentially more than 16 bytes of extension data
Fix memory leaks and recurring error
Detail: * Fixed memory leaks if registration of filters failed upon object creation * Guard against recurring errors when showing a delayed object
Fix to arguments of call to ColourPicker_UpdateDialogue
Reset/cancel improvements
Detail: * Displayed colour and model are now reset to the last confirmed choice (or that set by the client task) when the user clicks the 'Cancel' button. * Added support for handling reset: Select and Adjust click on cancel button will now reset last set colour. * Utility function reset_colour() added.
GetColour[Model] improvements and fixes
Detail: * Fixed overrun of buffer passed to method ColourDbox_GetColourModel, when the specified object is showing * ColourDbox_GetColourModel now returns a result even if the object is hidden and a colour model was not previously set by the client program * Fixed unpredictable behaviour of ColourDbox_GetColour on a hidden object due to earlier lack of memory or if called prior to a colour having been set by the user or client program * Fixed bug that caused ColourDbox_GetColour on a hidden object to return a truncated descriptor after the user had updated or confirmed the displayed colour * Utility function store_colour_descriptor_block() added
Fix for internal flags setting when None button clicked
Detail: Internal flags for selection of none-button were not being set correctly when ColourPicker_ColourChanged_Event event received.
Refactor repeated code to reduce code duplication
Small cleanups
Detail: * Make use of NULL_ObjectID * Mark event handlers as static
Change required ColourPicker version from 0.30 to 0.58
Detail: This module expects some of the fixes present in ColourPicker 0.58 Admin: Submission for Toolbox bounty. Version 0.23. Tagged as 'ColourDbox-0_23'
Make tboxlibint path explicit in #includes
This allows C:tboxlibint to be removed from our command line include path. Requires RiscOS/Sources/Toolbox/tboxlib!2 Version 0.23. Not tagged
Logs for RiscOS/Sources/Toolbox/ColourMenu from ColourMenu-0_23 to ColourMenu-0_23-1-g0ebd1df1
Make tboxlibint path explicit in #includes
This allows C:tboxlibint to be removed from our command line include path. Version 0.23. Not tagged
Logs for RiscOS/Sources/Toolbox/DCS from DCS-1_14 to DCS-1_14-1-g903311eb
Make tboxlibint path explicit in #includes
This allows C:tboxlibint to be removed from our command line include path. Requires RiscOS/Sources/Toolbox/tboxlib!2 Version 1.14. Not tagged
Logs for RiscOS/Sources/Toolbox/FileInfo from FileInfo-0_21 to FileInfo-0_21-1-g85327f1c
Make tboxlibint path explicit in #includes
This allows C:tboxlibint to be removed from our command line include path. Requires RiscOS/Sources/Toolbox/tboxlib!2 Version 0.21. Not tagged
Logs for RiscOS/Sources/Toolbox/FontDbox from FontDbox-0_19 to FontDbox-0_19-1-gde1f3adf
Make tboxlibint path explicit in #includes
This allows C:tboxlibint to be removed from our command line include path. Requires RiscOS/Sources/Toolbox/tboxlib!2 Version 0.19. Not tagged
Logs for RiscOS/Sources/Toolbox/FontMenu from FontMenu-0_26 to FontMenu-0_26-1-g2996b917
Make tboxlibint path explicit in #includes
This allows C:tboxlibint to be removed from our command line include path. Version 0.26. Not tagged
Logs for RiscOS/Sources/Toolbox/Gadgets from Gadgets-0_44 to Gadgets-0_45-1-gbcc89530
Fix to painting non-square sprites in a list
Detail: Correction to argument order when getting the sprite size. Admin: Spotted during work on the Git source control client. Version 0.45. Tagged as 'Gadgets-0_45'
Make tboxlibint path explicit in #includes
This allows C:tboxlibint to be removed from our command line include path. Requires RiscOS/Sources/Toolbox/tboxlib!2 Version 0.45. Not tagged
Logs for RiscOS/Sources/Toolbox/IconBar from IconBar-1_23 to IconBar-1_23-1-gda3bfcef
Make tboxlibint path explicit in #includes
This allows C:tboxlibint to be removed from our command line include path. Version 1.23. Not tagged
Logs for RiscOS/Sources/Toolbox/Menu from Menu-0_40 to Menu-0_42
Menu_HasBeenHidden events are now delivered for individual sub-menus as well as the root object in a menu tree
Include x,y coordinates of message data with all submenu events
Improve accuracy of flags returned by Toolbox_GetObjectInfo
Detail: Reflect as accurately as possible whether a Menu object is currently showing, even if only as a sub-menu.
Fix for Toolbox_GetObjectState not returning the correct main menu state
Improvements to menu item state logic
Detail: Function menu_showing() will now return the correct state even if the menu item requested is shown but no item in it is highlighted. Version 0.41. Tagged as 'Menu-0_41'
Make tboxlibint path explicit in #includes
This allows C:tboxlibint to be removed from our command line include path. Version 0.41. Not tagged
Fix for looping opening a submenu after tick/fade changes
Detail: menu_showing() could report the sub-menu state as 'open' when in fact it was only 'about to be shown'. This caused a problem where the tick/fade state of an entry was changed (ie. both set and cleared) from the 'about to be shown' event because Menu wrongly thought the menu was showing then called update_tree() which in turn asks the Wimp to recreate the menu tree, causing the 'about to be shown' event to be resent in an endless loop. A new flag SUB_SHOWING notes the extra intermediate state and is distinct from SHOW_NEXT. Once the 'about to be shown' event has completed the flag clears and menu_showing() proceeds as before. Admin: Submission for Toolbox bounty. Version 0.42. Tagged as 'Menu-0_42'
Logs for RiscOS/Sources/Toolbox/PrintDbox from PrintDbox-0_18 to PrintDbox-0_18-1-g1b2c91be
Make tboxlibint path explicit in #includes
This allows C:tboxlibint to be removed from our command line include path. Requires RiscOS/Sources/Toolbox/tboxlib!2 Version 0.18. Not tagged
Logs for RiscOS/Sources/Toolbox/ProgInfo from ProgInfo-0_19 to ProgInfo-0_19-1-g50d7b5ca
Make tboxlibint path explicit in #includes
This allows C:tboxlibint to be removed from our command line include path. Requires RiscOS/Sources/Toolbox/tboxlib!2 Version 0.19. Not tagged
Logs for RiscOS/Sources/Toolbox/SaveAs from SaveAs-0_21 to SaveAs-0_21-1-gc7132cfd
Make tboxlibint path explicit in #includes
This allows C:tboxlibint to be removed from our command line include path. Requires RiscOS/Sources/Toolbox/tboxlib!2 Version 0.21. Not tagged
Logs for RiscOS/Sources/Toolbox/Scale from Scale-0_16 to Scale-0_18-1-g053eadbd
Remember scale factor when Scale dialogue is opened
Detail: If cancel is clicked (or dialogue closed by Esc) the last applied value (or initial value) will be set as scale factor.
Fix for GetValue failing to read value correctly
Detail: There was a break missing in the case structure which has been added now. Admin: Based on a description of a similar bug in the Select change logs.
Guard against recurring errors upon failing to show a delayed object
Detail: After delivering a Scale_AboutToBeShown event, any error would be repeated. Also fixes a memory leak in case of an error. Admin: Based on a description of a similar bug in the Select change logs.
Show the Window object with the same IDs as the Scale object
Detail: The underlying Window object is now shown with the same parent object and component IDs as the Scale object (instead of no parent, as before). Admin: Based on a description of a similar bug in the Select change logs.
Fixed memory leaks if registration of filters failed upon object creation
Don't rely on potentially stale handle
Detail: GetObjectState is now calling Wimp_GetWindowState using the Wimp handle instead of relying on ScaleInternal_IsShowing whose status may be delayed. ScaleInternal_IsShowing is only set if ToolboxShowObject was successful. Version 0.17. Tagged as 'Scale-0_17'
Fix for spurious CHR$(255) from Scale
Was calling Window_GetWimpHandle as though a SWI number, when that define is actually a subreason of Toolbox_ObjectMiscOp. Fixes https://www.riscosopen.org/forum/forums/4/topics/16280 Version 0.18. Tagged as 'Scale-0_18'
Make tboxlibint path explicit in #includes
This allows C:tboxlibint to be removed from our command line include path. Requires RiscOS/Sources/Toolbox/tboxlib!2 Version 0.18. Not tagged
Logs for RiscOS/Sources/Toolbox/ToolAction from ToolAction-0_38 to ToolAction-0_38-1
Docs update
Admin: Spec recovered from archive disc 2504,326 in support of Toolbox Unification bounty. Version 0.38. Not tagged
Make tboxlibint path explicit in #includes
This allows C:tboxlibint to be removed from our command line include path. Version 0.38. Not tagged
Rewrite rules for exports
BuildSys 7.91 changes how top-level phony rules are overridden. In this component, the `export` target is redefined after `CModule` is included, so it will be affected. Version 0.38. Not tagged
Logs for RiscOS/Sources/Toolbox/Toolbox from Toolbox-1_59 to Toolbox-1_60
Make tboxlibint path explicit in #includes
This allows C:tboxlibint to be removed from our command line include path. Requires RiscOS/Sources/Toolbox/tboxlib!2 Version 1.59. Not tagged
Call memory allocation functions in matched pairs
When dynamic areas are unavailable, the Toolbox memory SWIs fall back to using malloc (or calloc) and later free the allocation with OS_Module 7. However, the CLib now allocates extra to record private information behind the allocation so requires a matching call to free to succeed. Toolbox must either call malloc/free *or* OS_Module 6/7, not a mixture of the two. Since realloc from a module is broken in the CLib built into RISC OS 3.10, we opt to call OS_Module 6/7 to avoid needing to consider that bug. Version 1.60. Tagged as 'Toolbox-1_60'
Logs for RiscOS/Sources/Toolbox/ToolboxLib from ToolboxLib-1_18 to ToolboxLib-1_21
Add missing methods and flags
Detail: ColourDbox - GetHelpMessage/SetHelpMessage methods added Iconbar - 4 extra flags added Menu - 2 extra flags added Scale - min/max structure members switched to match tboxlibint and module Admin: Omissions discovered during User Interface Toolbox manual update. Version 1.19. Tagged as 'ToolboxLib-1_19'
Make tboxlibint path explicit in #includes
This allows <Lib$Dir>.tboxlibint to be removed from eventlib's command line include path. Version 1.20. Tagged as 'ToolboxLib-1_20'
Correct reformatting of one documentation file
During the import to Git from CVS in 2019, some files (including the one affected here) were accidentally reformatted, on the assumption that they were Makefiles, to use leading tabs for indents. This has no functional effect in this case, but it is still desirable to restore the formatting to its original style. If you wish to obtain a version of any earlier commit with this correction applied, first check that commit out, then either git cherry-pick <this commit> which will create a new commit with the correction applied, or git checkout <this commit> toolboxlib/docs/MakeGen which will only update your working tree and the index. Version 1.20. Not tagged
Export headers and veneers on behalf of TabsGadget and TreeView
Version 1.21. Tagged as 'ToolboxLib-1_21'
Logs for RiscOS/Sources/Toolbox/Window from Window-1_80 to Window-1_81
Make tboxlibint path explicit in #includes
This allows C:tboxlibint to be removed from our command line include path. Requires RiscOS/Sources/Toolbox/tboxlib!2 Version 1.80. Not tagged
[616] Fix for abort on action button create with a zero length string
If the buffer limit is zero size the action button's text member is pointed at an empty string, which is a pointer to a constant within the module, then an unconditional call is made to string_copy() the gadget template text into that member. In the case of a ROM copy of Window this results in an abort. Adopt the same strategy as the other gadgets (eg. the radio button gadget) and use string_copy_chk() instead - this is a noop for buffer limits of zero size. Version 1.81. Tagged as 'Window-1_81'
Logs for RiscOS/Sources/Toolbox/tboxlib from Common-0_26-1 to tboxlib-0_29
Add more ColourPicker message definitions
Detail: Added definitions for Message_ColourPickerColourChanged. Added definitions for ResetColourRequest. Version 0.27. Tagged as 'tboxlib-0_27'
Make all #includes relative to the including file
This allows <Lib$Dir>.tboxlibint to be removed from our command line include path. Henceforth, clients of this library also won't need to put it (or C:tboxlibint) in their command line include paths either. It also means that when building the library, only local copies of header files are used (as opposed to a mixture of local and exported copies, as previously). Version 0.28. Tagged as 'tboxlib-0_28'
Call memory allocation functions in matched pairs
When client modules are paired with a Toolbox that doesn't support the Toolbox_Memory SWI the mem functions fall back to using calloc, free, and a local implementation of realloc via OS_Module 13. These variants are also used by Toolbox itself for allocations prior to being linked into the module chain. However, the CLib now allocates extra to record private information behind the allocation so mem must either call calloc/free/realloc *or* OS_Module 6/7/13, not a mixture of the two. Since realloc from a module is broken in the CLib built into RISC OS 3.10, we opt to call OS_Module 6/7 to avoid needing to consider that bug. Version 0.29. Tagged as 'tboxlib-0_29'
Logs for RiscOS/Sources/Video/Render/Colours from Colours-1_95 to Colours-1_97
Use HostApp makefile fragment
Version 1.95. Not tagged
Enable default palette substitution
Detail: When output is switched to a sprite, but the sprite has no palette, substitute a default one. This mirrors a change made in RISC OS Select for ColourTrans 1.73. Admin: In support of Paint bounty work. Version 1.96. Tagged as 'Colours-1_96'
Correct reformatting of two source files
During the import to Git from CVS in 2019, some files (including the ones affected here) were accidentally reformatted, on the assumption that they were Makefiles, to use leading tabs for indents. This has no functional effect in this case, but it is still desirable to restore the formatting to its original style. If you wish to obtain a version of any earlier commit with this correction applied, first check that commit out, then either git cherry-pick <this commit> which will create a new commit with the correction applied, or git checkout <this commit> MakeNew git checkout <this commit> MakeOld which will only update your working tree and the index. Version 1.96. Not tagged
[604] Fix for inverted text box colour in paletted modes
Detail: Turn defaultpalettes back off (cf. Colours 1.95) as this caused writable icons to be the wrong colour in low colour modes because the Wimp palette is not the same as the default palette tables which ColourTrans substitutes. Furthermore, in 256 colour modes deselected Filer icons had the wrong colour caused by an attempt to lookup a palette for a true colour mode - a test has been added for <= 8bpp should the option ever be enabled in future. Version 1.97. Tagged as 'Colours-1_97'
Logs for RiscOS/Sources/Video/Render/DrawFile from DrawFile-1_60 to DrawFile-1_62
Use "Resources:$...." not "Resources:..."
If the current directory is not it's root these are not equivalent. Version 1.61. Tagged as 'DrawFile-1_61'
[541] Fix for returning a stale error pointer
During the rendering process (or Service_DrawObjectRender for unknown objects) the render state may be updated with an error pointer. However, as rending proceeds and potentially many other SWIs are called also using MessageTrans' shared buffers, by the end of the rendering process the originally captured pointer may be pointing at a totally different message. Capture the error after each object is despatched in our own buffer. Version 1.62. Tagged as 'DrawFile-1_62'
Logs for RiscOS/Sources/Video/Render/Fonts/ROMFonts from ROMFonts-0_77 to ROMFonts-0_78
Trim comments from encodings
Save ~6.5k by trimming the comments out of the encodings in ResourceFS. Use macros from StdTools shared makefile where possible. Version 0.78. Tagged as 'ROMFonts-0_78'
Logs for RiscOS/Sources/Video/Render/SprExtend from SprExtend-1_84 to SprExtend-1_86-1-gf0ed23f7
Tabify Makefile
Replace spaces with tabs in Makefile so it works with GNU Make. Version 1.84. Not tagged
[507] Fix translucent plots of 32k/64k source into 16M
The combining shifts for 4k source are 0/4/8 <-- all even, OK 32k source are 0/5/10 64k source are 0/5/11 When the destination is a 16M colour mode (ie. full 8bpp mask) this results in an attempt to generate an odd shift of &FF which can't be encoded in a 12b immediate. The code generator asserts ("ror < 32") and thus no plot is produced. Spot this case and stick in an extra LSL by 1 to ensure the mask can be represented, then compensate with an extra right shift during the combining ORR. Version 1.85. Tagged as 'SprExtend-1_85'
Add `rom_link` rule
This permits this component's type in ModuleDB to be changed to `C`, which is a prerequisite for further upcoming build changes. Version 1.85. Not tagged
[540] Fix buffer overflow in ExpandMaskSizeToR0
A mistake in the arguments passed to move_memory_up resulted in the code moving twice as much data as needed, potentially causing it to write off the end of the sprite area. Fix the bad argument, and add a couple of extra comments. Fixes https://www.riscosopen.org/tracker/tickets/540 Version 1.86. Tagged as 'SprExtend-1_86'
Use HostApp makefile fragment
Version 1.86. Not tagged
Logs for RiscOS/Sources/Video/Render/Super from Super-0_16 to Super-0_16-1-g5cb068cf
Use HostApp makefile fragment
Version 0.16. Not tagged
Logs for RiscOS/Sources/Video/UserI/Picker from Picker-0_56-2-g2ddd12e7 to Picker-0_59
Use "Resources:$...." not "Resources:..."
If the current directory is not it's root these are not equivalent. Version 0.57. Tagged as 'Picker-0_57'
Fix for flags read back being out of sync with the picker
Detail: SWI ColourPicker_ReadDialogue claims to return the current state (and does so for the colour) but was returning the cached copy of the flags word. Ensure this is always up to date whenever the colour is changed by copying the 'none' state into the cached flags. Admin: Discovered during Toolbox Unification bounty work.
Fix for being unable to change None and colour setting in a single call
Detail: SWI ColourPicker_UpdateDialogue allows the possibility of changing both colour and transparency state by setting bits 1 and 6 of the input flags. However, bit 6 has the side effect of using the Set_Values entry point which calls the colour changed model SWI which unsets the 'None' flag because the colour was set. Swap around the order of actioning the flags such that the colour is set before considering the new 'None' setting. Admin: Discovered during Toolbox Unification bounty work.
Rename INCLUDE_OSLIB to OSINC
Correct the Wimp message lengths
Detail: When message_COLOUR_PICKER_COLOUR_CHOICE or message_COLOUR_PICKER_COLOUR_CHANGED were sent the size of the Wimp message was set based on the model's private state structure size, rather than the extension field size. Update the message calculation to use the model's info_size value. Admin: Discovered during Toolbox Unification bounty work. Version 0.58. Tagged as 'Picker-0_58'
Fully fill 'None' swatch in 180dpi modes
The Crosshatch sprite wasn't quite tall enough for the swatch when plotted in an EY0 mode, and didn't account for the icon being inset from the window border. For width, we now tile the sprite as needed (rather than enlarge the one in Resources). Version 0.59. Tagged as 'Picker-0_59'
Logs for RiscOS/Utilities/Autobuild/ABRelease from ABRelease-1_00 to ABRelease-1_12
Update softload obey files
Also, remove the local copies of Prompt/SoftLoad in favour of the centrally held ones in 'Generic'. Version 1.01. Tagged as 'ABRelease-1_01'
Fix fallback BASIC64 command to work with command line arguments
Version 1.02. Tagged as 'ABRelease-1_02'
Add 5 packages from BootResources
These 5 items don't have dependencies or subdivisions, so can be handled by the existing package generator. Also fix a problem with the package generator when the major version number changes the package suffix wasn't being reset to '1', eg. "Thing_1.23-5.zip" "Thing_1.24-6.zip" (expected "Thing_1.24-1.zip" here) Version 1.03. Tagged as 'ABRelease-1_03'
Build fix
Detail: Make the path of the CSD without the system variable having $< as a substring, which amu 5.36 now tries to expand as a makefile variable. Version 1.04. Tagged as 'ABRelease-1_04'
Add 1 package from BootResources
Checking the boot sequence reveals !Internet is still correctly checked at each use so is safe to package on its own. A side benefit being CertData updates will now be flagged in PackMan. Delete OMAP3Live disc support (was removed from BuildSys-7_33 in 2019). Version 1.05. Tagged as 'ABRelease-1_05'
Update SysMerge script
DHCP added (ref BuildSys-7_77).
Move softload out of Choices
Bulk rename from Choices.Boot.PreDesk.!!SoftLoad -> Resources.SoftLoad Update URLs to HTTPS
Add ABRelease accompanying resources for PineA64 download
Version 1.06. Tagged as 'ABRelease-1_06'
Add Boot softload facility to Titanium ROM update
This will enable a Titanium to have the same softload option shown at boot time as the Iyonix & RPC have always had. Delete old TrySoftload obey file. Version 1.07. Tagged as 'ABRelease-1_07'
Updated SoftLoad binary
Admin: SoftLoad-1_22 built with cc 5.90 in the Disc environment.
Merge Softload facility for RiscPC, Iyonix, & Titanium machines
After the previous change, the facility to softload a ROM at boot is effectively the same on all these machines. This change generates it from a single Generic set of source files, rather than the sets for each of 5 build processes previously. Some insignificant inconsistencies have been eliminated, and 14 files merged into 7. The Prompt BASIC program is now BasicTxt, and Crunched for release. Testing: All 5 builds have been generated by simulating the AutoBuilder, and the resulting zips compared before and after these changes with no significant differences found. Version 1.08. Tagged as 'ABRelease-1_08'
Add 1 package from Utilities
Detail: SparkFS was previously not offered as a package so that the read-only version didn't class with the full version. Version 1.09. Tagged as 'ABRelease-1_09'
Enable menu selection of Softload ROM at boot
This change is mainly to enable a choice from several ROMs to be made at boot to softload, but it also... - Displays version & date of available ROMs, in date sequence. - Remembers last ROM used as default for auto-boot next time. - !Help file added to SoftLoad. - Allows extra Message files for different Territories. - The ROM version check is dynamic, not fixed in !Run. - Only affects RiscPC, Iyonix & Titanium builds. Detail: The main changes are to the Prompt program, with parameters added to !Run and Loader. Admin: Developed and tested on a Titanium running 5.24 softloading 5.28 & many 5.29. Also tested on RPCEmu 0.9.4 with all combinations of: Running 3.50, 3.60, 3.71, 4.02, 4.39, 5.20, 5.22, 5.24 & 5.28 Softloading 3.60, 3.71, 4.39, 5.20, 5.22, 5.24, 5.28 & 5.29 Version 1.10. Tagged as 'ABRelease-1_10'
Add ReadMe for Replay applications
Version 1.11. Tagged as 'ABRelease-1_11'
[630] Changed SoftLoad to allow it to run on Kinetic Risc PC and A7000/A7000+
Both these use the IOMD ROMs, which dynamically change the platform type. Changed Prompt and !Help accordingly. Tested on RPCEmu with A7000, but no Kinetic available. Version 1.12. Tagged as 'ABRelease-1_12'