This repository has been archived by the owner on Dec 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReadMe.txt
155 lines (119 loc) · 5.1 KB
/
ReadMe.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
=========================================
= nRGBlib for Ndless v3.1 for TI-Nspire =
=========================================
nRGBlib v0.3
What is it ?
============
nRGBlib is a librairy which contains basic displaying routines for TI-Nspire.
It needs to work Ndless 3.1. It allows you to draw multiple shapes in color and
easily allowing the user not to waste time on the creation of these basic functions.
nRGBlib can be used on 4 bpp Nspire (ClickPad, TouchPad) and on 16 bpp Nspire (CX, CM).
Executables created with nRGBlib can be used on any Nspire without rebuilding.
nRGBlib allows to use the screen in 4bpp on CX.
The official Mercurial repository is available at:
https://bitbucket.org/totorigolo/nrgblib
What are the features of nRGBlib?
=============================================
nRGBlib is organized into several modules. In addition to static compilation, this allows
use only the modules relevant to the project to develop, and avoid needlessly executable.
For the moment, nRGBlib is organized as follows:
nCOMMON:
- Color, RGB <-> BW conversion, precomputed colors.
- Screen buffer, creation, drawing, screen shootinh, clearing.
- setPixel(), clearScreen().
nGEO:
- Shapes: Discus, Circle, Line, Rectangle, Square, Triangle.
- Display functions of these shapes.
nTILE:
- Tile 8x8 in one color or in multicolors.
- Display functions of tiles.
-> Tiles are saved INSIDE of the program.
nIMAGE:
- Image, initializing, loading, drawing, getPixel().
- Sub-image, initializing, loading, drawing, getPixel().
-> Images are saved OUTSIDE of the program.
nGUI:
- Structures: Letter, Text.
- Display functions of these structures.
nMATHS:
- rand() and randMinMax() functions.
To be kept informed of progress and updates, here is the official topic:
- FR: http://tiplanet.org/forum/viewtopic.php?t=8597
- IN: http://www.omnimaga.org/index.php?topic=12134
What do I need to use nRGBlib?
==============================================
- A TI-Nspire CAS and non-CAS ClickPad, Touchpad or CX.
- The OS v3.1.0.
- Ndless 3.1 installed (the last version).
- A program for sending files to the calculator like TI-Nspire Student Software.
How to use nRGBlib?
==========================
Simple method:
1. Copy the headers in "C:/Users/<Votre nom>/.ndless/include" and the .a files
in "C:/Users/<Votre nom>/.ndless/lib".
2. Include <nRGBlib.h> in the program which use nRGBlib to access
to the entire library, or include only the headers you need.
3. Indicate to GCC where are the .a and .h files
4. Link "libRGB.a" to your project using the "-LRGB" to Nspire-gcc.
Complicated method:
1. Copy the headers and .a files in the directory of your wish.
2. Include <nRGBlib.h> in the program which use nRGBlib to access
to the entire library, or include only the headers you need.
3. Indicate to GCC where are the .a and .h files
4. Link "libRGB.a" to your project using the "-LRGB" to Nspire-gcc.
For 3 and 4, here is a sample Makefile:
#-- Only for the complicated method --
GCCFLAGS = -O3 -nostdlib -I"path/to/nRGBlib/sdk/include/"
LDFLAGS = -L "path/to/nRGBlib/sdk/lib/"
#---------------
GCC = nspire-gcc
LD = nspire-ld
OBJCOPY := "$(shell (which arm-elf-objcopy arm-none-eabi-objcopy arm-linux-gnueabi-objcopy | head -1) 2>/dev/null)"
ifeq (${OBJCOPY},"")
OBJCOPY := arm-none-eabi-objcopy
endif
OBJS = main.o bar.o -> One .o file for each .c file
DISTDIR = directory/for/the/tns/file
vpath %.tns $(DISTDIR)
all: <name_of_tns_file>.tns
%.o: %.c
$(GCC) $(GCCFLAGS) -c $<
%.o: %.S
$(GCC) $(GCCFLAGS) -c $<
<name_of_tns_file>.tns: $(OBJS)
$(LD) $(LDFLAGS) $^ -o $(@:.tns=.elf) -lRGB
@mkdir -p $(DISTDIR)
$(OBJCOPY) -O binary $(@:.tns=.elf) $(DISTDIR)/$@
clean:
rm -f *.o *.elf
rm -f $(DISTDIR)/<name_of_tns_file>.tns
#---------------
What about the compatibility between the Nspire?
================================================
- You can freely send files created with nRGBlib between
any Nspire is compatible as long as Ndless 3.1 is installed :)
Troubleshooting:
================
- Nothing yet
The official bug tracker is available at:
https://bitbucket.org/totorigolo/nrgblib/issues
Support and suggestions
=======================
- FR : http://tiplanet.org/forum/viewtopic.php?t=8597
- EN : http://www.omnimaga.org/index.php?topic=12134
Many thanks to:
================
ExtendeD (Ndless, help), Lionel Debroux (continual help), Goplat (his TI-Nspire
Emulator that allowed me to test more effectively), TI-Planet (data hosting,
active community for help), and those I forgot :)
Creator and main developper:
============================
Thomas Lacroix aka totorigolo - toto.rigolo@free.fr
Legal stuff:
============
Most of the work is covered by the Mozilla Public License, version 2.0 (MPL).
Please read careful the file "Mozilla-Public-License-v1.1.html" before
distributing of any part of Ndless, with or without modification.
Some parts are covered by other licenses. Others are in the public domain. These
parts are identified by the files LICENSE.txt or LICENSE.html in the sub-
directory.