Creating a Web-based PC emulator?

Started by
3 comments, last by RanBlade 11 years, 2 months ago

So recently I finished this book called "The Elements of Computing Systems" where you learn how to build a computer system from the ground up, starting from NAND gates and working your way up to a fully functioning virtual computer. Basically what happens is you start from primitive logic gates, then use those to implement combinational and sequential logic, then create a CPU with a machine language followed by an intermediate (VM) language, and finally a semi-OOP programming language called jack.

I really enjoyed the book (it's available here btw: http://www.nand2tetris.org/course.php it's also called "From Nand to Tetris") and would like to create something similar that extends upon the capabilities of this computer system, except as a web application with JavaScript and possibly a PHP back-end if necessary. However, I'm not sure how to go about doing this and am also unsure if it's a feasible project.

I created a small document explaining how it should work here: https://docs.google.com/document/d/1vGX6ec1ADPEtkq2sMrrdqBv7qtzplbuORzuUgWTj1GA/edit

Only difference is that I added in some stuff like bitwise operators into the machine and VM language so it doesn't have to be implemented by the OS.

EDIT: Also I changed the layout of the RAM cause I want this to be a 32bit system instead of 16bit. I don't think 65565 words of memory (that's for both ROM and RAM) is enough if I'm going to write anything significant in Jack.

I'd like to extend upon this by adding:

1. Computer screen -- probably 640x480 with support for rgba values (the original only supports black & white)

2. Keyboard & mouse input -- ascii codes for keys along with keydown, keyup, etc and mouse button state and x,y coordinates

3. An actual filesystem instead of storing everything in RAM... not sure how hard this will be to implement though

4. A second programming language apart from Jack, that also compiles to intermediate code... might look something like python

5. Ability to output sound

6. Networking, able to communicate with other PC emulators (running on a separate browser tab, everything is just gonna be local for now) through a simple protocol.

After it's complete I'm probably gonna write some basic apps for it, things like a paint tool, notepad, calculator, some games, etc.

I'm not sure if #3, 4, and 6 are actually possible though. But anyway I have about 3 years experience with Web development and wouldn't mind spending a good amount of time implementing this, although I'm unsure as to how long this will take. Sorry if this sounds overly-ambitious or anything, but I've wanted to make something like this for quite a while.

Advertisement

Thanks for posting that link, it's very interesting! Your link mistakenly has a comma at the end of it, so here's the correct link.

That link is very interesting. Thanks for posting it.

Thanks for that link. I just watched the Google talk about this lecture and it made me wish there had been something like this when I went to uni.

As for your project, it defenitely seems very ambitious. I know there is a C64 emulator written in Javascript, so performance should be ok. Writing all the tools will be a very big endeavour.

Thank you for the link. I have been looking for something like this for awhile.

Eric Ranaldi a.k.a RanBlade


[size=1]"Passion is what drives you to stay up until 4am fixing that bug that hardly anyone would notice...


[size=1]Passion is where great games come from, if you dont live and breathe games you shouldn't be in the games industry."


[size=2]- Dave Pottinger, Ensemble Studios



[size=1][GameDev][C++ Page][Unity Game Engine][Panda3D Game Engine][NeHe Productions][Drunken Hyena][MSDN][Beej's Guide to Network Programming]


[size=1][FreedBSD][My Site][Gamasutra][Khan Acadamey]

This topic is closed to new replies.

Advertisement