home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / atari / st / tech / 4577 < prev    next >
Encoding:
Internet Message Format  |  1992-08-26  |  3.3 KB

  1. Path: sparky!uunet!mcsun!corton!loria!loria.crin.fr!eker
  2. From: eker@loria.crin.fr (Steven Eker)
  3. Newsgroups: comp.sys.atari.st.tech
  4. Subject: Re: Sprite code (Re: Second&last time: Hacking Contest)
  5. Message-ID: <467@muller.loria.fr>
  6. Date: 26 Aug 92 19:54:13 GMT
  7. 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
  8. Sender: news@news.loria.fr
  9. Organization: CRIN (CNRS) Nancy - INRIA Lorraine
  10. Lines: 70
  11.  
  12. In article <9890@uqcspe.cs.uq.oz.au>, warwick@cs.uq.oz.au (Warwick Allison) writes:
  13.  
  14. |> >Maybe, maybe not - it depends on your sprite drawing method. The code
  15. |> >I originally posted only read the screen implicity with 
  16. |> >       or.w    d0,(a0)+ 
  17. |> 
  18. |> Hardly useful for anything but UNMASKED single-bitplane graphics, which 
  19. |> is next-to-useless (at he very least, you usually want to have black
  20. |> and white sprites (like the ST mouse pointer), rather than just black
  21. |> sprites (like the Sun SunView mouse pointer)).  Of course, in the 
  22. |> interests of competition, anything is "useful" :-).
  23. |> 
  24. Actually I said or.w d0,(a0) _type_ instructions. By this I also mean
  25. and.w d0,(a0), eor.w d0,(a0) ... The code does proper masking.
  26.  
  27. |> <delight> if you can mail me code-for-code patches, I'll put them into
  28. |> my library (which will be free-to-all one of these days).
  29.  
  30. I'll do that as soon as I have some time. The main problem is that I use moto
  31. memonics & your code uses MIT memonics (which I can read (to calculate the
  32. timings) but not write (reliably)). Also what regs does gcc (a) use to
  33. communicate with the asm stuff (b) leave free for the asm stuff - I need all
  34. 8 data regs!
  35. BTW when I write hybrid C/asm code I always put the asm in a separate .s
  36. file and pull my own arguments off the stack.
  37.  
  38. |> Actually, I think it was more like 50 at 72Hz (ie. mono).
  39. |> 
  40. |> >Still I can't resist the challenge...
  41. |> 
  42. |> You didn't post performance stats!  How well does it BURN?
  43.  
  44. Oops - you didn't say mono - the last routine I posted was for single plane
  45. lores sprites (any plane). Mono should be faster because you don't have
  46. skip over unused planes & can make use of long word ops.
  47.  
  48. |> 
  49. |> Let's make some categories:
  50. |> 
  51. |>     1. Preshifted / Unshifted
  52. |>     2. 16x16 / 32x32
  53. |>     3. Masked / Unmasked       (ie. black&white / black)
  54. |>
  55.  
  56. Sounds good... and when we've run out of sprite possibilities we can move on
  57. to scrolling & parallax scrolling & then sample replay & then polygons & then...
  58.  
  59. |> Yep.  One better:  with unmasked sprite, why even HAVE sprite data?
  60. |> it uses only 100% more RAM to have the sprite data be the CODE ITSELF,
  61. |> ie. automatically generate the
  62. |> 
  63. |>     orl   #....,(a0)     (3 words)
  64. |>     addl  d0,a0          (1 word)
  65. |> 
  66. |> instructions from the 2-word sprite-data!
  67. |>
  68. even better:
  69.     or.l    #...,(a0)
  70.     or.l    #...,80(a0)
  71.         or.l    #...,160(a0)
  72.       :      :
  73. saving 4cy/long word. Actually I've considered this "executable data"
  74. idea for 3D vectors but never had the patience to code it up.
  75.  
  76. |> (Of course, this is only acceptable for HACK CONTESTS.  Anyone who seriously
  77. |> considers this a "programming technique" is a beauxault)
  78.                                                  ^^^^^^^^^ a what?
  79.  
  80.  
  81. Steven
  82.