top | item 40840599

Python programming for Nintendo 8 bits (2018)

103 points| raytopia | 1 year ago |github.com | reply

25 comments

order
[+] Retr0id|1 year ago|reply
Ooh, I wasn't aware of this, but I recently wrote something conceptually similar (albeit slightly lower-level - it's more of a "macro assembler with python syntax"):

https://github.com/DavidBuchanan314/p65a

It needs a bit of a refactor, and there aren't any docs except for my example code (which is a serial bootloader, complete with crc checks, for my SBC)

Looking closer at OP, it uses AST introspection to do its magic, whereas mine just uses operator overload hacks.

[+] freedomben|1 year ago|reply
Kind of off topic, but it's a real shame that Nintendo is so aggressively proprietary and litigious. If you read the (excellent) book "Super Mario: How Nintendo Conquered America" by Jeff Ryan, you'll see that Nintendo is that to its core and always has been, so I don't expect a change. But it's one of the big tragedies of the world IMHO.
[+] mywittyname|1 year ago|reply
So is Disney and Apple.

Nintendo can't use strategies like IBM or Google to keep their revenue flowing. Aggressively protecting their IP and preventing people from distributing information on piracy is how they protect their business.

For as large and old as Nintendo is, a bad decade could crush them.

[+] sircastor|1 year ago|reply
I think a lot of gaming and computer companies were like this, especially early on. If you read Console Wars (about Sega during the 3rd generation of consoles) you run into loads of aggressive practices while they all try to build out their market dominance.
[+] vunderba|1 year ago|reply
You're not wrong, but most companies that achieve critical success eventually become rather protective of their IP.

I wouldn't be so hyperbolic as to call it a tragedy of the world, it's just kind of a shame.

I mean, read up on the history of Activision and how they got started. Atari did everything they could to stop them from producing cartridges for the 2600.

[+] cacois|1 year ago|reply
I'm very interested in this topic, but currently ignorant enough about NES game dev to make this repo fairly cryptic. Is there anyone here with more knowledge that can explain what exactly this does (more deeply than "enable writing NES games in Python, kind of"), and how it compares to other tooling out there?
[+] immibis|1 year ago|reply
Looks like it compiles a subset of python code into NES assembly code.
[+] 1stub|1 year ago|reply
This is fricken awesome. Wish I understood more about NES game dev to make some sense of this repo but that is likely the point of this project :)
[+] sircastor|1 year ago|reply
I wrote an NES game in 6502 assembly back in 2020. It was a school capstone project and I intentionally wanted to do it “close to the metal”. Outside of that I had seen some people writing NES games in C++, but had heard that it compiled pretty inefficiently. I’m pleased to see projects like this because even if it is a higher level language, it’s important to learn to operate in constrained environments. And it brings more folks into the NES homebrew scene.
[+] medguru|1 year ago|reply
If I learned anything from fighting with MicroPython on far more powerful "limited environments" it would be that this is just a curious study, not a feasible choice.
[+] Retr0id|1 year ago|reply
This isn't MicroPython though, and it's not similar either.
[+] vsuperpower2021|1 year ago|reply
I kept thinking to myself, someone really should design a language that compiles down to ASM so we don't have to write it by hand. Finally.
[+] buescher|1 year ago|reply
Compilers for the 6502 are tricky, because of its limitations and idiosyncracies. There was a well-received port of a language called Micro-SPL to the 6502 for the Atari 8-bit computers called Action!. The original incarnation of Micro-SPL, on the Xerox Alto, compiled to Alto microcode.
[+] 1234554321a|1 year ago|reply
Don’t tell this guy about the thing that Ritchie made in 1972.