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