There is no problem with doing what you explained, if you stick to what I say below.
Trademark laws and copyright laws are completely different things.
- Trademark laws protect registered brand names, company names, model names, or other names used to sell products. The purpose is to stop counterfeiting.
- Copyright laws protect "intellectual works" like pictures, paintings, music, songs, literature and computer software from being reproduced without the author's explicit permission. (Well, at least in this context, this explanation accurate.)
I kind of want to tell the history of the consoles and games through the history mode.
Well, clearly you seem to want to document history, and laws are not meant to stop authors from creating documentaries, even if they are part of video games. So, you are allowed to do what you explained, under the following conditions:
Make sure the history mode is clearly marked as an experience that is independent of the video game itself.
If you want to demonstrate the logos and screenshots of their products, familiarize yourself with the fair use principle.
Whenever you use a trade name, make sure you clearly mention its owner.
Include a disclaimer at the opening of the video game that says:
"Trademarks or other registered marks mentioned in the history section of this work are properties of their respective owners, clearly indicated in each case. The purpose of using these marks is historically accurate education. Our use of these marks does not imply any form of association to, or endorsement by, said mark holders."
Microsoft is more generous in this regard. They have a Microsoft Trademark & Brand Guidelines, as well as a Microsoft Corporate Logo Guidelines. Stick to them, even hyperlink to them. You'll be fine.
Could I use the name of the consoles and companies in the game?
The spirit of the law says "yes". I say "DO NOT!":
- Copyright and trademark laws are not your only problem. If you make a fictional version of, e.g., Microsoft without seeking Microsoft's consent first, and Microsoft doesn't like it, then Microsoft can sue for defamation. This is very important in UK. Microsoft is frequently called the "software giant", never "the friendly software giant". In fact it has a reputation of being a Goliath. Same goes for others. Seeking their consent first can also be problematic. They may try to ask for royalties.
- Unless you are creating a very historically accurate educational simulator, these brand owners can sue under trademark laws, accusing you of trying to cash in on their fame. (But in a historically accurate simulation, you can argue that your purpose is only education and the cash you earn is only to cover your expenses of services rendered to the society.)
And there is one thing I cannot possibly emphasize enough: You DO NOT want to go to the court, even if you win! (Well, unless you have ample money, time, nerves, spirit of adventure and reputation, and you are ready to gamble them all.)