gutomaia / pyNES

Python programming for Nintendo 8 bits
BSD 3-Clause "New" or "Revised" License
1.22k stars 109 forks source link

command line and readme broken #35

Open dstitt opened 8 years ago

dstitt commented 8 years ago

Can't get the readme example to work AND the output from the pynes executable isn't very helpful either.

here's the hello.py file I used:

import pynes
from pynes.bitbag import *

palette = [
    0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
    0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
    0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
]

chr_asset = import_chr('player.chr')

sprite = define_sprite(128, 128, 0, 3)

def reset():
    global palette, sprite
    wait_vblank()
    clearmem()
    wait_vblank()
    load_palette(palette)
    load_sprite(sprite, 0)

I grabbed a copy of player.chr from github then used this command line:

pynes -p hello.py -o hello.nes

unfortunately this doesn't work. It produces no error message other than an unhelpful help message. The tool runs though because it creates an empty hello.nes file.

so I'm stuck - I can't even get the basics working

any ideas?

I'm on mac os x 10.11.3. installed pynes using pip.

jmgaya commented 8 years ago

The problem is pip. Just follow the README instructions, clone the repo, and inside the pyNES directory, install it using the following command:

sudo python setup.py install