home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / t / tornado / QandA / Paul1 < prev    next >
Encoding:
Internet Message Format  |  1995-06-26  |  7.7 KB

  1. From: Paul Corke <csc060@cent1.lancs.ac.uk>
  2. Message-Id: <10150.9506241102@cent1.lancs.ac.uk>
  3. Received: by cent1.lancs.ac.uk; Sat, 24 Jun 95 12:02:29 +0100
  4. Subject: Reply - part 1
  5. To: ndouglas@digibank.demon.co.uk
  6. Date: Sat, 24 Jun 1995 12:02:29 +0100 (BST)
  7. In-Reply-To: <950608033146@digibank.demon.co.uk> from "Niall Douglas" at Jun
  8. 6, 95 11:50:43 pm
  9. X-Mailer: ELM [version 2.4 PL22]
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=US-ASCII
  12. Content-Transfer-Encoding: 7bit
  13. Content-Length: 9952      
  14.  
  15. Hiya,
  16.  
  17. > finish recoding it into assembler. I also need to write a millisecond timer,
  18. > as blooming Acorn saw fit not to provide one. The most obvious course is to
  19. > use the IOC latch 2Mhz timer, but this isn't RPC comp. Any ideas?
  20.  
  21. Could do one which is accurate to 10ms :).  I've got something here
  22. somewhere which will do millisecond timing.  Question is, where!  It doesn't
  23. appear to be on the hard-drive,  so it must be on one of the cartridges...
  24. Right. It appears to attach itself to IRQ vector and watch for IOC/timer1. 
  25. Now as there is no IOC in a RiscPC,  the timer has to be derived from another
  26. source.  I believe that the IOMD can supply a suitable ticker,  but without
  27. the TRM I don't know what base address it's using.  With any luck, it's using
  28. the same addr as IOC, but I'd have to knock up some code to try it.
  29.  
  30. > preemption is inefficiency, as the null return code can't be masked out (ie;
  31. > the Wimp is always having to page in the task even when it may not be
  32. > necessary).
  33.  
  34. Not sure what you mean about not being able to mask out null's.  Why can't
  35. you?  If you're worried about too much paging,  then how about initialising
  36. two apps for each real app.  For example "Impression" might take 600k,  but
  37. it would mask out *all* events.  The co-app "ImpressionMsg" would mask any
  38. events it doesn't want,  and pass any relevant ones on to the main app.  The
  39. message gatherer might take 16k,  so only 4 pages need to be swapped in and
  40. not 150.  I am assuming that the wimp isn't silly enough to page in tasks
  41. before checking their poll mask...
  42.  
  43. >    In other words, the task behaves as normal, but say the user clicks on
  44. > 'Recalculate spreadsheet' and then preemption is started up. Then RISC-OS
  45.  
  46. It would be nice to pre-empt all applications,  and not force them to be
  47. written to support it,  but this is a step in the right direction.
  48.  
  49. > begins to look like the Mac, something I'm anxious to avoid. I think some
  50.  
  51. Then you could change the startup banner to read "Welcome to Acorn" and
  52. change the error sprites to look like bombs... :)
  53.  
  54. > it. And I'd also stipulate that you should be able to plug 16 of these
  55. Acorn's
  56. > together by ethernet (or better) and have them all function as one huge
  57.  
  58. Distributed processing is currently a big research topic - there are all
  59. sorts of problems - mainly associated with machines dying.  If some remote
  60. machine dies then you don't know if it has executed the function you asked
  61. it to.  For example if you ask a remote machine to add a record to a
  62. database,  and it falls over for some reason,  how do you know if the record
  63. was added or not?  Do you try to run the request again and risk two copies
  64. in the DB?  Do you assume it was completed and risk the record not being
  65. added?  I think you should leave the hooks for distributed processing,  but
  66. don't try to write it for the first release!
  67.  
  68. >    Anyway, the way I have it is, upon receiving redraw, Tornado calls
  69. > Wimp_RedrawWindow and Wimp_GetRectangle and stores the current graphics
  70. >    I think this should work.
  71.  
  72. When you store the rectangles,  the Wimp will redraw the icons.  Then after
  73. you have UpdateWindow'ed,  the icons will be drawn again.  Not a major
  74. problem,  but it should work.  You may need to keep track of new rectangles,
  75. though.  If something is being dragged accross your window,  then you might
  76. get new rectangles to redraw before you have redrawn the old ones.
  77.  
  78. > Very very dodgy. If you have tried playing around with the memory map,
  79. you'll
  80.  
  81. If the Wimp gets control and finds that someone has altered the mem map,  it
  82. *will* quit and you'll lose all your work.
  83.  
  84. > I agree, but using better methods is far more time-consuming, and when
  85. you'll
  86. > have auto-compression after every heap op, it'll have to be quick. I've
  87.  
  88. Do you have to auto compress after each heap op?  Surely you only need to do
  89. it when you fail to allocate memory:
  90.  
  91. * User requests block which is smaller than largest_block.  Allocate memory.
  92.  
  93. * User requests block which is larger than largest_block.  Compact heap.  If
  94.   request is still larger,  extend heap or fail.  Allocate memory.
  95.  
  96. >    I believe there might be a problem under RO3.5 - Acorn have changed the
  97. > OS_Heap format, and no doubt will go for some stupid relocatable
  98.  
  99. Have they?  The only reference to OS_Heap in the 3.5 PRM is:
  100.  
  101. PRM> RISC OS 2 and 3 place strong restrictions on the heap: the base of the
  102. PRM> heap as specified in R1 must be word aligned and less than 32Mbytes, and
  103. PRM> the size of the heap must be a multiple of 4 and less than 16Mbytes.
  104. PRM> 
  105. PRM> In RISC OS 3.5 platforms the only restrictions are that the base of the
  106. PRM> heap must be word-aligned,  and the size must be a multiple of 4 bytes.
  107.  
  108. If they have changed the format,  then they haven't told anyone about it. 
  109.  
  110. > and reruns itself, keeping the original app intact. When the new app has
  111.  
  112. Isn't it a bit wasteful on memory to have two copies of an app loaded at
  113. once? For example,  Impression Style with no files loaded takes up 600K of
  114. wimpslot.  This is no problem on a 9Mb machine,  but what about 2Mb users? 
  115. Here's a possible solution.  Howabout the old app saves all it's data into
  116. tfs: and the new app then loads it back.  A swi "Tornado_ReLoadApp" could do
  117. it in the background:  the app saves it's data into tfs: and then calls the
  118. swi.  The new app is loaded over the top of the old one,  and initialised. 
  119. When the Tornado App Manager sees a Message_TaskStarted it can send a
  120. Message_DataLoad to the application to force it to load data back from tfs.
  121.  
  122. > Is done. Tornado hooks into Address exception etc. and catches any such
  123.  
  124. Hooking on to hardware vectors is not the same under RISC OS 3.5.  Two
  125. reasons: the module area is now at &2100000.  If you were to assemble the
  126. instruction "b &2100000" and disassemble it you will find that you've run out
  127. of bits (dis: b &fe100000).  The second reason is the new
  128. processor modes with the ARM6 and above - when an exception occurs
  129. you get put in a 32 bit mode - 26bit code doesn't work in 32 bit
  130. modes, so you have to switch back to 26bits.  Fortunately there is a swi
  131. which can help you:  swi "OS_ClaimProcessorVector",  but looking at the docs
  132. it seems that you can't use the addrex vector (prefetch and data aborts are
  133. supported).
  134.  
  135. ------------------------------------------------------------------------------
  136.  
  137. Quicks comment on release 1 of Tornado.
  138.  
  139.  - TFS
  140.  
  141. Does not work.  I've assembled it,  and loaded the module.  Typing *tfs
  142. is fine, but any further * commands (such as *. *info *ex) fail.  They all
  143. data-abort at &01c02084 - according to my memory map this is near the bottom
  144. of the system heap (starts at &01c02000).
  145.  
  146. When I try to shutdown the computer,  I get the error FS_Entry Func 16 not
  147. supported by tfs - I've looked up Func16 in the book and it is just called
  148. shutdown.  On entry,  r0=16 - I think you can safely ignore this one and
  149. not bother with the error.
  150.  
  151.  - HeapExt
  152.  
  153. Works,  but garbage collection doesn't appear to be very good.  At the left
  154. of the bar,  it's mostly white with a few black lines;  to the right of the
  155. used portion it is mostly black with a few white lines.  The right hand side
  156. of the heap is completely black (because it's unused).
  157.  
  158. - TornMod and THeapMod
  159.  
  160. Some test code would be nice,  although from looking at the source I guess I
  161. need ROS 2 to run THeapMod :)
  162.  
  163. ------------------------------------------------------------------------------
  164.