home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3775 < prev    next >
Encoding:
Text File  |  1996-08-05  |  3.8 KB  |  81 lines

  1. Newsgroups: alt.sys.amiga.demos,comp.sys.amiga.programmer
  2. Path: newshost.grace.cri.nz!maths!peterm
  3. From: peterm@maths.grace.cri.nz (Peter McGavin)
  4. Subject: Re: OS friendly Demos..
  5. Message-ID: <PETERM.96Feb22110658@tui.maths.irl.cri.nz>
  6. Date: 21 Feb 1996 22:06:58 GMT
  7. References: <wJL6y*csa@aargh.incubus.sub.org> <2492.6623T185T733@mbox.vol.it>
  8. Organization: Industrial Research Ltd
  9. In-reply-to: bizzetti@mbox.vol.it's message of 19 Feb 1996 02:14:18 GMT
  10.  
  11. bizzetti@mbox.vol.it (Fabio Bizzetti) writes:
  12. >>In article <2125.6620T1404T1504@mbox.vol.it>, Fabio Bizzetti writes:
  13. >
  14. >>> be so nice to write an assembly, short as much as possible source to
  15. >>> intercept the Amiga-M/N keys
  16. >
  17. >>Why intercept?  Users hit them when they WANT to access other screens.
  18. >
  19. >Because when you press the Amiga-M keys the OS hits the hardware although you
  20. >made a LoadView(0). This changes the synch registers, in the best case.
  21. >Amiga-M/N keys have to be filtered if you want to make a demo/game that hits
  22. >the hardware
  23.  
  24. So install an input-handler...  See the input.device docs in the
  25. Devices RKM.  Not only does an input-handler intercept the Amiga-M/N
  26. keys giving the illusion of single-tasking, but it kills 95% of the
  27. OS's performance hit and it also provides efficient, low-level
  28. hardware-independent keyboard and mouse input to the program.  The
  29. program can continue to multitask for network play, hard disk caching,
  30. alternate serial.device drivers, OS calls, etc.
  31.  
  32. >(I challenge anyone to demonstrate that with the OS you can do
  33. >everything, you -cannot- make the great effects that you should ask Amiga
  34. >coders to make).
  35.  
  36. I agree not everything can be done with the OS.  Even if it could, you
  37. set an impossible challenge because no-one could write every program.
  38. On the other hand, about the only effects that cannot be done with the
  39. OS are ones that bang the custom hardware so fast that there is no
  40. time for interrupts or context switches.  Such effects are few and far
  41. between in my experience.
  42.  
  43. >Definitely, I agree to push the compatibility as far as
  44. >possible, but we cannot think with OS's C/C++ programmers mentality when we've
  45. >to make technically amazing DemoEffects/games.
  46. >This is sad maybe, but absolutely true.
  47.  
  48. IMHO practically every OS-killing program I've ever seen would work
  49. without any noticeable slowdown if they were programmed properly
  50. _with_ the OS.  In many cases they would work in an Intuition Screen
  51. with high-level gfx calls.  This provides maximum gfx-card support.
  52. Some effects might require a user copper list.  More complex
  53. copper-banging effects need an input-handler and LoadView(NULL).  At
  54. this lowest level it's simply a matter of checking for and exclusively
  55. allocating the required hardware thru the OS before banging it
  56. (bailing out if the required hardware is not available), installing
  57. interrupts with AddIntServer(), SetIntVector(), QBlit(), etc, obeying
  58. other OS rules and maybe adjusting priorities.  Such programs should
  59. never crash on _any_ existing or future Amiga configuration.
  60.  
  61. >>> No shared libraries please.
  62. >
  63. >>Why not?
  64. >
  65. >I dont want to call 10 libraries to run 10 routines long 20-100 bytes each.
  66. >I dont know if you understand, but you'll hear this from many other coders.
  67. >Just accept it please, there're good reasons.
  68.  
  69. The OS does not force the use of shared libraries.  On the other hand,
  70. they are a powerful tool for saving memory when multiple programs
  71. share the same subroutines.  Also they provide device-independent
  72. interfaces to hardware.  For example, how do you propose using
  73. third-party serial ports or network redirection if you bang the serial
  74. port hardware instead of using serial.device?  Indeed, ROM libraries
  75. provide up to 512kb of useful code on every Amiga for free.  If we
  76. don't use them, we're hardly making full use of the machine and may
  77. even finish up duplicating much of their functionality in RAM.
  78. -- 
  79. Peter McGavin.   (p.mcgavin@irl.cri.nz)
  80.  
  81.