scene.org File Archive

File download

<root>­/­mirrors­/­amigascne­/­Scrollers­/­A-Groupstext­/­Anarchy/Anarchy-StolenData01-mag.txt

File size:
37 842 bytes (36.96K)
File date:
2018-08-31 11:48:10
Download count:
all-time: 70

Preview

      ISSUE #1      ----------------------------------------     Page No. ##    
------------ Contents  Page ------------ Telecommunications in  the near future Demo Reviews by  FRAP of Magnetic Fields-- The STOLEN DATA  Music Competition ------------ Classified Adverts ------------------- Kreators Coding Page ---------- An Introduction to Amiga Demo-Coding ------------ Closing Comments -----------




            -------- Telecommunications in the near future -------

                           ----- By Count Zero ----- 


   The future of telecommunications in
Britain  will see the emergence of two
fundamentally  different  systems. One
system  will  be have  evolved, and is
evolving at the present time, from the
existing British Telecom network, this
will  be  the  ISDN  system. The other
system  will  be  the   most  advanced
system  of  its  kind  and will  exist
nowhere  else on  the world, this will
be the PCN system.
   ISDN  is an acronym  ( stands for )
Intergrated Services  Digital Network,
and is being developed by BT.ISDN will
replace BT`s ageing  network of clock-
work exchanges, and co-axial telephone
lines, BT  says that  it will  have  a
complete digital network by the middle
of  the next  decade, around the  year
1995, assuming  the  present  rate  of
upgrading  continues. At present  this
is the replacing of  two old exchanges
with digital ones, every day, but bear
in mind  BT has around 6,000 telephone









exchanges.
   Okay, I hear you ask,  exactly what
is ISDN and will it be any better than
the  present  system?   Digital  fibre
optic  cables have  immense advantages
over co-axial copper cable,but chiefly
there are two reasons why.
   Bandwidth  is   a  measure  of  the
capacity  of information  that  can be
carried, for instance your phone has a
bandwidth of 3,100 hz, this means that
the  frequency  of  the  signal can be
varied  3,100 times per second  ( This
method is called  Frequency Modulation
or FM). In theory this means you could
only transmit  3,100 Bits Per  Second,
but modems  achieve a much higher rate
by using  another method of modulation
in addition, called  phase modulation.
Although the coaxial copper cable used
for  phone lines can carry more, it is
not  needed  for  voice  grade  trans-
mission  ,  where  3,100 hz   provides 
acceptable quality.


  Fibre optic cables are fundamentally
different, because  the information is
carried, or modulated, using  a  light
wave, as opposed to a  radio frequency 
wave,although both are electromagnetic
waves  they are at  different ends  of 
the  EMG  spectrum. Light  has a  much
higher  frequency  than  radio  waves,
typically around  1 million Giga Hertz
( 1,000 Million Million Hetrz!! ), and
so   has  a  much   higher   bandwidth 
enabling   more   information   to  be
carried, around 140 million bps, or 12
million kilobytes per second! A single
strand of  fibre optic cable can carry
about 2,000 telephone conversations,or
250  music  channels, or  2  colour TV
channels, or a  combination  of any of
these.
  The second advantage of fibre optics
is that  it is digital, unlike  copper
cables which are not suited to precise
digital transmission because they have
have a very low signal to noise ratio,
or decibel  level (dB). This is caused
because they are made of metal and are
prone  to  having  signals  induced in
them by other  radio frequencies, this
is  the noise that can be heard over a
bad telephone line.


   So  the advantages of  fibre optics
are substantial, with only a few fibre
optic cables  running  into your  home
you could  have access to all sorts of
services, like  cable  TV, or the  new
format  High   Definition   Television
(HDTV), or even cable `radio stations`
with   the  advantage  of  CD  quality
music. But  what  will be  vastly more
interesting  will be  the implications
it has for you as a computer user.
   Okay, thats  fibre optics, but what
about  the  other  major development?,
about  which  you`ve   probably  never
heard  anything. The alternative  to a
hard-wired   digital   network,  is  a
completly wireless radio communication
network which is similiar to the Cell-
net or  Vodaphone  network  already in
existence.
   Give up?, well it`s called  PCN and
stands  for  Personnal  Communications
Network, and   it  is   already  being
developed  by several major companies.
Basically it is the same as the system
upon  which car-phones work, but it is
fundamentally different in that unlike
car-phones it will  not rely on the BT
network.
  So in effect this means that it will


be a  mirror image of the  BT network,
enabling   you  to  use   your   cheap
personal phone  almost anywhere in the
country  without having to find a call
box. Although  this does not have such
far-reaching   implications  as  fibre
optics ,  it  will  act  as  a  direct
competitor  for  BT, and will  provide
the  consumer  with  the   first  real
alternative in domestic communications
  But PCN will be a massive commitment
for any  company, with  over 1 billion
having  to  be  spent in the next five
years. Although  this has  not put off
major  communications  companies, like
Telefonica (Spanish), Bellsouth (USA),
along  with  other companies  such  as
Philips, GEC, Motorola and  Thorn EMI,
from accepting the Department of Trade
and   Industry`s  ( DTI )   offer  for
potential  operators to  forward their
plans.
  Okay,and now for the intresting bit,
how this will effect you as a computer
user? Well, I think that  fibre optics
will be a  revolution, and  may herald
the age of the  `computer revolution`,
as a  progression from the  industrial
one. A digital  network  that connects
every house  in the country could have


drastic  implications  on the  way  we
live and work.
   A  survey  early  this year  by the
industrial research group  `Industrial
Relations Services`  found that 23% of
the people questioned  said they would 
prefer to work from home,or `telework`
by being linked to the office by their
computer.  With  the  vastly   reduced
charges  on  data communications  that
will  be  economically  possible  with
ISDN  then   this   could   easily  be
achieved.
  But specifically  lets  consider the
computing implications:
    The  ideas  of  the  sci-fi  genre
concerned  with  computers in the near
future, called `cyberpunk`,has already
explored  the ideas  that such a comms
net could achive. More exactly,William
Gibson   has  been   heralded  as  the
creator  of this genre, and  his ideas
about  `cyberspace`  as  a  medium  in
which  all computers are linked, could
be seen to be a partial reality by the
turn of the century.
   Gibson`s   exploration  of  society
dominated  by high technology, in such
books as  NEUROMANCER and  COUNT ZERO,
can  be seen to be  one of in the next



century. But perhaps  if his books can
be seen  as a  prophecy  of the future
then a digital fibre optic network can
be  seen  to  be a  step  in the right
direction.
 The most interactive computer system,
espoused by Gibson`s cyberspace, which
is every  game-players dream, would be
one  in which the  sensory input would
be total, so along with  direct visual
and  audio  input  to  your  brain you
would also have  sensory input such as
touch.   In   effect   it   would   be
indistinguishable from reality itself,
touched   upon   in   the   TV  comedy
RED  DWARF, and  strived  for  by  all
arcade game designers, with bigger and
better  hydraulic cabinets, and sit in
enclosures. With big steps being taken
towards  this goal by California`s VPL
company,  who  have  designed  Reality

Okay dudes that`s it,was it good enough for you?
Article written for STOLEN DATA by Andy,alias Count Zero of Rising Force.

 KREATOR- Thanks for that article Andy ! Just a little note; Here in Britain
BT have  now installed  565 Mbit/s  optical fibres ,  and in the near future
they intend to increase this  to 2.2 Gigabit/s, which will ultimately permit
transmission of some 32 TV channels on one fibre strand ( don't forget there
are on average 8 of these fibres to a single cable )



Built  for  2 (RB2), a computer system
where  two  users  can  interact  in a
computer  generated  world by using 3D
eye goggles and `Datagloves` to detect
hand movement.
   The  strive  towards  this  perhaps
ultimate goal in  computing  will have
taken the  first step  with ISDN. With
interaction  in  games  being taken to
the  maximum capacity  possible  using
visual  means, by using  movie quality
graphics generated on  supercomputers,
and audio means via Compact Disk sound
systems.So in perhaps 10 years,instead
of  blasting away all by yourself, you
could be exterminating green aliens in
full    High   Definition   Television
resolution with a few thousand colours
and stereo CD sound,whilst hoping that
the   last  green  alien  you  blasted
wasn`t your mate next door!


                 ---------- The Demo Review Column ----------

                    ----- By FRAP of MAGNETIC FIELDS -----

  Welcome to the first issue of STOLEN
DATA and  this is FRAP/MAGNETIC FIELDS
bringing  the up  to  date info on all
the latest demos  worldwide !!. I have
seen  most  of  the  latest  demos and
intros and they are  all basically the
same with the  usual scrollers and the
same sort  of effects. You'll probably
know what I'm talking about.
  But there is some good stuff around,
with  some   good   music  disks  from
various  groups   and   a   few   very
impressive demos.I've listed the three
demos  which  I  think  are  the  best
around at present :

  1. SEVEN SINS by SCOOPEX/FINLAND.
  2. SCROLLER DEMO by  THE SILENTS.
  3. DER BLOCKHAUS by SETROX.

Let's take a  closer look at each demo
in turn :










SEVEN SINS-SCOOPEX/FINLAND.
  This demo is very impressive indeed,
it is  very  well  coded and  contains
some really cool music. The grafix are
very  well done, with some  novel sine
scrollers  and  some  truly  excellent
vector balls.Hard to fault and this is
why the demo got 1st place this month.

DANISH QUALITY - THE SILENTS.
  It nearly got 1st place  until I saw
the  scoopex  demo !!.  It's  a simple 
concept, containing a scroller made up
of dots which twists  and flips across
the  screen to  the sound  of a really
cool tune.The logos at the top contain
some good graphics and the scroller is
really easy to read.

DER BLOCKHAUS - SETROX.
  Well  coded, with  an option  screen
allowing   you  to  toggle  between  a
vector scroll  and a  sinus part. Some
cool effects add to the enjoyment.




  If you think your demos are the most
coolest around then  please send  them
to us and let us all  see them.  If we
agree with you, then your demo will be
picked  as one of the  best 3 for that
month and go onto the STOLEN DATA DISK
( if  Kreator  has  room )  Send  your
productions to the following address :

     37 STETCHWORTH DVE,
     BOOTHSTOWN,
     WORLSLEY,
     M28 4FU,
     MANCHESTER,
     ENGLAND.

We guarantee  all disks  returned with
latest stuff.  Only send recent demos,
utils & music. In  future issues there
will  be  1  meg demos/music  and best
Amiga artwork. So if you do this stuff
then send us a compact to look at.

NO GAME SWAPPING  (FUCK OFF FAST !!)


KREATOR

  Thanks  for  that FRAP,  I thought I
would just add my  own comments to the



above three demos, so  here they are.

SEVEN SINS-SCOOPEX/FINLAND
   I must  admit I was very  impressed
with  this demo  coded by  SLAYER. The
presentation is almost faultless, this
is  one  of  those  progressive  demos
which introduces  new effects  as time
moves on. However here we have a basis
of  a  simple  starfield  a  couple of
copper bars  bordering the action, and
a truly excellent  soundtrack composed
by UNCLE TOM,  on top of which  just a
single  effect runs, a  new one fading
in as the previous  one disappears.
   It starts  out  like a  movie  with
the credits and titles; here we get to
see the  graphical  talents of REWARD. 
Amongst the visuals thrown at us are a
proportional sine-scroller,some vector
balls another sine-scroller but with a
large  font  which  also moves  in the
horizontal  direction ,  and some very
smooth large solid 3D convex objects.
   The solid  3D is  technically  very
impressive,  each of the objects is in
3 bitplanes  (8 colours)  and all  but
very  large objects  run   in just one
frame. This is achieved by  using what
are   called   Convex   objects.  This


eliminates the need to calculate plane
priorities,and you can fill the object
all in one operation.
  In all I would say this rates as one
of  the best  demos  I  have seen in a
long while,  and I congratulate SLAYER
for this,  his first  demo for SCOOPEX
FINLAND.

DANISH QUALITY - THE SILENTS
  This   demo  coded  by   MR  PERFECT
features some rather  well drawn logos
from MIKAEL BALLE  and very good music
by DESPER KYD. The whole demo revolves
around  a  single routine:  a scroller
composed  of dots,  moving  in  varied
twisting  helical  paths.  There  also
features  a  simple  scroller  at  the
bottom which can be moved up and down.
Technically   this  demo   isn't   too
complex,  but  nevertheless  it scores
on originality.




DER BLOCKHAUS - SETROX
  ZYR coded  this demo  featuring a 3D
vector  scroller ( well  three of them
to be precise ) and  some simple  sine
effects.   The  graphics   are  purely
functional, but where this demo scores
most  is  in  its  controlability.  By
pressing the HELP key a screen pops up
to  explain  the  large  selection  of
functions,  enabling  you to alter any
of the demos variables.There are quite
a  large  number  of  3D  vertices  on
screen,  and the  screen area is about
256  lines deep;  I would say  there's
some  clever programming here. 

  Well thats  all for  the demo review
this issue,  watch out next month when
we  should  be   reviewing  even  more
demos. But don't forget,  you won't be
featured in this magazine if you don't
send us your latest demos.



      ==================================================================
               STOLEN DATA - A DCS-ANARCHY-TRISTAR CO-PRODUCTION
      ==================================================================

                                    Contents
                                  ------------
Shortcut    Page     Title                                   Author

( F1 )      1        Contents
( F2 )      2-5      Telecommunications in the near future   Count Zero
( F3 )      6-8      The Demo Review Column                  Frap
( F4 )      9        The STOLEN DATA Music Competition
( F5 )      10       Classified Ads. Section
( F6 )      11       Coders section inc. Problem page        Kreator
( F7 )      12-19    Beginners guide to demo coding          Kreator
( F8 )      20       Closing comments                        Kreator

   To order the paper magazine ( 30p + SAE in UK, see ads for more details)
 write  to NOSAH,  if you  have anything  we may be interested in,  for the
 magazine, you can also write to us at :

              KREATOR-ANARCHY ( Michael )    NOSAH-DCS ( Dave )
              42 Browfield Terr.             99 St. Lucia Park,
              Silsden,                       BORDON,
              KEIGHLEY,                      Hants,
              W.Yorks,  BD20 9PT             GU35 OLD.

  Controls :-   Function keys for quick shortcuts
                Cursor Left & Right step backwards and forwards
                Right mouse cycles forwards




*******************************************************************************
******                  STOLEN DATA - MUSIC COMPETITION                  ******
*******************************************************************************
******                                                                   ******
******      This  is  one  for  all you Budding  musicians out there     ******
******                                                                   ******
******      If your  musically inclined  and think  that  your Amiga     ******
******                                                                   ******
******      music is the best, then this is the competition for you.     ******
******                                                                   ******
******      Just send your best track,  written on any music utility     ******
******                                                                   ******
******      ( send  the  replay  routine  or  the music  prog used )     ******
******                                                                   ******
******      to either of  the addresses  below, it costs one disk to     ******
******                                                                   ******
******      enter and the winner(s) will get every disk that reaches     ******
******                                                                   ******
******      us.The closing date is the 31st January so get composing     ******
******                                                                   ******
******       Silver/Errors                    Superted                   ******
******       J.K.Styve,                       Skytterveien,              ******
******       5164 Hjelmas,                    5035 Bergen/Sandviken,     ******
******       NORWAY.                          NORWAY.                    ******
******                                                                   ******
****** P.S. This is the same competition as in Iguana so don't worry if  ******
****** you entered that , your entry is still valid, we have just moved  ******
****** the closing date back a few months.                               ******
******                                                                   ******
*******************************************************************************




--------------------------------------
 If you don't already have a copy of
 the STOLEN DATA paper magazine then
 here are the details.
 Prices in the UK
 ----------------
 30p + S.A.E. ( + 1 Amiga disk  )
 75p + S.A.E. ( 45p covers disk )
 Price outside UK
 ----------------
 A  banknote  closest  to  One  pound
 sterling + 1 Amiga disk, remember it
 must be a banknote,we can't exchange
 coins.

   'But'  you ask  'what do I get for
 my money',  well  here  is  a little
 resume of the first issue:

 Interviews with  VISION FACTORY  and
 BAMIGA SECTOR 1 , the Hottest Gossip
 around ,  Demo  reviews ,  the Amiga
 Music  Competition ,  Dear Mr. DROKK
 featuring ANARCHY's own JUDGE DROKK,
 an  article from  SUBWAY, and one on
 the  Development of the Amiga Scene,
 PLUS  some really  GREAT  artwork by
 SILVER of the  ERRORS  including two
 excellent cartoons, Charts and more.
--------------------------------------



--------------------------------------
        OOH ! IT'S OBSCENE V

Part five in this Exciting,Stimulating
Mind  Numbingly  Awesome  demo  series 
from ANARCHY UK is OUT NOW !!!!!!!!
   Featuring some cool graphics, great
sampled dirty  or obscene  phonecalls,
and some excellent code by HAMMER.
   For a copy of O.I.O.V.  ( 2 Disks )
write to one of these addresses:

 HAMMER (ADAM),    JUDGE DROKK (MARK)
 12 Windsor Place, 9 Back Lane East,
 Barnoldswich,     Royston,
 Lancs.            Barnsley,
 BB8 6HD.          South Yorks,   
                   S71 4RZ.
 or my address on the contents page
--------------------------------------
 Here's an address I received at the
 last minute,  write to this guy for
 swapping.

  SLIDER-TOPGUN  ( John Bown )
  11 Greysand Crescent,
  Appledore,
  Bideford, DEVON,
  EX39 1SE.
--------------------------------------





      ----------- An Introduction to Demo Coding on the Amiga -----------

                ----------- By Kreator of ANARCHY UK ----------


  Welcome  to the  first of  hopefully
many  articles I  will be  writing for
STOLEN DATA  on  Demo  coding for  the
Amiga.  I must emphasise that the best
way in which  you can learn to produce
demos is through practice.
  Now you will  find on this disk some
example  source, designed on Devpac II
Unfortunately  due  to  using  some of
Devpac's   more   powerful   features,
the Source is incompatible  with SEKA.
  I  don't  intend to  cover  material
you  can  find in  reference books, so
if you do not  own  either  the 'Amiga
Hardware  Reference  Manual'   or  the
'System  Programmers  Guide'  and  are
serious about  coding,  I  suggest you
buy,  borrow  or steal  one of them. A
reference on 68000 would also help.

 This issue I  will explain the use of
Bobs ( or  sprites as  Magazines  like
to incorrectly refer to them ). I will
not be covering the type of bobs found









in  games ie.  they  move  across some
backdrop  without  disturbing  it,  as
these  are  a simple  extension of the
bobs usually found in demos.

  What is a bob? A bob is just a piece
of graphical data, which has a certain
number  of  colours  ( bitplanes ) and
that can me  moved smoothly around the
screen.   This is  achieved by copying
the data, and performing a Right shift
on it  in the process.  The blitter is
able  to do this  automatically,  with
what is known as a barrel shifter.

  Now  one   of  the   most  important
techniques  used   when  working  with
large   numbers  of   bobs  is  double
buffering;   so   called   because  it
involves using two screen buffers, one
of them is displayed, whilst the other
is being re-drawn.  You will  find the
sine-bob  source  utilises  this.  The
mechanics  of  this  process  are very


simple, look  in the source if you are
unsure how it works.

  To  begin  with  how do  we use  the
blitter to  draw a bob.  Well a bob is
generally  composed  of a  sequence of
bitplanes for the graphic, and a mask.
The  mask is  used to  'mask'  out the
bits of the  background,  which you do
not want to disturb,  when copying the
bob onto  the screen.  In practice you
will normally just OR each of the bobs
image  bitplanes  together  to produce
the mask,  but it is  possible to  use
alternative  masks  eg.  You  may have
noticed   that  on   some  games,  the
'sprites'  have a black  outline, this
is achieved  by adding an  extra pixel
all the way around your mask.

  For a fast bob routine,  arrange the
image  planes next  to each other, and
similarly  have multiple copies of the
mask  corresponding to the images.Also
important,  you  must  leave one blank
word at  the  right of the image ( and
mask ) so  that the bob can be shifted
into this area.




eg. For a 3 bitplane bob ,48*64 ,the
image data should be arranged :

Word1 - plane1 --- Word4 - plane1
Word1 - plane2 --- Word4 - plane2
Word3 - plane3 --- Word4 - plane3
Word5 - plane1 --- Word7 - plane1

      .................

Word252-plane3 --- Word255-plane3

   But for the mask, instead of having
three different lines of data, we have
the same data for each plane.

  For this to work we must also have a
similar format for the screen, this is
achieved with the Bitplane modulos.
 eg. If we  have  a  3 bitplane screen
of  the   required   form  at  $70000,
(320 x 256  pixels)  then  a  suitable
copperlist to set up this screen is,


  MOVE  $3081,Diwstrt
  MOVE  $30c1,Diwstop
  MOVE  $0038,Ddfstrt
  MOVE  $00d0,Ddfstop
  MOVE  $0000,Bpl1ptl


  MOVE  $0007,Bpl1pth
  MOVE  $0028,Bpl2ptl
  MOVE  $0007,Bpl2pth
  MOVE  $0050,Bpl3ptl
  MOVE  $0007,Bpl3pth
  MOVE  80,Bpl1mod    
  MOVE  80,Bpl2mod
  MOVE  $3200,Bplcon0
etc...

  The reason for going to such lengths
is because now the bob routine is much
simpler  and  we  need  only  use  the
blitter once  to plot the whole image.
Whereas  using  consecutive  planes we
would   need  to   copy   each   plane
seperately.  To get  the bob into this
format DON'T  use an  IFFconvertor use
an IFFdepacker  (one supplied on disk)
or strip  the IFF header from your IFF
brush by hand  ( generally DPaint does
not  compact  small  brushes,  so just
look  for the  word  BODY   with  your
monitor,  the next  longword  is   the
length of the graphic  followed by the
data itself )

 Now once we have our bob in the right
form,  how is  it copied  onto screen.
As should already be known the blitter



has four DMA channels  ( Direct Memory
Access ). The  three  inputs A,B,C can
be combined  using  logical operations
with what is  called the MINTERM. This
allows any form of logical function to
be applied  to these  channels  before
output onto channel D.  We address the
channels through  four pointers Bltxpt
(x is A,B,C or D), whereas the Minterm
is the bottom 8 bits of the  blitter's
first  control word  Bltcon0.  Bltcon0
also  tells the  blitter how  many DMA
channels   are in  use and  how far to
shift  channel A.  One important point
to  notice  right now,  is  that  only
channels  A and B  can be shifted. The
blitters  second control  word Bltcon1
also has a shift counter  for source B
but its remaining  functions are of no
interest to us as  they relate to line
drawing,  filling,  and  reversing the
blitters direction.
  First  we  determine   the   correct
Minterm.  Now  channel A  is used  for
the image data, channel B for the mask
and Channel C  points to the screen at
which we  want to copy the data.  This
is essential as only  Channels A and B
can be shifted prior to combining with
Source C,  thus allowing  the bobs  to



move smoothly one pixel at a time.  We
want  data to be  copied from A if the
bit  in  B is  set otherwise  it comes
from C.  The final result is output in
channel D.  As a  reminder  here  is a
list of the  LFx,  Bltcon0 and Bltcon1
bits ( capitals mean bit set )

LFx     7   6   5   4   3   2   1   0
       ABC ABc AbC Abc aBC aBc abC abc

Bltcon0  15-12   11  10   9   8   7-0
        A shift  Aen Ben Cen Den  LFx

Bltcon1  15-12           11-0
        B shift    set these to zero

   If you didn't  already know here is
how to calculate the minterm. Find out
what happens in each of the above  bit
combinations,  if it is set put a 1 in
the  corresponding   position  in  the
minterm otherwise a zero.

 eg. ABC - If B is set data comes from
A and C is ignored,  therefore as A is
set in this case ABC is also set.

 From these considerations we see that
the required  minterm is  %11100010 or


$e2 (check it if you don't believe me)

  We must now  calculate  Bltdpt ( and
Bltcpt ) from the bobs X and Y coords.
This is  very simple  and is  given by
the equation :

Bltdpt =  Screen  +  Y*Width*Number of
planes + ( X and $fff0 )/8

  So if  X and Y  are  given  in d0,d1
respectively   then   the    following
routine will calculate  Bltdpt for you
for a  2  bitplane,  320  pixels  wide
screen.  (  this will  now be the same
for each  step of the example,  with a
32 (+16 blank) x 31 bob as used in the
example  source, which can be found on
this disk )

Screen = $70000
      Lea    Screen,a0
      Move   d0,d2      Remember X
      Lsr    #4,d0      Divide by 16
      Add    d0,d0      Multiply by 2
      Mulu   #80,d1
      Add    d0,d1
      Lea    (a0,d1),a1

   ( cont. on next page )


BlitWait
      Btst   #14,Dmaconr
      Bne.s  BlitWait
      Move.l a1,Bltdpth
      Move.l a1,Bltcpth

 Next we set the pointers to the image
data and mask with

      Move.l  #Image,Bltapth
      Move.l  #Mask,Bltbpth

 Now calculate  by how much we need to
shift the  A-B sources,  this is given
by X and 15. We then combine this with
the minterms  and DMA  enable bits, to
go into Bltcon0 and Bltcon1 as follows

( we'll  update  both  at once  with a
Move.l as they are adjacent registers)

(don't forget we stored X in d2 )

      And    #$f,d2
      Ror    #4,d2      The shifts are
  in bits 12-15 of Bltcon0 and Bltcon1
      Move   d2,d0
      Or     #$fe2      $f00-all DMA
  channels active, $e2 is the minterm
      Swap   d2


      Move   d0,d2      Bits 0-11 are
  already clear in d0 (ie. no lines or
  blitter fill)
      Move.l d2,Bltcon0

  We now need to discuss Modulo values
and the Bltsize register,  for which I
need  to   explain   how  the  blitter
operates in normal ascending mode. The
Bltsize  and modulo registers together
define a window  on the full-screen on
which  your blitter  operations are to
take place. The Bltsize  register uses
the lower  6 bits (0-5)  to define the
length of each line (ie the Bob width)
in words ( this is important, remember
Bltsize is  not  specified in bytes ).
A value of 0  corresponds to  64 words
in length.  The upper 10 bits refer to
the number of  lines you wish to copy,
again a  zero value does  in fact mean
1024  lines (  there  is after  all no
point  in  copying  zero lines ). When
you  set  Bltsize  the  blitter begins
its operation;  it increments  each of
the   Channel  pointers  in  use,  for
every word copied  until it has copied
the  specified number  of lines;  then
the  blitter  adds  the  corresponding
modulo values to  each of the channels



and continues with the next line until
it has finished.  Therefore by setting
the modulos correctly, a window on the
screen can be specified.  This is what
needs to be done with our bob routine,

  In our  case the  screen is 40 bytes
across and the Bob is 6 bytes wide, so
both  Bltcmod  and  Bltdmod need to be
set to 34 (40-6).  Bltamod and Bltbmod
are cleared to zero.

      Move   #36,Bltcmod
      Move   #36,Bltdmod
      Clr    Bltbmod
      Clr    Bltamod

  We have  a  final pair  of registers
which I have left out till now.  These
are  Bltafwm and  Bltalwm  ( Blitter A
first  and  last  word masks ).  Their
primary use is for  copying rectangles
of screen data,  which  do not  always
lie on word boundaries. By setting the
registers,  you can  mask out  bits on
either  side  of  channel  A's window.
They  can be  used  to  save  a  small
amount  of  memory with  bob routines,
but have no benefits in speed, as such
I will  simply set  both  to  $ffff in


order that they do  not interfere with
the blitter at all.
  Bltsize  in our  example  is  set to
31*64*2+3 which means draw 62 lines of
3 words each,  as we have  2 bitplanes
of 31 lines apiece.

     Move.l #$ffff0000,Bltafwm
     Move   #31*2*64+3,Bltsize

  As soon  as  Bltsize is  initialized
the blitter  gets to work,  and begins
plotting the bob.

  Before we redraw the bob in the next
frame the previous bob must be deleted
 Two methods are available here :

1> If a large number of bobs are being
used  a  fast screen  clear routine is
employed.  This uses  both the blitter
and the processor;  the blitter is set
working  forwards  and  the processor,
which works  in parallel,  clears from
the bottom of the screen backwards.

 eg. Move.l  #Screen,Bltdpth
     Clr     Bltadat

    (cont. on next page )


     Move.l  #$1f00000,Bltcon0
     Clr     Bltdmod
     Move    #A*64+40,Bltsize

     Movem.l a1-a6/d0-d7,-(a7)
     Lea     #Screen+(Nolines-1)*80,a0

     Movem.l Blank,a1-a6/d0-d7  Repeat
     .......                      B
     Movem.l Blank,a1-a6/d0-d7  Times
     
     Movem.l (a7)+,a1-a6/d0-d7

 Blank points to  an area of at  least
14 blank  longwords,  A and B  must be
determined  by   experimentation,  but
the  Blitter and Processor clears must
overlap.

2> If  using a  smaller number of bobs
clear them individually.

with  d0 and d1 as the  X and Y coords
as  before,  the  routine  below  will
clear the bob.

     Lea    Screen,a0
     Lsr    #4,d0
     Add    d0,d0
     Mulu   #80,d1



     Add    d0,d1
     Lea    (a0,d1),a1
     Move.l a1,Bltdpth
     Move   #34,Bltdmod
     Move.l #$1f00000,Bltcon0
     Clr    Bltadat
     Move   #31*2*64+3,Bltsize

  For a complete listing of the source
outlined  above,  look  in  the source
directory  of  this disk.  One  of the
demos uses  16 bobs and  is controlled
with  the  mouse.  The  other  employs
double-buffering  and  a  double  sine
for a simple (and very slow!) sine-bob
routine.Both these routines are purely
for  demonstration  purposes,  as they
are  designed to  be  easy  to follow.
You will find  that the faster the Bob
routine  the more  difficult it  is to
follow,  and  as  an  example  I  have
included  my 196 animated bob routine.
Be careful not to run it twice without
re-assembling,    it's     a    little
temperamental.

 Some of the techniques for increasing
speed include ;  use  of   tables  for
converting the X,Y coordinates,  using
Address  pointers  for  some   of  the


Blitter  registers   as   the  Address
register   indirect    (   and    with
displacement  )  addressing  modes are
much faster than absolute addressing.

  I hope this has been of some help to
coders starting out, next month I will
possibly  be covering  3D graphics,the
equtions for their calculation, simple
hidden-line removal, vector balls, and
ordinary  line-vector  graphics. Until
the next issue ..

       Kreator  -  Anarchy UK


 I have included a list of the blitter
registers on the opposite column.  You
will also find an  equates file in the
source  directory which  contains most
of the  custom registers.  It also has
three Macros,  which  are  designed to
fascilitate    the     creation     of
Copperlists.

   If  you  have  any  suggestions  or
queries   for  this   section  of  the
magazine sned them to my address,which
can be found on the contents page.




     Blitter Custom Register List
    ------------------------------
All registers have a base addess of
$dff000.

Bltcon0   $40     | Bltdpth   $54
Bltcon1   $42     | Bltdptl   $56
Bltafwm   $44     | Bltsize   $58
Bltalwm   $46     | Bltcmod   $60
Bltcpth   $48     | Bltbmod   $62
Bltcptl   $4a     | Bltamod   $64
Bltbpth   $4c     | Bltdmod   $66
Bltbptl   $4e     | Bltcdat   $70
Bltapth   $50     | Bltbdat   $72
Bltaptl   $52     | Bltadat   $74

There is also a Blddat, but this is an
early  read register.

Bltcon0
 15-12       11-8         7-0
A shift   Usex (A-D)   Minterm Lfx

Bltcon1
 15-12    11-5    4   3   2   1    0
B shift  Unused  EFE IFE FCI DESC LINE

EFE-Exclusive fill  IFE-Inclusive fill
FCI-Fill carry in  LINE-Line draw mode
DESC-Descending mode


                             The Coders Section
                         --------------------------

 Problems, Hints & Tips
------------------------
  Well as it's the first issue I don't
have  any problems  to answer,  but in
future  issues with  the help  of  out
readers I hope to run a Problems page.
I will  try to  answer any queries you
may have,  for instance  I have  had a
few people  ask me how  to code  a bob
routine,  so that's the  subject of my
first article on Beginning Demo-Coding

  Anyway,  I will just give a few tips
to  those coders just  starting, these
may  seem  trivial, but  I  have  seen
plenty   of   demos  in   which  these
pointers haven't been followed.

1>   Always  remember  to  switch  off
Sprite DMA if not using sprites.
2>   Also   clear   the  sprite   data
registers to prevent streaks appearing
down the screen.  Make sure  you do it
in that order aswell !!
3>   NEVER access the Operating System
directly   ALWAYS   go   through   the
libraries.






Kreator's Challenge
-------------------
  This may become a regular feature if
I   can  think   of   enough  suitable
Challenges.  I will set a  problem for
all you coders  to have a crack at and
you send me a  disk with your solution
source.The best one gets all the disks
I receive.  The problem for this issue
is actually a routine I have wanted to
write for a while now, but never found
the time or  the inspiration to begin.
What I  would like  you to try,  is to
create  a  Racing  game  style  moving
landscape  with hills  and bends using
only  the  copper.  This could  be the
basis for  a very  fast  Racing  game,
although the colours would be limited,
it  could  also  be used  to  create a
pretty impressive demo.

   I will also try  out the problem in
order for me to  be able to assess any
routines I may receive.  It seems like
a difficult one to me,  but it will be
interesting to see how many can do it.






  Thanks  for  reading this  magazine,
I hope you found it interesting, if so
get  your orders  in now  for the next
issue.  We hope to bring one out every
six  weeks,  and  next  month  I  will
hopefully have some original music and
graphics.

  Anyone  having problems with coding,
write to  me and  I'll try to help you
out in  the magazine  ( Anonymously if
you wish ). Also if you have any ideas
for next issues challenge, write to me
with  that;   also  if  you  have  any
solutions to this months problem.

  Remember  if you make a contribution
to either magazines, you qualify for a
free Advert in here.

  That's all for this issue, I hope to
see   lots   of  people   reading  the
magazine at the 16-bit show.

         Kreator - Anarchy UK