RUSH #01
29 мая 1999
  Amiga  

AMIGA NEWS - Programming on the Amiga: Amiga On the inside, Graphics coprocessors Features assembler.

<b>AMIGA NEWS</b> -
 Programming on the Amiga: Amiga On the inside, Graphics coprocessors Features assembler.
    Basics of programming in the "classical"
Ammy. This text I wrote a long time,
but now many are interested in coding
on the Amiga, can find in it the basic
information that will help you understand
structure of the machine and start writing
something different ...


            About AMIGA INSIDE ...


    Many are now in parallel with SPECCY
master AMIG'u. Small quantity
information and data on this machine
forcing all to achieve results and
knowledge through hard work and the price of many hours
"Picking" in other people's programs. We want
share their knowledge and those
modest advances that we have to
moment. I must say that we are
are only at the initial stage of development
AMIG'i, so it is quite possible errors and
inaccuracies in the text. But still -
this is better than no
information.

    This article is intended both for
those who are currently studying the "interior"
AMIG'i, and for those who want more
learn about this machine before buying.


    Now our group is going through a very
turbulent period, "amigizatsii. We do for
a lot of interesting and exciting
discoveries and findings ... Everything seems to
situation with SPECCY 5-7 years ago, when we
were enthusiastic, unpretentious writing
running line, hanging on the music
interrupt or button to display the picture.
True difference is that if we
SPECCY mastered each by itself, but
are now trying to "spin," "Girlfriend"
common efforts. The difference is also in
that the structure is much simpler and SPECCY
affordable than AMMY. But we are familiar with uzhe
basic programming techniques, and
experience gained at the very SPECTRUM'e
greatly helps us in our work.

    Development AMIG'i mainly engaged in
I RUFF. (Note: now RUFF
incomparably ahead of me, has become an excellent
coder, and I hope to write for the magazine
more thorough and professional
Articles about programming on Amiga). Y
I A600, in its basic configuration (as long as
:-) Have RUFF'a A500 + with A600 from KickStart'om
and with two "parameters" of memory. From the literature
until there is only a book by Dmitry
Mikhailova, who just wanted to call
Amiga Nikolai Rodionov, - "AMIGA # 1"
(Description of the operating system
internal language ARREX). Also, there is a disk
in a hypertext document (with menus in
text) describing the assembly and MC680x0
three disks hypertexts on working with external
devices, a coprocessor, libraries
etc. All these texts in English,
that the more difficult the perception, but
quite acceptable. It should be noted that these
wheels came to us thanks to the guys from
Smash Band - MIGHTY and GRUNGE.

    We will not go this time
details of assembly and coding for AMIGA,
the more that do not know a lot, and
tell you about all as a whole ...


                GRAPHICS:


    First, it will disprove some
attitudinal koderskih circles rumors - though
would AMMY can change the screen resolution
from one point on a screen, up to a thousand
and more ... Everything is much more modest (but need
notice that all of what I write in this
article concerns only AMIG without AGA
regime. They have the same graphics capabilities
much higher. AGA Amiga - is A1200,
A4000). So ... Standard mode
graphics, which supports the AMIGA with ECS
set of chips (A1000, A2000, A500, A500 +,
A600, A3000) are as follows: (for
Scanning Mode PAL)

 LOW resolution, NON INTERLACED: 320x256
 LOW resolution, INTERLACED: 320x512
 HI resolution, NON INTERLACED: 640x256
 HI resolution, INTERLACED: 640x512


  Plus mode Super Hi resolution, when
X resolution is 1280 pixels.


    In this case, LOW and HI resolution - this is
modes of horizontal resolution. Mode
High (HI) resolution does not call
flicker, but it slows the central
processor.

    INTERLACED and INTERLACED - it
modes of vertical resolution. When
connecting INTERLACED scan will
be interlaced (frame - even
line, another shot - odd). This
changing strings will cause flicker.
Such ways of improving the quality of
images used in recent years and
on SPECCY, but it's done AMIGA
hardware. Sprtsialnye devices and
Universal monitor with DOUBLE
PAL can produce "interleysnutye"
Pictures are absolutely without blinking. Anticipating
distress or gloating :-) on your
persons over a modest
permission, I will say that this is the standard
resolution of conventional TV. And even
Image 320x256, with own color for
each point, look great. A
actually I like all at once advise you
buy AGA'shnuyu Amiga and enjoy it
great graphics.

    More ... Do not BORDER'a Amiga, it is
means that it can generate
image across the screen surface.
The above-mentioned modes permits were
given for standard visible areas
screen, the same total resolution (of the screen
nevlazit in the frame) vertically equals 312
lines. Similarity is BORDER'a created by
discretion of the coder, and this is done for
the fact that the picture entirely in intermeddle
screen of any monitor or TV.

    At AMIGA not rigidly tied
screen memory as SPECCY. There
enough coprocessor to indicate from which
CHIP memory location to retrieve the image, where
its output on the screen and what the format of these
data. Screen Size in memory depends on
several factors: the resolution
(Vertical and horizontal) and
number of colors. Graphics stored in
a special format - in the form bitplanov.
Bitplanovaya schedule is essentially the same
format graphics as SPECCY, ie
status of each point on the screen
determined by whether
corresponding bit or not.

    More colors achieved
the fact that few can bitplanov
impose on one another. If
connect more than 1 bitplan at
mapping of each point will be taken to
bit from each bitplana and the resulting
number will match the number
color-sensitive.

    Color registers - 32
dvenadtsatibitnyh values, each of
which contains a color code from
palette of 4096 colors. For each of the main
color here corresponds to 4 bits:


         15/12 are not used

         11-8 RED (red)

         7 -4 GREEN (Green)

         3 -0 BLUE (blue)

So black corresponds to code $ 0000
white $ 0FFF, red $ 0F00, gray with
average rate $ 0,999, etc. As
see color registers is very simple
specified in hexadecimal.


    Further bitplanah ... Total
can be simultaneously connected to 6
bitplanov. Such is bitplanovaya screen
area is called the background (playfield). For
outside the wallpaper can not be
display any images including
sprites. There is also a mode with two backgrounds,
when the screen formed two
independent images of any size. In
dvuhfonovom mode in each of the backgrounds can be
specify up to three bitplanov. By the way, count
bitplanov often referred to as deep
Image (DEPTH).

    Naturally, the more bitplanov
given simultaneously, the more
the number of colors can be displayed:


    count bitplanov number of colors

              February 1

              April 2

              March 8

              April 1916

              May 1932

Thus, the standard can display up to 32
colors on the screen simultaneously, with
each color is randomly chosen from
palette of 4096 colors. It's not so little,
Considering that you can build yourself
palette and paint each pixel in
own color. Anyway Toys
and the demos look very colorful and
prevlekatelno.

    Sixth bitplan is used in
HalfBright, which helps
Number of colors to 64, with
additional 32 colors are taken from
standard color registers
half brightness.


    Also there is a regime Hold And Modify
(HAM), which can be displayed
simultaneously all the 4096 colors, but
some colors depending on the surrounding
points from one another. Produced
original hardware compression. Mode
effective for static images and
savers, but the dynamic graphics in the HAM
complicated.

    Still have some weird mode
640x480 resolution with four colors of
palette of 64 colors. The truth about it and I did not
I know.


    Each background (playfield), may be
arbitrary size. Can be displayed on
screen is only part of it. Coprocessor (COPPER)
he will retreat periods in length
runoff. Also, there are hardware
means for smooth scrolling backgrounds in
vertically and horizontally.

    Amiga mozhet independent findings of up to 8
sprite of a given size, track
location on the screen and overlap each
on the other, or at one of the backgrounds.

    The size of the sprite X should not
exceed 16 pixels in Y - ME
limited. Standard sprites 4 color
(With its own palette), but you can
unite two into one sprite and
get with the 16 colors.



             Coprocessor:


    Now for the hardware AMIGA. Y
Amiga each have two very useful
"Instrument" for working with external
devices and for various
audio-visual effects. They are:

    COPPER - is developing a
images, synchronizes the output of graphics
with a sweep through the tracking of the current
position of the beam. Also, it "hangs"
Service 4 audio channels.

    BLITTER - allows you to quickly draw
line, paint over certain areas in
image. Also, BLITTER can
used for rapid deployment
data from memory. Per second can BLITTER
put about 1 million points (in
line). For example, say that SPECCY
You can pull somewhere in the 50,000 points
second, and then only with difficulty. And the conclusion
million points 7Mgts'naya AMIGA can
parallel play cool digitized
music, load something from disk and do
still a lot of different operations ... COOL! One
point is placed for 8 cycles. BLITTER
organized a very flexible and allows
draw graphics in different backgrounds
size and resolution.

    To control the coprocessor and
control external devices so ispolzuyutsya
HARDWARE called registers (registers
Control of iron or hardveyrnye
registers). Each of the registers has its own
own address, writing or reading
to / from which data can be dealt with
the outside world and command the most powerful of all
structure of the machine. How do I
discuss in the next time he
shall understand all the subtleties.


         FEATURES assembler:


    The most important and painful honors
from SPECTRUM'ovskogo assembly are
unusually large addresses, consisting of
four bytes. At first, it is very difficult
take such great value. Also
cool difference is that in
Amiga assembler, when entering values
istochika of a receiver on the left (before the comma)
written source, and the right (after
semicolon) - the receiver. At SPECCY and PC all
quite the contrary. Incidentally, Amiga standard
more characteristic of European man,
accustomed to reading from left to right. For those
who have not yet "kerf" in the foregoing,
explains that when LD A, B, (Amiga analogue
Team LD - MOVE) will be recorded value
register A to register B.

    Also, each team works with
numeric values ​​must have
identifier (the letter is recorded after
points):

     . B - one byte

     . W - slvo (two bytes)

     . L - a long word (four bytes)
This identifier is used to separate
data types.

    In assemblers received several
differs from the standard Spectrum
record numbers. So, before hexadécimal
numbers marked with the sign "$" in front of
decimal not put anything. In the case of
use direct addressing
put before the number sign "#". This
feature can lead to confusion.

    Spectrum is an analogue of DEFB
Team DC (apparently, Define Code),
after which also put an identifier.
Thus, the command "DC.L $ 0" - means that
compilation of current address will be placed
four bytes are filled with zero.

    Themselves assembly program (I
saw "ASM ONE", and two versions of "GENS")
equipped with a text editor velikollepnymi
(Not worth remembering "GENS" on SPECCY :-).
Also, very nice debugging programs
directly in the text. Truth functions
dolbagere not enough (STS cooler!), but I do not
I know how to look separate debuggers, and
talking about the built-in "ASM ONE".

    AMIG'e registers in 32-bit (even
in 16-bit A500, A600 ...). There are two types of
main registers: the data registers and
address registers. And those and others already on 8
pieces - D0-D7, A0-A7.

    Data registers, it is something like
SPECTRUM'ovskih HL, DE, BC, just all of them
identical and have 4 bytes. With these
registers is most
logical and arifmetichehkih operations.

    Address registers, it is similar to our
IX and IY, that is - the index registers.
Using them can be addressed to the memory of
displacement, but not +, - 128 bytes, and +, - 32768
bytes (COOL!). Coupled with the fact
that there are teams of transitions and challenges
routines at the relative address in
the same range - it allows you to write
rather large relocatable program.

    Also have a very nice feature
put into operation with the address register
"+" Or "-" after the brackets, while
contents of address register will be
reduced or increased depending on the number of
the type of data (b, w, l). For example
Team MOVE.W # 0, (A0) + means that
address pointed to by register A0
will be placed two bytes "0" and the value
A0 will be increased by 2. This allows
simple and efficient to work with blocks
memory.

    In microprocessors MC680x0 set
Flags are very similar to a set of flags in the Z80.
Here there are:


        X - flag extension

        N - sign flag

        Z - zero flag

        V - overflow flag

        C - carry flag


  Checking flags and transitions in terms of
carried out somewhat differently than
SPECCY, - namely, working in teams
by condition (B, DB, S, etc.) to the name
command, without any commas, prmpisyvaetsya
the name of the condition. Here is a list of all conditions:


        F False Z = 1

        T True Z = 0

        HI HIgh C + Z = 0

        LS Low or Same C + Z = 0

        CC Carry Clear C = 0

        CS Carry Set C = 1

        NE Not Equal Z = 0

        EQ EQual Z = 1

        VC V = 0

        VS V = 1

        PL PLus N = 0

        MI MInus N = 1

        GE Greater or = N (+) V = 0

        LT Less Than N (+) V = 1

        GT Greather Then Z + (N (+) V) +

        LE Less or = Z + (N (+) V)

    More details about all komadnah
Motorola I try to tell the other
times (including the effect on flags and
specific examples).

    And today might be enough ....
Share with us their knowledge and
achievements.

   E-mail, ask for remedies,
advice ...

When creating this article were used:

"MC680x0 GUIDE"
"CODER COMPANION (vol.1, 2,3)"
"AMIGA # 1" (C) Dmitry Mikhailov

Amiga but I have studied and RUFF ZNAHAR.


          GOOD LUCK IN THE STRUGGLE FOR BUSINESS

           Amiga platform!





Other articles:

AMIGA NEWS - AMIGA OS v3.5 - questions and answers.

AMIGA NEWS - Description of image file viewer - Fast JPEG.

AMIGA NEWS - Programming on the Amiga: Amiga On the inside, Graphics coprocessors Features assembler.

AMIGA NEWS - Events of 1998 (summary of events).

AMIGA NEWS - Cheat'y For Amiga-games: After The War, Magicland Dizzy, Fantasy World Dizzy, Alien Breed, Exolon, Jagar Zj2200, Goblins, Mega Ball, Prince Of Persia, Projects-x, UGH!, Rick Dangerous-2.

AMIGA NEWS - Amiga GFX-chip Permedia2.

AMIGA NEWS - Amiga today.

Spectrum programming - Fast 3D-calculations: an advanced algorithm.

Spectrum programming - Sound effects for a music processor and combine with the main melody.

Spectrum programming - Mirroring bytes and restoration of the background buffer.

Spectrum programming - A brief guide to the system encoder. Tips to author "boot'a", packer, music editor.

Spectrum programming - Modern methods of coding and modern ways of working with graphics.

The End - an epilogue.

ZX-SOFT - "Black Raven II ": Get ready for another hit from Copper Feet!

ZX-SOFT - Description of programs: Real Commander v1.6

ZX-SOFT - arguments about the demo: Forever vs Refresh.

Ator - The authors of the magazine.

Virtual Speccy - Conversion of graphics on the Spectrum to the PC and Amiga.

Virtual Speccy - The emulator of CodeBusters on the Amiga.

Virtual Speccy - Emulators ZX-SPECTRUM on the PC: Where to get the latest FAQ on emulating ZX-Spectrum, What Emulators are most useful - an emulator Luntera, UKV v1.2, Shalaev. What kind of files with the extension *. $ b, *. $ c, *. $ s, *. $ z, *. $ w? How to read format "hobeta". How and in what emulator You can work in the iS-DOS. Convert files. Z80 to. $ and vice versa. Files with the extension. Fdi. Problems with the emulator UKV. How to get a clean disk image file (. Trd) Emulator Shalaev. Is there a Russian ZX-oriented FTP or WWW server? Hobeta refuses to read / write drives 3.5 "- what to do?

Entry - the story of creating a magazine.

Entry - On order stsenovogo magazine - RUSH.

Interview - A great interview with ANTARES.

Interview - An Interview with Kvazar'om of RUSH.

Interview - An interview with a group of Vitebsk Power group.

Informatsrium - CD with the emulator and the ZX-software.

Informatsrium - Interesting INTERNET addresses.

Informatsrium - Overview of magazines and books about the Amiga.

Journal - Platformobesie - cross-platform wrapper for the magazine.

Parallel Worlds - The history of central processors and Windows.

Parallel Worlds - an overview of the computer models Macintosh.

Development Spectrum - 128 colors on the Spectrum (graphic description of the expansion of the palette).

Development Spectrum - Lock the keyboard port when connecting SPECCY C-DOS modem.

Development Spectrum - New Speccy - AZXMONSTRUM 512K.

Development SPECTRUM - New Spectrum from Sinclair.

Development Spectrum - The descendants of the processor Z80.

Advertising - a detailed price list of firm Scorpio.

Advertising - Advertisements and announcements ...

Advertising - Advertising Company X-Trade.

meaning without a sense - Short Stories: The happiest man, third eye, the Savior of the Universe, Tsvetik-semitsvetik, Life has just begun, the Last Judgement.

Scene vs professional - has assembled a team of the best people from the scene, we can create programs of the highest quality ...

Stsenohroniya - tenacious Spectrum: Spectrum of roads, most of us. Why?

Stsenohroniya - A brief overview of news from the band RUSH.

Stsenohroniya - Overview of the stage-event: Alliance, Alchemist Research, Asphyxia, Brokimsoft, CodeBusters, Concern Chaos, Copper Feet, Crystal Dream, Digital Reality, E0Mage, Energy Minds, Entire, Excess, Fatality etc.

Stsenohroniya - Echoes Fun Top'98.

Stsenohroniya - Draft Long Live Amiga, designed to assist the establishment and development amigovskoy scene.

Office shell - on the ZX version of the shell.


Темы: Игры, Программное обеспечение, Пресса, Аппаратное обеспечение, Сеть, Демосцена, Люди, Программирование

Similar articles:
It was you - The story "The Road".
Mosaic - Where are they? What happened to the people who wrote branded games for the Spectrum.
Paradox'99 - Results Paradox'99.

В этот день...   5 May