   Getting to know your hardware...
  Hi there! I''m working hard to build a solid knowledge of C++ and some assembly before undertaking the somewhat daunting task of mastering (yeah, right!) DirectX and/or OpenGL. But I have this annoying feeling that something is missing from the picture, and that''s hardware.There''s something I learned from assembly, and this is that there''s more to a computer than Strings or Vectors. I would like to know thoroughly the machine I''m working on to be able to squeeze every piece of performance out of it; I understand that the difference between a project like DoomIII and some of the amateur games you can find around is more than artistic quality or the number of people involved, and has something to do with the (let''s call it that way) intense knowledge of the hardware you''re developing for.Do you people know of any interesting source where I could find that information? And do you think it''s worth the trouble, to begin with?I''m not sure if the post is clear enough (as I''m not too confident about my english''s skills). Anyway, thanks for your time!    "Senri no michi mo ippo kara (A journey of a thousand miles starts with a single step...)" 
  I agree TOTALLY that programmers should know how computers workFirst learn about hardware architecture (chipsets, busses...). Many tech sites have diagrams when they review a motherboard. Try building a computer if you havn''t already.Assembly is how I learned how the CPU works. Looking at the assembly listing the compiler generates (an option) is a good way to learn how the code you write runs on the computer. This makes C++ programming much easier and efficient.As for DirectX it is not so much about the CPU so you should learn how the API talks to the graphics cards and how the card works (pipelines, graphics memory).Magazines (like Maximum PC, CPU...), web sites (Anandtech, HardOCP...) and the DX SDK all have great info even for newbiesI think it is very fun and worth it but takes a bit of time to learn like a hobby ;  Hi again! First of all, Cybertron, thanks for your reply!I bought the "Black art of 3D Game Programming" book, by guru LaMothe some time ago, and it made me think that a deep knowledge of your computer was a must back in ''ye ole'' DOS days, because the resources were limited and there were no interfaces fast enough to access most of the hardware, so you had to actually create some black magic to solve both problems.Thus, even if nowadays the computers are extremely powerful, why do people forget that most computer resources can be used more efficiently handling them at low-level? Or am I wrong? Is not necessary anymore to know what ports the PC has, and how to read/write them, for instance?One thing is for sure: many so-called ''professional'' developers are getting increasingly lazy, and they release games that look and play like shit, but have incredibly steep requirements. Is this some kind of "Game''s-gonna-play-on-that-oh-so-powerful-computer-so-I-don''t-have-to-optimize" syndrome?P.S. Sorry to bother you again, Cybertron, but do you have any links to those tech sites you were talking about? Thanks!!   "Senri no michi mo ippo kara (A journey of a thousand miles starts with a single step...)" ;  For cpu''s these would be a good place to start,http://computer.howstuffworks.com/microprocessor.htmwww.intel.com ;  He means these sites:HardOCPAnandTechArsTechnicaI visit them myself sometimes too  --{You fight like a dairy farmer!} ;quote:Original post by Greatwolf   He means these sites:HardOCPAnandTechArsTechnicaOops! Thank you all! Looks like I'm gonna spend some time browsing those sites... Thanks again!   "Senri no michi mo ippo kara (A journey of a thousand miles starts with a single step...)"   [edited by - JoriathLionfort on February 5, 2004 9:53:58 PM];  Don''t worry if you can''t understand the API''s. Getting a DirectX demo in C++ up working requires you to have some experience. Try to write as much code without having to deal with a specific API. Some simple games with console output is somthing I would advice you to write. ;  Thanks for the advice! In fact, right now I''m working on a (typical) text-based combat RPG, with a mix of real-time and turn-based gameplay.But I''m after something different. I''m not that much concerned about APIs (at least, not yet...) as I''m about how a PC actually works. I know that, back in the DOS era, knowing and handling your hardware directly was a must. Why, then, nowadays seems that no one cares about it, only focusing on higher level languages (even if it''s C)? Computing power has been hugely increased, as hardware''s complexity, but that''s no the point... After all, building a 3D engine is not an easy task, either! So, my main question is: are there any benefits to work at hardware-level? And, if that''s so, what books or sites should I buy/visit to get the information I need?   "Senri no michi mo ippo kara (A journey of a thousand miles starts with a single step...)" ;  Well, with dos, you could easily get access to the low level hardware (well, it might have been a pain in a compatiblity way - but it was doable).But, with modern Operating Systems, they need to protect the computer they are running on from crashes... And that means for one, that they must protect the hardware by not let us (programmers) directly access them, only by means of an API. And while it still may be possible to work around OS protection and deal with the hardware itselt. There are a few things wrong with that - you may use the ability to have your app run on all kinds of hardware, or more than liekly, you will crash the OSEdited - some spelling   [edited by - pjcast on February 8, 2004 12:07:48 PM];quote:Original post by JoriathLionfort    Thanks for the advice! In fact, right now I'm working on a (typical) text-based combat RPG, with a mix of real-time and turn-based gameplay.But I'm after something different. I'm not that much concerned about APIs (at least, not yet...) as I'm about how a PC actually works. I know that, back in the DOS era, knowing and handling your hardware directly was a must. Why, then, nowadays seems that no one cares about it, only focusing on higher level languages (even if it's C)? Computing power has been hugely increased, as hardware's complexity, but that's no the point... After all, building a 3D engine is not an easy task, either! So, my main question is: are there any benefits to work at hardware-level? And, if that's so, what books or sites should I buy/visit to get the information I need?   "Senri no michi mo ippo kara (A journey of a thousand miles starts with a single step...)"   It sounds like you might be interested in this book calledVector Game Math ProcessorsBut the main reason everyone uses API's instead of assembly now is that they write games for windows xp and it doesn't let you access the hardware directly anymore. Try writing a console program trying to access an interrupt and you'll see what I mean.  If God played dice, He'd win.—Ian Stewart, Does God Play Dice? The Mathematics of Chaos   [edited by - daveangel on February 13, 2004 10:37:54 AM] [edited by - daveangel on February 13, 2004 10:39:30 AM]