Closed Thread Icon

Topic awaiting preservation: This is probably Suicide... (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8671" title="Pages that link to Topic awaiting preservation: This is probably Suicide... (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: This is probably Suicide... <span class="small">(Page 1 of 1)</span>\

 
wrayal
Bipolar (III) Inmate

From: Cranleigh, Surrey, England
Insane since: May 2003

posted posted 05-23-2003 22:36

Having finished my raytracer for the moment, I was looking for a new project to start on. I saw somebody had written an emulator in javascript. This got me thinking. I really would love to create an emulator.I think I would like to try a (comparatively) simple system like the NES. I could try an older and more simple system, but that would be stepping in at the shallow end, definitely not how I tend to do things....So I was looking on the internet, and I came across http://fms.komkon.org/EMUL8/NES.html . The NES had a processor speed of under 2 mhz. So even though javascript is very slow, how close to real time would it be possible to get? The other method I (or we, if somebody would like to help) is static or dynamic compilation to C++ code, to compile. Any feedback would be greatly apprectiated!

Wrayal

Go to kimber-ja.demon.co.uk and click on the link to the raytracer! It's mine!

[This message has been edited by wrayal (edited 05-23-2003).]

Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 05-23-2003 23:05

The speed of javascript is all over the shop at the best of times. I honestly can't see the point of making a NES emulator in this language besides the cross platform advantages.

Can I ask why you'd want to do this asside from the "look, I'm cool" factor?

Why not do it in pure Java. You'd get just as many oooh's and arrr's and it'd actually run fast enough to use. A platform game in JS would only be worth while running on IE/PC/win2K+/cpu1Ghz+

I just can't see the point to putting in that much work to a language that's so obviously not suited for it. Javascript may be bent to make a ray tracer but a gaming console... Possible, yes... Cool, for about 5 minuites... worthwhile? Eh, it's your life -- but I'd much prefer a usable Java version than a system hogging Javascript one.

Anyways, that's just my 2c.

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 05-24-2003 01:57

wrayal: I guess you are refering to the CHIP8 emulator done by Robert Gamble. Until he mentionned his project I didn't knew the CHIP8 language. I was quite excited about that language and by Robert's emulator itself. Since the CHIP8 have few instructions ( less than 40 ) and that it has some games like BLITZ, PONG, INVADER, TETRIS ... I gave it a try and had a lot of fun coding my own one and playing BLITZ and INVADER in the train But the extreme ( the word is light ) simplicity of the CHIP8 took few days/hours to emulate. Doing a NES emulator would require far more efforts.

I agree with Dracusis, and fear that the complexity of the NES hardware needs so much tricks to emulate it in JavaScript that the speed would be pathetic and makes the project not as rewarding as it could be.

For example the the sprites are strored in the ROM of the cartdriges. Generating a (quickly) usable image from raw datas seems rather hard, not to mention that the video chip of the NES can flips the sprites on both axis.

To answer your last question, I'd say that Interpretation is the easiest method and you shouldn't have any problem of speed to emulate a 2Mhz processor if you code in C++.

Cheers,

Mathieu "POÏ" HENRI

wrayal
Bipolar (III) Inmate

From: Cranleigh, Surrey, England
Insane since: May 2003

posted posted 05-24-2003 09:44

the "look, I'm cool factor"? That hurt...
Anyway, there is no way I would do it in that way. Thats simply not why I program at all. I program for the sake of programming. Making a raytracer in javascript is beyond pointless. Even slime admits that. Slime went to all the trouble of amming a class based system, but still wrote it in javascript. Why? Its fun. Thats exactly the same for me. My efforts on my raytracer could more easily have been spent learning c++ better to program it in c++, but where would be the fun in that? I program brainf*** for example, and made a fibonacci program. Where was the point? there wasnt one, and if there was one, it certainly wasnt for the "look, I'm cool factor". Doing that would be really sad. If there are actually any programmers out there who program for that reason, I pity them. Programming for fun, i can understand, programming for money, I would never do, but can understand, programming to look cool, no.
Honestly, Im doing this for fun. But since the first reply was so negative, and the second one not exactly hopeful (thanks anyway poi, massive respect for your work!) I am going to start on a simpler system, if I do it at all.

Wrayal

Go to kimber-ja.demon.co.uk and click on the link to the raytracer! It's mine!

[This message has been edited by wrayal (edited 05-24-2003).]

wrayal
Bipolar (III) Inmate

From: Cranleigh, Surrey, England
Insane since: May 2003

posted posted 05-24-2003 10:01

oh, what a surprise, myweb.tiscali.co.uk/punkoff/robert/5k.html has been blocked by my network administrator. Does anybody know any mirrors, or another site where I can get information on making a chip 8 emulator?

Wrayal

Go to kimber-ja.demon.co.uk and click on the link to the raytracer! It's mine!

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 05-24-2003 10:39

....all my best friends call me Google

[This message has been edited by Petskull (edited 05-24-2003).]

Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 05-24-2003 13:42

Dude, it was a question, not a statment, thus the question mark.

Lighten up a bit. I have absolutly no resaon to insult you in any way so why would I?

quisja
Paranoid (IV) Inmate

From: everywhere
Insane since: Jun 2002

posted posted 05-24-2003 14:43

Try www.anonymization.net, that usually bypasses school filters etc., unless they actually scan the page content. There#s something in the faq on this I think.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 05-25-2003 16:54

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 05-25-2003 17:55

Wrayal: The point of my post, was not to discourage you but to point that the NES is quite complex and that you ( in fact, anyone ) willl have all the pain of the world to emulate it at decent speed in JavaScript. And since you're doing this for fun ( and learning purpose ), it would be thousands times more fun if you get something with which you can play in the end. That's why I tried to emulate the CHIP8 too. CHIP8 is easy, simple and you can still make little wonders ( in comparision to its extreme simplicity ) in just few bytes. PONG is just 246bytes, INVADER is 1283bytes with an intro, a font, several sprites and levels...

I hope you won't give up with the emulation topic. And I'm sure there's another hardware that can be emulated at decent speed in JavaScript.

InI: In fact, I know no way to load binary datas only with JavaScript. The only way I see is to use a server side script that transforms the ROM into a JavaScript array of bytes. The implementation of Robert GAMBLE's emulator is tad special 'coz he chopped a bigger version ( with several games in an external JS file ) to make a 5K version.

Mathieu "POÏ" HENRI

[This message has been edited by poi (edited 05-25-2003).]

« BackwardsOnwards »

Show Forum Drop Down Menu