Giter Club home page Giter Club logo

cy_nes_emulator's Introduction

cy_NES_Emulator

Nes system in cython with joystick support. Tested on Windows 10 and Linux Ubuntu I don't see why it wouldn't work on macOS. This project was heavily inspired from javidx9 (https://www.youtube.com/@javidx9) so huge thanks to him.

Recommended Setup

I recommended you set this up in an anaconda enviorment. You can download it from here: https://www.anaconda.com/download. After downlaoding open an anaconda prompt and type:

conda create --name cy_NES_EMU_env python=3.9

Run through the setup procedure as prompted. Once complete enter

conda activate cy_NES_EMU_env

Navigate to the module directory

cd path/to/module/cy_NES_Emulator

Inside is a requirements file, install it as follows

pip install -r requirements.txt

Lastly, run the command

python setup.py build_ext --inplace

To compile the code.

All done! The module behaves exactly like any other python module.

Usage

Command Line

To use cy_NES_Emulator from the command line simply open the command line in the same directory as the cy_NES_Emulator folder and type the following

python cy_NES_Emulator

You will be prompted to choose the location of your rom file. You may also specity a path directly using

python cy_NES_Emulator -run "Super Mario Bros (E).nes"

Within Python file

Simply import as follows

from cy_NES_Emulator import NES

followed by these two lines

nes = NES("Super Mario Bros (E).nes")
nes.run()

Controls

The emulator has keyboard and joystick support. If you plug in another controller you can probably guess what the mapping will be.

NES controller Keyboard Xbox 360 controller PS3 controller
A x A โœ•
B z B โ—‹
SELECT a BACK SELECT
START s START START
UP up D-pad UP D-pad UP
DOWN down D-pad DOWN D-pad DOWN
LEFT left D-pad LEFT D-pad LEFT
RIGHT right D-pad RIGHT D-pad RIGHT

cy_nes_emulator's People

Contributors

michael-md avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.