@@ -43,63 +43,25 @@ Release notes
43
43
Installation
44
44
-----------
45
45
46
- Just use pip. It will give you a "pynes" command.
46
+ Clone this repo into your computer, then:
47
47
48
- .. code-block :: bash
48
+ .. code-block :: shell
49
49
50
- pip install pyNES
50
+ cd pyNES
51
+ python setup.py install
51
52
52
53
53
- Hello, world
54
+ Examples
54
55
------------
55
56
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:
83
58
84
59
.. code-block :: shell
85
60
86
- pynes py hello .py -o hello .nes
61
+ pynes py example_file_name .py -o whatever .nes
87
62
88
63
Now you can open hello.nes
89
64
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
-
103
65
[1] Read "That's not all" at the end
104
66
105
67
0 commit comments