Mega ST Blitter and OCS Amiga Blitter

Discuss your favourite artists, styles, art packages and much more in this section

Moderator: Moderator Team

User avatar
ROWBEARTOE
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 123
Joined: Mon May 26, 2008 2:12 am
Contact:

Mega ST Blitter and OCS Amiga Blitter

Postby ROWBEARTOE » Sun Jun 01, 2008 7:26 pm

What's the difference between these two Blitter chips? How fast could they go? Atari Explorer has been quoted as saying the Atari Blitter could improve graphics and memory movement by as much as 16 times faster. Degas Elite draws about 7 times faster on my Mega ST4. Start Magazine has been quoated as saying the 8 MHz 68000 could outperform the Blitter in many operations refering to TurboST and QuickST for reference.

I'm writing about the ST and Amiga and the more I know the better.

Thank you.

User avatar
Frank B
Atari Super Hero
Atari Super Hero
Posts: 899
Joined: Wed Jan 04, 2006 1:28 am
Location: Boston

Re: Mega ST Blitter and OCS Amiga Blitter

Postby Frank B » Sun Jun 01, 2008 8:54 pm

ROWBEARTOE wrote:What's the difference between these two Blitter chips? How fast could they go? Atari Explorer has been quoted as saying the Atari Blitter could improve graphics and memory movement by as much as 16 times faster. Degas Elite draws about 7 times faster on my Mega ST4. Start Magazine has been quoated as saying the 8 MHz 68000 could outperform the Blitter in many operations refering to TurboST and QuickST for reference.

I'm writing about the ST and Amiga and the more I know the better.

Thank you.


--->

Feature wise the OCS Amiga has

1) hardware line draw and area fill
2) 3 source 1 destination blitter
3) max size pre ecs 1024*1024 1 plane blit (realistically it maxes out at 1008*1024 depending on the alignment/shift)
This is also per plane so it's pretty big
3) concurrent operation with the cpu 1 out of every 4 cycles given to the CPU when in blit nice mode
4) can be driven by the copper for beam sync blits
5) with true fast RAM can run concurrently with the CPU
6) 256 ways to combine sources and destination
7) 0-15 bit shifts for source A and B

The Atari has

1) 1 source destination blitter (with on chip 16 words of halftone as a second source)
2) smudge mode blit for indirect addressing (fast magnification/ h flipping etc)
3) 16 ways to combine source and dest (half tone adds 4 more if memory serves)
4) max blit size of (65536 * 16) rows * 65536 lines (Ie pretty huge :)
5) blit nice where 90% of blit nasty/hog mode performance can be obtained with reliable interrupt handling
6) some nice optimisations if source data is aligned
7) 0-15 bits for shifting source

Both are quite neat


---> some info I worked out awhile ago. I haven't double checked it so there may be errors. :)


blitter cycles on ECS
----------------------

A PAL frame has 312 lines even, 313 lines odd
227 CHIP cycles per PAL scan line

Per line.. Each CHIP cycle is 2 CPU cycles but 16 bits can be read/written

Therefor there are 227 CHIP cycles a scan line
there are CPU 454 cycles per scan line (I think)
454 * 312 == 141648 CPU cycles an even frame
454 * 313 == 142102 CPU cycles an even frame

Since code must run in the same amount of time each frame
we take the lowest value 141648 CPU cycles
70824 CHIP cycles
312 scan lines

Each scan line looks like this

a) 4 cycles for memory refresh
b) 3 cycles for disk DMA
c) 4 cycles for audio DMA (2 bytes per channel)
d) 16 cycles for sprite DMA (2 words per channel)
e) 80 cycles for bitplane DMA (even- or odd-numbered slots
according to the display size used)

107 CHIP cycle clocks... can be used at max... 120 left.

Assuming 320*256 display 5 bpp with one word for scrolling

Note CPU time is affected by contention too!
--------------------------------------------

4 planes don't affect the CPU
5 planes do (eg one plane at 1 DMA cycle * 21 * 256 ) == 5376 CHIP DMA cycles
* 2 == 10752 CPU cycles
/ 454 == 23 scan lines of CPU lost (13%)

Blitter cycles Lost
-------------------
a) Lost DMA CHIP cycles per frame 4 * 312 = 1248 per VBL (RAM Refresh)
d) extra word for scrolling (taken from sprite) 1*5 (bpp) * 256 = 1280 per VBL
e) 5 (planes) * 20 (320/16) * 256 = 25600 per VBL
f) min copper list
5 pointer moves, 10 copper moves, 20 DMA bus cycles
1 x scroll move, 1 copper move, 2 DMA bus cycles
2 x bplane modulos, 2 copper moves, 4 DMA bus cycles
1 x screen mode, 1 copper move, 2 DMA bus cycles
32 palette moves, 32 copper moves, 64 DMA bus cycles
1 x wait for EOF, 1 copper wait 2 DMA bus cycles = 94 cycles per VBL

TOTAL lost DMA cycles = 28222
TOTAL free DMA cycles = 42602

Blitter min tick is 2 DMA cycles (OR/AND/CLR/COPY) 42602/2 == 21301 16 bit words per frame (42602 bytes)
Blitter max tick is 4 DMA cycles (COOKIE cut) 42602/4 == 10650 16 bit words per frame (21300 bytes)



Potential cycles lost
---------------------
b) Lost to disk DMA cycles per frame 3 * 312 = 936 per VBL (DISK worst case)
c) Lost to audio DMA cycles per frame 4 * 312 = 1248 per VBL (Audio worst case)
d) Lost to Sprite DMA cycles per frame 7 * 2 * 256 = 3584 per VBL (we lose a sprite due to scrolling,
v unlikely to have 7 full height sprites
on screen)
e) optional copper list
7 x SPRITE DMA pointers (14 moves), 2 = 8 bus cycles

TOTAL lost DMA cycles = 5776
TOTAL free DMA cycles = 36826 (TOTAL lost - optional lost)

Blitter min tick is 2 DMA cycles (OR/AND/CLR/COPY) 36826/2 == 18413 16 bit words per frame (36826 bytes)
Blitter max tick is 4 DMA cycles (COOKIE cut) 36826/4 == 9206 16 bit words per frame (18413 bytes)


-----> Summary best case (assuming audio/sprites/disk inactive)


With a 32 colour screen and only CHIP ram
1) 13% Slow down of the CPU
2) 40% Slow down of the blitter
70824 bytes can be transferred at 100% theoretical blitter capacity
42602 actual blitter bytes can be transferred

a) OR/COPY/CLEAR : 42602 bytes / 10240 (bytes per plane) == 4.16 full screen planes copied/cleared a frame
b) COOKIE CUT : 21301 bytes / 10240 (bytes per plane) == 2.08 full screen planes masked a frame
c) time taken to mask a src aligned 32*32 4 plane bob
4 DMA cycles a word
3 words wide (1 extra for shift)
4 words deep (4 planes)
32 words high
1536 DMA cycles * 2 for CPU cycles == 3072 CPU cycles/ bytes transferred

d) time taken to mask a src aligned 32*32 5 plane bob
4 DMA cycles a word
3 words wide (1 extra for shift)
4 words deep (4 planes)
32 words high
1920 DMA cycles * 2 for CPU cycles == 3840 CPU cycles/ bytes transferred

42602 bytes available per frame / 2 (words transferred) == 21301 *4
to get the CPU cycle count == 85204

85204 / 3072 (mask cycles for 4 planes) == 27.7 32x32 4 planes bobs a frame masked
85204 / 3840 (mask cycles for 4 planes) == 22.1 32x32 5 planes bobs a frame masked



All timings assume blitter hog/nasty.

-------------------------------------------> Atari STE

cycles per second 8,000,000

320*200 4 plane screen with extra word fetched for scrolling

even frame 312 scan lines
odd frame 313 scan lines

312 + 313 = 625 every 2 frames
* 25 = 15625 scan lines a second
/ 50 = 312.5 per frame

This is approx 8,000,000 / 50 == 160000 CPU cycles per VBL

Blitter clear is 4 cycles == 160000/2 == 80000 bytes per frame
Blitter copy is 8 cycles == 160000/4 == 40000 bytes per frame
Blitter OR/AND is 12 cycles == 160000/6 == 26666 bytes per frame
Blitter mask is 24 cycles == 160000/12 == 13333 bytes per frame

Obviously a 200 high bitmap consumes less memory than a 256..
For clarity I'm missing out the extra word for scrolling.

a) FILL/CLEAR : 80,000 bytes / 8,000 (bytes per plane) == 10 full screen planes filled/cleared a frame
b) COPY : 40,000 bytes / 8,000 (bytes per plane) == 5 full screen planes copied a frame
c) AND/OR single : 26,666 bytes / 8,000 (bytes per plane) == 3.33 full screen planes AND or OR a frame
d) COOKIE CUT (full mask) : 13,333 bytes / 8,000 (bytes per plane) == 1.6 full screen planes masked a frame



No DMA contention... No slow down...

1) clear operations at twice the speed of the Amiga blitter (Atari nearly 2x faster)
2) copy operations 2602 bytes a frame slower than the Amiga blitter (Amiga wins barely)
If Audio and sprites active Amiga blitter is possibly slightly slower (Amiga *may* lose)
3) OR/AND 10160 bytes a frame slower than the Amiga blitter (Amiga wins by 1.5)
4) cookie cut Amiga only 1.5 times faster (Amiga wins by 1.5)

Time taken to mask a source aligned 32*32 4 plane sprite (Note 5 plane is pointless on the ST)
Note also Atari blitter will optimise out the shift word on the source with NFSR

!AND (1st pas)
---------------

2 words wide src. 3 words wide dest rmw/rmw/mr 12/12/8 = 32 cycles
4 planes deep 32 cycles * 4 == 128 cycles
32 lines high == 128 * 32
== 4096

OR (2nd pass)
-------------
2 words wide src. 3 words wide dest rmw/rmw/mr 12/12/8 = 32 cycles
4 planes deep 32 cycles * 4 == 128 cycles
32 lines high == 128 * 32
== 4096


Total == 8192 cycles

160000 / 8192 == 19.5 a frame

with 4 planes the Amiga is about 33% faster
with 5 planes the Amiga is slightly faster

Conclusion
----------

Although cycle for cycle the Amiga blitter is 2x (copy), 3x (cookie cut) more efficient than the
ST blitter DMA contention seriously reduces this advantage for 4 and 5 plane PAL screen modes.
With a 5 plane PAL screen the graphical throughput of both machines is about even for drawing
bobs. Ie the extra plane to process + DMA contention removes the efficiency advantage.
The Amiga is slightly faster but not by a significant margin. Note the Amiga CPU speed in a 5 plane
PAL mode is also around 20% slower than the ST*

Amiga 22.1 masked 5 plane 32* 32 sprites a frame**
Atari 19.5 masked 4 plane sprites a frame.

* I realise that fast RAM removes this disadvantage. A500s have never been shipped with true fast RAM,
only chip and bogo fast.
** Setup time can be drastically improved on the Amiga with interleaved bitmaps. It's possible to
set the screen up so that only one blit is needed for the entire operation. On an A500 however
this would mean using four or 5 times as much memory for the graphical mask. It would need to
be n planes deep. The advantage would be concurrent operation with fast RAM and reduced
set up time.
The disadvantage would be the amount of chip memory it would take.
It's trivial on the STE to have 4 meg of RAM which is effectively all CHIP memory.
The Amiga maxes out at 2 meg of chip.

I'm also aware that you can get away with hog mode on the Amiga since all display list changes
can be done with the copper which can always pre empt the Blitter.

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Mega ST Blitter and OCS Amiga Blitter

Postby Cyprian » Sun Jun 01, 2008 8:57 pm

This is a complex subject, but in a few words: Amiga's blitter is more complex than ST. i
I can:
- draw lines
- fill polygons
- copy bitmaps
ST's blitter can just copy bitmaps :)

In some cases Amiga's is faster: e.g. in straight copy by about 75% , especially if you switch off Video DMA - 3.75 MB/s vs Atari (Video DMA on) 2MB/s; copying&masking
In some cases no: clearing, filling with pattern: Amiga (Video DMA off) 3.75MB/s Atari: (Video DMA on) 4MB/s (with Halftone RAM).
I read on Amiga's group that modern coders can draw lines faster than blitter.

For smart coders ST BLiTTER has many advantages. It can:
- move bitmaps :)
- access hardware registers:
- - get more colors on screen (HighResMode by Paradox);
- - use as DMA channel for IDE (TOS);
- Gouraud mapping (Beam by Ray TSCC);
- run parallel with CPU : e.g. MULU during blitting in HOG MODE!;
- very fast byte-swapping (12 clocks per one swap);
- boost C2P conversion;
- scaling bitmap by 2x 4x;
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
Frank B
Atari Super Hero
Atari Super Hero
Posts: 899
Joined: Wed Jan 04, 2006 1:28 am
Location: Boston

Re: Mega ST Blitter and OCS Amiga Blitter

Postby Frank B » Sun Jun 01, 2008 9:07 pm

The amiga blitter can tell you when a bit was set in the destination which means you can use it for collision detection.
If you switch off the d channel it will not affect the dest but still tell you if the two regions over lap. Rather nice.
The designers of both blitters knew what they were doing :)

User avatar
ROWBEARTOE
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 123
Joined: Mon May 26, 2008 2:12 am
Contact:

Re: Mega ST Blitter and OCS Amiga Blitter

Postby ROWBEARTOE » Sun Jun 01, 2008 9:33 pm

Frank said the Amiga Chip RAM was 2 megabytes? If Im to understand correctly, the OCS could only access 512 Kilobytes of CHIP RAM.

For paint programs drawing with a full screen seemed 2 to 3 times faster with Blitter ST Degas Elite than Amiga Deluxe Paint 2 (1986 paint programs). Does Atari's Blitter move and draw pixels faster?

User avatar
Frank B
Atari Super Hero
Atari Super Hero
Posts: 899
Joined: Wed Jan 04, 2006 1:28 am
Location: Boston

Re: Mega ST Blitter and OCS Amiga Blitter

Postby Frank B » Sun Jun 01, 2008 9:45 pm

ROWBEARTOE wrote:Frank said the Amiga Chip RAM was 2 megabytes? If Im to understand correctly, the OCS could only access 512 Kilobytes of CHIP RAM.

For paint programs drawing with a full screen seemed 2 to 3 times faster with Blitter ST Degas Elite than Amiga Deluxe Paint 2 (1986 paint programs). Does Atari's Blitter move and draw pixels faster?


That document I wrote was actually about ECS. Yes you're correct the original Agnus could only address 512k of chip memory.
I think most A500s shipped with fat Agnus though. To answer your question the ST blitter is only really faster at clearing and filling memory. The Amiga is 2x more efficient at copying and 3 x more efficient at masking sprites. The point I was making in my previous post (and Cyprian K did too :) is that this efficiency is only achievable if the Amiga isn't displaying any graphics at all. Every bitplane you switch on costs you blitter cycles on the Amiga. By the time you have 5 planes in PAL mode switched on the difference is negligible for copying and about 50% on masking. If you're blitting 5 planes on the Amiga and 4 on the ST the difference isn't that great. I think you really need to be comparing a 68k cpu vs the blitter... :)

Frank

User avatar
sqward
Atari freak
Atari freak
Posts: 53
Joined: Wed Mar 12, 2008 4:47 pm
Location: London
Contact:

Re: Mega ST Blitter and OCS Amiga Blitter

Postby sqward » Sun Jun 01, 2008 10:25 pm

Cyprian_K wrote: - fill polygons


Actually it can't fill polygons directly. It would require intermediate buffer for that. Amiga could fill the screen in simple-flood-fill fashion and that would only enable convex shapes to be filled. There's even a special line drawing mode as this kind of fill required that no line would have more then one pixel on the same Y value. This kind of fill can be also done with ST blitter.

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Mega ST Blitter and OCS Amiga Blitter

Postby Cyprian » Sun Jun 01, 2008 11:24 pm

Frank B wrote:--->

Feature wise the OCS Amiga has

2) 3 source 1 destination blitter

[...]
The Atari has

1) 1 source destination blitter (with on chip 16 words of halftone as a second source)


actually Atari's BLiTTER has 4 channels: 3 sources and 1 destinations too:
Source:
- Source RAM
- Half RAM
- Destination RAM

but unfortunately 1 source channel and destination channel share the same DMA and Counter
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
ROWBEARTOE
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 123
Joined: Mon May 26, 2008 2:12 am
Contact:

Re: Mega ST Blitter and OCS Amiga Blitter

Postby ROWBEARTOE » Sun Jun 01, 2008 11:58 pm

Amiga Bliter in OCS could access 1MB with Fat Agnus or 512KB with Agnus.
Ok, thanks- now I'm going to have to read and try and understand what you have all posted. And somehow translate it into english should this be mentioned in a more detailed way with my comparison.

Thanks. The more information the better.
To bad there was no simple benchmark-

Example:
The Atari Jaguar game system: 850,000,000 pixels a second.
The Atari Transputer: Square area fills 128 megapixels. Arbitrary two-color drawing is 64 megapixels.

The claim that the 68000 could outperform the Blitter is interesting for both the Amiga and ST as well.

Thanks everyone!

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Mega ST Blitter and OCS Amiga Blitter

Postby Cyprian » Mon Jun 02, 2008 6:15 am

ROWBEARTOE wrote:Example:
The Atari Jaguar game system: 850,000,000 pixels a second.
The Atari Transputer: Square area fills 128 megapixels. Arbitrary two-color drawing is 64 megapixels.

The claim that the 68000 could outperform the Blitter is interesting for both the Amiga and ST as well.

Thanks everyone!


ST Blitter can draw: 64 000 000 pixels per second.
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
Frank B
Atari Super Hero
Atari Super Hero
Posts: 899
Joined: Wed Jan 04, 2006 1:28 am
Location: Boston

Re: Mega ST Blitter and OCS Amiga Blitter

Postby Frank B » Mon Jun 02, 2008 7:20 am

Cyprian_K wrote:
Frank B wrote:--->

Feature wise the OCS Amiga has

2) 3 source 1 destination blitter

[...]
The Atari has

1) 1 source destination blitter (with on chip 16 words of halftone as a second source)


actually Atari's BLiTTER has 4 channels: 3 sources and 1 destinations too:
Source:
- Source RAM
- Half RAM
- Destination RAM

but unfortunately 1 source channel and destination channel share the same DMA and Counter



Yes it's a 2 source blitter but the destination is overwritten by the blit. :)

Frank

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 4852
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: Mega ST Blitter and OCS Amiga Blitter

Postby simonsunnyboy » Mon Jun 02, 2008 9:16 am

Shouldn't this fit better into the Hardware section? As the Blitter is only a tool in use for graphics.
Simon Sunnyboy/Paradize - http://paradize.atari.org/ - STOT: http://www.npoi.de/stot/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

Jabber: simonsunnyboy@atari-jabber.org


Social Media

     

Return to “Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest