[comp.arch] Mario Bothers

bron@bronze.wpd.sgi.com (Bron Campbell Nelson) (07/17/90)

In article <2767@awdprime.UUCP>, tif@doorstop.austin.ibm.com (Paul Chamberlain) writes:
> [stuff deleted]   but I'm pretty impressed with how many Mario Brothers
> get sold.  That software runs on everything.  I have no idea what it
> was written in but I'd bet that its very modular, structured, etc.

And you'd be dead wrong.  Video game software is some of the ugliest
and most arcane assembler there is.

--
Bron Campbell Nelson
bron@sgi.com  or possibly  ..!ames!sgi!bron
These statements are my own, not those of Silicon Graphics.

tif@doorstop.austin.ibm.com (Paul Chamberlain) (07/17/90)

In article <64280@sgi.sgi.com> bron@bronze.wpd.sgi.com (Bron Campbell Nelson) writes:
>And you'd be dead wrong.  Video game software is some of the ugliest
>and most arcane assembler there is.

(I won't include my quote since it's embarassingly unfounded.)

Really?  Is that changing?  I am seeing more and more of the popular
games very accurately duplicated on radically different hardware (at
least I assume that these game systems use different hardware).  Do
they rewrite it completely?

Sorry for the off topic discussion, my e-mail isn't very dependable.

Paul Chamberlain | I do NOT represent IBM         tif@doorstop, sc30661@ausvm6
512/838-7008     | ...!cs.utexas.edu!ibmaus!auschs!doorstop.austin.ibm.com!tif

peter@ficc.ferranti.com (Peter da Silva) (07/17/90)

In article <64280@sgi.sgi.com> bron@bronze.wpd.sgi.com (Bron Campbell Nelson) writes:
> And you'd be dead wrong.  Video game software is some of the ugliest
> and most arcane assembler there is.

Depends on the machine. The Amiga has plenty of horsepower for doing even
zippy videogames in C. Hackercorp's "Tracers" is 100% C code, and multitasks
well enough to be completely playable while background stuff like compiles
are running.
-- 
Peter da Silva.   `-_-'
+1 713 274 5180.
<peter@ficc.ferranti.com>

cliffc@cimbria.rice.edu (Cliff Click) (07/18/90)

In article <2779@awdprime.UUCP> tif@doorstop.austin.ibm.com (Paul Chamberlain) writes:
>In article <64280@sgi.sgi.com> bron@bronze.wpd.sgi.com (Bron Campbell Nelson) writes:
>>And you'd be dead wrong.  Video game software is some of the ugliest
>>and most arcane assembler there is.
>
>(I won't include my quote since it's embarassingly unfounded.)
>
>Really?  Is that changing?  I am seeing more and more of the popular
>games very accurately duplicated on radically different hardware (at
>least I assume that these game systems use different hardware).  Do
>they rewrite it completely?

I've worked on a few such games.  Some of the games are very well written in
a HLL, with a few assembler routines to hack out such stuff as graphics,
timer & other interrupt handling, sound, keyboard, mouse, etc.  In short, many
games do port fairly well, especially on the "beefier" machines like a Mac,
PC with 512K, Amiga, etc.  Games that ALSO go to the Apple II or Commadore 64
take a machine-specific "guru" to write much of the stuff in assembler.  Some
of the more spectacular effects are changed/removed when you go from machine
to machine (sound on an Amiga is of a completely different sort than sound on 
a PC).

On the flip side of the coin, I made some routines to do a rasterized polygon 
fill on the IBM PC; the polygons were disjoint, degenerate, and fell partially
outside the screen area.  Naturally the display update was the slowest part of
the code, and I desperately needed speed on a 4.77 8088 - so the assembler there
is of the worst sort; unrolled loops, self-modifing code, the whole 9 yards.

Cliff Code Rot Click



--
Cliff Click                
cliffc@owlnet.rice.edu       

tif@doorstop.austin.ibm.com (Paul Chamberlain) (07/18/90)

In article <9926@brazos.Rice.edu> cliffc@cimbria.rice.edu (Cliff Click) writes:
>In article <2779@awdprime.UUCP> tif@doorstop.austin.ibm.com (Paul Chamberlain) writes:
>>In article <64280@sgi.sgi.com> bron@bronze.wpd.sgi.com (Bron Campbell Nelson) writes:
>>>Video game software is some of the ugliest
>>>and most arcane assembler there is.
>>Really?  Is that changing?  I am seeing more and more of the popular
>>games very accurately duplicated on radically different hardware ...
>... Mac, ... PC with 512K, Amiga, ... Apple II or Commadore 64

I was more interesed in, and the discussion (IMHO) was more in reference
to, real game machines.  Arcades, Nintendo, etc.  From my observation, there
are certainly more Mario Brothers Nintendo cartridges than ANY PC game,
maybe even all PC games combined.  But Mario Brothers has been very faith-
fully reproduced on real arcade hardware (which came first?) and some other
dedicated game machines.  But, and this is my point, the arcade hardware
seems to be incredibly more sophisticated.  Thus, a good modular
implementation would have been a near-necessity for the port.

Paul Chamberlain | I do NOT represent IBM         tif@doorstop, sc30661@ausvm6
512/838-7008     | ...!cs.utexas.edu!ibmaus!auschs!doorstop.austin.ibm.com!tif

bron@bronze.wpd.sgi.com (Bron Campbell Nelson) (07/18/90)

In article <9926@brazos.Rice.edu>, cliffc@cimbria.rice.edu (Cliff Click) writes:
> In article <2779@awdprime.UUCP> tif@doorstop.austin.ibm.com (Paul Chamberlain) writes:
> >In article <64280@sgi.sgi.com> bron@bronze.wpd.sgi.com (Bron Campbell Nelson) writes:
> >>And you'd be dead wrong.  Video game software is some of the ugliest
> >>and most arcane assembler there is.
> >
> >Really?  Is that changing?  I am seeing more and more of the popular
> >games very accurately duplicated on radically different hardware
> 
> I've worked on a few such games.  Some of the games are very well written in
> a HLL, with a few assembler routines to hack out such stuff as graphics,
> timer & other interrupt handling, sound, keyboard, mouse, etc.  In short, many
> games do port fairly well, especially on the "beefier" machines like a Mac,
> PC with 512K, Amiga, etc.

I've caught enough flak (by email and to the net) that I feel compelled to
publicly admit my first comment was stupid.  I'm glad to know that some
of the newer stuff can be (and is) well written.  My own recollections
however hark back to the bad old days.  For example, the old Atari 2600
(the first home system that really caught on in a big way).  *That* beast
required some of the worst looking stuff ever:  no frame buffer, so you
had to draw the picture on the screen each frame, and do any computations
during the horizontal and/or vertical retrace time (and of course, count
the instructions to be sure you didn't miss); tiny ROM's in the game
cartridges; 256 *bytes* of RAM; etc. etc.  In those days "porting" a
game actually meant "write a new program that plays pretty much the same
and has vaugely similar graphics."  I'm glad to hear the hardware has
improved, and the bad old days are drifting away (not that the Nintendo
is exactly a piece of cake from all I hear).

--
Bron Campbell Nelson
bron@sgi.com  or possibly  ..!ames!sgi!bron
These statements are my own, not those of Silicon Graphics.

daveh@cbmvax.commodore.com (Dave Haynie) (07/18/90)

In article <2794@awdprime.UUCP> tif@doorstop.austin.ibm.com (Paul Chamberlain) writes:

>I was more interesed in, and the discussion (IMHO) was more in reference
>to, real game machines.  ...

>But Mario Brothers has been very faithfully reproduced on real arcade 
>hardware (which came first?) and some other dedicated game machines.  But, 
>and this is my point, the arcade hardware seems to be incredibly more 
>sophisticated.  Thus, a good modular implementation would have been a 
>near-necessity for the port.

The trick, at least in the past, has always been preserving the arcade feel
on the home system.  You can get a pretty good look and feel-alike on a cheap 
home machine, but you're probably getting fewer colors, less sophisticated
moving images, less or poorer sound, etc.

I don't have any specifics, but in talking with a person or two who's actually
worked on these things over the years, it's evident that they can be pretty 
sophisticated as compared with your average Nintendo box.  I've heard of 6809 
or 68000 machines with dedicated sprite engines and machines with dualing 
68000s.  There are also some machines out there with Amiga 500 motherboards 
in them, which could obviously simplify at least the Amiga home version of 
the game.

>Paul Chamberlain | I do NOT represent IBM         tif@doorstop, sc30661@ausvm6
>512/838-7008     | ...!cs.utexas.edu!ibmaus!auschs!doorstop.austin.ibm.com!tif


-- 
Dave Haynie Commodore-Amiga (Amiga 3000) "The Crew That Never Rests"
   {uunet|pyramid|rutgers}!cbmvax!daveh      PLINK: hazy     BIX: hazy
	"I have been given the freedom to do as I see fit" -REM

albaugh@dms.UUCP (Mike Albaugh) (07/19/90)

From article <2794@awdprime.UUCP>, by tif@doorstop.austin.ibm.com (Paul Chamberlain):
[Heavily nested snide comments about video-game code deleted]
> 
> I was more interesed in, and the discussion (IMHO) was more in reference
> to, real game machines.  Arcades, Nintendo, etc.  From my observation, there
> are certainly more Mario Brothers Nintendo cartridges than ANY PC game,
> maybe even all PC games combined.  But Mario Brothers has been very faith-
> fully reproduced on real arcade hardware (which came first?) and some other

	I believe the original Mario Brothers was arcade first, while the
later ones may have come out first on the NES.

> dedicated game machines.  But, and this is my point, the arcade hardware
> seems to be incredibly more sophisticated.  Thus, a good modular

	Arcade machines _typically_ have greater video bandwidth, hence nicer
pictures. They also may have better sounds, perhaps including a dedicated
CPU for sounds. In the case of Mario Brothers, I wouldn't call the arcade
hardware "incredibly more sophisticated". As I recall it was done well before
the NES.

> implementation would have been a near-necessity for the port.

	As I said in my first posting on this subject, the highest level
_design_ may well be pretty modular and disciplined. The _implementation_
may get pretty arcane. This is a natural consequence of the manufacturer
having to pay for the CPU and the memory containing the program, not just
the distribution media. If e.g. Lotus had to include the RAM and co-processor
to run 1-2-3 in the price of the software, you might see a few more "lean
and mean" programs in the PC world too :-)

						Mike

| Mike Albaugh (albaugh@dms.UUCP || {...decwrl!pyramid!}weitek!dms!albaugh)
| Atari Games Corp (Arcade Games, no relation to the makers of the ST)
| 675 Sycamore Dr. Milpitas, CA 95035		voice: (408)434-1709
| The opinions expressed are my own (Boy, are they ever)

sysmgr@KING.ENG.UMD.EDU (Doug Mohney) (07/19/90)

>>I don't have any specifics, but in talking with a person or two who's actually
>worked on these things over the years, it's evident that they can be pretty 
>sophisticated as compared with your average Nintendo box.  I've heard of 6809 
>or 68000 machines with dedicated sprite engines and machines with dualing 
>68000s.  There are also some machines out there with Amiga 500 motherboards 
>in them, which could obviously simplify at least the Amiga home version of 
>the game.
>>-- 
>Dave Haynie Commodore-Amiga (Amiga 3000) "The Crew That Never Rests"
>	"I have been given the freedom to do as I see fit" -REM

Oh? WHich machines? ;-) I've never heard of Commodore OEMing their motherboards
to game companies...

jesup@cbmvax.commodore.com (Randell Jesup) (07/24/90)

In article <00939DE3.241BB8C0@KING.ENG.UMD.EDU> sysmgr@KING.ENG.UMD.EDU (Doug Mohney) writes:
>>>I don't have any specifics, but in talking with a person or two who's actually
>>worked on these things over the years, it's evident that they can be pretty 
>>sophisticated as compared with your average Nintendo box.  I've heard of 6809 
>>or 68000 machines with dedicated sprite engines and machines with dualing 
>>68000s.  There are also some machines out there with Amiga 500 motherboards 
>>in them, which could obviously simplify at least the Amiga home version of 
>>the game.
...
>Oh? WHich machines? ;-) I've never heard of Commodore OEMing their motherboards
>to game companies...

	They do exist, Commodore does sell A500 boards to manufacturers (there
are a few around here somewhere).

	Some people have stated that on the Amiga, Mac, etc more games are
being written in C, are semi-portable, etc.  This is true.  However, there
continues a sizeable fraction of the market, particularily in shoot-em-ups and
"flight" simulators, where every refresh per second, or extra moving object, is
a major point.  There are some people that get AMAZING frame rates (15-20+/sec)
for a 3-d hidden-solid-polygon flight-simulator on a 512K 68000 Amiga using
pure asm.  For that sort of program, performance is a major design and selling
point.  Now, I don't suggest everyone do this, but in that market, with the
competition and volume of sales to amortize the costs, for that type of
program it works financially.  

	Another point is that as a platform (whether it be Nintendo or a PC)
ages and becomes better known, the standards for a game (especially a video
game) go up.  This can lead to escalation to the point where the only way
to squeeze out the performance needed is in highly arcane asm (the C64 and
other 8-bitters started halfway down that path).

-- 
Randell Jesup, Keeper of AmigaDos, Commodore Engineering.
{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com  BIX: rjesup  
Common phrase heard at Amiga Devcon '89: "It's in there!"

silos@bench.sublink.ORG (Paolo Pennisi) (07/29/90)

In article <64415@sgi.sgi.com>, bron@bronze.wpd.sgi.com (Bron Campbell Nelson) writes:
> In article <9926@brazos.Rice.edu>, cliffc@cimbria.rice.edu (Cliff Click) writes:
> > In article <2779@awdprime.UUCP> tif@doorstop.austin.ibm.com (Paul Chamberlain) writes:
> > >In article <64280@sgi.sgi.com> bron@bronze.wpd.sgi.com (Bron Campbell Nelson) writes:
> > >Really?  Is that changing?  I am seeing more and more of the popular
> > >games very accurately duplicated on radically different hardware
[...]
> > 
> > I've worked on a few such games.  Some of the games are very well written in
> > a HLL, with a few assembler routines to hack out such stuff as graphics,
> > timer & other interrupt handling, sound, keyboard, mouse, etc.  In short, many
> 
[...]
> and has vaugely similar graphics."  I'm glad to hear the hardware has
> improved, and the bad old days are drifting away (not that the Nintendo
> is exactly a piece of cake from all I hear).
> 
> --
> Bron Campbell Nelson
> bron@sgi.com  or possibly  ..!ames!sgi!bron
> These statements are my own, not those of Silicon Graphics.

I'm glad to see that comp.arch talks about video games, a world of architectures
completely different from everyday's arch... but with very interesting
quirks and tricks.
I'm part of a team developing a complete game develpment system to allow
game programmers to develop, produce and distribute realist 3D games using
only high level programming. We are designing the software and hardware
architecture which will make possible that goal.
The programmer will work with high level C library for every need of the game,
 developing on a platform which, under few changes could even be the target
machine for running the game in coin-op arcades. Based around a 386 pc,
with a multitasking kernel, and a set of dedicated hardware to perform all
the tasks of gemometric projections, clipping, shading etc, and the heavy
burden of updating a med res screen (800x600x256[16M]) at realtime speed,
this game development system will allow the programmer to avoid even a single
line of assembly language, giving at the same time a optimized platform for
thousand or realistic 3-dimensional games such as fligth simulators, car
race simulators, tank simulators etc.
A lot of water has flown from Atari 2600 times.
  Paolo.
-- 
 (ARPA) silos@bench.sublink.ORG				Paolo Pennisi
 (BANG) ...!deejay!bench!silos				via Solari 19
 (MISC) ppennisi on BIX & PTPOSTEL			20144 Milano ITALIA
----< S U B L I N K  N E T W O R K  : a new way to *NIX communications >-----

peter@ficc.ferranti.com (Peter da Silva) (08/05/90)

In article <460@bench.sublink.ORG> silos@bench.sublink.ORG (Paolo Pennisi) writes:
> Based around a 386 pc,
> with a multitasking kernel, and a set of dedicated hardware to perform all
> the tasks of gemometric projections, clipping, shading etc, and the heavy
> burden of updating a med res screen (800x600x256[16M]) at realtime speed,

Sounds like it is to the best arcade games of 1990 what the Amiga was to the
best arcade games of 1985. And the same thing will happen... by 1995 your
programmers will be going back to assembly for the critical core routines,
and a bunch of PC-heads will be writing 100% assembly programs in a misguided
attempt to get more performance.

Speaking of Amigas, why not start with them? The software is already there...
-- 
Peter da Silva.   `-_-'
+1 713 274 5180.   'U`
<peter@ficc.ferranti.com>