home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ARM Club 3
/
TheARMClub_PDCD3.iso
/
hensa
/
utilities
/
a215_1
/
README
< prev
Wrap
Text File
|
1993-02-13
|
5KB
|
127 lines
| > README
|
| Title 3D hires/lores Icons Switcher module
| Author Nick Smith
| Version 1.00 (12-Feb-93)
| Status Public Domain, no distribution restrictions
*** Version 0.03
Release 0.03 (including in this distribution) is a tiny module for
RISC OS 3.10 - (300 bytes inc workspace) that switches sprites on mode
changes between low and hires modes.
To use - set up a system variable <Sprite$Path> to point to the
directory containing the files :-
Sprites Lores sprites for filetypes, applications, etc
Sprites22 Hires sprites for filetypes, applications, etc
The exact contents of each sprite file is entirely arbitrary - the
module will just *IconSprites the file appropriate for a given mode
resolution.
Example use (eg, in Desktop !Boot file)
Set Sprite$Path ADFS::IDEDisc4.$.!Boot.NewSprites.
RMEnsure IconSwitch 0.03 RMLoad ADFS::IDEDisc4.$.!Boot.IconSwitch
... assuming you have 'IconSwitch' module assembled & saved into your
!Boot application - or stick it in your !System folder - whatever.
*** Version 1.00
Despite having a turbo-charged A5000, the speed at which v0.03
switches between modes (I have a 80+Kb Sprites22 file) is horrible.
This is because the Sprite merge operation is rather complex/slow.
A *much* faster solution, but which requires significantly more
memory, is to register the Sprites/Sprites22 files as the ROM Wimp
sprite pools using ResourceFS. This has the advantage that the Wimp
treats the files as being in ROM, and upon a mode change merely has to
change a pointer - not merge a huge file of sprites.
This rather neat solution has a serious problem (other than requiring
both the Sprites & Sprites22 files in memory at once), when an
application does a *IconSprites command, the RMA sprite pool gets
sprites loaded, and these are displayed in preference to the ROM
sprites. Hence when your x-hundred applications filer boot you load
all these filetype and !appl sprites into RMA *again* and the hires
ROM sprites never get used ...
The obvious fix for this is to scan the RMA sprite pool upon mode
changes and OS_SpriteOp,25 (delete) those sprites which have matches
in the current ROM pool. Even if you have 50 duplicated sprites, the
time it takes to delete them is unnoticable. An added bonus is that
all the crap directory sprites, etc. that some PD apps insist on
redefining get thrown away too.
Using 1.00:
Take your sprites/sprites22 files (see v0.03 above) and place them in
'Resources.Wimp.' dir. NOTE: It is very important that you start with
the exisiting ROM 'Sprites' file, as this contains fairly vital
sprites such as the pointer sprite, and your desktop will look rather
odd with some of these missing 8-) I recommend grabbing bits of the
sprites from Roger Wilson's !SetIcons off the Apps disc.
You can also add a 'Tools' sprites file for window borders, and indeed
any other replacement templates or messages files for other ROM
modules that takes your fancy. eg, I have a customized PaletteUtil
menu by having a new messages file in 'Resources.Palette.' These
require simple additions in the source to the module.
Build the module by running on !Make, and then edit your desktop
startup sequence as described in the above section. (You don't need a
Sprite$Path variable)
Note that this IconSwitch module must be loaded before you enter the
desktop, otherwise all hell will break loose 8-) Also, don't expect
this module to work in significantly later versions of the OS - it
relies heavily on the exact nature of the Wimp sprite pool, and the
PRMs say that this may well change in the future ...
Hope this is useful.
*** Contacts
Please send me any bugreports, comments, ideas for new features, etc.
I can be contacted at the following address, at least until Jul '94 ;
Nick Smith
Churchill College
Cambridge
CB3 0DS nas20@uk.ac.cam.phx (JANET/Internet email)
*** Distribution
This software is 'Public Domain'. You may copy and distribute it
without restriction - include it on magazine discs, with commercial
products, etc, etc. However, any distribution must include the
source code and this documentation.
*** Revision history
Modifications to v0.01 (23-Jan-93)
- First release - can it do anything more ???
Modifications to v0.02 (24-Jan-93)
- Silly addition for my PCATS card - performs *Clock 5 command
for Mode 61 (45MHz clock crystal)
There is a good reason why I need to do this - but I doubt
you're interested ....
Modifications to v0.03 (12-Feb-93)
- A high-speed (instant?) switcher will be ready RSN, but this
version was done for 'internal' use. ie, more changes for my
PCATS card! Because I have 16MHz RAM I needed to mess with
Mode 0, and so this version has a couple more *Clock commands
for Modes 0, 60 & 61.
- Changed sprites files inline with v1.00
Modifications to v1.00 (12-Feb-92)
- Completely new code - registers Sprites/Sprites22 files
with ResourceFS & keeps them in RAM.
- Much faster, eats RAM.