gutomaia / pynes Goto Github PK
View Code? Open in Web Editor NEWPython programming for Nintendo 8 bits
License: BSD 3-Clause "New" or "Revised" License
Python programming for Nintendo 8 bits
License: BSD 3-Clause "New" or "Revised" License
I write commands:
$ git clone https://github.com/gutomaia/pyNES
$ cd pyNES/
$ python3 setup.py install
$ pynes py pynes/examples/helloworld.py -o helloworld.nes
Output:
Traceback (most recent call last):
File "/usr/local/bin/pynes", line 4, in <module>
__import__('pkg_resources').run_script('pyNES==0.0.2', 'pynes')
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 667, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1463, in run_script
exec(code, namespace, namespace)
File "/usr/local/lib/python3.8/dist-packages/pyNES-0.0.2-py3.8.egg/EGG-INFO/scripts/pynes", line 7, in <module>
main(sys.argv)
File "/usr/local/lib/python3.8/dist-packages/pyNES-0.0.2-py3.8.egg/pynes/__init__.py", line 82, in main
args.func(args)
File "/usr/local/lib/python3.8/dist-packages/pyNES-0.0.2-py3.8.egg/pynes/__init__.py", line 86, in exec_py
pynes.composer.compose_file(args.input, output=args.output,
File "/usr/local/lib/python3.8/dist-packages/pyNES-0.0.2-py3.8.egg/pynes/composer.py", line 327, in compose_file
game = compose(code)
File "/usr/local/lib/python3.8/dist-packages/pyNES-0.0.2-py3.8.egg/pynes/composer.py", line 345, in compose
builder.visit(python_land)
File "/usr/lib/python3.8/ast.py", line 363, in visit
return visitor(node)
File "/usr/lib/python3.8/ast.py", line 439, in generic_visit
value = self.visit(value)
File "/usr/lib/python3.8/ast.py", line 363, in visit
return visitor(node)
File "/usr/lib/python3.8/ast.py", line 448, in generic_visit
new_node = self.visit(old_value)
File "/usr/lib/python3.8/ast.py", line 363, in visit
return visitor(node)
File "/usr/local/lib/python3.8/dist-packages/pyNES-0.0.2-py3.8.egg/pynes/composer.py", line 57, in visit_List
expr = self.generic_visit(node)
File "/usr/lib/python3.8/ast.py", line 439, in generic_visit
value = self.visit(value)
File "/usr/lib/python3.8/ast.py", line 363, in visit
return visitor(node)
File "/usr/lib/python3.8/ast.py", line 393, in visit_Constant
return visitor(node)
File "/usr/local/lib/python3.8/dist-packages/pyNES-0.0.2-py3.8.egg/pynes/composer.py", line 54, in visit_Num
return Num(NesInt(node.n))
NameError: name 'Num' is not defined
Can anyone help me?
Python version: 3.8.5
i think that the examples are far not enough for figuring out the potential of pyNES, like developing more complex code, like what we can do on Boriel’s ZXBasic Compiler - where from can we find these examples? and would be great if this github account could host such examples as well - and thanks in advance! :)
Improve the NSIS instaler with:
Associate the .asm file to pynes.exe command on the local folder. The expected behavior should be. When the user has a folder with the whole asm project, when double clicks on the main.asm file, a new main.nes file should appear.
When the project is listed on Python Index (pypi), usually it does have a small description. That usually come when refering the README.rst in setup.py and adding the file to wheel package.
We need docs, really!
PIL as a graphic library is outdated and doomed. I should use Pillow from the beguining.
Sprite library uses PIL to import/export sprites from JPEG. However, PIL is outdated, we need to move on to Pillow. Basically, the change on library should only affect sprite tests.
Start a new branch 0.1.x and clean-up the spikes and loose loops from the first one
Olá Guto, tudo bem?
Gostei muito do PyNES, é uma idéia sensacional e ficou muito bom o SDK kit.
Recentemente, eu estava pensando em uma idéia semelhante só que para Mega Drive, visto que existem outras SDKS para a plataforma mas em linguagens muito travadas como C ou BASIC. Atualmente prefiro fazer em puro assembly m68k do que usar elas.
Sem mais rodeios, gostaria de saber se tenho sua permissão para desenvolver baseado no PyNES, uma sdk para o Mega Drive.
Aguardo sua autorização, obrigado!
can a new project, like combining pyNES and Boriel’s ZXBasic Compiler, or extending Boriel’s ZXBasic Compiler with 6502 support based on pyNES code and documentation, be a start to something interesting?
Support for Python 3 is a must have, especially if you intent to use pyNES in a Raspberry PI. It came with Python 3 as a standard!
Actually pyNES deal with the process of compiling (lexical, syntax, semantic) in a serial form. I mean, I think, we will increase the performance and also the readable intention of the code if we use iterators.
That is an outstanding task, you will deal with the main spine of pyNES, however, there is nothing to be worried about that, the test coverage will guide you before any detour. Use them, "use the force Luke". Any doubt just ask.
If you are not sure how iterators work on python take a look on @ramalho presentation about it
https://speakerdeck.com/ramalho/iterators-and-generators-the-python-way
http://pyvideo.org/video/1709/iteration-generators-the-python-way
Goal:
ATTENTION:
Nowadays, every project have Badges on their README.
Must have badges:
The sentence before the waitvblank function example is incomplete:
"Hi Level Functions are not templated anymore. However, th"
looks like it was cut off.
Improve test coverage to 96% without cheating. It's a very serious task!
Use coveralls as a reference[1] .
Try to port some CC65 examples to pyNES.
http://shiru.untergrund.net/files/src/cc65_nes_examples.zip
https://www.youtube.com/watch?t=5&v=jvgz5sY5xUw
-- Disclamer --
Right now, it's not possible. Some examples deals with some of the pyNES limitations. I think, with 0.2.0 that would be possible
Sugestion by @klaussilveira
Here's what i got:
C:\Users\smart>pynes
'pynes' is not recognized as an internal or external command, operable program or batch file.
Although there are options in the commandline for the image/nametable features, they are not connected any code.
Goal:
In local docs, pynes.lib docs were show, however, on remote readthedocs, it was not shown.
Travis is breaking tests 'cause of the lack of PIL PNG on PIP.
Witch could be called the 3P problem (3Ps with 3 letters each, that is just Pain Phuck Parody).
Anyway. Just someone that could fix this:
91 --------------------------------------------------------------------
92 PIL 1.1.7 SETUP SUMMARY
93 --------------------------------------------------------------------
94 version 1.1.7
95 platform linux2 2.7.3 (default, Aug 1 2012, 05:16:07)
96 [GCC 4.6.3]
97 --------------------------------------------------------------------
98 *** TKINTER support not available
99 --- JPEG support available
100 *** ZLIB (PNG/ZIP) support not available
101 *** FREETYPE2 support not available
102 *** LITTLECMS support not available
103 --------------------------------------------------------------------
104
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.
I tried an hour, it still not work~
Create a basic doc for the composer module.
Doc must explain:
At the command line when calls: "pynes asm example.asm -o example.nes", you receive an ugly stack trace on the file doesn't exists. User must receive a better error handle in that case.
can you help me i got this error :
Traceback (most recent call last):
File "C:/Users/User/PycharmProjects/marioNES/source.py", line 6, in
pynes.press_start()
File "C:\Python34\lib\site-packages\pynes__init__.py", line 18, in press_start
game = compose(code)
File "C:\Python34\lib\site-packages\pynes\composer.py", line 348, in compose
turist.visit(python_land)
File "C:\Python34\lib\ast.py", line 245, in visit
return visitor(node)
File "C:\Python34\lib\site-packages\pynes\composer.py", line 101, in generic_visit
self.visit(item)
File "C:\Python34\lib\ast.py", line 245, in visit
return visitor(node)
File "C:\Python34\lib\site-packages\pynes\composer.py", line 178, in visit_Assign
self.generic_visit(node)
File "C:\Python34\lib\site-packages\pynes\composer.py", line 103, in generic_visit
self.visit(value)
File "C:\Python34\lib\ast.py", line 245, in visit
return visitor(node)
File "C:\Python34\lib\site-packages\pynes\composer.py", line 245, in visit_Call
self.generic_visit(node.args)
File "C:\Python34\lib\site-packages\pynes\composer.py", line 90, in generic_visit
self.visit(n)
File "C:\Python34\lib\ast.py", line 245, in visit
return visitor(node)
File "C:\Python34\lib\site-packages\pynes\composer.py", line 293, in visit_Str
self.stack(NesString(node.s))
File "C:\Python34\lib\site-packages\pynes\nes_types.py", line 112, in init
str.init(self, string)
TypeError: object.init() takes no parameters
Is there any documentation? The docs
link currently directs here
Updated:
TODO to fullfill this issue!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.