Author Topic: MHRD - Video Game to build your own CPU  (Read 10592 times)

0 Members and 1 Guest are viewing this topic.

Offline icy_Topic starter

  • Newbie
  • Posts: 5
  • Country: de
MHRD - Video Game to build your own CPU
« on: December 08, 2016, 09:12:26 am »
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=813905115

Check out the trailer and let me know what you think. If you like it, I would appreciate your vote on Steam Greenlight!
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3508
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: MHRD - Video Game to build your own CPU
« Reply #1 on: December 08, 2016, 09:57:20 am »
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.
 
The following users thanked this post: CM800, icy_

Offline CM800

  • Frequent Contributor
  • **
  • Posts: 882
  • Country: 00
Re: MHRD - Video Game to build your own CPU
« Reply #2 on: December 08, 2016, 10:00:11 am »
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.

I'm liking the sound of that idea....
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3508
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: MHRD - Video Game to build your own CPU
« Reply #3 on: December 08, 2016, 10:25:44 am »
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.
 
The following users thanked this post: icy_

Offline icy_Topic starter

  • Newbie
  • Posts: 5
  • Country: de
Re: MHRD - Video Game to build your own CPU
« Reply #4 on: December 08, 2016, 11:04:17 am »
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.

I 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 :D... 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!


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.

I 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 :)

 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4987
  • Country: gb
Re: MHRD - Video Game to build your own CPU
« Reply #5 on: December 08, 2016, 11:11:38 am »
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
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3508
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: MHRD - Video Game to build your own CPU
« Reply #6 on: December 08, 2016, 01:37:13 pm »
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.

I 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 :D... 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!
You 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.
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.

I 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 :)
Maybe 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.
 

Offline iaeen

  • Regular Contributor
  • *
  • Posts: 65
  • Country: us
Re: MHRD - Video Game to build your own CPU
« Reply #7 on: December 08, 2016, 02:35:42 pm »
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...
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8550
  • Country: us
    • SiliconValleyGarage
Re: MHRD - Video Game to build your own CPU
« Reply #8 on: December 08, 2016, 02:46:25 pm »
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.
guru mode gets 1 transistor ...
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline icy_Topic starter

  • Newbie
  • Posts: 5
  • Country: de
Re: MHRD - Video Game to build your own CPU
« Reply #9 on: December 08, 2016, 03:00:06 pm »
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

I 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:
:D... 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)

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...
I 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 :D
« Last Edit: December 08, 2016, 03:01:55 pm by icy_ »
 

Offline helius

  • Super Contributor
  • ***
  • Posts: 3688
  • Country: us
Re: MHRD - Video Game to build your own CPU
« Reply #10 on: December 08, 2016, 03:00:32 pm »
Also see Shenzhen I/O, which is another game based on design and verification of circuits using jellybean MCUs.
 

Offline iaeen

  • Regular Contributor
  • *
  • Posts: 65
  • Country: us
Re: MHRD - Video Game to build your own CPU
« Reply #11 on: December 08, 2016, 03:48:59 pm »
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...
I haven't considered  gog yet. I will definetely check them out. Out of curiosity: Why do you prefer them to Steam?

They specialize in DRM free games and don't require a client to be installed on my machine.
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3508
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: MHRD - Video Game to build your own CPU
« Reply #12 on: December 08, 2016, 03:50:09 pm »
@technix:
:D... 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)
On 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.
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3508
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: MHRD - Video Game to build your own CPU
« Reply #13 on: December 08, 2016, 05:06:34 pm »
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 connector

Also 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.
 

Offline icy_Topic starter

  • Newbie
  • Posts: 5
  • Country: de
Re: MHRD - Video Game to build your own CPU
« Reply #14 on: December 08, 2016, 09:16:06 pm »
They specialize in DRM free games and don't require a client to be installed on my machine.

Thanks 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.
« Last Edit: December 08, 2016, 09:58:12 pm by icy_ »
 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4987
  • Country: gb
Re: MHRD - Video Game to build your own CPU
« Reply #15 on: December 08, 2016, 09:28:00 pm »
In the mean time I learned...
As mentioned in this and later posts. Original Link(s) have been removed. Sorry.

...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.

Quote
Removed: After polite request from OP

Analogy:
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;dr
Although 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.
« Last Edit: December 08, 2016, 10:23:09 pm by MK14 »
 

Offline icy_Topic starter

  • Newbie
  • Posts: 5
  • Country: de
Re: MHRD - Video Game to build your own CPU
« Reply #16 on: December 08, 2016, 09:57:10 pm »
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!
 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4987
  • Country: gb
Re: MHRD - Video Game to build your own CPU
« Reply #17 on: December 08, 2016, 10:03:04 pm »
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!

(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.
« Last Edit: December 08, 2016, 10:08:45 pm by MK14 »
 
The following users thanked this post: icy_

Offline danshtr

  • Contributor
  • Posts: 17
  • Country: us
Re: MHRD - Video Game to build your own CPU
« Reply #18 on: July 24, 2018, 07:22:41 pm »
Just finished it.

What a wonderful game!

I always wanted to learn how CPUs are designed. Now I know...

 
The following users thanked this post: NivagSwerdna

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8550
  • Country: us
    • SiliconValleyGarage
Re: MHRD - Video Game to build your own CPU
« Reply #19 on: July 25, 2018, 05:19:21 pm »
intel is hiring ... hurry !
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2507
  • Country: gb
Re: MHRD - Video Game to build your own CPU
« Reply #20 on: July 25, 2018, 05:24:07 pm »
What a wonderful game!
It's on my wish list... still waiting for a steam sale that discounts it nicely.... and working on SpaceChem in the mean time.  :)
 

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2507
  • Country: gb
Re: MHRD - Video Game to build your own CPU
« Reply #21 on: May 13, 2020, 06:31:42 pm »
^Ignoring the click bait spammer above

Back 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!)

 :)
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9322
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: MHRD - Video Game to build your own CPU
« Reply #22 on: May 15, 2020, 12:14:05 am »
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.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf