Date: Fri, 10 JUL 1998 11:24:20 +0000 (GMT) From: Dave Walker Subject: Acorn Developer News 10/07/98: Looking for Contractors, More Y2K notes, Toolbox Module stuff, News from WSS about Prioritised Callbacks To: isvquery@acorn.com Hi folks... Acorn Developer News 10/07/98 Looking for some Contractors... ------------------------------- We are wondering whether any developers have some time spare to do some contract work for us. We have several projects which would benefit from contract work; in all cases knowledge of programming RISC OS in C is required, and in some cases network programming is required too. Potential lengths of contracts vary from a few weeks to up to about four months, and we'd prefer it if people could start at short notice. If you are interested, drop me a line (dwalker@acorn.co.uk) with details of what you can do, and I'll forward the info to the relevant project managers. More Y2K Notes -------------- I've written a set of notes relating to Year 2000 compliance of Acorn kit on a wider scale; in particular, it covers just about all of our old 8-bit hardware (or, at least, as much of it as I can recall). This document has not been ratified by our Legal dept. and is therefore about as disclaimered as disclaimered can get, however some of you may still find it useful or wish to comment on it. You can find the document as http://www.art.acorn.co.uk/SALES/DEVELOPERS/resource/docs/misc/y2kunrat.txt ; please send comments to me (dwalker@acorn.co.uk). Toolbox Module Stuff -------------------- I have quite a lot of news on the Toolbox this time... first of all, a newer set of beta Toolbox modules is now available from http://www.art.acorn.co.uk/SALES/DEVELOPERS/resource/updates/toolbox.arc (this is a much more sensible place for beta and pre-QA code to reside than http://www.art.acorn.co.uk/SALES/DEVELOPERS/resource/reference/bootstruct/toolbox.arc , so this latter file has been deleted). The new set of modules comprises: Menu 0.33 TextGadget 0.11 ColourDbox 0.17 ColourMenu 0.19 DCS_Quit 1.08 FileDbox 1.00 FileInfo 0.16 FontDbox 0.16 FontMenu 0.21 IconBar 1.18 PrintDbox 0.14 ProgInfo 0.14 SaveAs 0.15 Scale 0.13 ToolAction 0.15 Toolbox 1.43 Window 1.54 ie only the Window module has been updated since the last set of new modules I released. With the exception of the Window module, to which we wish to make a few more changes, these new modules are intended (modulo fixing of whatever bugs may be found as a result of our and your testing) to be incorporated into the Ursula build. Please feed bugs as you find them back to isvquery@acorn.co.uk . Rough (terse, in fact) copies of the change logs for the Toolbox modules from the point at which they were frozen for the RISC OS 3.71 ROM build follow. These comments were culled directly from our CVS logs, and I've also included them in the toolbox.arc file referenced above. ColourMenu: Added tokenisation directives to Messages files. Made modules open "Resources:$...." not "Resources:....". DCS: Updated use of zap_gadget to avoid memory overwrite problem when storing the message string. FileDbox: Imported to CVS from no previous source control - developed for Java but a general Toolbox module so included here. FileInfo: No changes FontDbox: Fixed bug which meant that it was impossible to call FontMenu_SetTick in a FontMenu_AboutToBeShown event handler. Ticked font was being processed with strlen and strcpy instead of string_length and string_copy. This is now fixed. FontMenu: Fixed bug which meant that it was impossible to call FontMenu_SetTick in a FontMenu_AboutToBeShown event handler. Ticked font was being processed with strlen and strcpy instead of string_length and string_copy. This is now fixed. IconBar: Modified to support tall icon bar icons Added ShowCentred and ShowAtPointer text+sprite object now correct width. Incremented version number for AW release Menu: adds show-centre support for menu items Bug fix: ShowAtPointer for objects shown from Menu objects now implemented Zero-length menu entries caused the Wimp to display oflaoflaofla etc. on RISC OS 3.7 due to a bad NULL pointer usage in c.auxiliary. This is now fixed so that an empty menu item is displayed. PrintDbox: Added show centre and show at pointer support. incremented version number for AW release Memory leak fixed (global_unknown is now freed when module dies) ProgInfo: New ProgInfo class version is 1.01. Module version now 0.10. (Requires ResEd 0.42 for editing of ProgInfo objects in Res files). New resize source file added for automatic ProgInfo resizing, plus updated resource files to contain Web site button templates. Auto-resize disabled if component IDs in underlying Window object are wrong. Fixed memory leak which caused URI buffers to be left around when objects were deleted at task closedown. German version of Resource file added to CVS. This is required for anybody using the German version of RISC OS to prevent weird errors and aborts when using the updated ProgInfo modules (>0.09) SaveAs: Workaround for Wimp bug which causes message reference/sender not to be updated during Wimp_SendMessage calls if message block is in a dynamic area. Fixes spurious broadcast DataLoad messages when using the actionbutton to save an object in type 2 and type 3 save operations. Scale: Date declaration added to CMHG header files to ensure date is fixed. Uses new zap_gadget_string macro to ensure that it increases the buffer size for the actionbutton gadgets if necessary. Known bug fixed (setting a large percentage value for one of the preset buttons in a Scale object does not cause random crashes/machine freezes) ToolAction: Release 0.14 - Adds Set/GetPressed method. Assumes new (Ursula) CMHG. 0.15: Added CMHG version detection to automatically switch const qualifiers on/off on appropriate veneers. Toolbox: Toolbox memory allocator now uses a dynamic area under RISC OS 3.5 and later. New SWI (Toolbox_Memory) added for object modules to access the allocator. Ensured that filename passed to MessageTrans_OpenFile is stored in RMA. Made the Toolbox look for Res then Res, rather than Res then Res. Ditto for Messages. Service_ToolboxTaskBorn issued once for each task instead of multiple times for the same task when new object modules register. SWI dispatcher fixed to dispatch Toolbox_Memory calls - this prevented version 1.39 from providing the advertised memory services to the other object modules. Object ID validation is now performed by the Toolbox module itself instead of the slower OS_ValidateAddress SWI call. This is possible for both the normal RMA usage and dynamic area usage since the Toolbox knows the dynamic area address range. Event ordering problems fixed. Needs Window 1.51's co-operation for this to work properly. New null pointer check added to make sure that the Toolbox module no longer data aborts if the application's Messages file cannot be found. Window: Module now uses Toolbox memory allocation instead of calling OS_Module. Writable gadgets now generate "No more gadgets" errors rather than "Invalid component ID" when trying to place the caret into a faded writable icon and there are no available alternative linked writables. WindowHasBeenHidden events are now generated consistently for transiently shown windows. Instead of relying upon a single static variable indicating which, if any, window is showing transiently, a shown/hidden counter is kept and pending HasBeenHidden events are flushed when message_MENUS_CLOSED arrives. This solves the problems observed with several Toolbox applications which variously did not appear to get a HasBeenHidden event for a closed transient or got duplicate messages (which confused applications wishing to show a shared window object transiently, wait for it to close, and then open it again (eg. a dbox asking the user to make a choice). A bug thought to lie elsewhere turned out to be in the Window module too. Also related to transient Window objects, this fix stops random pointer dereferencing when a message_MENUS_DELETED is generated by the Wimp and Window doesn't know about the window object in its ShowingAsMenu global. Fixed setpointer - setting the pointer back to default incorrectly set the shape to pointer 2, rather than 1. "Wimp dying when Window deletes transiently shown objects" bug fixed Event ordering for transient submenu objects fixed. Module now uses srccommit to maintain its version number Alteration made to handling of SWI Window_PlotGadget so that errors generated by external gadget modules are detected correctly and the bounding box of the gadget isn't drawn in addition to the gadget. Change does not affect gadget modules' API to Window. Fail-safe behaviour of drawing the bounding box if Window is not sure whether the plot call succeeded is retained. Radio button gadgets didn't cope with being given empty label field, hence attempted various pieces of memory copying through null pointers and memory allocation/deallocation of zero lengths blocks. Its handling of its text buffer has been altered to bring it into line with the way all the other built-in gadgets handle their label buffers - which works. Toolbox Dependencies -------------------- An undocumented dependency in the Toolbox module set was pointed out to me the other day; the Toolbox has a dependency on the Menu module in respect of stringset* and popup*. If you try using these functions without the menu module resident, nothing useful will happen! Note that this does not affect the order in which Toolbox modules should be killed in order to softload new ones; Toolbox must always be the last module to be killed. News from Warm Silence: Prioritised Callbacks --------------------------------------------- [start of large chunk of text from Robin] > This is a message to announce a module that provides a general > prioritised interrupt system for RISC OS. Developed by Warm Silence > Software and Steven Singer, this is the first time such a system has > been available, and radically improves the possible performance of > computationally intensive Real Time tasks (such as sound/video > handling or internet services). > > The problem > ~~~~~~~~~~~ > > Consider the situation of several interrupt tasks running at the same > time. When one thread is called, it has a choice; > > 1) it could run without reenabling interrupts, risking holding up the > whole machine, including more time-critical threads. > > 2) it could reenable interrupts, but then risks being interrupted by > another lower-priority thread. > > 3) it could trigger a callback to do the real work on that, but has no > guarantee when the callback will actually get serviced. > > As the demands of modern computing layer more and more real-time > tasks onto a typical machine scheduling problem such as these become > harder and harder to resolve. (Consider a MIDI synth playing the > background music from a website fetched from the internet with a > multitasking movie playing from local disc with a DMA SCSI card). > > The solution > ~~~~~~~~~~~~ > > The CallBackAfterInterrupt (CBAI) module allows many interrupt tasks > to be registered at different priorities, and ensures that no lower > priority task ever interrupts one at the same or higher priority. > > This module was produced in response to direct problems with > efficiently handling multimedia playback under RISC OS, and has > provided a simple, easy to understand and maintain solution. > > Where to get it > ~~~~~~~~~~~~~~~ > > The authors have decided to make the documentation and module > available free for evaluation purposes to any interested developer. If > a developer wishes to distribute the module with software based on it, > then a license will be required. > > For more information and a copy of the documentation/module, please do > not hesitate to contact us at info@wss.co.uk on 01608 737172 or at > Warm Silence Software, PO Box 28, Woodstock, Oxfordshire, OX15 4JX. [end of large chunk of text from Robin] Cheers, -- Dave Walker, Developer Support Specialist Acorn Computers Ltd Tel: +44 (0) 1223 725233 Acorn House, 645 Newmarket Road Fax: +44 (0) 1223 725333 Cambridge, CB5 8PB, United Kingdom WWW: http://www.acorn.co.uk/ **** ACORN WORLD '98: 16 - 18th OCTOBER 1998, LONDON ARENA, DOCKLANDS **** **** *TICKET HOTLINE 0171 538 1212* **** **** http://www.argonet.co.uk/acornworld98/ ****