Strange Project Idea?

Hello all,

I thought about doing some strange project to help me gain more experience in C++ since I've been neglecting it for other things such as BlitzBasic and the Ethanon Engine (using Angelscript).

My idea was to simulate a computer system, similar to how the Wiremod folks had done in GMod. Using virtual components, one could program some sort of OS complete with kernels, BIOSes and such to interact with them.

Of course, it'd be a very loose simulation since I think it would be pretty difficult to simulate all of the intricate parts of the components, but I guess it'd give a basic idea of what goes on when people spent years creating the very systems we use today.

I was wondering if any other people thought it might be interesting, since I'd love to share my work and code with others and get feedback. Ultimately I want to do this project to help me learn more about connecting the hardware and software side of things since I've only focused on the high-level aspects, in addition to improving my competence in C++.

I'm sorry if this seems kind of random; for some reason it feels pretty awkward to write about this lol. But what do you guys think?
Well, one thing you should ask yourself is exactly how low you are willing to go.

There exist simulations of equivalents of electronic circuits that go down to the conductor paths on a circuit board. At this level, this is generally done with cellular automata (e.g. see Wireworld. There's one example of a small computer that finds primes and shows them on a 7 segment display within the simulation).

A more common level is simulating a CPU. This is known as a virtual machine. For example, many modern language interpreters are actually virtual machines. Virtual machines are also commonly used to emulate hardware for practical purposes (since while it would be possible to emulate the electronics, it would be too slow to be practical).
Last edited on
Gosh, I feel kind of silly not realizing that it was basically a virtual machine I was thinking of!

But yeah, ideally I was planning a very simple hardware virtualization that simulated things like instructions per second on a CPU (of course it couldn't be a very fast one), basic outputting to a screen, etc. I'd try to simulate things such as having machine code parsed and then running various C++ functions, like some sort of "scripting language" and then see what goes on from there. Since the CPU is virtual, the "virtual BIOS" would be written in C++ and the "output" would be displayed using SFML.

It wouldn't be very useful at all but I think it'd be cool to play around with it! :)
Last edited on
If you want some hardware that is not too complicated and powerfull, you could try make your own Gameboy emulator? That would allow you to run 'fun' programs out of your work :)
Or do you want to recreate some new computer hardware instead of using an existing one?
Yeah, I wanted to create new computer hardware, perhaps loosely based on real-life counterparts. I was thinking of creating a very simple, fictional 16-bit CPU with a very simple instruction set and a small bit of 64kB RAM, so that I could code my own programs for it. Afterwards, if had some success with it, I'd probably expand onto something a bit more complicated.
zeikoh I have had the same idea and for that i have been reading up on hardware but haven't gotten around to actually trying to code it. I have mostly been occupied with planning out my game(mechanics, features, etc...). Now i think it would be a fun thing to do but idk if im going to start on a 2d or ASCII based prototype of my game just to get experience with game programming and design. Now if i decide to not do that then i would gladly join you in this project. I will get back to you once i decide.
Thanks, but that's okay, I wanted to do this on my own as a learning experience. :)
Thanks, but that's okay, I wanted to do this on my own as a learning experience. :)

Topic archived. No new replies allowed.