home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 5
/
DATAFILE_PDCD5.iso
/
utilities
/
t
/
tornado
/
TNdemo1
/
Readme
< prev
Wrap
Text File
|
1996-03-06
|
12KB
|
214 lines
Readme for tornado 0.10b (06-03-1996)
by N. Douglas
This is a temporary release of what is a small taster of what is to come.
In this archive is !Tornado, the resource directory but with only the kernel,
and !TornWin, a demo tornado window. This is a tornado window as it should
hopefully end up looking like.
This is merely an intermediate program. I'm still writing it, as you'll
see if you look through the code. ATM, I'm doing the icon stuff, and when
that's done I'll finish off the string and attribute handling properly,
including visual linking to code fragments. Then I'll convert the lot into
assembler (then release), whack it into the shell module which isn't being
released with this, and finish the multitasker (then release). I suppose that
at this stage tornado would be something which theroretically people could
actually write for.
Why release it now?
-=-=-=-=-=-=-=-=-=-
I thought I'd release this copy now, mainly for two reasons. Firstly, a
lot of people seem to think I'm some kid who came up with a good idea,
flashed it around the networks and then got bored and went away. I'd like to
say to all those who have been saying this *GO* *SCREW* *YOURSELVES*. I'd
also _quietly_ ask that if you lot are so full of yourselves, then why don't
you sit down and try planning and writing all this crap out, especially when
you have a major amount of study for rather important exams soon. I'd love to
see your (feeble and pitiful) attempts, honest! :)
Secondly, there has been a slight but noticeable increase in the number of
people who are getting very gloomy about the future of RISC-OS, the
architecture and Acorn in general. I hope this will show you that things
aren't going to the dogs quite as easily as some of you might think, that
some people are actually doing things about it. Cheer up! ;)
Just as a statistic, I've been watching hensa's top 50 for a while now,
and I've noticed that since its appearence in AU, it's never left the list -
and seeing as I'd prefer it not to, I decided to knock out this. Some people
already have a much much older version of this program, which on the front
does the same thing, but in fact is a totally different program (I had to
start all over because the code was getting too messy + it didn't use the
kernel at all). So, if you have a copy, and are thinking "This hasn't changed
much in 3 months or so", well, you're wrong!
Bugs
-=-=
You'll notice that it all still has a few bugs. Firstly, scrolling by the
scroll bars corrupts the display - and don't ask me why, I think it's
rounding errors. I only finished this bit today (scrolling), so I still have
a bit of leeway. Next, the tornado kernel has a MAJOR bug with post-wimp-slot
heaps - it hates extending them (again, I don't have a clue why - it hasn't
any problems with extending anything else). Next, the fonts aren't recached
on mode change - changing mode from hires to lores or vice versa causes
problems. In addition, nothing is done on mode change - so the RISC-OS dummy
window may unstick from the tornado one by a pixel or two for example as
RISC-OS tends to realign windows to the eigen factors on mode changes.
It also works much better if you reinitialise it before use (hence the
yucky *RMReInit in the !Run file), mainly as it's becoming quite a horrible
bit of code which has been tweaked a lot. When I first wrote the memory
routines back in July-August 95, they worked perfectly. Since, I've changed
the heap data format three times, tweaking the code each time. Also, they
were written for speed, meaning the source is about as incomprehensible as
the debugger output, so my skills as an assembly programmer were sorely
tested, and I think I must have missed something somewhere surely. However,
I'm sure the bugs will slowly iron themselves out in due course.
You may think it runs very slowly. This may be because you are running it
from a slow medium, and a log file is continually written to by the program -
if so, either copy it to a quicker one (eg; RAM disc) or edit the !RunImage
(change line 220 to log%=FALSE). The other thing is that you may have a
'slower' machine - it takes three seconds on mine to redraw fully in Mode 20
with a standard palette. When dragging things around and over it though, do
note how the window doesn't always redraw fully, but given a chance it does.
This is a taster of what multitasking redraws look like - not hugely
impressive here because the redraw code's in Basic, but when in assembler it
should really kick ass. Also, of course, Basic won't multithread, so in fact
it should be even more impressive with many sections being redrawn
simultaneously.
You'll notice how it doesn't leave things unupdated like Win95 or System
7.x - this is because redraw threads are placed in the top priority, so they
get the most CPU time. In fact, on tornado, redrawing is the THE top priority
of all - nothing can be higher.
BTW, if it looks real gammy - there are two reasons for this. First, and
probably most likely, is that you don't have enough colours on the screen -
although I can't test it, it should look gorgeous in 24bit (and be quick too
as there shouldn't be any need for colour translation tables). Anyway, in
Mode 21 on my machine is looks bloody fine.
Second reason is if you aren't using a hires display. I haven't
implemented lores operation yet (nor will I until /way/ into the future -
after when the multitasker has been written), so it simply scales the sprites
down to fit (which looks crap).
Documentation
-=-=-=-=-=-=-
The two files _Kernel and _Shell give a few bits and pieces about each
relevent module and what they will do. In particular, _Shell has a good few
updates on the docs older than this release. The program MultiTtest
implements a model of the tornado multitasker - would anyone with experience
in multitaskers contact me as I have precious little information on how they
should work?
Currently, the multitasker takes current CPU speed (based on screen mode,
CPU speed etc) and the load on the RISC-OS desktop into account when sharing
out time between individual tasks, and attempts to obtain the maximum
efficiency it can (time spent executing code against time spent in
multitasking the code).
The testbed multitasker as supplied was fed the data for the processors
below, given eight tasks to switch between and told to (a) turnaround all
tasks in 25cs and then pass control to the wimp and (b) turnaround all tasks
in a second but every 25cs pass control to the wimp. Here's the results:
Type (a) multitasking:
CPU MIPS Efficiency cs per task turnaround time (secs)
8Mhz Arm2 4 99.75% 2 0.2
12Mhz Arm250 6 99.87% 3 0.26
25Mhz Arm3 12 99.93% 3 0.25
33Mhz Arm3 15 99.95% 3 0.25
30Mhz Arm610 26 99.97% 3 0.24
33Mhz Arm700 35 99.98% 3 0.24
??Mhz ArmXXX 50 99.98% 3 0.24
Type (b) multitasking:
CPU MIPS Efficiency cs per task turnaround time (secs)
8Mhz Arm2 4 99.92% 7 0.62
12Mhz Arm250 6 99.95% 7 0.6
25Mhz Arm3 12 99.97% 7 0.58
33Mhz Arm3 15 99.98% 7 0.57
30Mhz Arm610 26 99.99% 7 0.56
33Mhz Arm700 35 99.99% 7 0.56
??Mhz ArmXXX 50 99.99% 7 0.56
The MIPS values are approximate, and the Arm700 one is for a prototype chip,
not the production one. As you can see, the switcher is very optimised,
achieving at worst a loss of 0.25%, and obviously the faster the processor
the less the loss is.
Anyway, while all this is all well and good, there is a problem. As you can
see, the multitasker can only handle a minimum of 1cs slices. Now, I don't
know much about other architectures, but 1cs is an *awfully* long time, and
it gives very little scope for multithreading as you only need ~25 processes
running for cascade overlo