NHacker Next
login
▲NESFab – A new programming language for creating NES gamespubby.games
219 points by redbell 145 days ago | 23 comments
Loading comments...
breckinloggins 142 days ago [-]
When I was a kid in the 80s and early 90s I was fascinated with the process of making video games for my favorite console. But back then I didn’t really know how to research that topic (and much of it - unbeknownst to me - was behind NDA anyway).

One day I asked my friend if he knew how these games were programmed. He confidently claimed that they were made in a top secret tool called NPL - The Nintendo Programming Language.

Of course that kid didn’t know anything more about it than I did so this was just a wild rumor. Now I know that “NPL” was just 6502 assembly with the correct system documentation and some dev hardware, but kid me didn’t know that. Instead, he spent a lot of time dreaming up what this super secret language looked like.

When I checked out NESFab today I instantly saw something that looked very much like what 7 - 9 year old me would have imagined. So thanks for that.

ForHackernews 136 days ago [-]
I think he was eventually sued into taking it all down, but the custom devkit work Brian Provinciano did in order to create his own GTA port for the NES was incredible: https://web.archive.org/web/20070125130745/http://www.bripro...
jkestner 139 days ago [-]
One of my favorite Kickstarters was for a new NES game, because the updates were deep dives into different aspects of NES development and the tradeoffs on that hardware. https://www.kickstarter.com/projects/1101008925/lizard/posts
TriedWharf 142 days ago [-]
For me, it was the same but with the game boy. Turns out no-one knew the name of it. For some reason.
pubby 142 days ago [-]
Hey, this is my project. Cool to see it here again.

You might like this article I wrote on the backend: https://pubby.games/codegen.html

asfasfds 142 days ago [-]
Nice read, thanks for the link!
namuol 142 days ago [-]
I often wonder what sort of tools like this must have existed in-house at the many small game development studios of the era.

This one reminds me of another modern compiler for the Intellivision console called INTYBasic, which has an extremely impressive suite of games and NES remakes implemented in it:

https://nanochess.org/intybasic.html

https://youtu.be/h7ttNz2UVw8

For something even higher level check out GBStudio:

https://www.gbstudio.dev/

chrismaltby 142 days ago [-]
Nice to see GB Studio get a mention, I’m still working away at it after many years! Definitely going to be checking out NESFab to see what I can learn from it.

There’s also been a fork recently called BB Studio adapting it to make NES games:

https://github.com/michel-iwaniec/bb-studio

namuol 142 days ago [-]
Oh wow, it’s exciting to see the same idea catching on for other platforms. And thank you so much for sharing your hard work - I’m loving the huge new influx of GB(C) games thanks to the community that sprung up around your project!
pvg 145 days ago [-]
Show HN a couple of years ago https://news.ycombinator.com/item?id=35055308
snvzz 144 days ago [-]
The code is GPLv3: https://github.com/pubby/nesfab/blob/master/COPYING

While software made using this SDK can be any license, as stated in the readme:

>TL;DR: If you make a game using NESFab, your code can remain private, and you do not need to include attribution in your binary release.

rvnx 142 days ago [-]
It means it is actually LGPL in practice then ?
mijoharas 142 days ago [-]
To clarify, the _compiler_ is GPL (as is GCC, GPL doesn't mean that artefacts created with it share that license), but the standard library is the boost software license (which is not a copyleft library) so any machine code artefacts can remain private and doesn't require attribution.

[0] The NESFab standard library (lib/), examples (examples/), and documentation (doc/) are licensed under the Boost Software License 1.0 (See lib/LICENSE_1_0.txt).

qwery 142 days ago [-]
No. The (GPL) license doesn't "infect" the output of the (GPL) software.
colejohnson66 142 days ago [-]
But it does infect if some "standard library" is injected into the output. This is why glibc has a "linking exception".
djmips 145 days ago [-]
I've been using this and it's a lot of fun
jkosoy 142 days ago [-]
+1. It’s a lot of fun, it makes 6502 more approachable and it’s deeply satisfying. I’ve been making a game with my daughter.
atan2 142 days ago [-]
I just finished Gustavo Pezzi's NES course last year (https://pikuma.com/courses/nes-game-programming-tutorial). It was excellent and it gave me some great insights to how things work inside the NES using 6502. This looks a lot simpler. I'll take a look. :)
gustavopezzi 142 days ago [-]
Hi there. I'm glad you enjoyed the NES module. :)
agentultra 142 days ago [-]
Oh this is cool. One of my back-burner projects is a compiler targeting the 6502 specifically for NES development. This looks super nifty.
999900000999 142 days ago [-]
Would love this for GBA instead. Something about that system is so perfectly limiting.
TriedWharf 142 days ago [-]
The SNES probably has tools like this, and a GBA is pretty similar limitation-wise to a SNES.
b3ing 142 days ago [-]
Maybe someday you will be able code in c or whatever language and have AI convert the entire codebase to assembly in 15 seconds.