home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!corton!loria!loria.crin.fr!eker
- From: eker@loria.crin.fr (Steven Eker)
- Newsgroups: comp.sys.atari.st.tech
- Subject: Re: Sprite code (Re: Second&last time: Hacking Contest)
- Message-ID: <467@muller.loria.fr>
- Date: 26 Aug 92 19:54:13 GMT
- References: <438@muller.loria.fr> <1992Aug06.184949.22119@infoserver.th-darmstadt.de> <439@muller.loria.fr> <1992Aug09.011934.47152@news.th-darmstadt.de> <440@muller.loria.fr> <9777@uqcspe.cs.uq.oz.au> <441@muller.loria.fr> <9817@uqcspe.cs.uq.oz.au> <446@muller.loria
- Sender: news@news.loria.fr
- Organization: CRIN (CNRS) Nancy - INRIA Lorraine
- Lines: 70
-
- In article <9890@uqcspe.cs.uq.oz.au>, warwick@cs.uq.oz.au (Warwick Allison) writes:
-
- |> >Maybe, maybe not - it depends on your sprite drawing method. The code
- |> >I originally posted only read the screen implicity with
- |> > or.w d0,(a0)+
- |>
- |> Hardly useful for anything but UNMASKED single-bitplane graphics, which
- |> is next-to-useless (at he very least, you usually want to have black
- |> and white sprites (like the ST mouse pointer), rather than just black
- |> sprites (like the Sun SunView mouse pointer)). Of course, in the
- |> interests of competition, anything is "useful" :-).
- |>
- Actually I said or.w d0,(a0) _type_ instructions. By this I also mean
- and.w d0,(a0), eor.w d0,(a0) ... The code does proper masking.
-
- |> <delight> if you can mail me code-for-code patches, I'll put them into
- |> my library (which will be free-to-all one of these days).
-
- I'll do that as soon as I have some time. The main problem is that I use moto
- memonics & your code uses MIT memonics (which I can read (to calculate the
- timings) but not write (reliably)). Also what regs does gcc (a) use to
- communicate with the asm stuff (b) leave free for the asm stuff - I need all
- 8 data regs!
- BTW when I write hybrid C/asm code I always put the asm in a separate .s
- file and pull my own arguments off the stack.
-
- |> Actually, I think it was more like 50 at 72Hz (ie. mono).
- |>
- |> >Still I can't resist the challenge...
- |>
- |> You didn't post performance stats! How well does it BURN?
-
- Oops - you didn't say mono - the last routine I posted was for single plane
- lores sprites (any plane). Mono should be faster because you don't have
- skip over unused planes & can make use of long word ops.
-
- |>
- |> Let's make some categories:
- |>
- |> 1. Preshifted / Unshifted
- |> 2. 16x16 / 32x32
- |> 3. Masked / Unmasked (ie. black&white / black)
- |>
-
- Sounds good... and when we've run out of sprite possibilities we can move on
- to scrolling & parallax scrolling & then sample replay & then polygons & then...
-
- |> Yep. One better: with unmasked sprite, why even HAVE sprite data?
- |> it uses only 100% more RAM to have the sprite data be the CODE ITSELF,
- |> ie. automatically generate the
- |>
- |> orl #....,(a0) (3 words)
- |> addl d0,a0 (1 word)
- |>
- |> instructions from the 2-word sprite-data!
- |>
- even better:
- or.l #...,(a0)
- or.l #...,80(a0)
- or.l #...,160(a0)
- : :
- saving 4cy/long word. Actually I've considered this "executable data"
- idea for 3D vectors but never had the patience to code it up.
-
- |> (Of course, this is only acceptable for HACK CONTESTS. Anyone who seriously
- |> considers this a "programming technique" is a beauxault)
- ^^^^^^^^^ a what?
-
-
- Steven
-