21

It seems that 3D games, especially simulations like Falcon, were not faster (fps) on the Amiga than on the Atari ST - even a bit slower due to the CPU clock.

I was wondering why this is the case, since the Agnus seems to me as an early model of a GPU, capable of drawing vector lines and even fill out polygons. Was it not capable to display the typical number of 3D objects in those games or was it simply not used, since it would require a complete different codeline for the Amiga with respect to 3D rendering ?

  • What does "faster" mean? more frames per second or something? – Wilson Sep 19 '18 at 7:46
  • yes, more fps, I update the question – Marco Sep 19 '18 at 8:23
  • Mind to support your assumption with some data? Link frame rates used and how they differ? – Raffzahn Sep 19 '18 at 10:39
  • 2
    That is a little tough for me, since I did not the comparison by myself. I have a print magazine from 1990, which only covered simulations cross-system and there almost was for every game the statement that the 3D aspects between Amiga and Atari ST would be more or less the same – Marco Sep 19 '18 at 11:15
  • 2
    Would it be worth (someone's) while to add an answer talking about how as 3d graphics algorithms developed, they were frequently better able to be implemented on graphics systems that used a "chunky" approach vs the Amiga's (and many other older systems) "planar" approach? – Damien_The_Unbeliever Sep 19 '18 at 13:47
28

There are a few reasons why multi-platform 3D games turned out to be no faster on the Amiga than on other 68000-based platforms without its blitter:

The developers may have targetted the lowest common denominator system and not taken advantage of the blitter when they ported to the Amiga. Early games and poor conversions tended to be like this.

A naive implementation by somebody unfamiliar with the hardware may well fail to use the blitter's line-drawing and space-filling operations efficiently, thus losing the benefit. If one draws and fills individual polygons and then blits them to the framebuffer, that is a lot of wasteful work. AmigaOS itself didn't set a good example here.

Finally, the blitter is a pure 2D device which offers no acceleration for 3D calculations, so the main CPU needs to do those. This involves a lot of matrix multiplication, and the 68000's MULU/MULS instructions are very slow, taking about 70 cycles. (The exact number of cycles is data-dependent because the microcode uses an iterative algorithm.) At 7.09MHz that's a shade over 100,000 multiplies per second, or 2,000 per 50Hz field. Even if the blitter was infinitely-fast, this still sets an upper limit of a few hundred points on screen or compromise on frame rate.

  • 4
    "that's a shade over 100,000 multiplies per second" ;-) – Nigel Touch Sep 19 '18 at 12:56
  • 1
    I would dare imagine that most optimised titles do not use MULU/MULS, preferring a more limited numerical range and the lookup table options that permits. But that's not to argue with your main point about calculation versus drawing costs. – Tommy Sep 19 '18 at 14:02
  • 2
    Actually the biggest performance hit in 3D calculations usually comes from the perspective divide, as divide instructions are much slower than multiply instructions. Of course like Tommy said with multiplies, in practice games would avoid using an actual divide instruction. – Ross Ridge Sep 19 '18 at 14:22
  • 1
    @RossRidge but both the final column and final row are invariably 0, 0, 0, 1 assuming you're doing only linear transforms. So you can just multiply by the inner 3x3 and then add the final column as a translation. I think another common optimisation is spotting that most of the time you're just doing rotation, so elements are in the range [-1, 1], giving a great opportunity for locally-limited-precision arithmetic. E.g. 8x8 matrix arithmetic into a 16.16 space. But then the divides have to occur in the objective space, which further helps your point — 8x8 multiply vs at least 16x16 divide! – Tommy Sep 19 '18 at 20:09
  • 3
    The AtariST has a slightly higher clock than the Amiga, but most of the cpu time was spent in drawing the picture. The Amiga had an edge in theory because the blitter has a fill mode so you could draw lines and use the blitter to do the fill, but the constraints made it so that it wasn't that useful in games, however it was used a lot in demos – Thomas Sep 19 '18 at 23:56
12

The thing the Agnus has that speeds up 3D games is the polygon fill feature. Blitting by itself is not so much a standard operation driving 3D performance. It can help 2D games and windowed GUIs a lot, however, one of the reasons the Atari ST got a (much simpler) blitter as well in later releases.

3D Games are CPU-heavy, or rather performance is driven how fast you can do vector arithmetics and trigonometric functions (which would mainly be done by table lookups in older games) - Agnus doesn't help here, even a 68881 wouldn't help much, as fixed-point integer maths done by a 68k are still faster. We're talking mainly integer operations here, and that is driven by raw CPU speed and bus contention.

  • Polygon fill doesn't really help with 3D though, because you have to draw the boundaries, fill the polygon and then later blit it into place, all stealing memory access cycles away from the CPU. It's faster to use the CPU to fill, rather than doing so many blitter operations (3 line draws, one fill, blit into target image). – user Sep 20 '18 at 8:10
  • @user Yep - That's what I was trying to convey with "bus contention". Fill, however, can be made a lot faster or slower by the layout of your video memory and allocation of bitplanes - The more linear, the better. The Amiga was a bit complicated in that respect, I seem to recall. – tofro Sep 20 '18 at 8:16
7

Agnes doesn't help much with 3D acceleration. It has a blitter which is capable of filling polygons, but they must then be copied in to the display bitmap so it's actually slower than just filling with the CPU. Additionally the blitter requires the horizontal limits of the polygon to be rendered first, meaning an additional line draw per vertex.

The biggest performance limitation for 3D on the Amiga is memory bandwidth. In fact all 16 bit home machines of the time were the same, memory bandwidth was the biggest challenge.

The maximum fill rate can be achieved by using unrolled CPU loops that write directly in to bitmaps. There is then no copy stage, and no need to line draw vertexes.

The general strategy used by most high performance 3D on the Amiga is to calculate all vectors in one go, allowing as much data to be kept in CPU registers to avoid memory reads. The display is then rendered by the CPU alone as outlined above.

Since the Amiga had the same CPU as the Atari ST running at a similar speed, but with actually a little bit less memory bandwidth performance was about the same. The Amiga could do some tricks to improve things, such as variable colour depth on different parts of the screen and sprites for low overhead overlays, but in practice they tended not to be that significant performance-wise.

4

I did 3d on both and optimizations were different on both machines; I didn't do very advanced stuff at the time, mostly rotating simple objects, etc but no game or complex scenes.

On the Amiga, you would use the blitter to draw lines and fill the bitplanes. The different bit planes were not interleaved but sequential, so the size of the blitter pass you had to do was depending on the colors used. You would draw the same lines in all the planes needed and then do a blitter fill, but filling plane 0 and plane 3 in two passes was slower than filling plane 0 and 1 in a single pass which was slower than filling only plane 1 for example.

The blitter really sped up the filling, but the bitplane layout forced color palette organization in order to make sure the largest surfaces of your objects were the fastest to fill.

On the Atari ST, it was a different story: you had to draw your picture as you were building your triangles, so you needed to sort the vertices vertically and then, as you were doing line interpolations, you were filling up the screen. The edges were tricky to work with, but large surfaces could be filled in a single pass.

In short, the ST required more CPU work, but drawing the picture could be done in a single pass. On the Amiga, the process was generally faster, but the memory layout generated a lot more memory traffic.

Despite these differences, the two came remarkably close in performance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.