MHRD - Video Game to build your own CPU - Page 1
Forum section: electronics / projects

author: icy_
author_rank: Newbie
timestamp: December 08, 2016, 09:12:26 am
content: Hi folks,while my EE project portfolio isn't very extensive, I only started last year to set it up by designing a CPU (with the help of the book "The Elements of Computing Systems"). I was amazed by how easy it actually is to design a working CPU. I got a FPGA and was able to translate my CPU design to Verilog and have it run on the FPGA. This experience was so great, which is why I decided to share it with everyone!If you always wanted to understand how a CPU works and built one for yourself, I made a game for that! The player starts out at a 80s hardware startup to build a CPU. You start by designing basic boolean logic gates and work your way over multiplexers, adders, registers, ALUs up to a working CPU design. The design part takes place with a very simple hardware description language in an editor with auto-completion support. The game provides you with a whole lot of verification tests, so you can be sure that your stuff actually works.You can find it here:http://steamcommunity.com/sharedfiles/filedetails/?id=813905115Check out the trailer and let me know what you think. If you like it, I would appreciate your vote on Steam Greenlight!

author: technix
author_rank: Super Contributor
timestamp: December 08, 2016, 09:57:20 am
content: It would be nice if the player can export their progress as actual VHDL or Verilog files, so for those who bothered to buy a FPGA or CPLD dev kit they can actually load the design into actual hardware and play with it IRL.

author: CM800
author_rank: Frequent Contributor
timestamp: December 08, 2016, 10:00:11 am
content: Quote from: technix on December 08, 2016, 09:57:20 amI'm liking the sound of that idea....

author: technix
author_rank: Super Contributor
timestamp: December 08, 2016, 10:25:44 am
content: Another possible addition is a difficulty system based on logic unit usage. Easy mode limit the player to a medium-high-end thousand-pin FPGA, medium mode limits the player to a an entry-level FPGA, hard mode limits the player to a 100-pin CPLD like EPM570T100.

author: icy_
author_rank: Newbie
timestamp: December 08, 2016, 11:04:17 am
content: Quote from: technix on December 08, 2016, 09:57:20 amI already was thinking about an export/import mode for players to exchange designs. However I wasn't thinking about exporting as VHDL/Verilog. I does sound like fun... and it sounds actually doable with a reasonable amount of work (as my syntax is quite simple, it should be easy to transform the syntax to VHDL/Verilog). I will write it on my future feature list, many thanks!Quote from: technix on December 08, 2016, 10:25:44 amI was thinking along the lines, but instead of setting a difficulty at the beginning, I'd rather would show the player a rating for the design based on logic unit use. This way the player can decide wether he wants to optimize his design or go on with other designs (and maybe return later). A ranking system could be done with that as well. It is also on my future feature list

author: MK14
author_rank: Super Contributor
timestamp: December 08, 2016, 11:11:38 am
content: It sounds a bit like the following game. The link lets you play it. The game involves designing your own, progressively harder digital chips. Designing them from a low level mask/transistor level. I think it is Russian.http://jayisgames.com/review/engineer-of-the-people.php

author: technix
author_rank: Super Contributor
timestamp: December 08, 2016, 01:37:13 pm
content: Quote from: icy_ on December 08, 2016, 11:04:17 amYou can even design a hardware kit, being the "official" hardware accessory for the game, which allows the most hard-core players to get the most out of the game with IRL hardware they can poke around, with a user interface almost identical to the game itself. If you decided to sell physical copies of the game, instead of selling the games alone, it can come with this kit and relevant manuals.Quote from: icy_ on December 08, 2016, 11:04:17 amMaybe you can rank the design by this resource usage metric, and maybe also show the user the approximate price of the smallest possible CPLD or FPGA that can hold it.

author: iaeen
author_rank: Regular Contributor
timestamp: December 08, 2016, 02:35:42 pm
content: This looks really cool. I'd definitely be interested in giving it a try.You should see if gog.com would be willing to carry your game. I prefer them to Steam...

author: free_electron
author_rank: Super Contributor
timestamp: December 08, 2016, 02:46:25 pm
content: Quote from: technix on December 08, 2016, 10:25:44 amguru mode gets 1 transistor ...

author: icy_
author_rank: Newbie
timestamp: December 08, 2016, 03:00:06 pm
content: Quote from: MK14 on December 08, 2016, 11:11:38 amI think its a Zachtronics game (http://www.zachtronics.com/kohctpyktop-engineer-of-the-people/). I found out about it some day ago and haven't played it yet (but sure will do). The same developer also made some more famous games (TIS-100 and Shenzhen I/O). I only played Shenzhen I/O and my game is in part inspired by that. The title is "Konstruktor" (written in cyrillic) and the story is set in the sovjet union I think... the game itself isn't russian.@technix:... I would be happy to be able to distribute my game via Steam/as a download. Publishing hard copys is quite problematic I'm affraid as one needs a publisher, distributor, etc.. If you know however some FPGA producer/distributor who would be interested in bundling my game, let me know! I'd be more than glad. Another cool thing for a hardcopy version would be a printed manual (at least a PDF is also on my "future feature" list)Quote from: iaeen on December 08, 2016, 02:35:42 pmI haven't considered gog yet. I will definetely check them out. Out of curiosity: Why do you prefer them to Steam?Edit:@3roomlab: Definetely opposite

author: helius
author_rank: Super Contributor
timestamp: December 08, 2016, 03:00:32 pm
content: Also see Shenzhen I/O, which is another game based on design and verification of circuits using jellybean MCUs.

author: iaeen
author_rank: Regular Contributor
timestamp: December 08, 2016, 03:48:59 pm
content: Quote from: icy_ on December 08, 2016, 03:00:06 pmThey specialize in DRM free games and don't require a client to be installed on my machine.

author: technix
author_rank: Super Contributor
timestamp: December 08, 2016, 03:50:09 pm
content: Quote from: icy_ on December 08, 2016, 03:00:06 pmOn the other hand, if you get the kit up, you can distribute the kit through element14 or Farnell or DigiKey or Tindie, while selling the game itself along with the hardware kit as part of the kit's documentation.

author: technix
author_rank: Super Contributor
timestamp: December 08, 2016, 05:06:34 pm
content: Actually I have an idea for a potential kit for this game, that will provide the game with a real mid-level FPGA, some buttons and LEDs, and a good selection of peripherals for further development. It can be used to build a modern MCU out of it.* Intel EP4CE22E22C8N Cyclone IV FPGA in TQFP-144 with 22320 logic elements (that is a lot - enough to fit a small CPU in)* ISSI IS62WV51216BLL 1MB (512k x16) SRAM* Onboard 12MHz clock* Two onboard buttons (one of them can be used as reset)* One onboard 4x4 button matrix* Four FPGA-controlled LEDs, each in a different color (red/amber/green/blue)* WCH CH340G USB to UART converter leaging to 7 FPGA pins* Realtek RTL8201 Ethernet PHY, conneced to FPGA using MII pinout, have standalone 25MHz crystal* Connector for ST7920-based dot matrix LCD module (ST7920 supports serial and parallel mode, and supports both character and graphic modes)* Onboard DS3231 RTC* Embedded USB JTAG FPGA ISP adapter* 2x FE1.1s USB hubs, one leading from PC to the three onboard USB devices (USB to Serial, USB download dongle and 3 FPGA pins), one forking off 3 other FPGA pins.* All remaining pins unused by onboard peripherals broken out on a high-density connectorAlso if you really want to hit home you can try port LLVM (or instruct the player to perform this) to the resulting processor architecture so upon finishing the entire game the player with the hardware kit will have a custom-architecture SBC with a working C/C++ compiler.

author: icy_
author_rank: Newbie
timestamp: December 08, 2016, 09:16:06 pm
content: Quote from: iaeen on December 08, 2016, 03:48:59 pmThanks for the reply. They seem to be a very good place for indie developers as well... I contacted them about selling my game and hopefully will hear back in some days.

author: MK14
author_rank: Super Contributor
timestamp: December 08, 2016, 09:28:00 pm
content: Quote from: icy_ on December 08, 2016, 09:16:06 pm...deleted...in order to properly give you free advice, in order just to see your early release (Beta ?) version ?OP has/is amending this policy.QuoteAnalogy:We sometimes help fellow EEVblog members, when they need help with their circuits/Schematics.But if it cost at least ...deleted..., just to download the Schematic. I don't think they would get much help.The video (about your game) is free, but seems to be very short and not give much away about the game.Striked out, see OP's post, below:tl;drAlthough it is fair enough if you want to charge money for your game, later/now. If you want people to look at it, and give their impressions of it (Beta testers, evaluators, reviewers, testers, professionals, etc). You may want to review your pricing arrangements, as regards such people, such as EEVblog members. Until the game is finally finished/released.EDIT:Another (maybe better still option), would be to also release a completely free,DEMO, probably cut-down/restricted version. Which would give both us and possible future customers (nothing to do with EEVblog), a way of seeing what it is like, and being able to evaluate it. The demo version could probably be updated, at a considerable slower rate than the main/full version product. To minimize the extra work required in maintaining two versions.EDIT2:Edited after polite request(s), from OP.

author: icy_
author_rank: Newbie
timestamp: December 08, 2016, 09:57:10 pm
content: Hey MK14,you are right... when I first posted, I didn't intend to sell the game here, I was asking for some feedback. I am sorry if I got excited about how easy it is to put and sell my game on itch.io and thereby might came across as a bad sales pitch. I will delete the link from my previous post... feel free to delete it from your quote.I will try to put up a free demo tomorrow and send a new link! Sorry again!

author: MK14
author_rank: Super Contributor
timestamp: December 08, 2016, 10:03:04 pm
content: Quote from: icy_ on December 08, 2016, 09:57:10 pm(My previous post has been amended as requested).That sounds like a good idea.Without information/reviews/star-ratings/votes etc. It is difficult for people to buy it later, anyway. But a free demo should enable this information to be produced, and hence boost your $ sales, later.Yes, a free demo, which some of us can mess with, should give you more accurate results and more potentially useful feedback.

author: danshtr
author_rank: Contributor
timestamp: July 24, 2018, 07:22:41 pm
content: Just finished it.What a wonderful game!I always wanted to learn how CPUs are designed. Now I know...

author: free_electron
author_rank: Super Contributor
timestamp: July 25, 2018, 05:19:21 pm
content: intel is hiring ... hurry !

author: NivagSwerdna
author_rank: Super Contributor
timestamp: July 25, 2018, 05:24:07 pm
content: Quote from: danshtr on July 24, 2018, 07:22:41 pmIt's on my wish list... still waiting for a steam sale that discounts it nicely.... and working on SpaceChem in the mean time.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: May 13, 2020, 06:31:42 pm
content: ^Ignoring the click bait spammer aboveBack to the original thread.... I did buy MHRD in a Steam sale... well worth it.... or you can just use an FPGA (which I also did!)

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 15, 2020, 12:14:05 am
content: Not Verilog, but Robot Odyssey is a game that centers around building digital logic.(Very long at over 13 hours of gameplay, just skip around to get the idea.)A modernized version of the game that uses Verilog would be a great educational tool.