Programming for the NES with JS

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Programming for the NES with JS
by on (#203063)
Anyone heard about this : https://www.youtube.com/watch?v=D9ZbqnffS7c ?!
Re: Programming for the NES with JS
by on (#203065)
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.
Re: Programming for the NES with JS
by on (#203085)
wow JS really is the new JAVA... why just why?
Re: Programming for the NES with JS
by on (#203105)
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.
Re: Programming for the NES with JS
by on (#203110)
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.
Re: Programming for the NES with JS
by on (#203111)
glutock wrote:
Anyone heard about this : https://www.youtube.com/watch?v=D9ZbqnffS7c ?!

Is it you talking here ?
Re: Programming for the NES with JS
by on (#203132)
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
Re: Programming for the NES with JS
by on (#203140)
PyNES is a wrapper for pre-written asm functions, though it has a built-in assembler, which is kinda neat.
Re: Programming for the NES with JS
by on (#203143)
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 ...
Re: Programming for the NES with JS
by on (#203152)
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.
Re: Programming for the NES with JS
by on (#203153)
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.
Re: Programming for the NES with JS
by on (#203221)
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 ?
Re: Programming for the NES with JS
by on (#203353)
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.