Jump to content

  • Log In with Google      Sign In   
  • Create Account

Creating a Web-based PC emulator?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 rlink   Members   -  Reputation: 151

Like
10Likes
Like

Posted 24 January 2013 - 09:45 PM

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.


Edited by rlink, 24 January 2013 - 10:26 PM.


Sponsor:

#2 Servant of the Lord   Crossbones+   -  Reputation: 21213

Like
1Likes
Like

Posted 24 January 2013 - 10:23 PM

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


It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal

[Fly with me on Twitter] [Google+] [My broken website]

[Need web hosting? I personally like A Small Orange]


#3 BornToCode   Members   -  Reputation: 951

Like
0Likes
Like

Posted 25 January 2013 - 07:11 PM

That link is very interesting. Thanks for posting it.



#4 Madhed   Crossbones+   -  Reputation: 3139

Like
0Likes
Like

Posted 26 January 2013 - 07:57 AM

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.



#5 RanBlade   Members   -  Reputation: 648

Like
0Likes
Like

Posted 26 January 2013 - 10:01 AM

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


Eric Ranaldi a.k.a RanBlade

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

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

- Dave Pottinger, Ensemble Studios


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

[FreedBSD][My Site][Gamasutra][Khan Acadamey]





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS