/whynes

“... but your scientists were so preoccupied with whether or not they could that they didn’t stop to think if they should.”

Primary LanguagePythonMIT LicenseMIT

🕹️whynes

A Nintendo Entertainment System emulator written in python.

(pssst... it's not finished yet)

Why ?

Why not. This is a project designed as an educational experiment so I can do two things:

  • learn how to emulate hardware in software.
  • use that knowledge to then learn other languages.

I know python pretty well - I've been using it professionally for (insert flex) years and a I'm pretty comfortable with it (no error; good program).

I've always wanted to learn how to write an emulator, but I don't know other more suitable languages to do that in - so I thought why not just write one in python. Is writing a emulator in python a good idea ? No.

Then I can implement the same emulator in other languages and bing bong boom I've become a giga-polyglot-chad programmer.

Rules

  1. When Mario can jump, I've finished.

Snake (Bonus)

I needed a way to confirm my implementation of the CPU was correct, so I found a snake game written in 6502 assembly and given the instructions here, I implemented a snake game using PyGame (SDL) and pyinput for controls and the CPU implementation.

pip install .[dev]  # install all the dependencies including dev P.S. on zsh surround '.[dev]' quotes
python3 src/snake.py

Resources

Nesdev Wiki

Online Assembler/Dissembler

Instruction Set Manual

Writing NES Emulator in Rust

Related Memes