Programming for the NES with JS

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

Post Reply
User avatar
Broke Studio
Formerly glutock
Posts: 181
Joined: Sat Aug 15, 2015 3:42 pm
Location: France
Contact:

Programming for the NES with JS

Post by Broke Studio »

Anyone heard about this : https://www.youtube.com/watch?v=D9ZbqnffS7c ?!
My first game : Twin Dragons available at Broke Studio.
User avatar
dustmop
Posts: 136
Joined: Wed Oct 16, 2013 7:55 am

Re: Programming for the NES with JS

Post by dustmop »

Fritz is a really great guy! I'm in the audience for this talk, he even shouted out Star Versus at 11:40, which was super cool.
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: Programming for the NES with JS

Post by Oziphantom »

wow JS really is the new JAVA... why just why?
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Programming for the NES with JS

Post by Pokun »

Heh proof of concept.

Anyway nice presentation, too bad the NES didn't start. Spotted one mistake though:
He says in his presentation that the NTSC resolution is 256x224, which is incorrect as just discussed in another thread. Both NTSC and PAL PPUs always outputs the full 256x240 resolution.
User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2064
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: Programming for the NES with JS

Post by FrankenGraphics »

Hehe, that did point my ears too. I think he was confusing sprite patterns with background patterns at one point - easy mistake to do on a stage/in the heat of the moment.

Needing to preposition 0x for every byte looks very hard to read. I'd just type 0-255 if that'd work.
User avatar
Bregalad
Posts: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: Programming for the NES with JS

Post by Bregalad »

glutock wrote:Anyone heard about this : https://www.youtube.com/watch?v=D9ZbqnffS7c ?!
Is it you talking here ?
User avatar
GradualGames
Posts: 1106
Joined: Sun Nov 09, 2008 9:18 pm
Location: Pennsylvania, USA
Contact:

Re: Programming for the NES with JS

Post by GradualGames »

Reminds me of the pyNES guy, haha. It's funny how often co-workers find out I code for the NES and they forward me a video like this and they're like DUDE HAVE YOU HEARD OF THIS? YOU SHOULD TOTALLY USE THIS I BET YOU COULD MAKE GAMES FASTER No. Stop right there. I haven't and I don't care. I like assembly. So sue me. :D
strat
Posts: 409
Joined: Mon Apr 07, 2008 6:08 pm
Location: Missouri

Re: Programming for the NES with JS

Post by strat »

PyNES is a wrapper for pre-written asm functions, though it has a built-in assembler, which is kinda neat.
User avatar
Broke Studio
Formerly glutock
Posts: 181
Joined: Sat Aug 15, 2015 3:42 pm
Location: France
Contact:

Re: Programming for the NES with JS

Post by Broke Studio »

Bregalad wrote:
glutock wrote:Anyone heard about this : https://www.youtube.com/watch?v=D9ZbqnffS7c ?!
Is it you talking here ?
Nope. YouTube recommended this video for me. Huummm, strange:)
GradualGames wrote:Reminds me of the pyNES guy, haha. It's funny how often co-workers find out I code for the NES and they forward me a video like this and they're like DUDE HAVE YOU HEARD OF THIS? YOU SHOULD TOTALLY USE THIS I BET YOU COULD MAKE GAMES FASTER No. Stop right there. I haven't and I don't care. I like assembly. So sue me. :D
Don't get me wrong, I live coding in assembly for the NES, but I thought the idea of using JS for that was fun. And it seems to work. Well I guess you'll be quickly limited though ...
My first game : Twin Dragons available at Broke Studio.
User avatar
GradualGames
Posts: 1106
Joined: Sun Nov 09, 2008 9:18 pm
Location: Pennsylvania, USA
Contact:

Re: Programming for the NES with JS

Post by GradualGames »

glutock wrote: Don't get me wrong, I live coding in assembly for the NES, but I thought the idea of using JS for that was fun. And it seems to work. Well I guess you'll be quickly limited though ...
I guess I can see any number of these languages as being potentially a powerful preprocessor for assembly, that's basically what these things are I suppose. What's really interesting to me is observing which approaches actually become commonplace in the community. It seems like most of the high-level experiments with python, lisp, js, etc. remain mostly curiosities or only used by one or two people. Much like I might write a set of ca65 macros specific to how I do things that nobody else would want to use...

It seems that one so frequently must understand the low level details anyway that it is hard to imagine one of these high-level preprocessors providing enough more benefit than say CA65 macros that it would be worth abandoning current development tools.
User avatar
dougeff
Posts: 3079
Joined: Fri May 08, 2015 7:17 pm

Re: Programming for the NES with JS

Post by dougeff »

My thoughts on programming NES in JS =

1. Why?

2. Don't

Edit - I do think he did a good job at explaining NES development in 20 minutes. Describe the color and memory constraints, show a bunch of slides of actual games. He did repeat the incorrect "NTSC has only 224 pixels" line that I've seen many times.
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
Bregalad
Posts: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: Programming for the NES with JS

Post by Bregalad »

strat wrote:PyNES is a wrapper for pre-written asm functions, though it has a built-in assembler, which is kinda neat.
But what is the difference between that and uing the JSR opcode in assembly code ? As long as your functions are already programmed, code can be re-used this way, isn't it ?
strat
Posts: 409
Joined: Mon Apr 07, 2008 6:08 pm
Location: Missouri

Re: Programming for the NES with JS

Post by strat »

Well, you can supply the PyNES functions with parameters and it'll spit out modified asm code, so it might be good for quick prototyping or a demo. But it looks like you have to write more asm to extend the functionality, so its usefulness as a high-level solution is limited.
Post Reply