Archived

This topic is now archived and is closed to further replies.

Source code of classic games of the 80s?

This topic is 6013 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Don't you know if any company released the source code of its old console games of the 80s? I was trying to get anyone, but I didn't find it until now. I'm not speaking of clones, I want the original ones, if possible (or the later clones of the 80s). I'm very curious about how they programmed them, specially the classics (Pacman, Lode Runner, you know). Please post here the URLs you know. Old articles of game making (80s, also) allowed, too. Thanks. H. Hernán Moraldo aka DoctorK PD: don't tell me about Wolfestein, Quake, Doom... I'm looking for the very old ones! Edited by - DoctorK on June 28, 2001 11:46:51 AM

Share this post


Link to post
Share on other sites
Most of those games were writtn in assemble for the 5402/10? and 68000 series of processors. Most of the "logic" has to do with getting an entire game in as little as 4k of space.

Except for neto value, the source would be worth little since most of what the pogrammers were doing is now done by the OS or other basic graphics lib.

Share this post


Link to post
Share on other sites
Yeah. Most were written in assembly back then. Most emulators I''ve come across have a disassembly window. So you can just download the emulator, and the game you want, then go into the disassembly and read away. I doubt it''ll be much help though unless you''re good at that sort of thing.

Share this post


Link to post
Share on other sites
Yes it would be cool to see the source code (or at least the game logic part) for old games. Even old NES games would be sweet. BTW - what were those programmed in (nes)? C, assembly, both?

Share this post


Link to post
Share on other sites
Assembly.

Most games were written primarily in assembly on consoles until the PSX/Saturn era. There were a few Genesis games that were mostly C with a bit of asm, but most were 100% asm.

Share this post


Link to post
Share on other sites
Hey, don''t tell me it wouldn''t be cool to have the original sources! I''m not just speaking about the ASM code (it can be disassembled), but the commentaries too, and maybe the documentation and all that stuff.

Didn''t nobody at these old gaming enterprises decide to release the source code of these now useless games???

Share this post


Link to post
Share on other sites
For historical purposes, having the commented code for some of these games would be cool. But from a purely technical standpoint, even the original assembly listings (with comments and documentation) would be nearly useless to anyone except emulator authors, or people who write games for obsolete systems for fun.

Essentially none of the specific tricks/tips/general coding practices that were used back then are particularly useful now. Some of the same general concepts apply, but its easy to learn these concepts without looking at the old source (plenty of information on them is available in books and on the net).

Share this post


Link to post
Share on other sites
quote:
Original post by DoctorK
Hey, don''t tell me it wouldn''t be cool to have the original sources! I''m not just speaking about the ASM code (it can be disassembled), but the commentaries too, and maybe the documentation and all that stuff.

Didn''t nobody at these old gaming enterprises decide to release the source code of these now useless games???


First off, games back then were all programmed exclusively in assembler. Believe it or not, people actually wrote stuff before compilers came about.

We''re talking 20-30 years ago, where programmers didn''t even have enough room to store the entire 4 digit date in programs. What makes you think they had room for comments as well?

Disassembling ASM code is amazingly difficult, and most of the time results in worthless unreadable code.

These games were not programmed in a programming language. They were made in assembler.

Second, companies still own the intellectual property associated with those games. Even if they had source to give out, why should they? They still want to make money off of ''classic'' collections.

Share this post


Link to post
Share on other sites
And I doubt many programmers used much in the way of comments back then, either. They were used to machines with very little memory or storage space. Extensive commenting would have eaten into these vital resources.

Share this post


Link to post
Share on other sites
quote:
Original post by Mithrandir

We''re talking 20-30 years ago, where programmers didn''t even have enough room to store the entire 4 digit date in programs. What makes you think they had room for comments as well?

Disassembling ASM code is amazingly difficult, and most of the time results in worthless unreadable code.




Wouldn''t you imagine that most programmers probably diagrammed their code in a special document or something like that? Like "in addresses 10A5-11BF is the code that draws the characters to the screen." Having that along with the assembler code would be cool but I doubt any companies would release that stuff because they have so little to gain.

Share this post


Link to post
Share on other sites
Mithrandir wrote:
quote:
These games were not programmed in a programming language. They were made in assembler.


Hey, are you meaning machine code?

At 80's ASM compilers did exist. Imagine that C was created on 1972. Why couldn't they code with commented ASM code? There is no advantages of using plain machine code respect to ASM.

I think they did create these games with ASM.

Those games could be programmed in a very big machine (a mainframe, maybe?) with tons of memory. We are speaking of 80s, no 60s, 70s or Stone Age!

Tell me if I'm wrong.

quote:
Second, companies still own the intellectual property associated with those games. Even if they had source to give out, why should they? They still want to make money off of 'classic' collections.


Why not? Didn't Id do so?

They can release the source code for educational purposes, with a lot of restrictions and stuff, so that you can just read it.

--DK
--H. Hernán Moraldo

Edited by - DoctorK on June 29, 2001 7:56:28 PM

Share this post


Link to post
Share on other sites
quote:
At 80's ASM compilers did exist. Imagine that C was created on 1972. Why couldn't they code with commented ASM code? There is no advantages of using plain machine code respect to ASM.

I think they did create these games with ASM.

Those games could be programmed in a very big machine (a mainframe, maybe?) with tons of memory. We are speaking of 80s, no 60s, 70s or Stone Age!

Tell me if I'm wrong.

You're very wrong

In the 80s, they were probably written in ASM. But no, programmers didn't all have mainframes! At least in the early 80s (I mean, you mentioned Pacman...) most programmers used 8-but machines with 64k of memory. Often 16k of that was video ram anyway.

Do you have any idea how rare and expensive mainframes were?

Anyway, most of it would have been poorly commented ASM, if at all commented.

Edited by - Kylotan on June 30, 2001 1:44:20 AM

Share this post


Link to post
Share on other sites
OK.. this talk of not having enough memory for comments is sort of weird isn''t it?

Now, I could be wrong, but I would imagine the guys writing code for their assemblers for consoles or whatever in the 80s were using command line assemblers. Therefore, they edit their code, leave the editor, assemble, run, etc...

Comments are not compiled into exe files, so comments would only take up more memory in storage and while the code is being edited. Presumably, the editing machines had more power than was required to run the game, right? So why would low code space memory be a reason not to comment?

Share this post


Link to post
Share on other sites
Their would have to be some sort of documentation, either as comments in the assembly, or seperate written documentation, else they would get lost. And looking through old assembly books, they still emphasis commenting LOTS, and if you try writing in assembly, you realize just how vital these comments are. I cannot imagine a complete commentless game written in assembly without significant bugs, and bugs were something consoles could not afford (no way to patch).


Resist Windows XP''s Invasive Production Activation Technology!

Share this post


Link to post
Share on other sites
Why do you think that programmers in those days had big powerful machines compared to the ones the games ran on? They didn''t. Most game programmers weren''t working in big studios like they are now, with publishers pumping 6 or 7 figure sums of money in at periodic intervals. Instead, they were often written by some schoolkid in his free time on his C64 or whatever. Some of the console games were a bit more professional, but there was certainly no team of programmers sat around a mainframe Of course there would have been some commenting. But ASM isn''t something you do without a pretty high level of understanding in the first place, and therefore commenting becomes less important. Games in those days used to be done in anything from 1 to 3 months usually, meaning that you wouldn''t have trouble ''remembering what this function does''. Finally, there simply wasn''t enough code for comments to be widely needed. I believe Pacman was programmed to run on a 4k machine. You''d hardly need a load of comments to describe that much code. And bugs aren''t really linked to comments or lack of them. It''s more about understanding of code. Comments help us understand code, but these guys had a lot less code to worry about, no teammates who needed to understand it, no weird APIs to get to grips with, no memory allocation to contend with, etc.

As for old assembly books emphasising commenting... well, new C++ books emphasise commenting too. Look at real-world source code, and you''ll see how sparsely commented it is in comparison with the ''ideal'' in a book.

Share this post


Link to post
Share on other sites
Ok, so they probably hadn''t comments. Maybe I was wrong, of course!

Back to the topic, any original stuff related with those games? Source code, documentation, work on sprites or general stuff (interesting interviews, maybe?).

Isn''t there nothing on internet about it? I haven''t found it, btw.

Let us allow games of the early 90s be included here. Maybe some Contra, or something by that way?

ID software ones are all at ID software website, don''t tell me that ones please

--DK
--H. Hernán Moraldo

Share this post


Link to post
Share on other sites
quote:
Original post by Mithrandir
We''re talking 20-30 years ago, where programmers didn''t even have enough room to store the entire 4 digit date in programs. What makes you think they had room for comments as well?


The two digit date thing came about in large databases where space was at a premium. Comments in source code were not subject to the same restrictions. Code was commented. Maybe not to the same level as it is these days, but it was commented.
quote:

These games were not programmed in a programming language. They were made in assembler.


But assembly language IS a programming language. It is just at a lower level than C. The assembler compiles the assembly source code into machine code. Assembly is not machine code. It is the closest you can get to machine code in a text format, but it is not the same. Assembly still has to be compiled into machine code that the CPU understands. Jumps and branches have to be calculated as offsets or absolute jumps. Variable names have to be replaced by memory locations. This is all done by the assembler or assembly compiler.

Steve ''Sly'' Williams  Code Monkey  Krome Studios

Share this post


Link to post
Share on other sites