home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / misc / tornado / tndemo1 / Readme < prev   
Text File  |  1996-03-06  |  12KB  |  214 lines

  1. Readme for tornado 0.10b (06-03-1996)
  2.  
  3. by N. Douglas
  4.  
  5.    This is a temporary release of what is a small taster of what is to come.
  6. In this archive is !Tornado, the resource directory but with only the kernel,
  7. and !TornWin, a demo tornado window. This is a tornado window as it should
  8. hopefully end up looking like.
  9.    This is merely an intermediate program. I'm still writing it, as you'll
  10. see if you look through the code. ATM, I'm doing the icon stuff, and when
  11. that's done I'll finish off the string and attribute handling properly,
  12. including visual linking to code fragments. Then I'll convert the lot into
  13. assembler (then release), whack it into the shell module which isn't being
  14. released with this, and finish the multitasker (then release). I suppose that
  15. at this stage tornado would be something which theroretically people could
  16. actually write for.
  17.  
  18. Why release it now?
  19. -=-=-=-=-=-=-=-=-=-
  20.    I thought I'd release this copy now, mainly for two reasons. Firstly, a
  21. lot of people seem to think I'm some kid who came up with a good idea,
  22. flashed it around the networks and then got bored and went away. I'd like to
  23. say to all those who have been saying this *GO* *SCREW* *YOURSELVES*. I'd
  24. also _quietly_ ask that if you lot are so full of yourselves, then why don't
  25. you sit down and try planning and writing all this crap out, especially when
  26. you have a major amount of study for rather important exams soon. I'd love to
  27. see your (feeble and pitiful) attempts, honest! :)
  28.    Secondly, there has been a slight but noticeable increase in the number of
  29. people who are getting very gloomy about the future of RISC-OS, the
  30. architecture and Acorn in general. I hope this will show you that things
  31. aren't going to the dogs quite as easily as some of you might think, that
  32. some people are actually doing things about it. Cheer up! ;)
  33.  
  34.    Just as a statistic, I've been watching hensa's top 50 for a while now,
  35. and I've noticed that since its appearence in AU, it's never left the list -
  36. and seeing as I'd prefer it not to, I decided to knock out this. Some people
  37. already have a much much older version of this program, which on the front
  38. does the same thing, but in fact is a totally different program (I had to
  39. start all over because the code was getting too messy + it didn't use the
  40. kernel at all). So, if you have a copy, and are thinking "This hasn't changed
  41. much in 3 months or so", well, you're wrong!
  42.  
  43. Bugs
  44. -=-=
  45.    You'll notice that it all still has a few bugs. Firstly, scrolling by the
  46. scroll bars corrupts the display - and don't ask me why, I think it's
  47. rounding errors. I only finished this bit today (scrolling), so I still have
  48. a bit of leeway. Next, the tornado kernel has a MAJOR bug with post-wimp-slot
  49. heaps - it hates extending them (again, I don't have a clue why - it hasn't
  50. any problems with extending anything else). Next, the fonts aren't recached
  51. on mode change - changing mode from hires to lores or vice versa causes
  52. problems. In addition, nothing is done on mode change - so the RISC-OS dummy
  53. window may unstick from the tornado one by a pixel or two for example as
  54. RISC-OS tends to realign windows to the eigen factors on mode changes.
  55.    It also works much better if you reinitialise it before use (hence the
  56. yucky *RMReInit in the !Run file), mainly as it's becoming quite a horrible
  57. bit of code which has been tweaked a lot. When I first wrote the memory
  58. routines back in July-August 95, they worked perfectly. Since, I've changed
  59. the heap data format three times, tweaking the code each time. Also, they
  60. were written for speed, meaning the source is about as incomprehensible as
  61. the debugger output, so my skills as an assembly programmer were sorely
  62. tested, and I think I must have missed something somewhere surely. However,
  63. I'm sure the bugs will slowly iron themselves out in due course.
  64.  
  65.    You may think it runs very slowly. This may be because you are running it
  66. from a slow medium, and a log file is continually written to by the program -
  67. if so, either copy it to a quicker one (eg; RAM disc) or edit the !RunImage
  68. (change line 220 to log%=FALSE). The other thing is that you may have a
  69. 'slower' machine - it takes three seconds on mine to redraw fully in Mode 20
  70. with a standard palette. When dragging things around and over it though, do
  71. note how the window doesn't always redraw fully, but given a chance it does.
  72. This is a taster of what multitasking redraws look like - not hugely
  73. impressive here because the redraw code's in Basic, but when in assembler it
  74. should really kick ass. Also, of course, Basic won't multithread, so in fact
  75. it should be even more impressive with many sections being redrawn
  76. simultaneously.
  77.    You'll notice how it doesn't leave things unupdated like Win95 or System
  78. 7.x - this is because redraw threads are placed in the top priority, so they
  79. get the most CPU time. In fact, on tornado, redrawing is the THE top priority
  80. of all - nothing can be higher.
  81.    BTW, if it looks real gammy - there are two reasons for this. First, and
  82. probably most likely, is that you don't have enough colours on the screen -
  83. although I can't test it, it should look gorgeous in 24bit (and be quick too
  84. as there shouldn't be any need for colour translation tables). Anyway, in
  85. Mode 21 on my machine is looks bloody fine.
  86.    Second reason is if you aren't using a hires display. I haven't
  87. implemented lores operation yet (nor will I until /way/ into the future -
  88. after when the multitasker has been written), so it simply scales the sprites
  89. down to fit (which looks crap).
  90.  
  91. Documentation
  92. -=-=-=-=-=-=-
  93.    The two files _Kernel and _Shell give a few bits and pieces about each
  94. relevent module and what they will do. In particular, _Shell has a good few
  95. updates on the docs older than this release. The program MultiTtest
  96. implements a model of the tornado multitasker - would anyone with experience
  97. in multitaskers contact me as I have precious little information on how they
  98. should work?
  99.    Currently, the multitasker takes current CPU speed (based on screen mode,
  100. CPU speed etc) and the load on the RISC-OS desktop into account when sharing
  101. out time between individual tasks, and attempts to obtain the maximum
  102. efficiency it can (time spent executing code against time spent in
  103. multitasking the code).
  104.    The testbed multitasker as supplied was fed the data for the processors
  105. below, given eight tasks to switch between and told to (a) turnaround all
  106. tasks in 25cs and then pass control to the wimp and (b) turnaround all tasks
  107. in a second but every 25cs pass control to the wimp. Here's the results:
  108.  
  109. Type (a) multitasking:
  110.  
  111.   CPU         MIPS     Efficiency      cs per task     turnaround time (secs)
  112. 8Mhz  Arm2      4       99.75%          2               0.2
  113. 12Mhz Arm250    6       99.87%          3               0.26
  114. 25Mhz Arm3      12      99.93%          3               0.25
  115. 33Mhz Arm3      15      99.95%          3               0.25
  116. 30Mhz Arm610    26      99.97%          3               0.24
  117. 33Mhz Arm700    35      99.98%          3               0.24
  118. ??Mhz ArmXXX    50      99.98%          3               0.24
  119.  
  120. Type (b) multitasking:
  121.   CPU         MIPS     Efficiency      cs per task     turnaround time (secs)
  122. 8Mhz  Arm2      4       99.92%          7               0.62
  123. 12Mhz Arm250    6       99.95%          7               0.6
  124. 25Mhz Arm3      12      99.97%          7               0.58
  125. 33Mhz Arm3      15      99.98%          7               0.57
  126. 30Mhz Arm610    26      99.99%          7               0.56
  127. 33Mhz Arm700    35      99.99%          7               0.56
  128. ??Mhz ArmXXX    50      99.99%          7               0.56
  129.  
  130. The MIPS values are approximate, and the Arm700 one is for a prototype chip,
  131. not the production one. As you can see, the switcher is very optimised,
  132. achieving at worst a loss of 0.25%, and obviously the faster the processor
  133. the less the loss is.
  134.  
  135. Anyway, while all this is all well and good, there is a problem. As you can
  136. see, the multitasker can only handle a minimum of 1cs slices. Now, I don't
  137. know much about other architectures, but 1cs is an *awfully* long time, and
  138. it gives very little scope for multithreading as you only need ~25 processes
  139. running for cascade overload (ie; when total time to turnaround exceeds time
  140. allowed for turnaround). This is _nothing_, as another testbed of mine proves
  141. that when you move a tornado window around a lot you can start up to a
  142. hundred new redraw threads. Obviously, 100cs is > than 25cs, and cascade
  143. overload happens just like that! :(((
  144.    So, what I'm wondering is, does ANYONE know of any method past this? Maybe
  145. a different method of multitasking? Perhaps a method of scheduling interrupts
  146. for periods smaller than 1cs on existing Acorn machines? You can hook code
  147. onto the internal hardware ticker vector, which oscillates at (I think) 2Mhz,
  148. but this is unsuitable for interrupt code as - well, how the hell would you
  149. do it? Anyone got any ideas? Please contact me then!
  150.  
  151.    As a final point, I think the kernel's Tornado_Hourglass call still works
  152. - if it does, have fun! (and make sure you save your work first!)
  153.  
  154. Cheers,
  155. Niall Douglas
  156.  
  157.  
  158.  
  159. Methods of contacting me:
  160. -=-=-=-=-=-=-=-=-=-=-=-=-
  161.  
  162. I am plugged into the various networks at the following addresses:
  163.  
  164.  Niall Douglas@fidonet#2:443/13.68
  165.  Niall.Douglas@443-13-68.conqueror.co.uk
  166.     - this is an internal Irish address and so is very cheap for me to use.
  167. Please send anything to here if you're on fidonet.
  168.       The internet address attached to it is very unreliable at the moment
  169. (probably disconnected for good :( ), so if you don't get a reply try the
  170. other ones below.
  171.  
  172.  Niall Douglas@fidonet#2:257/501.13
  173.  ndouglas@digibank.demon.co.uk
  174.     - this is in the UK, which is at cross-channel rates for me (ie; VERY
  175. EXPENSIVE). The internet address attached, unfortunately, also is expensive,
  176. so if you use this address, please do NOT send anything largish, only
  177. smallish messages.
  178.  
  179.  tornado@ucc.ie
  180.     - this is my local internet PoP, but irritatingly doesn't have an offline
  181. mail reader ie; I have to do all mailing while online which mounts up. It's
  182. great for large uucodings though ie; if you want to send me a file, do so
  183. through this address.
  184.  
  185.  
  186. Finally ...
  187. -=-=-=-=-=-
  188.    I'd like to thank the following people:
  189.  - Ricky Sarge, for your help with the memory copying code
  190.  - Nava Whiteford, for your support and saying how wonderful my ideas are ;)
  191.  - Justin Fletcher, for inspiring me with that data streaming and eyes and
  192. hats and arrows etc stuff. BTW, how's Caroline? (rotten joke). If you're
  193. wondering, Laura's doing just fine ... I still keep socialising with her ...
  194. I'm thinking of asking her to my graduation dance ... ooar! ;)
  195.  - Colin Turner, for being so /you/!
  196.  - John Stonier, for never answering your mail! ;)
  197.  - all the blokes on the Acorn fido-scene, and various people from the
  198. internet for all your ideas and support. I hope I do justice to your
  199. requests!
  200.  
  201. Last but not least ...
  202. -=-=-=-=-=-=-=-=-=-=-=
  203.    I'm looking for work in England for the summer for July and August. I'm
  204. hard-working, excellent at computers ('specially Acorns of course), and
  205. willing to take almost peanuts for pay! As you can see above, I'm pretty
  206. handy with the programming, and I've serviced and upgraded my computer
  207. entirely by myself. I can fix (almost) any problem with an Acorn, and can go
  208. a long way to a solution with Macs, PCs or Unix boxes.
  209.    I should get around 500 out of 600 points in my Leaving Cert in June and
  210. would be willing to work anywhere in the UK. If you are interested in
  211. employing me (and why not???), then email me above and ask for a CV. I'll be
  212. emailing all the Acorn-related companies with email addresses anyway, when I
  213. get a list that is!
  214.