FreeBSD Most wanted
Miguel Mendez
flynn at energyhq.es.eu.org
Sat Mar 6 06:46:31 PST 2004
Dag-Erling Smørgrav wrote:
> Joao Schim <j.schim at netmaniacs.nl> writes:
>
>>I can imagine there's still a lot of ASM programming involved in
>>console computer games.. Atleast it still was a few years ago.
>
>
> No, the PlayStation changed all that.
There's a lot of hand-coded mips assembly code in PS games. The PSX
didn't have a very powerful hardware, and needed a lot of tricks for
games to look good. Some tricks were in the gfx area, most of them in
the programming area. A very good example of this is Crash Bandicoot,
which rendered most of the graphics as gouraud, letting enough free
memory and bus cycles for the streaming music system. The same applies
to PS2 games. To be able to use 5:1 audio the programmers at EA (I think
they were the first to come up with the idea) found out they could use
one of the VU coprocessors to process the audio, while doing 3d math
with the other. There are a lot of interesting tricks game companies
have found since the PS2 were released. The rise of quality in the games
comes from getting more intimate knowledge of the underlying hardware
and learning that in the PS2 world you have very small very fast caches
that need to be constantly filled, as opposed to the PC world with slow
buses and big memories. Most of that stuff is done in assembler. FWIW,
mips assembler is a very nice ISA to work with. Although most PC games
mostly rely on hardware these days, there's still place for the 90/10
rule, i.e. writing the critical inner loops in asm, or hand optimize
your SSE/3dNow code. 3D hardware changed the way games are written,
though, most programmers today woulnd't know how to init mode-x on their
VGA cards even if they supported it :)
To stay on topic, while I find assembly programing extremely funny,
specially on the Amiga, for systems programming I think it's better to
avoid it as much as you can. Current AMD and Intel space heaters can eat
code fast enough that only critical parts really need to be hand
optimized (kernel, libc, that kind of stuff).
Cheers,
--
Miguel Mendez <flynn at energyhq.es.eu.org>
http://www.energyhq.es.eu.org
PGP Key: 0xDC8514F1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3415 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.freebsd.org/pipermail/freebsd-chat/attachments/20040306/75862088/smime.bin
More information about the freebsd-chat
mailing list