Commander Keen

Started by
28 comments, last by Jeeo 20 years, 1 month ago
Having disassembled most of the Keen engine, I can tell you with 100% certainty that it used C and assembly.

However, assembly was in no way at all "required" for graphics. Why would you think this? Graphics in DOS are just writing to EGA (in this case) ports and dumping pixels into memory, both of which C can do quite well.
Advertisement
quote:Original post by Promit
Every game id Software has ever made except for Doom 3 has been C & ASM. That incldues Quake 3 (the software renderer is ASM).


Except Quake 3 doesn''t have a software renderer...

quote:Original post by Onemind
You could probably email Id and get the Commander Keen code for yourselve - they''ve already GPLed DOOM/Quake.


Id doesn''t have it anymore.

But John Romero does.

quote:Original post by Anonymous Poster
quote:Original post by Promit
Every game id Software has ever made except for Doom 3 has been C & ASM. That incldues Quake 3 (the software renderer is ASM).


Except Quake 3 doesn''t have a software renderer...



I always assumed it did, and never bothered to check, lol. Well, the software renderer, if there was one, would be at least partially ASM. So there.

quote:
However, assembly was in no way at all "required" for graphics. Why would you think this? Graphics in DOS are just writing to EGA (in this case) ports and dumping pixels into memory, both of which C can do quite well.

How do you call interrupts in C?


By the way, anyone happen to have a live id software e-mail I can send a question to?
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
quote:Original post by Promit
How do you call interrupts in C?


Why would you need to?

>> By the way, anyone happen to have a live id software e-mail I can send a question to?

Try Todd''s (CEO of id) email: toddh@idsoftware.com

>> How do you call interrupts in C?

You can use inline assembly. I think how this is done varies depending on compiler but for MSDEV its _asm{ blah } . So you can do your assembly interupt calling in there.


-SirKnight
quote:Original post by SirKnight
>> How do you call interrupts in C?

You can use inline assembly. I think how this is done varies depending on compiler but for MSDEV its _asm{ blah } . So you can do your assembly interupt calling in there.


You missed the point. You''re now using assembly. It''s inline, but it''s still not C. It''s C & ASM. Get what I''m saying?
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
quote:
>> How do you call interrupts in C?


C for DOS (Which I assume we are talking about here and not other platforms) does have support for calling interrupts in c.

Ex:
#include <dos.h>union REGS regs;int main(void){	regs.h.ah = 0;	regs.h.al = 1;	int86(0x10,&regs,&regs);	return 0;}


Would change the screenmode to some format I can't remember now.
(Feel free to correct me as it is from dusty memories)

I would imagine that doing a Google would enlighten you further on the subject.

Regards.


[edited by - MichaelT on March 19, 2004 9:53:14 PM]

[edited by - MichaelT on March 19, 2004 10:00:47 PM]
No no no no! :)
quote:Original post by MichaelT
C for DOS (Which I assume we are talking about here and not other platforms) does have support for calling interrupts in c.




Correct. Borland''s C (and some of their C++) compilers for DOS had interrupt support through library functions. Many (if not all) versions of Microsoft''s C compiler for DOS also had this support. Heck, even QuickC had an int86 function.

I''ve got a great book by Herb Schildt that includes graphics routines (simple sprite libraries) written entirely in C using int86 calls. I can still remember doing simple sprite games with good performance with that code.


Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

quote:Original post by Anonymous Poster
Having disassembled most of the Keen engine, I can tell you with 100% certainty that it used C and assembly.


?

This topic is closed to new replies.

Advertisement