Skip to content

Commit ed7b800

Browse files
author
jmunoz
committed
Fixed README and satisfying dependencies
1 parent 5f6078c commit ed7b800

File tree

3 files changed

+7
-45
lines changed

3 files changed

+7
-45
lines changed

README.rst

+7-45
Original file line numberDiff line numberDiff line change
@@ -43,63 +43,25 @@ Release notes
4343
Installation
4444
-----------
4545

46-
Just use pip. It will give you a "pynes" command.
46+
Clone this repo into your computer, then:
4747

48-
.. code-block:: bash
48+
.. code-block:: shell
4949
50-
pip install pyNES
50+
cd pyNES
51+
python setup.py install
5152
5253
53-
Hello, world
54+
Examples
5455
------------
5556

56-
A simple "Hello, world" example. Given the example "hello.py"
57-
58-
.. code-block:: python
59-
60-
61-
import pynes
62-
from pynes.bitbag import *
63-
64-
palette = [
65-
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
66-
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
67-
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
68-
]
69-
70-
chr_asset = import_chr('player.chr')
71-
72-
sprite = define_sprite(128, 128, 0, 3)
73-
74-
def reset():
75-
global palette, sprite
76-
wait_vblank()
77-
clearmem()
78-
wait_vblank()
79-
load_palette(palette)
80-
load_sprite(sprite, 0)
81-
82-
Compile it with:
57+
Inside ``pynes/examples`` you'll find a set of examples. Compile them with:
8358

8459
.. code-block:: shell
8560
86-
pynes py hello.py -o hello.nes
61+
pynes py example_file_name.py -o whatever.nes
8762
8863
Now you can open hello.nes
8964

90-
91-
**How does it work?**
92-
93-
94-
In the above example, ``palette``, ``chr_asset`` and ``sprite`` are constants.
95-
Each one has their own properties, since they are equally evaluated.
96-
* ``palette`` is an int array. Int Arrays are static, and can't be changed.
97-
* ``chr_asset`` Are reading structures.
98-
* ``sprite`` is the sprite definition.
99-
100-
Functions are provided by bitbag package. Bitbag deals with templating[1] and some surrounding aspects needed by the asm code.
101-
102-
10365
[1] Read "That's not all" at the end
10466

10567

pynes/examples/mario.chr

8 KB
Binary file not shown.

pynes/examples/player.chr

8 KB
Binary file not shown.

0 commit comments

Comments
 (0)