├── .gitattributes
├── .github
└── FUNDING.yml
├── .gitignore
├── CMakeLists.txt
├── LICENSE.txt
├── font.h
├── main.c
├── remaPSV.yml
├── renderer.c
└── renderer.h
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | patreon: Rinnegatamante
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows image file caches
2 | Thumbs.db
3 | ehthumbs.db
4 |
5 | # Folder config file
6 | Desktop.ini
7 |
8 | # Recycle Bin used on file shares
9 | $RECYCLE.BIN/
10 |
11 | # Windows Installer files
12 | *.cab
13 | *.msi
14 | *.msm
15 | *.msp
16 |
17 | # Windows shortcuts
18 | *.lnk
19 |
20 | # =========================
21 | # Operating System Files
22 | # =========================
23 |
24 | # OSX
25 | # =========================
26 |
27 | .DS_Store
28 | .AppleDouble
29 | .LSOverride
30 |
31 | # Thumbnails
32 | ._*
33 |
34 | # Files that might appear in the root of a volume
35 | .DocumentRevisions-V100
36 | .fseventsd
37 | .Spotlight-V100
38 | .TemporaryItems
39 | .Trashes
40 | .VolumeIcon.icns
41 |
42 | # Directories potentially created on remote AFP share
43 | .AppleDB
44 | .AppleDesktop
45 | Network Trash Folder
46 | Temporary Items
47 | .apdisk
48 |
49 | build/*
--------------------------------------------------------------------------------
/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 2.8)
2 |
3 | if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
4 | if(DEFINED ENV{VITASDK})
5 | set(CMAKE_TOOLCHAIN_FILE "$ENV{VITASDK}/share/vita.toolchain.cmake" CACHE PATH "toolchain file")
6 | else()
7 | message(FATAL_ERROR "Please define VITASDK to point to your SDK path!")
8 | endif()
9 | endif()
10 |
11 | project(TurboPad)
12 | include("${VITASDK}/share/vita.cmake" REQUIRED)
13 |
14 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,-q -Wall -O3 -std=gnu99")
15 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions")
16 |
17 | include_directories(
18 | )
19 |
20 | link_directories(
21 | ${CMAKE_CURRENT_BINARY_DIR}
22 | )
23 |
24 | add_definitions(-DRELEASE)
25 |
26 | add_executable(remaPSV
27 | main.c
28 | renderer.c
29 | )
30 |
31 | target_link_libraries(remaPSV
32 | taihen_stub
33 | SceLibKernel_stub_weak
34 | SceCtrl_stub_weak
35 | SceIofilemgr_stub_weak
36 | SceAppMgr_stub_weak
37 | SceTouch_stub_weak
38 | SceDisplay_stub_weak
39 | SceSysmem_stub_weak
40 | SceMotion_stub
41 | k
42 | gcc
43 | )
44 |
45 | set_target_properties(remaPSV
46 | PROPERTIES LINK_FLAGS "-nostdlib"
47 | )
48 |
49 | vita_create_self(remaPSV.suprx remaPSV
50 | CONFIG ${CMAKE_SOURCE_DIR}/remaPSV.yml
51 | )
52 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/font.h:
--------------------------------------------------------------------------------
1 | //---------------------------------------------------------------------------------
2 | // Linux 6x10 font
3 | // https://github.com/torvalds/linux/tree/master/lib/fonts
4 | //---------------------------------------------------------------------------------
5 | #define FONT_WIDTH 6
6 | #define FONT_HEIGHT 10
7 | //---------------------------------------------------------------------------------
8 | static const unsigned char font[] = {
9 |
10 | /* 0 0x00 '^@' */
11 | 0x00, /* 00000000 */
12 | 0x00, /* 00000000 */
13 | 0x00, /* 00000000 */
14 | 0x00, /* 00000000 */
15 | 0x00, /* 00000000 */
16 | 0x00, /* 00000000 */
17 | 0x00, /* 00000000 */
18 | 0x00, /* 00000000 */
19 | 0x00, /* 00000000 */
20 | 0x00, /* 00000000 */
21 |
22 | /* 1 0x01 '^A' */
23 | 0x00, /* 00000000 */
24 | 0x78, /* 01111000 */
25 | 0x84, /* 10000100 */
26 | 0xCC, /* 11001100 */
27 | 0x84, /* 10000100 */
28 | 0xCC, /* 11001100 */
29 | 0xB4, /* 10110100 */
30 | 0x78, /* 01111000 */
31 | 0x00, /* 00000000 */
32 | 0x00, /* 00000000 */
33 |
34 | /* 2 0x02 '^B' */
35 | 0x00, /* 00000000 */
36 | 0x78, /* 01111000 */
37 | 0xFC, /* 11111100 */
38 | 0xB4, /* 10110100 */
39 | 0xFC, /* 11111100 */
40 | 0xB4, /* 10110100 */
41 | 0xCC, /* 11001100 */
42 | 0x78, /* 01111000 */
43 | 0x00, /* 00000000 */
44 | 0x00, /* 00000000 */
45 |
46 | /* 3 0x03 '^C' */
47 | 0x00, /* 00000000 */
48 | 0x00, /* 00000000 */
49 | 0x28, /* 00101000 */
50 | 0x7C, /* 01111100 */
51 | 0x7C, /* 01111100 */
52 | 0x38, /* 00111000 */
53 | 0x10, /* 00010000 */
54 | 0x00, /* 00000000 */
55 | 0x00, /* 00000000 */
56 | 0x00, /* 00000000 */
57 |
58 | /* 4 0x04 '^D' */
59 | 0x00, /* 00000000 */
60 | 0x00, /* 00000000 */
61 | 0x10, /* 00010000 */
62 | 0x38, /* 00111000 */
63 | 0x7C, /* 01111100 */
64 | 0x38, /* 00111000 */
65 | 0x10, /* 00010000 */
66 | 0x00, /* 00000000 */
67 | 0x00, /* 00000000 */
68 | 0x00, /* 00000000 */
69 |
70 | /* 5 0x05 '^E' */
71 | 0x00, /* 00000000 */
72 | 0x00, /* 00000000 */
73 | 0x38, /* 00111000 */
74 | 0x38, /* 00111000 */
75 | 0x6C, /* 01101100 */
76 | 0x6C, /* 01101100 */
77 | 0x10, /* 00010000 */
78 | 0x38, /* 00111000 */
79 | 0x00, /* 00000000 */
80 | 0x00, /* 00000000 */
81 |
82 | /* 6 0x06 '^F' */
83 | 0x00, /* 00000000 */
84 | 0x00, /* 00000000 */
85 | 0x10, /* 00010000 */
86 | 0x38, /* 00111000 */
87 | 0x7C, /* 01111100 */
88 | 0x7C, /* 01111100 */
89 | 0x10, /* 00010000 */
90 | 0x38, /* 00111000 */
91 | 0x00, /* 00000000 */
92 | 0x00, /* 00000000 */
93 |
94 | /* 7 0x07 '^G' */
95 | 0x00, /* 00000000 */
96 | 0x00, /* 00000000 */
97 | 0x00, /* 00000000 */
98 | 0x30, /* 00110000 */
99 | 0x78, /* 01111000 */
100 | 0x30, /* 00110000 */
101 | 0x00, /* 00000000 */
102 | 0x00, /* 00000000 */
103 | 0x00, /* 00000000 */
104 | 0x00, /* 00000000 */
105 |
106 | /* 8 0x08 '^H' */
107 | 0xFC, /* 11111100 */
108 | 0xFC, /* 11111100 */
109 | 0xFC, /* 11111100 */
110 | 0xCC, /* 11001100 */
111 | 0x84, /* 10000100 */
112 | 0xCC, /* 11001100 */
113 | 0xFC, /* 11111100 */
114 | 0xFC, /* 11111100 */
115 | 0xFC, /* 11111100 */
116 | 0xFC, /* 11111100 */
117 |
118 | /* 9 0x09 '^I' */
119 | 0x00, /* 00000000 */
120 | 0x00, /* 00000000 */
121 | 0x30, /* 00110000 */
122 | 0x48, /* 01001000 */
123 | 0x84, /* 10000100 */
124 | 0x48, /* 01001000 */
125 | 0x30, /* 00110000 */
126 | 0x00, /* 00000000 */
127 | 0x00, /* 00000000 */
128 | 0x00, /* 00000000 */
129 |
130 | /* 10 0x0A '^J' */
131 | 0xFC, /* 11111100 */
132 | 0xFC, /* 11111100 */
133 | 0xCC, /* 11001100 */
134 | 0xB4, /* 10110100 */
135 | 0x78, /* 01111000 */
136 | 0xB4, /* 10110100 */
137 | 0xCC, /* 11001100 */
138 | 0xFC, /* 11111100 */
139 | 0xFC, /* 11111100 */
140 | 0xFC, /* 11111100 */
141 |
142 | /* 11 0x0B '^K' */
143 | 0x00, /* 00000000 */
144 | 0x3C, /* 00111100 */
145 | 0x14, /* 00010100 */
146 | 0x20, /* 00100000 */
147 | 0x78, /* 01111000 */
148 | 0x44, /* 01000100 */
149 | 0x44, /* 01000100 */
150 | 0x38, /* 00111000 */
151 | 0x00, /* 00000000 */
152 | 0x00, /* 00000000 */
153 |
154 | /* 12 0x0C '^L' */
155 | 0x00, /* 00000000 */
156 | 0x38, /* 00111000 */
157 | 0x44, /* 01000100 */
158 | 0x44, /* 01000100 */
159 | 0x38, /* 00111000 */
160 | 0x10, /* 00010000 */
161 | 0x38, /* 00111000 */
162 | 0x10, /* 00010000 */
163 | 0x00, /* 00000000 */
164 | 0x00, /* 00000000 */
165 |
166 | /* 13 0x0D '^M' */
167 | 0x00, /* 00000000 */
168 | 0x18, /* 00011000 */
169 | 0x14, /* 00010100 */
170 | 0x14, /* 00010100 */
171 | 0x10, /* 00010000 */
172 | 0x10, /* 00010000 */
173 | 0x70, /* 01110000 */
174 | 0x60, /* 01100000 */
175 | 0x00, /* 00000000 */
176 | 0x00, /* 00000000 */
177 |
178 | /* 14 0x0E '^N' */
179 | 0x00, /* 00000000 */
180 | 0x3C, /* 00111100 */
181 | 0x24, /* 00100100 */
182 | 0x3C, /* 00111100 */
183 | 0x24, /* 00100100 */
184 | 0x24, /* 00100100 */
185 | 0x6C, /* 01101100 */
186 | 0x6C, /* 01101100 */
187 | 0x00, /* 00000000 */
188 | 0x00, /* 00000000 */
189 |
190 | /* 15 0x0F '^O' */
191 | 0x00, /* 00000000 */
192 | 0x10, /* 00010000 */
193 | 0x54, /* 01010100 */
194 | 0x38, /* 00111000 */
195 | 0x6C, /* 01101100 */
196 | 0x38, /* 00111000 */
197 | 0x54, /* 01010100 */
198 | 0x10, /* 00010000 */
199 | 0x00, /* 00000000 */
200 | 0x00, /* 00000000 */
201 |
202 | /* 16 0x10 '^P' */
203 | 0x00, /* 00000000 */
204 | 0x40, /* 01000000 */
205 | 0x60, /* 01100000 */
206 | 0x70, /* 01110000 */
207 | 0x78, /* 01111000 */
208 | 0x70, /* 01110000 */
209 | 0x60, /* 01100000 */
210 | 0x40, /* 01000000 */
211 | 0x00, /* 00000000 */
212 | 0x00, /* 00000000 */
213 |
214 | /* 17 0x11 '^Q' */
215 | 0x00, /* 00000000 */
216 | 0x04, /* 00000100 */
217 | 0x0C, /* 00001100 */
218 | 0x1C, /* 00011100 */
219 | 0x3C, /* 00111100 */
220 | 0x1C, /* 00011100 */
221 | 0x0C, /* 00001100 */
222 | 0x04, /* 00000100 */
223 | 0x00, /* 00000000 */
224 | 0x00, /* 00000000 */
225 |
226 | /* 18 0x12 '^R' */
227 | 0x00, /* 00000000 */
228 | 0x10, /* 00010000 */
229 | 0x38, /* 00111000 */
230 | 0x54, /* 01010100 */
231 | 0x10, /* 00010000 */
232 | 0x54, /* 01010100 */
233 | 0x38, /* 00111000 */
234 | 0x10, /* 00010000 */
235 | 0x00, /* 00000000 */
236 | 0x00, /* 00000000 */
237 |
238 | /* 19 0x13 '^S' */
239 | 0x00, /* 00000000 */
240 | 0x48, /* 01001000 */
241 | 0x48, /* 01001000 */
242 | 0x48, /* 01001000 */
243 | 0x48, /* 01001000 */
244 | 0x48, /* 01001000 */
245 | 0x00, /* 00000000 */
246 | 0x48, /* 01001000 */
247 | 0x00, /* 00000000 */
248 | 0x00, /* 00000000 */
249 |
250 | /* 20 0x14 '^T' */
251 | 0x3C, /* 00111100 */
252 | 0x54, /* 01010100 */
253 | 0x54, /* 01010100 */
254 | 0x54, /* 01010100 */
255 | 0x3C, /* 00111100 */
256 | 0x14, /* 00010100 */
257 | 0x14, /* 00010100 */
258 | 0x14, /* 00010100 */
259 | 0x00, /* 00000000 */
260 | 0x00, /* 00000000 */
261 |
262 | /* 21 0x15 '^U' */
263 | 0x38, /* 00111000 */
264 | 0x44, /* 01000100 */
265 | 0x20, /* 00100000 */
266 | 0x50, /* 01010000 */
267 | 0x48, /* 01001000 */
268 | 0x24, /* 00100100 */
269 | 0x14, /* 00010100 */
270 | 0x08, /* 00001000 */
271 | 0x44, /* 01000100 */
272 | 0x38, /* 00111000 */
273 |
274 | /* 22 0x16 '^V' */
275 | 0x00, /* 00000000 */
276 | 0x00, /* 00000000 */
277 | 0x00, /* 00000000 */
278 | 0x00, /* 00000000 */
279 | 0x00, /* 00000000 */
280 | 0xF8, /* 11111000 */
281 | 0xF8, /* 11111000 */
282 | 0xF8, /* 11111000 */
283 | 0x00, /* 00000000 */
284 | 0x00, /* 00000000 */
285 |
286 | /* 23 0x17 '^W' */
287 | 0x00, /* 00000000 */
288 | 0x10, /* 00010000 */
289 | 0x38, /* 00111000 */
290 | 0x54, /* 01010100 */
291 | 0x10, /* 00010000 */
292 | 0x54, /* 01010100 */
293 | 0x38, /* 00111000 */
294 | 0x10, /* 00010000 */
295 | 0x7C, /* 01111100 */
296 | 0x00, /* 00000000 */
297 |
298 | /* 24 0x18 '^X' */
299 | 0x00, /* 00000000 */
300 | 0x10, /* 00010000 */
301 | 0x38, /* 00111000 */
302 | 0x54, /* 01010100 */
303 | 0x10, /* 00010000 */
304 | 0x10, /* 00010000 */
305 | 0x10, /* 00010000 */
306 | 0x10, /* 00010000 */
307 | 0x00, /* 00000000 */
308 | 0x00, /* 00000000 */
309 |
310 | /* 25 0x19 '^Y' */
311 | 0x00, /* 00000000 */
312 | 0x10, /* 00010000 */
313 | 0x10, /* 00010000 */
314 | 0x10, /* 00010000 */
315 | 0x10, /* 00010000 */
316 | 0x54, /* 01010100 */
317 | 0x38, /* 00111000 */
318 | 0x10, /* 00010000 */
319 | 0x00, /* 00000000 */
320 | 0x00, /* 00000000 */
321 |
322 | /* 26 0x1A '^Z' */
323 | 0x00, /* 00000000 */
324 | 0x00, /* 00000000 */
325 | 0x10, /* 00010000 */
326 | 0x08, /* 00001000 */
327 | 0x7C, /* 01111100 */
328 | 0x08, /* 00001000 */
329 | 0x10, /* 00010000 */
330 | 0x00, /* 00000000 */
331 | 0x00, /* 00000000 */
332 | 0x00, /* 00000000 */
333 |
334 | /* 27 0x1B '^[' */
335 | 0x00, /* 00000000 */
336 | 0x00, /* 00000000 */
337 | 0x10, /* 00010000 */
338 | 0x20, /* 00100000 */
339 | 0x7C, /* 01111100 */
340 | 0x20, /* 00100000 */
341 | 0x10, /* 00010000 */
342 | 0x00, /* 00000000 */
343 | 0x00, /* 00000000 */
344 | 0x00, /* 00000000 */
345 |
346 | /* 28 0x1C '^\' */
347 | 0x00, /* 00000000 */
348 | 0x00, /* 00000000 */
349 | 0x00, /* 00000000 */
350 | 0x00, /* 00000000 */
351 | 0x40, /* 01000000 */
352 | 0x40, /* 01000000 */
353 | 0x40, /* 01000000 */
354 | 0x78, /* 01111000 */
355 | 0x00, /* 00000000 */
356 | 0x00, /* 00000000 */
357 |
358 | /* 29 0x1D '^]' */
359 | 0x00, /* 00000000 */
360 | 0x00, /* 00000000 */
361 | 0x48, /* 01001000 */
362 | 0x84, /* 10000100 */
363 | 0xFC, /* 11111100 */
364 | 0x84, /* 10000100 */
365 | 0x48, /* 01001000 */
366 | 0x00, /* 00000000 */
367 | 0x00, /* 00000000 */
368 | 0x00, /* 00000000 */
369 |
370 | /* 30 0x1E '^^' */
371 | 0x00, /* 00000000 */
372 | 0x00, /* 00000000 */
373 | 0x10, /* 00010000 */
374 | 0x10, /* 00010000 */
375 | 0x38, /* 00111000 */
376 | 0x38, /* 00111000 */
377 | 0x7C, /* 01111100 */
378 | 0x7C, /* 01111100 */
379 | 0x00, /* 00000000 */
380 | 0x00, /* 00000000 */
381 |
382 | /* 31 0x1F '^_' */
383 | 0x00, /* 00000000 */
384 | 0x00, /* 00000000 */
385 | 0x7C, /* 01111100 */
386 | 0x7C, /* 01111100 */
387 | 0x38, /* 00111000 */
388 | 0x38, /* 00111000 */
389 | 0x10, /* 00010000 */
390 | 0x10, /* 00010000 */
391 | 0x00, /* 00000000 */
392 | 0x00, /* 00000000 */
393 |
394 | /* 32 0x20 ' ' */
395 | 0x00, /* 00000000 */
396 | 0x00, /* 00000000 */
397 | 0x00, /* 00000000 */
398 | 0x00, /* 00000000 */
399 | 0x00, /* 00000000 */
400 | 0x00, /* 00000000 */
401 | 0x00, /* 00000000 */
402 | 0x00, /* 00000000 */
403 | 0x00, /* 00000000 */
404 | 0x00, /* 00000000 */
405 |
406 | /* 33 0x21 '!' */
407 | 0x00, /* 00000000 */
408 | 0x10, /* 00010000 */
409 | 0x10, /* 00010000 */
410 | 0x10, /* 00010000 */
411 | 0x10, /* 00010000 */
412 | 0x10, /* 00010000 */
413 | 0x00, /* 00000000 */
414 | 0x10, /* 00010000 */
415 | 0x00, /* 00000000 */
416 | 0x00, /* 00000000 */
417 |
418 | /* 34 0x22 '"' */
419 | 0x28, /* 00101000 */
420 | 0x28, /* 00101000 */
421 | 0x28, /* 00101000 */
422 | 0x00, /* 00000000 */
423 | 0x00, /* 00000000 */
424 | 0x00, /* 00000000 */
425 | 0x00, /* 00000000 */
426 | 0x00, /* 00000000 */
427 | 0x00, /* 00000000 */
428 | 0x00, /* 00000000 */
429 |
430 | /* 35 0x23 '#' */
431 | 0x00, /* 00000000 */
432 | 0x00, /* 00000000 */
433 | 0x28, /* 00101000 */
434 | 0x7C, /* 01111100 */
435 | 0x28, /* 00101000 */
436 | 0x28, /* 00101000 */
437 | 0x7C, /* 01111100 */
438 | 0x28, /* 00101000 */
439 | 0x00, /* 00000000 */
440 | 0x00, /* 00000000 */
441 |
442 | /* 36 0x24 '$' */
443 | 0x10, /* 00010000 */
444 | 0x38, /* 00111000 */
445 | 0x54, /* 01010100 */
446 | 0x50, /* 01010000 */
447 | 0x38, /* 00111000 */
448 | 0x14, /* 00010100 */
449 | 0x54, /* 01010100 */
450 | 0x38, /* 00111000 */
451 | 0x10, /* 00010000 */
452 | 0x00, /* 00000000 */
453 |
454 | /* 37 0x25 '%' */
455 | 0x00, /* 00000000 */
456 | 0x64, /* 01100100 */
457 | 0x64, /* 01100100 */
458 | 0x08, /* 00001000 */
459 | 0x10, /* 00010000 */
460 | 0x20, /* 00100000 */
461 | 0x4C, /* 01001100 */
462 | 0x4C, /* 01001100 */
463 | 0x00, /* 00000000 */
464 | 0x00, /* 00000000 */
465 |
466 | /* 38 0x26 '&' */
467 | 0x00, /* 00000000 */
468 | 0x30, /* 00110000 */
469 | 0x48, /* 01001000 */
470 | 0x50, /* 01010000 */
471 | 0x20, /* 00100000 */
472 | 0x54, /* 01010100 */
473 | 0x48, /* 01001000 */
474 | 0x34, /* 00110100 */
475 | 0x00, /* 00000000 */
476 | 0x00, /* 00000000 */
477 |
478 | /* 39 0x27 ''' */
479 | 0x10, /* 00010000 */
480 | 0x10, /* 00010000 */
481 | 0x10, /* 00010000 */
482 | 0x00, /* 00000000 */
483 | 0x00, /* 00000000 */
484 | 0x00, /* 00000000 */
485 | 0x00, /* 00000000 */
486 | 0x00, /* 00000000 */
487 | 0x00, /* 00000000 */
488 | 0x00, /* 00000000 */
489 |
490 | /* 40 0x28 '(' */
491 | 0x08, /* 00001000 */
492 | 0x10, /* 00010000 */
493 | 0x20, /* 00100000 */
494 | 0x20, /* 00100000 */
495 | 0x20, /* 00100000 */
496 | 0x20, /* 00100000 */
497 | 0x20, /* 00100000 */
498 | 0x10, /* 00010000 */
499 | 0x08, /* 00001000 */
500 | 0x00, /* 00000000 */
501 |
502 | /* 41 0x29 ')' */
503 | 0x20, /* 00100000 */
504 | 0x10, /* 00010000 */
505 | 0x08, /* 00001000 */
506 | 0x08, /* 00001000 */
507 | 0x08, /* 00001000 */
508 | 0x08, /* 00001000 */
509 | 0x08, /* 00001000 */
510 | 0x10, /* 00010000 */
511 | 0x20, /* 00100000 */
512 | 0x00, /* 00000000 */
513 |
514 | /* 42 0x2A '*' */
515 | 0x00, /* 00000000 */
516 | 0x10, /* 00010000 */
517 | 0x54, /* 01010100 */
518 | 0x38, /* 00111000 */
519 | 0x54, /* 01010100 */
520 | 0x10, /* 00010000 */
521 | 0x00, /* 00000000 */
522 | 0x00, /* 00000000 */
523 | 0x00, /* 00000000 */
524 | 0x00, /* 00000000 */
525 |
526 | /* 43 0x2B '+' */
527 | 0x00, /* 00000000 */
528 | 0x00, /* 00000000 */
529 | 0x10, /* 00010000 */
530 | 0x10, /* 00010000 */
531 | 0x7C, /* 01111100 */
532 | 0x10, /* 00010000 */
533 | 0x10, /* 00010000 */
534 | 0x00, /* 00000000 */
535 | 0x00, /* 00000000 */
536 | 0x00, /* 00000000 */
537 |
538 | /* 44 0x2C ',' */
539 | 0x00, /* 00000000 */
540 | 0x00, /* 00000000 */
541 | 0x00, /* 00000000 */
542 | 0x00, /* 00000000 */
543 | 0x00, /* 00000000 */
544 | 0x00, /* 00000000 */
545 | 0x30, /* 00110000 */
546 | 0x30, /* 00110000 */
547 | 0x10, /* 00010000 */
548 | 0x20, /* 00100000 */
549 |
550 | /* 45 0x2D '-' */
551 | 0x00, /* 00000000 */
552 | 0x00, /* 00000000 */
553 | 0x00, /* 00000000 */
554 | 0x00, /* 00000000 */
555 | 0x7C, /* 01111100 */
556 | 0x00, /* 00000000 */
557 | 0x00, /* 00000000 */
558 | 0x00, /* 00000000 */
559 | 0x00, /* 00000000 */
560 | 0x00, /* 00000000 */
561 |
562 | /* 46 0x2E '.' */
563 | 0x00, /* 00000000 */
564 | 0x00, /* 00000000 */
565 | 0x00, /* 00000000 */
566 | 0x00, /* 00000000 */
567 | 0x00, /* 00000000 */
568 | 0x00, /* 00000000 */
569 | 0x18, /* 00011000 */
570 | 0x18, /* 00011000 */
571 | 0x00, /* 00000000 */
572 | 0x00, /* 00000000 */
573 |
574 | /* 47 0x2F '/' */
575 | 0x04, /* 00000100 */
576 | 0x04, /* 00000100 */
577 | 0x08, /* 00001000 */
578 | 0x08, /* 00001000 */
579 | 0x10, /* 00010000 */
580 | 0x10, /* 00010000 */
581 | 0x20, /* 00100000 */
582 | 0x20, /* 00100000 */
583 | 0x40, /* 01000000 */
584 | 0x40, /* 01000000 */
585 |
586 | /* 48 0x30 '0' */
587 | 0x00, /* 00000000 */
588 | 0x38, /* 00111000 */
589 | 0x44, /* 01000100 */
590 | 0x4C, /* 01001100 */
591 | 0x54, /* 01010100 */
592 | 0x64, /* 01100100 */
593 | 0x44, /* 01000100 */
594 | 0x38, /* 00111000 */
595 | 0x00, /* 00000000 */
596 | 0x00, /* 00000000 */
597 |
598 | /* 49 0x31 '1' */
599 | 0x00, /* 00000000 */
600 | 0x10, /* 00010000 */
601 | 0x30, /* 00110000 */
602 | 0x50, /* 01010000 */
603 | 0x10, /* 00010000 */
604 | 0x10, /* 00010000 */
605 | 0x10, /* 00010000 */
606 | 0x7C, /* 01111100 */
607 | 0x00, /* 00000000 */
608 | 0x00, /* 00000000 */
609 |
610 | /* 50 0x32 '2' */
611 | 0x00, /* 00000000 */
612 | 0x38, /* 00111000 */
613 | 0x44, /* 01000100 */
614 | 0x04, /* 00000100 */
615 | 0x08, /* 00001000 */
616 | 0x10, /* 00010000 */
617 | 0x20, /* 00100000 */
618 | 0x7C, /* 01111100 */
619 | 0x00, /* 00000000 */
620 | 0x00, /* 00000000 */
621 |
622 | /* 51 0x33 '3' */
623 | 0x00, /* 00000000 */
624 | 0x38, /* 00111000 */
625 | 0x44, /* 01000100 */
626 | 0x04, /* 00000100 */
627 | 0x18, /* 00011000 */
628 | 0x04, /* 00000100 */
629 | 0x44, /* 01000100 */
630 | 0x38, /* 00111000 */
631 | 0x00, /* 00000000 */
632 | 0x00, /* 00000000 */
633 |
634 | /* 52 0x34 '4' */
635 | 0x00, /* 00000000 */
636 | 0x08, /* 00001000 */
637 | 0x18, /* 00011000 */
638 | 0x28, /* 00101000 */
639 | 0x48, /* 01001000 */
640 | 0x7C, /* 01111100 */
641 | 0x08, /* 00001000 */
642 | 0x08, /* 00001000 */
643 | 0x00, /* 00000000 */
644 | 0x00, /* 00000000 */
645 |
646 | /* 53 0x35 '5' */
647 | 0x00, /* 00000000 */
648 | 0x7C, /* 01111100 */
649 | 0x40, /* 01000000 */
650 | 0x78, /* 01111000 */
651 | 0x04, /* 00000100 */
652 | 0x04, /* 00000100 */
653 | 0x44, /* 01000100 */
654 | 0x38, /* 00111000 */
655 | 0x00, /* 00000000 */
656 | 0x00, /* 00000000 */
657 |
658 | /* 54 0x36 '6' */
659 | 0x00, /* 00000000 */
660 | 0x18, /* 00011000 */
661 | 0x20, /* 00100000 */
662 | 0x40, /* 01000000 */
663 | 0x78, /* 01111000 */
664 | 0x44, /* 01000100 */
665 | 0x44, /* 01000100 */
666 | 0x38, /* 00111000 */
667 | 0x00, /* 00000000 */
668 | 0x00, /* 00000000 */
669 |
670 | /* 55 0x37 '7' */
671 | 0x00, /* 00000000 */
672 | 0x7C, /* 01111100 */
673 | 0x04, /* 00000100 */
674 | 0x04, /* 00000100 */
675 | 0x08, /* 00001000 */
676 | 0x10, /* 00010000 */
677 | 0x10, /* 00010000 */
678 | 0x10, /* 00010000 */
679 | 0x00, /* 00000000 */
680 | 0x00, /* 00000000 */
681 |
682 | /* 56 0x38 '8' */
683 | 0x00, /* 00000000 */
684 | 0x38, /* 00111000 */
685 | 0x44, /* 01000100 */
686 | 0x44, /* 01000100 */
687 | 0x38, /* 00111000 */
688 | 0x44, /* 01000100 */
689 | 0x44, /* 01000100 */
690 | 0x38, /* 00111000 */
691 | 0x00, /* 00000000 */
692 | 0x00, /* 00000000 */
693 |
694 | /* 57 0x39 '9' */
695 | 0x00, /* 00000000 */
696 | 0x38, /* 00111000 */
697 | 0x44, /* 01000100 */
698 | 0x44, /* 01000100 */
699 | 0x3C, /* 00111100 */
700 | 0x04, /* 00000100 */
701 | 0x08, /* 00001000 */
702 | 0x30, /* 00110000 */
703 | 0x00, /* 00000000 */
704 | 0x00, /* 00000000 */
705 |
706 | /* 58 0x3A ':' */
707 | 0x00, /* 00000000 */
708 | 0x00, /* 00000000 */
709 | 0x00, /* 00000000 */
710 | 0x18, /* 00011000 */
711 | 0x18, /* 00011000 */
712 | 0x00, /* 00000000 */
713 | 0x18, /* 00011000 */
714 | 0x18, /* 00011000 */
715 | 0x00, /* 00000000 */
716 | 0x00, /* 00000000 */
717 |
718 | /* 59 0x3B ';' */
719 | 0x00, /* 00000000 */
720 | 0x00, /* 00000000 */
721 | 0x00, /* 00000000 */
722 | 0x30, /* 00110000 */
723 | 0x30, /* 00110000 */
724 | 0x00, /* 00000000 */
725 | 0x30, /* 00110000 */
726 | 0x30, /* 00110000 */
727 | 0x10, /* 00010000 */
728 | 0x20, /* 00100000 */
729 |
730 | /* 60 0x3C '<' */
731 | 0x00, /* 00000000 */
732 | 0x04, /* 00000100 */
733 | 0x08, /* 00001000 */
734 | 0x10, /* 00010000 */
735 | 0x20, /* 00100000 */
736 | 0x10, /* 00010000 */
737 | 0x08, /* 00001000 */
738 | 0x04, /* 00000100 */
739 | 0x00, /* 00000000 */
740 | 0x00, /* 00000000 */
741 |
742 | /* 61 0x3D '=' */
743 | 0x00, /* 00000000 */
744 | 0x00, /* 00000000 */
745 | 0x00, /* 00000000 */
746 | 0x7C, /* 01111100 */
747 | 0x00, /* 00000000 */
748 | 0x7C, /* 01111100 */
749 | 0x00, /* 00000000 */
750 | 0x00, /* 00000000 */
751 | 0x00, /* 00000000 */
752 | 0x00, /* 00000000 */
753 |
754 | /* 62 0x3E '>' */
755 | 0x00, /* 00000000 */
756 | 0x20, /* 00100000 */
757 | 0x10, /* 00010000 */
758 | 0x08, /* 00001000 */
759 | 0x04, /* 00000100 */
760 | 0x08, /* 00001000 */
761 | 0x10, /* 00010000 */
762 | 0x20, /* 00100000 */
763 | 0x00, /* 00000000 */
764 | 0x00, /* 00000000 */
765 |
766 | /* 63 0x3F '?' */
767 | 0x00, /* 00000000 */
768 | 0x38, /* 00111000 */
769 | 0x44, /* 01000100 */
770 | 0x04, /* 00000100 */
771 | 0x08, /* 00001000 */
772 | 0x10, /* 00010000 */
773 | 0x00, /* 00000000 */
774 | 0x10, /* 00010000 */
775 | 0x00, /* 00000000 */
776 | 0x00, /* 00000000 */
777 |
778 | /* 64 0x40 '@' */
779 | 0x00, /* 00000000 */
780 | 0x38, /* 00111000 */
781 | 0x44, /* 01000100 */
782 | 0x5C, /* 01011100 */
783 | 0x54, /* 01010100 */
784 | 0x5C, /* 01011100 */
785 | 0x40, /* 01000000 */
786 | 0x38, /* 00111000 */
787 | 0x00, /* 00000000 */
788 | 0x00, /* 00000000 */
789 |
790 | /* 65 0x41 'A' */
791 | 0x00, /* 00000000 */
792 | 0x10, /* 00010000 */
793 | 0x28, /* 00101000 */
794 | 0x44, /* 01000100 */
795 | 0x44, /* 01000100 */
796 | 0x7C, /* 01111100 */
797 | 0x44, /* 01000100 */
798 | 0x44, /* 01000100 */
799 | 0x00, /* 00000000 */
800 | 0x00, /* 00000000 */
801 |
802 | /* 66 0x42 'B' */
803 | 0x00, /* 00000000 */
804 | 0x78, /* 01111000 */
805 | 0x24, /* 00100100 */
806 | 0x24, /* 00100100 */
807 | 0x38, /* 00111000 */
808 | 0x24, /* 00100100 */
809 | 0x24, /* 00100100 */
810 | 0x78, /* 01111000 */
811 | 0x00, /* 00000000 */
812 | 0x00, /* 00000000 */
813 |
814 | /* 67 0x43 'C' */
815 | 0x00, /* 00000000 */
816 | 0x38, /* 00111000 */
817 | 0x44, /* 01000100 */
818 | 0x40, /* 01000000 */
819 | 0x40, /* 01000000 */
820 | 0x40, /* 01000000 */
821 | 0x44, /* 01000100 */
822 | 0x38, /* 00111000 */
823 | 0x00, /* 00000000 */
824 | 0x00, /* 00000000 */
825 |
826 | /* 68 0x44 'D' */
827 | 0x00, /* 00000000 */
828 | 0x78, /* 01111000 */
829 | 0x24, /* 00100100 */
830 | 0x24, /* 00100100 */
831 | 0x24, /* 00100100 */
832 | 0x24, /* 00100100 */
833 | 0x24, /* 00100100 */
834 | 0x78, /* 01111000 */
835 | 0x00, /* 00000000 */
836 | 0x00, /* 00000000 */
837 |
838 | /* 69 0x45 'E' */
839 | 0x00, /* 00000000 */
840 | 0x7C, /* 01111100 */
841 | 0x40, /* 01000000 */
842 | 0x40, /* 01000000 */
843 | 0x78, /* 01111000 */
844 | 0x40, /* 01000000 */
845 | 0x40, /* 01000000 */
846 | 0x7C, /* 01111100 */
847 | 0x00, /* 00000000 */
848 | 0x00, /* 00000000 */
849 |
850 | /* 70 0x46 'F' */
851 | 0x00, /* 00000000 */
852 | 0x7C, /* 01111100 */
853 | 0x40, /* 01000000 */
854 | 0x40, /* 01000000 */
855 | 0x78, /* 01111000 */
856 | 0x40, /* 01000000 */
857 | 0x40, /* 01000000 */
858 | 0x40, /* 01000000 */
859 | 0x00, /* 00000000 */
860 | 0x00, /* 00000000 */
861 |
862 | /* 71 0x47 'G' */
863 | 0x00, /* 00000000 */
864 | 0x38, /* 00111000 */
865 | 0x44, /* 01000100 */
866 | 0x40, /* 01000000 */
867 | 0x5C, /* 01011100 */
868 | 0x44, /* 01000100 */
869 | 0x44, /* 01000100 */
870 | 0x38, /* 00111000 */
871 | 0x00, /* 00000000 */
872 | 0x00, /* 00000000 */
873 |
874 | /* 72 0x48 'H' */
875 | 0x00, /* 00000000 */
876 | 0x44, /* 01000100 */
877 | 0x44, /* 01000100 */
878 | 0x44, /* 01000100 */
879 | 0x7C, /* 01111100 */
880 | 0x44, /* 01000100 */
881 | 0x44, /* 01000100 */
882 | 0x44, /* 01000100 */
883 | 0x00, /* 00000000 */
884 | 0x00, /* 00000000 */
885 |
886 | /* 73 0x49 'I' */
887 | 0x00, /* 00000000 */
888 | 0x38, /* 00111000 */
889 | 0x10, /* 00010000 */
890 | 0x10, /* 00010000 */
891 | 0x10, /* 00010000 */
892 | 0x10, /* 00010000 */
893 | 0x10, /* 00010000 */
894 | 0x38, /* 00111000 */
895 | 0x00, /* 00000000 */
896 | 0x00, /* 00000000 */
897 |
898 | /* 74 0x4A 'J' */
899 | 0x00, /* 00000000 */
900 | 0x1C, /* 00011100 */
901 | 0x08, /* 00001000 */
902 | 0x08, /* 00001000 */
903 | 0x08, /* 00001000 */
904 | 0x48, /* 01001000 */
905 | 0x48, /* 01001000 */
906 | 0x30, /* 00110000 */
907 | 0x00, /* 00000000 */
908 | 0x00, /* 00000000 */
909 |
910 | /* 75 0x4B 'K' */
911 | 0x00, /* 00000000 */
912 | 0x44, /* 01000100 */
913 | 0x48, /* 01001000 */
914 | 0x50, /* 01010000 */
915 | 0x60, /* 01100000 */
916 | 0x50, /* 01010000 */
917 | 0x48, /* 01001000 */
918 | 0x44, /* 01000100 */
919 | 0x00, /* 00000000 */
920 | 0x00, /* 00000000 */
921 |
922 | /* 76 0x4C 'L' */
923 | 0x00, /* 00000000 */
924 | 0x40, /* 01000000 */
925 | 0x40, /* 01000000 */
926 | 0x40, /* 01000000 */
927 | 0x40, /* 01000000 */
928 | 0x40, /* 01000000 */
929 | 0x40, /* 01000000 */
930 | 0x7C, /* 01111100 */
931 | 0x00, /* 00000000 */
932 | 0x00, /* 00000000 */
933 |
934 | /* 77 0x4D 'M' */
935 | 0x00, /* 00000000 */
936 | 0x44, /* 01000100 */
937 | 0x6C, /* 01101100 */
938 | 0x54, /* 01010100 */
939 | 0x54, /* 01010100 */
940 | 0x44, /* 01000100 */
941 | 0x44, /* 01000100 */
942 | 0x44, /* 01000100 */
943 | 0x00, /* 00000000 */
944 | 0x00, /* 00000000 */
945 |
946 | /* 78 0x4E 'N' */
947 | 0x00, /* 00000000 */
948 | 0x44, /* 01000100 */
949 | 0x64, /* 01100100 */
950 | 0x54, /* 01010100 */
951 | 0x4C, /* 01001100 */
952 | 0x44, /* 01000100 */
953 | 0x44, /* 01000100 */
954 | 0x44, /* 01000100 */
955 | 0x00, /* 00000000 */
956 | 0x00, /* 00000000 */
957 |
958 | /* 79 0x4F 'O' */
959 | 0x00, /* 00000000 */
960 | 0x38, /* 00111000 */
961 | 0x44, /* 01000100 */
962 | 0x44, /* 01000100 */
963 | 0x44, /* 01000100 */
964 | 0x44, /* 01000100 */
965 | 0x44, /* 01000100 */
966 | 0x38, /* 00111000 */
967 | 0x00, /* 00000000 */
968 | 0x00, /* 00000000 */
969 |
970 | /* 80 0x50 'P' */
971 | 0x00, /* 00000000 */
972 | 0x78, /* 01111000 */
973 | 0x44, /* 01000100 */
974 | 0x44, /* 01000100 */
975 | 0x78, /* 01111000 */
976 | 0x40, /* 01000000 */
977 | 0x40, /* 01000000 */
978 | 0x40, /* 01000000 */
979 | 0x00, /* 00000000 */
980 | 0x00, /* 00000000 */
981 |
982 | /* 81 0x51 'Q' */
983 | 0x00, /* 00000000 */
984 | 0x38, /* 00111000 */
985 | 0x44, /* 01000100 */
986 | 0x44, /* 01000100 */
987 | 0x44, /* 01000100 */
988 | 0x54, /* 01010100 */
989 | 0x48, /* 01001000 */
990 | 0x34, /* 00110100 */
991 | 0x00, /* 00000000 */
992 | 0x00, /* 00000000 */
993 |
994 | /* 82 0x52 'R' */
995 | 0x00, /* 00000000 */
996 | 0x78, /* 01111000 */
997 | 0x44, /* 01000100 */
998 | 0x44, /* 01000100 */
999 | 0x78, /* 01111000 */
1000 | 0x50, /* 01010000 */
1001 | 0x48, /* 01001000 */
1002 | 0x44, /* 01000100 */
1003 | 0x00, /* 00000000 */
1004 | 0x00, /* 00000000 */
1005 |
1006 | /* 83 0x53 'S' */
1007 | 0x00, /* 00000000 */
1008 | 0x38, /* 00111000 */
1009 | 0x44, /* 01000100 */
1010 | 0x40, /* 01000000 */
1011 | 0x38, /* 00111000 */
1012 | 0x04, /* 00000100 */
1013 | 0x44, /* 01000100 */
1014 | 0x38, /* 00111000 */
1015 | 0x00, /* 00000000 */
1016 | 0x00, /* 00000000 */
1017 |
1018 | /* 84 0x54 'T' */
1019 | 0x00, /* 00000000 */
1020 | 0x7C, /* 01111100 */
1021 | 0x10, /* 00010000 */
1022 | 0x10, /* 00010000 */
1023 | 0x10, /* 00010000 */
1024 | 0x10, /* 00010000 */
1025 | 0x10, /* 00010000 */
1026 | 0x10, /* 00010000 */
1027 | 0x00, /* 00000000 */
1028 | 0x00, /* 00000000 */
1029 |
1030 | /* 85 0x55 'U' */
1031 | 0x00, /* 00000000 */
1032 | 0x44, /* 01000100 */
1033 | 0x44, /* 01000100 */
1034 | 0x44, /* 01000100 */
1035 | 0x44, /* 01000100 */
1036 | 0x44, /* 01000100 */
1037 | 0x44, /* 01000100 */
1038 | 0x38, /* 00111000 */
1039 | 0x00, /* 00000000 */
1040 | 0x00, /* 00000000 */
1041 |
1042 | /* 86 0x56 'V' */
1043 | 0x00, /* 00000000 */
1044 | 0x44, /* 01000100 */
1045 | 0x44, /* 01000100 */
1046 | 0x44, /* 01000100 */
1047 | 0x44, /* 01000100 */
1048 | 0x44, /* 01000100 */
1049 | 0x28, /* 00101000 */
1050 | 0x10, /* 00010000 */
1051 | 0x00, /* 00000000 */
1052 | 0x00, /* 00000000 */
1053 |
1054 | /* 87 0x57 'W' */
1055 | 0x00, /* 00000000 */
1056 | 0x44, /* 01000100 */
1057 | 0x44, /* 01000100 */
1058 | 0x44, /* 01000100 */
1059 | 0x54, /* 01010100 */
1060 | 0x54, /* 01010100 */
1061 | 0x6C, /* 01101100 */
1062 | 0x44, /* 01000100 */
1063 | 0x00, /* 00000000 */
1064 | 0x00, /* 00000000 */
1065 |
1066 | /* 88 0x58 'X' */
1067 | 0x00, /* 00000000 */
1068 | 0x44, /* 01000100 */
1069 | 0x44, /* 01000100 */
1070 | 0x28, /* 00101000 */
1071 | 0x10, /* 00010000 */
1072 | 0x28, /* 00101000 */
1073 | 0x44, /* 01000100 */
1074 | 0x44, /* 01000100 */
1075 | 0x00, /* 00000000 */
1076 | 0x00, /* 00000000 */
1077 |
1078 | /* 89 0x59 'Y' */
1079 | 0x00, /* 00000000 */
1080 | 0x44, /* 01000100 */
1081 | 0x44, /* 01000100 */
1082 | 0x44, /* 01000100 */
1083 | 0x28, /* 00101000 */
1084 | 0x10, /* 00010000 */
1085 | 0x10, /* 00010000 */
1086 | 0x10, /* 00010000 */
1087 | 0x00, /* 00000000 */
1088 | 0x00, /* 00000000 */
1089 |
1090 | /* 90 0x5A 'Z' */
1091 | 0x00, /* 00000000 */
1092 | 0x7C, /* 01111100 */
1093 | 0x04, /* 00000100 */
1094 | 0x08, /* 00001000 */
1095 | 0x10, /* 00010000 */
1096 | 0x20, /* 00100000 */
1097 | 0x40, /* 01000000 */
1098 | 0x7C, /* 01111100 */
1099 | 0x00, /* 00000000 */
1100 | 0x00, /* 00000000 */
1101 |
1102 | /* 91 0x5B '[' */
1103 | 0x18, /* 00011000 */
1104 | 0x10, /* 00010000 */
1105 | 0x10, /* 00010000 */
1106 | 0x10, /* 00010000 */
1107 | 0x10, /* 00010000 */
1108 | 0x10, /* 00010000 */
1109 | 0x10, /* 00010000 */
1110 | 0x10, /* 00010000 */
1111 | 0x18, /* 00011000 */
1112 | 0x00, /* 00000000 */
1113 |
1114 | /* 92 0x5C '\' */
1115 | 0x40, /* 01000000 */
1116 | 0x40, /* 01000000 */
1117 | 0x20, /* 00100000 */
1118 | 0x20, /* 00100000 */
1119 | 0x10, /* 00010000 */
1120 | 0x10, /* 00010000 */
1121 | 0x08, /* 00001000 */
1122 | 0x08, /* 00001000 */
1123 | 0x04, /* 00000100 */
1124 | 0x04, /* 00000100 */
1125 |
1126 | /* 93 0x5D ']' */
1127 | 0x30, /* 00110000 */
1128 | 0x10, /* 00010000 */
1129 | 0x10, /* 00010000 */
1130 | 0x10, /* 00010000 */
1131 | 0x10, /* 00010000 */
1132 | 0x10, /* 00010000 */
1133 | 0x10, /* 00010000 */
1134 | 0x10, /* 00010000 */
1135 | 0x30, /* 00110000 */
1136 | 0x00, /* 00000000 */
1137 |
1138 | /* 94 0x5E '^' */
1139 | 0x00, /* 00000000 */
1140 | 0x10, /* 00010000 */
1141 | 0x28, /* 00101000 */
1142 | 0x44, /* 01000100 */
1143 | 0x00, /* 00000000 */
1144 | 0x00, /* 00000000 */
1145 | 0x00, /* 00000000 */
1146 | 0x00, /* 00000000 */
1147 | 0x00, /* 00000000 */
1148 | 0x00, /* 00000000 */
1149 |
1150 | /* 95 0x5F '_' */
1151 | 0x00, /* 00000000 */
1152 | 0x00, /* 00000000 */
1153 | 0x00, /* 00000000 */
1154 | 0x00, /* 00000000 */
1155 | 0x00, /* 00000000 */
1156 | 0x00, /* 00000000 */
1157 | 0x00, /* 00000000 */
1158 | 0x00, /* 00000000 */
1159 | 0x7C, /* 01111100 */
1160 | 0x00, /* 00000000 */
1161 |
1162 | /* 96 0x60 '`' */
1163 | 0x20, /* 00100000 */
1164 | 0x10, /* 00010000 */
1165 | 0x08, /* 00001000 */
1166 | 0x00, /* 00000000 */
1167 | 0x00, /* 00000000 */
1168 | 0x00, /* 00000000 */
1169 | 0x00, /* 00000000 */
1170 | 0x00, /* 00000000 */
1171 | 0x00, /* 00000000 */
1172 | 0x00, /* 00000000 */
1173 |
1174 | /* 97 0x61 'a' */
1175 | 0x00, /* 00000000 */
1176 | 0x00, /* 00000000 */
1177 | 0x00, /* 00000000 */
1178 | 0x38, /* 00111000 */
1179 | 0x04, /* 00000100 */
1180 | 0x3C, /* 00111100 */
1181 | 0x44, /* 01000100 */
1182 | 0x3C, /* 00111100 */
1183 | 0x00, /* 00000000 */
1184 | 0x00, /* 00000000 */
1185 |
1186 | /* 98 0x62 'b' */
1187 | 0x00, /* 00000000 */
1188 | 0x40, /* 01000000 */
1189 | 0x40, /* 01000000 */
1190 | 0x58, /* 01011000 */
1191 | 0x64, /* 01100100 */
1192 | 0x44, /* 01000100 */
1193 | 0x64, /* 01100100 */
1194 | 0x58, /* 01011000 */
1195 | 0x00, /* 00000000 */
1196 | 0x00, /* 00000000 */
1197 |
1198 | /* 99 0x63 'c' */
1199 | 0x00, /* 00000000 */
1200 | 0x00, /* 00000000 */
1201 | 0x00, /* 00000000 */
1202 | 0x38, /* 00111000 */
1203 | 0x44, /* 01000100 */
1204 | 0x40, /* 01000000 */
1205 | 0x44, /* 01000100 */
1206 | 0x38, /* 00111000 */
1207 | 0x00, /* 00000000 */
1208 | 0x00, /* 00000000 */
1209 |
1210 | /* 100 0x64 'd' */
1211 | 0x00, /* 00000000 */
1212 | 0x04, /* 00000100 */
1213 | 0x04, /* 00000100 */
1214 | 0x34, /* 00110100 */
1215 | 0x4C, /* 01001100 */
1216 | 0x44, /* 01000100 */
1217 | 0x4C, /* 01001100 */
1218 | 0x34, /* 00110100 */
1219 | 0x00, /* 00000000 */
1220 | 0x00, /* 00000000 */
1221 |
1222 | /* 101 0x65 'e' */
1223 | 0x00, /* 00000000 */
1224 | 0x00, /* 00000000 */
1225 | 0x00, /* 00000000 */
1226 | 0x38, /* 00111000 */
1227 | 0x44, /* 01000100 */
1228 | 0x7C, /* 01111100 */
1229 | 0x40, /* 01000000 */
1230 | 0x3C, /* 00111100 */
1231 | 0x00, /* 00000000 */
1232 | 0x00, /* 00000000 */
1233 |
1234 | /* 102 0x66 'f' */
1235 | 0x00, /* 00000000 */
1236 | 0x0C, /* 00001100 */
1237 | 0x10, /* 00010000 */
1238 | 0x10, /* 00010000 */
1239 | 0x38, /* 00111000 */
1240 | 0x10, /* 00010000 */
1241 | 0x10, /* 00010000 */
1242 | 0x10, /* 00010000 */
1243 | 0x00, /* 00000000 */
1244 | 0x00, /* 00000000 */
1245 |
1246 | /* 103 0x67 'g' */
1247 | 0x00, /* 00000000 */
1248 | 0x00, /* 00000000 */
1249 | 0x00, /* 00000000 */
1250 | 0x34, /* 00110100 */
1251 | 0x4C, /* 01001100 */
1252 | 0x44, /* 01000100 */
1253 | 0x4C, /* 01001100 */
1254 | 0x34, /* 00110100 */
1255 | 0x04, /* 00000100 */
1256 | 0x38, /* 00111000 */
1257 |
1258 | /* 104 0x68 'h' */
1259 | 0x00, /* 00000000 */
1260 | 0x40, /* 01000000 */
1261 | 0x40, /* 01000000 */
1262 | 0x78, /* 01111000 */
1263 | 0x44, /* 01000100 */
1264 | 0x44, /* 01000100 */
1265 | 0x44, /* 01000100 */
1266 | 0x44, /* 01000100 */
1267 | 0x00, /* 00000000 */
1268 | 0x00, /* 00000000 */
1269 |
1270 | /* 105 0x69 'i' */
1271 | 0x00, /* 00000000 */
1272 | 0x10, /* 00010000 */
1273 | 0x00, /* 00000000 */
1274 | 0x30, /* 00110000 */
1275 | 0x10, /* 00010000 */
1276 | 0x10, /* 00010000 */
1277 | 0x10, /* 00010000 */
1278 | 0x38, /* 00111000 */
1279 | 0x00, /* 00000000 */
1280 | 0x00, /* 00000000 */
1281 |
1282 | /* 106 0x6A 'j' */
1283 | 0x00, /* 00000000 */
1284 | 0x10, /* 00010000 */
1285 | 0x00, /* 00000000 */
1286 | 0x30, /* 00110000 */
1287 | 0x10, /* 00010000 */
1288 | 0x10, /* 00010000 */
1289 | 0x10, /* 00010000 */
1290 | 0x10, /* 00010000 */
1291 | 0x10, /* 00010000 */
1292 | 0x60, /* 01100000 */
1293 |
1294 | /* 107 0x6B 'k' */
1295 | 0x00, /* 00000000 */
1296 | 0x40, /* 01000000 */
1297 | 0x40, /* 01000000 */
1298 | 0x48, /* 01001000 */
1299 | 0x50, /* 01010000 */
1300 | 0x70, /* 01110000 */
1301 | 0x48, /* 01001000 */
1302 | 0x44, /* 01000100 */
1303 | 0x00, /* 00000000 */
1304 | 0x00, /* 00000000 */
1305 |
1306 | /* 108 0x6C 'l' */
1307 | 0x00, /* 00000000 */
1308 | 0x30, /* 00110000 */
1309 | 0x10, /* 00010000 */
1310 | 0x10, /* 00010000 */
1311 | 0x10, /* 00010000 */
1312 | 0x10, /* 00010000 */
1313 | 0x10, /* 00010000 */
1314 | 0x38, /* 00111000 */
1315 | 0x00, /* 00000000 */
1316 | 0x00, /* 00000000 */
1317 |
1318 | /* 109 0x6D 'm' */
1319 | 0x00, /* 00000000 */
1320 | 0x00, /* 00000000 */
1321 | 0x00, /* 00000000 */
1322 | 0x68, /* 01101000 */
1323 | 0x54, /* 01010100 */
1324 | 0x54, /* 01010100 */
1325 | 0x54, /* 01010100 */
1326 | 0x54, /* 01010100 */
1327 | 0x00, /* 00000000 */
1328 | 0x00, /* 00000000 */
1329 |
1330 | /* 110 0x6E 'n' */
1331 | 0x00, /* 00000000 */
1332 | 0x00, /* 00000000 */
1333 | 0x00, /* 00000000 */
1334 | 0x58, /* 01011000 */
1335 | 0x64, /* 01100100 */
1336 | 0x44, /* 01000100 */
1337 | 0x44, /* 01000100 */
1338 | 0x44, /* 01000100 */
1339 | 0x00, /* 00000000 */
1340 | 0x00, /* 00000000 */
1341 |
1342 | /* 111 0x6F 'o' */
1343 | 0x00, /* 00000000 */
1344 | 0x00, /* 00000000 */
1345 | 0x00, /* 00000000 */
1346 | 0x38, /* 00111000 */
1347 | 0x44, /* 01000100 */
1348 | 0x44, /* 01000100 */
1349 | 0x44, /* 01000100 */
1350 | 0x38, /* 00111000 */
1351 | 0x00, /* 00000000 */
1352 | 0x00, /* 00000000 */
1353 |
1354 | /* 112 0x70 'p' */
1355 | 0x00, /* 00000000 */
1356 | 0x00, /* 00000000 */
1357 | 0x00, /* 00000000 */
1358 | 0x58, /* 01011000 */
1359 | 0x64, /* 01100100 */
1360 | 0x44, /* 01000100 */
1361 | 0x64, /* 01100100 */
1362 | 0x58, /* 01011000 */
1363 | 0x40, /* 01000000 */
1364 | 0x40, /* 01000000 */
1365 |
1366 | /* 113 0x71 'q' */
1367 | 0x00, /* 00000000 */
1368 | 0x00, /* 00000000 */
1369 | 0x00, /* 00000000 */
1370 | 0x34, /* 00110100 */
1371 | 0x4C, /* 01001100 */
1372 | 0x44, /* 01000100 */
1373 | 0x4C, /* 01001100 */
1374 | 0x34, /* 00110100 */
1375 | 0x04, /* 00000100 */
1376 | 0x04, /* 00000100 */
1377 |
1378 | /* 114 0x72 'r' */
1379 | 0x00, /* 00000000 */
1380 | 0x00, /* 00000000 */
1381 | 0x00, /* 00000000 */
1382 | 0x58, /* 01011000 */
1383 | 0x64, /* 01100100 */
1384 | 0x40, /* 01000000 */
1385 | 0x40, /* 01000000 */
1386 | 0x40, /* 01000000 */
1387 | 0x00, /* 00000000 */
1388 | 0x00, /* 00000000 */
1389 |
1390 | /* 115 0x73 's' */
1391 | 0x00, /* 00000000 */
1392 | 0x00, /* 00000000 */
1393 | 0x00, /* 00000000 */
1394 | 0x3C, /* 00111100 */
1395 | 0x40, /* 01000000 */
1396 | 0x38, /* 00111000 */
1397 | 0x04, /* 00000100 */
1398 | 0x78, /* 01111000 */
1399 | 0x00, /* 00000000 */
1400 | 0x00, /* 00000000 */
1401 |
1402 | /* 116 0x74 't' */
1403 | 0x00, /* 00000000 */
1404 | 0x10, /* 00010000 */
1405 | 0x10, /* 00010000 */
1406 | 0x38, /* 00111000 */
1407 | 0x10, /* 00010000 */
1408 | 0x10, /* 00010000 */
1409 | 0x10, /* 00010000 */
1410 | 0x0C, /* 00001100 */
1411 | 0x00, /* 00000000 */
1412 | 0x00, /* 00000000 */
1413 |
1414 | /* 117 0x75 'u' */
1415 | 0x00, /* 00000000 */
1416 | 0x00, /* 00000000 */
1417 | 0x00, /* 00000000 */
1418 | 0x44, /* 01000100 */
1419 | 0x44, /* 01000100 */
1420 | 0x44, /* 01000100 */
1421 | 0x4C, /* 01001100 */
1422 | 0x34, /* 00110100 */
1423 | 0x00, /* 00000000 */
1424 | 0x00, /* 00000000 */
1425 |
1426 | /* 118 0x76 'v' */
1427 | 0x00, /* 00000000 */
1428 | 0x00, /* 00000000 */
1429 | 0x00, /* 00000000 */
1430 | 0x44, /* 01000100 */
1431 | 0x44, /* 01000100 */
1432 | 0x44, /* 01000100 */
1433 | 0x28, /* 00101000 */
1434 | 0x10, /* 00010000 */
1435 | 0x00, /* 00000000 */
1436 | 0x00, /* 00000000 */
1437 |
1438 | /* 119 0x77 'w' */
1439 | 0x00, /* 00000000 */
1440 | 0x00, /* 00000000 */
1441 | 0x00, /* 00000000 */
1442 | 0x54, /* 01010100 */
1443 | 0x54, /* 01010100 */
1444 | 0x54, /* 01010100 */
1445 | 0x54, /* 01010100 */
1446 | 0x28, /* 00101000 */
1447 | 0x00, /* 00000000 */
1448 | 0x00, /* 00000000 */
1449 |
1450 | /* 120 0x78 'x' */
1451 | 0x00, /* 00000000 */
1452 | 0x00, /* 00000000 */
1453 | 0x00, /* 00000000 */
1454 | 0x44, /* 01000100 */
1455 | 0x28, /* 00101000 */
1456 | 0x10, /* 00010000 */
1457 | 0x28, /* 00101000 */
1458 | 0x44, /* 01000100 */
1459 | 0x00, /* 00000000 */
1460 | 0x00, /* 00000000 */
1461 |
1462 | /* 121 0x79 'y' */
1463 | 0x00, /* 00000000 */
1464 | 0x00, /* 00000000 */
1465 | 0x00, /* 00000000 */
1466 | 0x44, /* 01000100 */
1467 | 0x44, /* 01000100 */
1468 | 0x44, /* 01000100 */
1469 | 0x44, /* 01000100 */
1470 | 0x3C, /* 00111100 */
1471 | 0x04, /* 00000100 */
1472 | 0x38, /* 00111000 */
1473 |
1474 | /* 122 0x7A 'z' */
1475 | 0x00, /* 00000000 */
1476 | 0x00, /* 00000000 */
1477 | 0x00, /* 00000000 */
1478 | 0x7C, /* 01111100 */
1479 | 0x08, /* 00001000 */
1480 | 0x10, /* 00010000 */
1481 | 0x20, /* 00100000 */
1482 | 0x7C, /* 01111100 */
1483 | 0x00, /* 00000000 */
1484 | 0x00, /* 00000000 */
1485 |
1486 | /* 123 0x7B '{' */
1487 | 0x08, /* 00001000 */
1488 | 0x10, /* 00010000 */
1489 | 0x10, /* 00010000 */
1490 | 0x10, /* 00010000 */
1491 | 0x20, /* 00100000 */
1492 | 0x10, /* 00010000 */
1493 | 0x10, /* 00010000 */
1494 | 0x10, /* 00010000 */
1495 | 0x08, /* 00001000 */
1496 | 0x00, /* 00000000 */
1497 |
1498 | /* 124 0x7C '|' */
1499 | 0x10, /* 00010000 */
1500 | 0x10, /* 00010000 */
1501 | 0x10, /* 00010000 */
1502 | 0x10, /* 00010000 */
1503 | 0x00, /* 00000000 */
1504 | 0x10, /* 00010000 */
1505 | 0x10, /* 00010000 */
1506 | 0x10, /* 00010000 */
1507 | 0x10, /* 00010000 */
1508 | 0x00, /* 00000000 */
1509 |
1510 | /* 125 0x7D '}' */
1511 | 0x20, /* 00100000 */
1512 | 0x10, /* 00010000 */
1513 | 0x10, /* 00010000 */
1514 | 0x10, /* 00010000 */
1515 | 0x08, /* 00001000 */
1516 | 0x10, /* 00010000 */
1517 | 0x10, /* 00010000 */
1518 | 0x10, /* 00010000 */
1519 | 0x20, /* 00100000 */
1520 | 0x00, /* 00000000 */
1521 |
1522 | /* 126 0x7E '~' */
1523 | 0x00, /* 00000000 */
1524 | 0x00, /* 00000000 */
1525 | 0x00, /* 00000000 */
1526 | 0x00, /* 00000000 */
1527 | 0x20, /* 00100000 */
1528 | 0x54, /* 01010100 */
1529 | 0x08, /* 00001000 */
1530 | 0x00, /* 00000000 */
1531 | 0x00, /* 00000000 */
1532 | 0x00, /* 00000000 */
1533 |
1534 | /* 127 0x7F '' */
1535 | 0x00, /* 00000000 */
1536 | 0x00, /* 00000000 */
1537 | 0x00, /* 00000000 */
1538 | 0x10, /* 00010000 */
1539 | 0x28, /* 00101000 */
1540 | 0x44, /* 01000100 */
1541 | 0x44, /* 01000100 */
1542 | 0x7C, /* 01111100 */
1543 | 0x00, /* 00000000 */
1544 | 0x00, /* 00000000 */
1545 |
1546 | /* 128 0x80 '\200' */
1547 | 0x00, /* 00000000 */
1548 | 0x38, /* 00111000 */
1549 | 0x44, /* 01000100 */
1550 | 0x40, /* 01000000 */
1551 | 0x40, /* 01000000 */
1552 | 0x40, /* 01000000 */
1553 | 0x44, /* 01000100 */
1554 | 0x38, /* 00111000 */
1555 | 0x10, /* 00010000 */
1556 | 0x20, /* 00100000 */
1557 |
1558 | /* 129 0x81 '\201' */
1559 | 0x00, /* 00000000 */
1560 | 0x28, /* 00101000 */
1561 | 0x00, /* 00000000 */
1562 | 0x44, /* 01000100 */
1563 | 0x44, /* 01000100 */
1564 | 0x44, /* 01000100 */
1565 | 0x4C, /* 01001100 */
1566 | 0x34, /* 00110100 */
1567 | 0x00, /* 00000000 */
1568 | 0x00, /* 00000000 */
1569 |
1570 | /* 130 0x82 '\202' */
1571 | 0x08, /* 00001000 */
1572 | 0x10, /* 00010000 */
1573 | 0x00, /* 00000000 */
1574 | 0x38, /* 00111000 */
1575 | 0x44, /* 01000100 */
1576 | 0x7C, /* 01111100 */
1577 | 0x40, /* 01000000 */
1578 | 0x3C, /* 00111100 */
1579 | 0x00, /* 00000000 */
1580 | 0x00, /* 00000000 */
1581 |
1582 | /* 131 0x83 '\203' */
1583 | 0x10, /* 00010000 */
1584 | 0x28, /* 00101000 */
1585 | 0x00, /* 00000000 */
1586 | 0x38, /* 00111000 */
1587 | 0x04, /* 00000100 */
1588 | 0x3C, /* 00111100 */
1589 | 0x44, /* 01000100 */
1590 | 0x3C, /* 00111100 */
1591 | 0x00, /* 00000000 */
1592 | 0x00, /* 00000000 */
1593 |
1594 | /* 132 0x84 '\204' */
1595 | 0x00, /* 00000000 */
1596 | 0x28, /* 00101000 */
1597 | 0x00, /* 00000000 */
1598 | 0x38, /* 00111000 */
1599 | 0x04, /* 00000100 */
1600 | 0x3C, /* 00111100 */
1601 | 0x44, /* 01000100 */
1602 | 0x3C, /* 00111100 */
1603 | 0x00, /* 00000000 */
1604 | 0x00, /* 00000000 */
1605 |
1606 | /* 133 0x85 '\205' */
1607 | 0x10, /* 00010000 */
1608 | 0x08, /* 00001000 */
1609 | 0x00, /* 00000000 */
1610 | 0x38, /* 00111000 */
1611 | 0x04, /* 00000100 */
1612 | 0x3C, /* 00111100 */
1613 | 0x44, /* 01000100 */
1614 | 0x3C, /* 00111100 */
1615 | 0x00, /* 00000000 */
1616 | 0x00, /* 00000000 */
1617 |
1618 | /* 134 0x86 '\206' */
1619 | 0x18, /* 00011000 */
1620 | 0x24, /* 00100100 */
1621 | 0x18, /* 00011000 */
1622 | 0x38, /* 00111000 */
1623 | 0x04, /* 00000100 */
1624 | 0x3C, /* 00111100 */
1625 | 0x44, /* 01000100 */
1626 | 0x3C, /* 00111100 */
1627 | 0x00, /* 00000000 */
1628 | 0x00, /* 00000000 */
1629 |
1630 | /* 135 0x87 '\207' */
1631 | 0x00, /* 00000000 */
1632 | 0x00, /* 00000000 */
1633 | 0x00, /* 00000000 */
1634 | 0x38, /* 00111000 */
1635 | 0x44, /* 01000100 */
1636 | 0x40, /* 01000000 */
1637 | 0x44, /* 01000100 */
1638 | 0x38, /* 00111000 */
1639 | 0x10, /* 00010000 */
1640 | 0x20, /* 00100000 */
1641 |
1642 | /* 136 0x88 '\210' */
1643 | 0x10, /* 00010000 */
1644 | 0x28, /* 00101000 */
1645 | 0x00, /* 00000000 */
1646 | 0x38, /* 00111000 */
1647 | 0x44, /* 01000100 */
1648 | 0x7C, /* 01111100 */
1649 | 0x40, /* 01000000 */
1650 | 0x3C, /* 00111100 */
1651 | 0x00, /* 00000000 */
1652 | 0x00, /* 00000000 */
1653 |
1654 | /* 137 0x89 '\211' */
1655 | 0x00, /* 00000000 */
1656 | 0x28, /* 00101000 */
1657 | 0x00, /* 00000000 */
1658 | 0x38, /* 00111000 */
1659 | 0x44, /* 01000100 */
1660 | 0x7C, /* 01111100 */
1661 | 0x40, /* 01000000 */
1662 | 0x3C, /* 00111100 */
1663 | 0x00, /* 00000000 */
1664 | 0x00, /* 00000000 */
1665 |
1666 | /* 138 0x8A '\212' */
1667 | 0x20, /* 00100000 */
1668 | 0x10, /* 00010000 */
1669 | 0x00, /* 00000000 */
1670 | 0x38, /* 00111000 */
1671 | 0x44, /* 01000100 */
1672 | 0x7C, /* 01111100 */
1673 | 0x40, /* 01000000 */
1674 | 0x3C, /* 00111100 */
1675 | 0x00, /* 00000000 */
1676 | 0x00, /* 00000000 */
1677 |
1678 | /* 139 0x8B '\213' */
1679 | 0x00, /* 00000000 */
1680 | 0x28, /* 00101000 */
1681 | 0x00, /* 00000000 */
1682 | 0x30, /* 00110000 */
1683 | 0x10, /* 00010000 */
1684 | 0x10, /* 00010000 */
1685 | 0x10, /* 00010000 */
1686 | 0x38, /* 00111000 */
1687 | 0x00, /* 00000000 */
1688 | 0x00, /* 00000000 */
1689 |
1690 | /* 140 0x8C '\214' */
1691 | 0x10, /* 00010000 */
1692 | 0x28, /* 00101000 */
1693 | 0x00, /* 00000000 */
1694 | 0x30, /* 00110000 */
1695 | 0x10, /* 00010000 */
1696 | 0x10, /* 00010000 */
1697 | 0x10, /* 00010000 */
1698 | 0x38, /* 00111000 */
1699 | 0x00, /* 00000000 */
1700 | 0x00, /* 00000000 */
1701 |
1702 | /* 141 0x8D '\215' */
1703 | 0x20, /* 00100000 */
1704 | 0x10, /* 00010000 */
1705 | 0x00, /* 00000000 */
1706 | 0x30, /* 00110000 */
1707 | 0x10, /* 00010000 */
1708 | 0x10, /* 00010000 */
1709 | 0x10, /* 00010000 */
1710 | 0x38, /* 00111000 */
1711 | 0x00, /* 00000000 */
1712 | 0x00, /* 00000000 */
1713 |
1714 | /* 142 0x8E '\216' */
1715 | 0x44, /* 01000100 */
1716 | 0x10, /* 00010000 */
1717 | 0x28, /* 00101000 */
1718 | 0x44, /* 01000100 */
1719 | 0x44, /* 01000100 */
1720 | 0x7C, /* 01111100 */
1721 | 0x44, /* 01000100 */
1722 | 0x44, /* 01000100 */
1723 | 0x00, /* 00000000 */
1724 | 0x00, /* 00000000 */
1725 |
1726 | /* 143 0x8F '\217' */
1727 | 0x30, /* 00110000 */
1728 | 0x48, /* 01001000 */
1729 | 0x38, /* 00111000 */
1730 | 0x44, /* 01000100 */
1731 | 0x44, /* 01000100 */
1732 | 0x7C, /* 01111100 */
1733 | 0x44, /* 01000100 */
1734 | 0x44, /* 01000100 */
1735 | 0x00, /* 00000000 */
1736 | 0x00, /* 00000000 */
1737 |
1738 | /* 144 0x90 '\220' */
1739 | 0x10, /* 00010000 */
1740 | 0x7C, /* 01111100 */
1741 | 0x40, /* 01000000 */
1742 | 0x40, /* 01000000 */
1743 | 0x78, /* 01111000 */
1744 | 0x40, /* 01000000 */
1745 | 0x40, /* 01000000 */
1746 | 0x7C, /* 01111100 */
1747 | 0x00, /* 00000000 */
1748 | 0x00, /* 00000000 */
1749 |
1750 | /* 145 0x91 '\221' */
1751 | 0x00, /* 00000000 */
1752 | 0x00, /* 00000000 */
1753 | 0x00, /* 00000000 */
1754 | 0x78, /* 01111000 */
1755 | 0x14, /* 00010100 */
1756 | 0x7C, /* 01111100 */
1757 | 0x50, /* 01010000 */
1758 | 0x3C, /* 00111100 */
1759 | 0x00, /* 00000000 */
1760 | 0x00, /* 00000000 */
1761 |
1762 | /* 146 0x92 '\222' */
1763 | 0x00, /* 00000000 */
1764 | 0x3C, /* 00111100 */
1765 | 0x50, /* 01010000 */
1766 | 0x50, /* 01010000 */
1767 | 0x78, /* 01111000 */
1768 | 0x50, /* 01010000 */
1769 | 0x50, /* 01010000 */
1770 | 0x5C, /* 01011100 */
1771 | 0x00, /* 00000000 */
1772 | 0x00, /* 00000000 */
1773 |
1774 | /* 147 0x93 '\223' */
1775 | 0x10, /* 00010000 */
1776 | 0x28, /* 00101000 */
1777 | 0x00, /* 00000000 */
1778 | 0x38, /* 00111000 */
1779 | 0x44, /* 01000100 */
1780 | 0x44, /* 01000100 */
1781 | 0x44, /* 01000100 */
1782 | 0x38, /* 00111000 */
1783 | 0x00, /* 00000000 */
1784 | 0x00, /* 00000000 */
1785 |
1786 | /* 148 0x94 '\224' */
1787 | 0x00, /* 00000000 */
1788 | 0x28, /* 00101000 */
1789 | 0x00, /* 00000000 */
1790 | 0x38, /* 00111000 */
1791 | 0x44, /* 01000100 */
1792 | 0x44, /* 01000100 */
1793 | 0x44, /* 01000100 */
1794 | 0x38, /* 00111000 */
1795 | 0x00, /* 00000000 */
1796 | 0x00, /* 00000000 */
1797 |
1798 | /* 149 0x95 '\225' */
1799 | 0x20, /* 00100000 */
1800 | 0x10, /* 00010000 */
1801 | 0x00, /* 00000000 */
1802 | 0x38, /* 00111000 */
1803 | 0x44, /* 01000100 */
1804 | 0x44, /* 01000100 */
1805 | 0x44, /* 01000100 */
1806 | 0x38, /* 00111000 */
1807 | 0x00, /* 00000000 */
1808 | 0x00, /* 00000000 */
1809 |
1810 | /* 150 0x96 '\226' */
1811 | 0x10, /* 00010000 */
1812 | 0x28, /* 00101000 */
1813 | 0x00, /* 00000000 */
1814 | 0x44, /* 01000100 */
1815 | 0x44, /* 01000100 */
1816 | 0x44, /* 01000100 */
1817 | 0x4C, /* 01001100 */
1818 | 0x34, /* 00110100 */
1819 | 0x00, /* 00000000 */
1820 | 0x00, /* 00000000 */
1821 |
1822 | /* 151 0x97 '\227' */
1823 | 0x20, /* 00100000 */
1824 | 0x10, /* 00010000 */
1825 | 0x00, /* 00000000 */
1826 | 0x44, /* 01000100 */
1827 | 0x44, /* 01000100 */
1828 | 0x44, /* 01000100 */
1829 | 0x4C, /* 01001100 */
1830 | 0x34, /* 00110100 */
1831 | 0x00, /* 00000000 */
1832 | 0x00, /* 00000000 */
1833 |
1834 | /* 152 0x98 '\230' */
1835 | 0x00, /* 00000000 */
1836 | 0x28, /* 00101000 */
1837 | 0x00, /* 00000000 */
1838 | 0x44, /* 01000100 */
1839 | 0x44, /* 01000100 */
1840 | 0x44, /* 01000100 */
1841 | 0x44, /* 01000100 */
1842 | 0x3C, /* 00111100 */
1843 | 0x04, /* 00000100 */
1844 | 0x38, /* 00111000 */
1845 |
1846 | /* 153 0x99 '\231' */
1847 | 0x84, /* 10000100 */
1848 | 0x38, /* 00111000 */
1849 | 0x44, /* 01000100 */
1850 | 0x44, /* 01000100 */
1851 | 0x44, /* 01000100 */
1852 | 0x44, /* 01000100 */
1853 | 0x44, /* 01000100 */
1854 | 0x38, /* 00111000 */
1855 | 0x00, /* 00000000 */
1856 | 0x00, /* 00000000 */
1857 |
1858 | /* 154 0x9A '\232' */
1859 | 0x88, /* 10001000 */
1860 | 0x44, /* 01000100 */
1861 | 0x44, /* 01000100 */
1862 | 0x44, /* 01000100 */
1863 | 0x44, /* 01000100 */
1864 | 0x44, /* 01000100 */
1865 | 0x44, /* 01000100 */
1866 | 0x38, /* 00111000 */
1867 | 0x00, /* 00000000 */
1868 | 0x00, /* 00000000 */
1869 |
1870 | /* 155 0x9B '\233' */
1871 | 0x00, /* 00000000 */
1872 | 0x00, /* 00000000 */
1873 | 0x10, /* 00010000 */
1874 | 0x38, /* 00111000 */
1875 | 0x54, /* 01010100 */
1876 | 0x50, /* 01010000 */
1877 | 0x54, /* 01010100 */
1878 | 0x38, /* 00111000 */
1879 | 0x10, /* 00010000 */
1880 | 0x00, /* 00000000 */
1881 |
1882 | /* 156 0x9C '\234' */
1883 | 0x30, /* 00110000 */
1884 | 0x48, /* 01001000 */
1885 | 0x40, /* 01000000 */
1886 | 0x70, /* 01110000 */
1887 | 0x40, /* 01000000 */
1888 | 0x40, /* 01000000 */
1889 | 0x44, /* 01000100 */
1890 | 0x78, /* 01111000 */
1891 | 0x00, /* 00000000 */
1892 | 0x00, /* 00000000 */
1893 |
1894 | /* 157 0x9D '\235' */
1895 | 0x00, /* 00000000 */
1896 | 0x44, /* 01000100 */
1897 | 0x28, /* 00101000 */
1898 | 0x7C, /* 01111100 */
1899 | 0x10, /* 00010000 */
1900 | 0x7C, /* 01111100 */
1901 | 0x10, /* 00010000 */
1902 | 0x10, /* 00010000 */
1903 | 0x00, /* 00000000 */
1904 | 0x00, /* 00000000 */
1905 |
1906 | /* 158 0x9E '\236' */
1907 | 0x00, /* 00000000 */
1908 | 0x70, /* 01110000 */
1909 | 0x48, /* 01001000 */
1910 | 0x70, /* 01110000 */
1911 | 0x48, /* 01001000 */
1912 | 0x5C, /* 01011100 */
1913 | 0x48, /* 01001000 */
1914 | 0x44, /* 01000100 */
1915 | 0x00, /* 00000000 */
1916 | 0x00, /* 00000000 */
1917 |
1918 | /* 159 0x9F '\237' */
1919 | 0x00, /* 00000000 */
1920 | 0x0C, /* 00001100 */
1921 | 0x10, /* 00010000 */
1922 | 0x10, /* 00010000 */
1923 | 0x38, /* 00111000 */
1924 | 0x10, /* 00010000 */
1925 | 0x10, /* 00010000 */
1926 | 0x60, /* 01100000 */
1927 | 0x00, /* 00000000 */
1928 | 0x00, /* 00000000 */
1929 |
1930 | /* 160 0xA0 '\240' */
1931 | 0x08, /* 00001000 */
1932 | 0x10, /* 00010000 */
1933 | 0x00, /* 00000000 */
1934 | 0x38, /* 00111000 */
1935 | 0x04, /* 00000100 */
1936 | 0x3C, /* 00111100 */
1937 | 0x44, /* 01000100 */
1938 | 0x3C, /* 00111100 */
1939 | 0x00, /* 00000000 */
1940 | 0x00, /* 00000000 */
1941 |
1942 | /* 161 0xA1 '\241' */
1943 | 0x08, /* 00001000 */
1944 | 0x10, /* 00010000 */
1945 | 0x00, /* 00000000 */
1946 | 0x30, /* 00110000 */
1947 | 0x10, /* 00010000 */
1948 | 0x10, /* 00010000 */
1949 | 0x10, /* 00010000 */
1950 | 0x38, /* 00111000 */
1951 | 0x00, /* 00000000 */
1952 | 0x00, /* 00000000 */
1953 |
1954 | /* 162 0xA2 '\242' */
1955 | 0x08, /* 00001000 */
1956 | 0x10, /* 00010000 */
1957 | 0x00, /* 00000000 */
1958 | 0x38, /* 00111000 */
1959 | 0x44, /* 01000100 */
1960 | 0x44, /* 01000100 */
1961 | 0x44, /* 01000100 */
1962 | 0x38, /* 00111000 */
1963 | 0x00, /* 00000000 */
1964 | 0x00, /* 00000000 */
1965 |
1966 | /* 163 0xA3 '\243' */
1967 | 0x08, /* 00001000 */
1968 | 0x10, /* 00010000 */
1969 | 0x00, /* 00000000 */
1970 | 0x44, /* 01000100 */
1971 | 0x44, /* 01000100 */
1972 | 0x44, /* 01000100 */
1973 | 0x4C, /* 01001100 */
1974 | 0x34, /* 00110100 */
1975 | 0x00, /* 00000000 */
1976 | 0x00, /* 00000000 */
1977 |
1978 | /* 164 0xA4 '\244' */
1979 | 0x34, /* 00110100 */
1980 | 0x58, /* 01011000 */
1981 | 0x00, /* 00000000 */
1982 | 0x58, /* 01011000 */
1983 | 0x64, /* 01100100 */
1984 | 0x44, /* 01000100 */
1985 | 0x44, /* 01000100 */
1986 | 0x44, /* 01000100 */
1987 | 0x00, /* 00000000 */
1988 | 0x00, /* 00000000 */
1989 |
1990 | /* 165 0xA5 '\245' */
1991 | 0x58, /* 01011000 */
1992 | 0x44, /* 01000100 */
1993 | 0x64, /* 01100100 */
1994 | 0x54, /* 01010100 */
1995 | 0x4C, /* 01001100 */
1996 | 0x44, /* 01000100 */
1997 | 0x44, /* 01000100 */
1998 | 0x44, /* 01000100 */
1999 | 0x00, /* 00000000 */
2000 | 0x00, /* 00000000 */
2001 |
2002 | /* 166 0xA6 '\246' */
2003 | 0x00, /* 00000000 */
2004 | 0x38, /* 00111000 */
2005 | 0x04, /* 00000100 */
2006 | 0x3C, /* 00111100 */
2007 | 0x44, /* 01000100 */
2008 | 0x3C, /* 00111100 */
2009 | 0x00, /* 00000000 */
2010 | 0x7C, /* 01111100 */
2011 | 0x00, /* 00000000 */
2012 | 0x00, /* 00000000 */
2013 |
2014 | /* 167 0xA7 '\247' */
2015 | 0x00, /* 00000000 */
2016 | 0x38, /* 00111000 */
2017 | 0x44, /* 01000100 */
2018 | 0x44, /* 01000100 */
2019 | 0x44, /* 01000100 */
2020 | 0x38, /* 00111000 */
2021 | 0x00, /* 00000000 */
2022 | 0x7C, /* 01111100 */
2023 | 0x00, /* 00000000 */
2024 | 0x00, /* 00000000 */
2025 |
2026 | /* 168 0xA8 '\250' */
2027 | 0x00, /* 00000000 */
2028 | 0x10, /* 00010000 */
2029 | 0x00, /* 00000000 */
2030 | 0x10, /* 00010000 */
2031 | 0x20, /* 00100000 */
2032 | 0x40, /* 01000000 */
2033 | 0x44, /* 01000100 */
2034 | 0x38, /* 00111000 */
2035 | 0x00, /* 00000000 */
2036 | 0x00, /* 00000000 */
2037 |
2038 | /* 169 0xA9 '\251' */
2039 | 0x00, /* 00000000 */
2040 | 0x00, /* 00000000 */
2041 | 0x00, /* 00000000 */
2042 | 0x00, /* 00000000 */
2043 | 0x7C, /* 01111100 */
2044 | 0x40, /* 01000000 */
2045 | 0x40, /* 01000000 */
2046 | 0x00, /* 00000000 */
2047 | 0x00, /* 00000000 */
2048 | 0x00, /* 00000000 */
2049 |
2050 | /* 170 0xAA '\252' */
2051 | 0x00, /* 00000000 */
2052 | 0x00, /* 00000000 */
2053 | 0x00, /* 00000000 */
2054 | 0x00, /* 00000000 */
2055 | 0x7C, /* 01111100 */
2056 | 0x04, /* 00000100 */
2057 | 0x04, /* 00000100 */
2058 | 0x00, /* 00000000 */
2059 | 0x00, /* 00000000 */
2060 | 0x00, /* 00000000 */
2061 |
2062 | /* 171 0xAB '\253' */
2063 | 0x20, /* 00100000 */
2064 | 0x60, /* 01100000 */
2065 | 0x24, /* 00100100 */
2066 | 0x28, /* 00101000 */
2067 | 0x10, /* 00010000 */
2068 | 0x28, /* 00101000 */
2069 | 0x44, /* 01000100 */
2070 | 0x08, /* 00001000 */
2071 | 0x1C, /* 00011100 */
2072 | 0x00, /* 00000000 */
2073 |
2074 | /* 172 0xAC '\254' */
2075 | 0x20, /* 00100000 */
2076 | 0x60, /* 01100000 */
2077 | 0x24, /* 00100100 */
2078 | 0x28, /* 00101000 */
2079 | 0x10, /* 00010000 */
2080 | 0x28, /* 00101000 */
2081 | 0x58, /* 01011000 */
2082 | 0x3C, /* 00111100 */
2083 | 0x08, /* 00001000 */
2084 | 0x00, /* 00000000 */
2085 |
2086 | /* 173 0xAD '\255' */
2087 | 0x00, /* 00000000 */
2088 | 0x10, /* 00010000 */
2089 | 0x00, /* 00000000 */
2090 | 0x10, /* 00010000 */
2091 | 0x10, /* 00010000 */
2092 | 0x10, /* 00010000 */
2093 | 0x10, /* 00010000 */
2094 | 0x10, /* 00010000 */
2095 | 0x00, /* 00000000 */
2096 | 0x00, /* 00000000 */
2097 |
2098 | /* 174 0xAE '\256' */
2099 | 0x00, /* 00000000 */
2100 | 0x00, /* 00000000 */
2101 | 0x00, /* 00000000 */
2102 | 0x24, /* 00100100 */
2103 | 0x48, /* 01001000 */
2104 | 0x90, /* 10010000 */
2105 | 0x48, /* 01001000 */
2106 | 0x24, /* 00100100 */
2107 | 0x00, /* 00000000 */
2108 | 0x00, /* 00000000 */
2109 |
2110 | /* 175 0xAF '\257' */
2111 | 0x00, /* 00000000 */
2112 | 0x00, /* 00000000 */
2113 | 0x00, /* 00000000 */
2114 | 0x90, /* 10010000 */
2115 | 0x48, /* 01001000 */
2116 | 0x24, /* 00100100 */
2117 | 0x48, /* 01001000 */
2118 | 0x90, /* 10010000 */
2119 | 0x00, /* 00000000 */
2120 | 0x00, /* 00000000 */
2121 |
2122 | /* 176 0xB0 '\260' */
2123 | 0x10, /* 00010000 */
2124 | 0x44, /* 01000100 */
2125 | 0x10, /* 00010000 */
2126 | 0x44, /* 01000100 */
2127 | 0x10, /* 00010000 */
2128 | 0x44, /* 01000100 */
2129 | 0x10, /* 00010000 */
2130 | 0x44, /* 01000100 */
2131 | 0x10, /* 00010000 */
2132 | 0x44, /* 01000100 */
2133 |
2134 | /* 177 0xB1 '\261' */
2135 | 0xA8, /* 10101000 */
2136 | 0x54, /* 01010100 */
2137 | 0xA8, /* 10101000 */
2138 | 0x54, /* 01010100 */
2139 | 0xA8, /* 10101000 */
2140 | 0x54, /* 01010100 */
2141 | 0xA8, /* 10101000 */
2142 | 0x54, /* 01010100 */
2143 | 0xA8, /* 10101000 */
2144 | 0x54, /* 01010100 */
2145 |
2146 | /* 178 0xB2 '\262' */
2147 | 0xDC, /* 11011100 */
2148 | 0x74, /* 01110100 */
2149 | 0xDC, /* 11011100 */
2150 | 0x74, /* 01110100 */
2151 | 0xDC, /* 11011100 */
2152 | 0x74, /* 01110100 */
2153 | 0xDC, /* 11011100 */
2154 | 0x74, /* 01110100 */
2155 | 0xDC, /* 11011100 */
2156 | 0x74, /* 01110100 */
2157 |
2158 | /* 179 0xB3 '\263' */
2159 | 0x10, /* 00010000 */
2160 | 0x10, /* 00010000 */
2161 | 0x10, /* 00010000 */
2162 | 0x10, /* 00010000 */
2163 | 0x10, /* 00010000 */
2164 | 0x10, /* 00010000 */
2165 | 0x10, /* 00010000 */
2166 | 0x10, /* 00010000 */
2167 | 0x10, /* 00010000 */
2168 | 0x10, /* 00010000 */
2169 |
2170 | /* 180 0xB4 '\264' */
2171 | 0x10, /* 00010000 */
2172 | 0x10, /* 00010000 */
2173 | 0x10, /* 00010000 */
2174 | 0x10, /* 00010000 */
2175 | 0xF0, /* 11110000 */
2176 | 0x10, /* 00010000 */
2177 | 0x10, /* 00010000 */
2178 | 0x10, /* 00010000 */
2179 | 0x10, /* 00010000 */
2180 | 0x10, /* 00010000 */
2181 |
2182 | /* 181 0xB5 '\265' */
2183 | 0x10, /* 00010000 */
2184 | 0x10, /* 00010000 */
2185 | 0x10, /* 00010000 */
2186 | 0xF0, /* 11110000 */
2187 | 0x10, /* 00010000 */
2188 | 0xF0, /* 11110000 */
2189 | 0x10, /* 00010000 */
2190 | 0x10, /* 00010000 */
2191 | 0x10, /* 00010000 */
2192 | 0x10, /* 00010000 */
2193 |
2194 | /* 182 0xB6 '\266' */
2195 | 0x28, /* 00101000 */
2196 | 0x28, /* 00101000 */
2197 | 0x28, /* 00101000 */
2198 | 0x28, /* 00101000 */
2199 | 0xE8, /* 11101000 */
2200 | 0x28, /* 00101000 */
2201 | 0x28, /* 00101000 */
2202 | 0x28, /* 00101000 */
2203 | 0x28, /* 00101000 */
2204 | 0x28, /* 00101000 */
2205 |
2206 | /* 183 0xB7 '\267' */
2207 | 0x00, /* 00000000 */
2208 | 0x00, /* 00000000 */
2209 | 0x00, /* 00000000 */
2210 | 0x00, /* 00000000 */
2211 | 0xF8, /* 11111000 */
2212 | 0x28, /* 00101000 */
2213 | 0x28, /* 00101000 */
2214 | 0x28, /* 00101000 */
2215 | 0x28, /* 00101000 */
2216 | 0x28, /* 00101000 */
2217 |
2218 | /* 184 0xB8 '\270' */
2219 | 0x00, /* 00000000 */
2220 | 0x00, /* 00000000 */
2221 | 0x00, /* 00000000 */
2222 | 0xF0, /* 11110000 */
2223 | 0x10, /* 00010000 */
2224 | 0xF0, /* 11110000 */
2225 | 0x10, /* 00010000 */
2226 | 0x10, /* 00010000 */
2227 | 0x10, /* 00010000 */
2228 | 0x10, /* 00010000 */
2229 |
2230 | /* 185 0xB9 '\271' */
2231 | 0x28, /* 00101000 */
2232 | 0x28, /* 00101000 */
2233 | 0x28, /* 00101000 */
2234 | 0xE8, /* 11101000 */
2235 | 0x08, /* 00001000 */
2236 | 0xE8, /* 11101000 */
2237 | 0x28, /* 00101000 */
2238 | 0x28, /* 00101000 */
2239 | 0x28, /* 00101000 */
2240 | 0x28, /* 00101000 */
2241 |
2242 | /* 186 0xBA '\272' */
2243 | 0x28, /* 00101000 */
2244 | 0x28, /* 00101000 */
2245 | 0x28, /* 00101000 */
2246 | 0x28, /* 00101000 */
2247 | 0x28, /* 00101000 */
2248 | 0x28, /* 00101000 */
2249 | 0x28, /* 00101000 */
2250 | 0x28, /* 00101000 */
2251 | 0x28, /* 00101000 */
2252 | 0x28, /* 00101000 */
2253 |
2254 | /* 187 0xBB '\273' */
2255 | 0x00, /* 00000000 */
2256 | 0x00, /* 00000000 */
2257 | 0x00, /* 00000000 */
2258 | 0xF8, /* 11111000 */
2259 | 0x08, /* 00001000 */
2260 | 0xE8, /* 11101000 */
2261 | 0x28, /* 00101000 */
2262 | 0x28, /* 00101000 */
2263 | 0x28, /* 00101000 */
2264 | 0x28, /* 00101000 */
2265 |
2266 | /* 188 0xBC '\274' */
2267 | 0x28, /* 00101000 */
2268 | 0x28, /* 00101000 */
2269 | 0x28, /* 00101000 */
2270 | 0xE8, /* 11101000 */
2271 | 0x08, /* 00001000 */
2272 | 0xF8, /* 11111000 */
2273 | 0x00, /* 00000000 */
2274 | 0x00, /* 00000000 */
2275 | 0x00, /* 00000000 */
2276 | 0x00, /* 00000000 */
2277 |
2278 | /* 189 0xBD '\275' */
2279 | 0x28, /* 00101000 */
2280 | 0x28, /* 00101000 */
2281 | 0x28, /* 00101000 */
2282 | 0x28, /* 00101000 */
2283 | 0xF8, /* 11111000 */
2284 | 0x00, /* 00000000 */
2285 | 0x00, /* 00000000 */
2286 | 0x00, /* 00000000 */
2287 | 0x00, /* 00000000 */
2288 | 0x00, /* 00000000 */
2289 |
2290 | /* 190 0xBE '\276' */
2291 | 0x10, /* 00010000 */
2292 | 0x10, /* 00010000 */
2293 | 0x10, /* 00010000 */
2294 | 0xF0, /* 11110000 */
2295 | 0x10, /* 00010000 */
2296 | 0xF0, /* 11110000 */
2297 | 0x00, /* 00000000 */
2298 | 0x00, /* 00000000 */
2299 | 0x00, /* 00000000 */
2300 | 0x00, /* 00000000 */
2301 |
2302 | /* 191 0xBF '\277' */
2303 | 0x00, /* 00000000 */
2304 | 0x00, /* 00000000 */
2305 | 0x00, /* 00000000 */
2306 | 0x00, /* 00000000 */
2307 | 0xF0, /* 11110000 */
2308 | 0x10, /* 00010000 */
2309 | 0x10, /* 00010000 */
2310 | 0x10, /* 00010000 */
2311 | 0x10, /* 00010000 */
2312 | 0x10, /* 00010000 */
2313 |
2314 | /* 192 0xC0 '\300' */
2315 | 0x10, /* 00010000 */
2316 | 0x10, /* 00010000 */
2317 | 0x10, /* 00010000 */
2318 | 0x10, /* 00010000 */
2319 | 0x1C, /* 00011100 */
2320 | 0x00, /* 00000000 */
2321 | 0x00, /* 00000000 */
2322 | 0x00, /* 00000000 */
2323 | 0x00, /* 00000000 */
2324 | 0x00, /* 00000000 */
2325 |
2326 | /* 193 0xC1 '\301' */
2327 | 0x10, /* 00010000 */
2328 | 0x10, /* 00010000 */
2329 | 0x10, /* 00010000 */
2330 | 0x10, /* 00010000 */
2331 | 0xFC, /* 11111100 */
2332 | 0x00, /* 00000000 */
2333 | 0x00, /* 00000000 */
2334 | 0x00, /* 00000000 */
2335 | 0x00, /* 00000000 */
2336 | 0x00, /* 00000000 */
2337 |
2338 | /* 194 0xC2 '\302' */
2339 | 0x00, /* 00000000 */
2340 | 0x00, /* 00000000 */
2341 | 0x00, /* 00000000 */
2342 | 0x00, /* 00000000 */
2343 | 0xFC, /* 11111100 */
2344 | 0x10, /* 00010000 */
2345 | 0x10, /* 00010000 */
2346 | 0x10, /* 00010000 */
2347 | 0x10, /* 00010000 */
2348 | 0x10, /* 00010000 */
2349 |
2350 | /* 195 0xC3 '\303' */
2351 | 0x10, /* 00010000 */
2352 | 0x10, /* 00010000 */
2353 | 0x10, /* 00010000 */
2354 | 0x10, /* 00010000 */
2355 | 0x1C, /* 00011100 */
2356 | 0x10, /* 00010000 */
2357 | 0x10, /* 00010000 */
2358 | 0x10, /* 00010000 */
2359 | 0x10, /* 00010000 */
2360 | 0x10, /* 00010000 */
2361 |
2362 | /* 196 0xC4 '\304' */
2363 | 0x00, /* 00000000 */
2364 | 0x00, /* 00000000 */
2365 | 0x00, /* 00000000 */
2366 | 0x00, /* 00000000 */
2367 | 0xFC, /* 11111100 */
2368 | 0x00, /* 00000000 */
2369 | 0x00, /* 00000000 */
2370 | 0x00, /* 00000000 */
2371 | 0x00, /* 00000000 */
2372 | 0x00, /* 00000000 */
2373 |
2374 | /* 197 0xC5 '\305' */
2375 | 0x10, /* 00010000 */
2376 | 0x10, /* 00010000 */
2377 | 0x10, /* 00010000 */
2378 | 0x10, /* 00010000 */
2379 | 0xFC, /* 11111100 */
2380 | 0x10, /* 00010000 */
2381 | 0x10, /* 00010000 */
2382 | 0x10, /* 00010000 */
2383 | 0x10, /* 00010000 */
2384 | 0x10, /* 00010000 */
2385 |
2386 | /* 198 0xC6 '\306' */
2387 | 0x10, /* 00010000 */
2388 | 0x10, /* 00010000 */
2389 | 0x10, /* 00010000 */
2390 | 0x1C, /* 00011100 */
2391 | 0x10, /* 00010000 */
2392 | 0x1C, /* 00011100 */
2393 | 0x10, /* 00010000 */
2394 | 0x10, /* 00010000 */
2395 | 0x10, /* 00010000 */
2396 | 0x10, /* 00010000 */
2397 |
2398 | /* 199 0xC7 '\307' */
2399 | 0x28, /* 00101000 */
2400 | 0x28, /* 00101000 */
2401 | 0x28, /* 00101000 */
2402 | 0x28, /* 00101000 */
2403 | 0x2C, /* 00101100 */
2404 | 0x28, /* 00101000 */
2405 | 0x28, /* 00101000 */
2406 | 0x28, /* 00101000 */
2407 | 0x28, /* 00101000 */
2408 | 0x28, /* 00101000 */
2409 |
2410 | /* 200 0xC8 '\310' */
2411 | 0x28, /* 00101000 */
2412 | 0x28, /* 00101000 */
2413 | 0x28, /* 00101000 */
2414 | 0x2C, /* 00101100 */
2415 | 0x20, /* 00100000 */
2416 | 0x3C, /* 00111100 */
2417 | 0x00, /* 00000000 */
2418 | 0x00, /* 00000000 */
2419 | 0x00, /* 00000000 */
2420 | 0x00, /* 00000000 */
2421 |
2422 | /* 201 0xC9 '\311' */
2423 | 0x00, /* 00000000 */
2424 | 0x00, /* 00000000 */
2425 | 0x00, /* 00000000 */
2426 | 0x3C, /* 00111100 */
2427 | 0x20, /* 00100000 */
2428 | 0x2C, /* 00101100 */
2429 | 0x28, /* 00101000 */
2430 | 0x28, /* 00101000 */
2431 | 0x28, /* 00101000 */
2432 | 0x28, /* 00101000 */
2433 |
2434 | /* 202 0xCA '\312' */
2435 | 0x28, /* 00101000 */
2436 | 0x28, /* 00101000 */
2437 | 0x28, /* 00101000 */
2438 | 0xEC, /* 11101100 */
2439 | 0x00, /* 00000000 */
2440 | 0xFC, /* 11111100 */
2441 | 0x00, /* 00000000 */
2442 | 0x00, /* 00000000 */
2443 | 0x00, /* 00000000 */
2444 | 0x00, /* 00000000 */
2445 |
2446 | /* 203 0xCB '\313' */
2447 | 0x00, /* 00000000 */
2448 | 0x00, /* 00000000 */
2449 | 0x00, /* 00000000 */
2450 | 0xFC, /* 11111100 */
2451 | 0x00, /* 00000000 */
2452 | 0xEC, /* 11101100 */
2453 | 0x28, /* 00101000 */
2454 | 0x28, /* 00101000 */
2455 | 0x28, /* 00101000 */
2456 | 0x28, /* 00101000 */
2457 |
2458 | /* 204 0xCC '\314' */
2459 | 0x28, /* 00101000 */
2460 | 0x28, /* 00101000 */
2461 | 0x28, /* 00101000 */
2462 | 0x2C, /* 00101100 */
2463 | 0x20, /* 00100000 */
2464 | 0x2C, /* 00101100 */
2465 | 0x28, /* 00101000 */
2466 | 0x28, /* 00101000 */
2467 | 0x28, /* 00101000 */
2468 | 0x28, /* 00101000 */
2469 |
2470 | /* 205 0xCD '\315' */
2471 | 0x00, /* 00000000 */
2472 | 0x00, /* 00000000 */
2473 | 0x00, /* 00000000 */
2474 | 0xFC, /* 11111100 */
2475 | 0x00, /* 00000000 */
2476 | 0xFC, /* 11111100 */
2477 | 0x00, /* 00000000 */
2478 | 0x00, /* 00000000 */
2479 | 0x00, /* 00000000 */
2480 | 0x00, /* 00000000 */
2481 |
2482 | /* 206 0xCE '\316' */
2483 | 0x28, /* 00101000 */
2484 | 0x28, /* 00101000 */
2485 | 0x28, /* 00101000 */
2486 | 0xEC, /* 11101100 */
2487 | 0x00, /* 00000000 */
2488 | 0xEC, /* 11101100 */
2489 | 0x28, /* 00101000 */
2490 | 0x28, /* 00101000 */
2491 | 0x28, /* 00101000 */
2492 | 0x28, /* 00101000 */
2493 |
2494 | /* 207 0xCF '\317' */
2495 | 0x10, /* 00010000 */
2496 | 0x10, /* 00010000 */
2497 | 0x10, /* 00010000 */
2498 | 0xFC, /* 11111100 */
2499 | 0x00, /* 00000000 */
2500 | 0xFC, /* 11111100 */
2501 | 0x00, /* 00000000 */
2502 | 0x00, /* 00000000 */
2503 | 0x00, /* 00000000 */
2504 | 0x00, /* 00000000 */
2505 |
2506 | /* 208 0xD0 '\320' */
2507 | 0x28, /* 00101000 */
2508 | 0x28, /* 00101000 */
2509 | 0x28, /* 00101000 */
2510 | 0x28, /* 00101000 */
2511 | 0xFC, /* 11111100 */
2512 | 0x00, /* 00000000 */
2513 | 0x00, /* 00000000 */
2514 | 0x00, /* 00000000 */
2515 | 0x00, /* 00000000 */
2516 | 0x00, /* 00000000 */
2517 |
2518 | /* 209 0xD1 '\321' */
2519 | 0x00, /* 00000000 */
2520 | 0x00, /* 00000000 */
2521 | 0x00, /* 00000000 */
2522 | 0xFC, /* 11111100 */
2523 | 0x00, /* 00000000 */
2524 | 0xFC, /* 11111100 */
2525 | 0x10, /* 00010000 */
2526 | 0x10, /* 00010000 */
2527 | 0x10, /* 00010000 */
2528 | 0x10, /* 00010000 */
2529 |
2530 | /* 210 0xD2 '\322' */
2531 | 0x00, /* 00000000 */
2532 | 0x00, /* 00000000 */
2533 | 0x00, /* 00000000 */
2534 | 0x00, /* 00000000 */
2535 | 0xFC, /* 11111100 */
2536 | 0x28, /* 00101000 */
2537 | 0x28, /* 00101000 */
2538 | 0x28, /* 00101000 */
2539 | 0x28, /* 00101000 */
2540 | 0x28, /* 00101000 */
2541 |
2542 | /* 211 0xD3 '\323' */
2543 | 0x28, /* 00101000 */
2544 | 0x28, /* 00101000 */
2545 | 0x28, /* 00101000 */
2546 | 0x28, /* 00101000 */
2547 | 0x3C, /* 00111100 */
2548 | 0x00, /* 00000000 */
2549 | 0x00, /* 00000000 */
2550 | 0x00, /* 00000000 */
2551 | 0x00, /* 00000000 */
2552 | 0x00, /* 00000000 */
2553 |
2554 | /* 212 0xD4 '\324' */
2555 | 0x10, /* 00010000 */
2556 | 0x10, /* 00010000 */
2557 | 0x10, /* 00010000 */
2558 | 0x1C, /* 00011100 */
2559 | 0x10, /* 00010000 */
2560 | 0x1C, /* 00011100 */
2561 | 0x00, /* 00000000 */
2562 | 0x00, /* 00000000 */
2563 | 0x00, /* 00000000 */
2564 | 0x00, /* 00000000 */
2565 |
2566 | /* 213 0xD5 '\325' */
2567 | 0x00, /* 00000000 */
2568 | 0x00, /* 00000000 */
2569 | 0x00, /* 00000000 */
2570 | 0x1C, /* 00011100 */
2571 | 0x10, /* 00010000 */
2572 | 0x1C, /* 00011100 */
2573 | 0x10, /* 00010000 */
2574 | 0x10, /* 00010000 */
2575 | 0x10, /* 00010000 */
2576 | 0x10, /* 00010000 */
2577 |
2578 | /* 214 0xD6 '\326' */
2579 | 0x00, /* 00000000 */
2580 | 0x00, /* 00000000 */
2581 | 0x00, /* 00000000 */
2582 | 0x00, /* 00000000 */
2583 | 0x3C, /* 00111100 */
2584 | 0x28, /* 00101000 */
2585 | 0x28, /* 00101000 */
2586 | 0x28, /* 00101000 */
2587 | 0x28, /* 00101000 */
2588 | 0x28, /* 00101000 */
2589 |
2590 | /* 215 0xD7 '\327' */
2591 | 0x28, /* 00101000 */
2592 | 0x28, /* 00101000 */
2593 | 0x28, /* 00101000 */
2594 | 0x28, /* 00101000 */
2595 | 0xFC, /* 11111100 */
2596 | 0x28, /* 00101000 */
2597 | 0x28, /* 00101000 */
2598 | 0x28, /* 00101000 */
2599 | 0x28, /* 00101000 */
2600 | 0x28, /* 00101000 */
2601 |
2602 | /* 216 0xD8 '\330' */
2603 | 0x10, /* 00010000 */
2604 | 0x10, /* 00010000 */
2605 | 0x10, /* 00010000 */
2606 | 0xFC, /* 11111100 */
2607 | 0x10, /* 00010000 */
2608 | 0xFC, /* 11111100 */
2609 | 0x10, /* 00010000 */
2610 | 0x10, /* 00010000 */
2611 | 0x10, /* 00010000 */
2612 | 0x10, /* 00010000 */
2613 |
2614 | /* 217 0xD9 '\331' */
2615 | 0x10, /* 00010000 */
2616 | 0x10, /* 00010000 */
2617 | 0x10, /* 00010000 */
2618 | 0x10, /* 00010000 */
2619 | 0xF0, /* 11110000 */
2620 | 0x00, /* 00000000 */
2621 | 0x00, /* 00000000 */
2622 | 0x00, /* 00000000 */
2623 | 0x00, /* 00000000 */
2624 | 0x00, /* 00000000 */
2625 |
2626 | /* 218 0xDA '\332' */
2627 | 0x00, /* 00000000 */
2628 | 0x00, /* 00000000 */
2629 | 0x00, /* 00000000 */
2630 | 0x00, /* 00000000 */
2631 | 0x1C, /* 00011100 */
2632 | 0x10, /* 00010000 */
2633 | 0x10, /* 00010000 */
2634 | 0x10, /* 00010000 */
2635 | 0x10, /* 00010000 */
2636 | 0x10, /* 00010000 */
2637 |
2638 | /* 219 0xDB '\333' */
2639 | 0xFC, /* 11111100 */
2640 | 0xFC, /* 11111100 */
2641 | 0xFC, /* 11111100 */
2642 | 0xFC, /* 11111100 */
2643 | 0xFC, /* 11111100 */
2644 | 0xFC, /* 11111100 */
2645 | 0xFC, /* 11111100 */
2646 | 0xFC, /* 11111100 */
2647 | 0xFC, /* 11111100 */
2648 | 0xFC, /* 11111100 */
2649 |
2650 | /* 220 0xDC '\334' */
2651 | 0x00, /* 00000000 */
2652 | 0x00, /* 00000000 */
2653 | 0x00, /* 00000000 */
2654 | 0x00, /* 00000000 */
2655 | 0x00, /* 00000000 */
2656 | 0xFC, /* 11111100 */
2657 | 0xFC, /* 11111100 */
2658 | 0xFC, /* 11111100 */
2659 | 0xFC, /* 11111100 */
2660 | 0xFC, /* 11111100 */
2661 |
2662 | /* 221 0xDD '\335' */
2663 | 0xE0, /* 11100000 */
2664 | 0xE0, /* 11100000 */
2665 | 0xE0, /* 11100000 */
2666 | 0xE0, /* 11100000 */
2667 | 0xE0, /* 11100000 */
2668 | 0xE0, /* 11100000 */
2669 | 0xE0, /* 11100000 */
2670 | 0xE0, /* 11100000 */
2671 | 0xE0, /* 11100000 */
2672 | 0xE0, /* 11100000 */
2673 |
2674 | /* 222 0xDE '\336' */
2675 | 0x1C, /* 00011100 */
2676 | 0x1C, /* 00011100 */
2677 | 0x1C, /* 00011100 */
2678 | 0x1C, /* 00011100 */
2679 | 0x1C, /* 00011100 */
2680 | 0x1C, /* 00011100 */
2681 | 0x1C, /* 00011100 */
2682 | 0x1C, /* 00011100 */
2683 | 0x1C, /* 00011100 */
2684 | 0x1C, /* 00011100 */
2685 |
2686 | /* 223 0xDF '\337' */
2687 | 0xFC, /* 11111100 */
2688 | 0xFC, /* 11111100 */
2689 | 0xFC, /* 11111100 */
2690 | 0xFC, /* 11111100 */
2691 | 0xFC, /* 11111100 */
2692 | 0x00, /* 00000000 */
2693 | 0x00, /* 00000000 */
2694 | 0x00, /* 00000000 */
2695 | 0x00, /* 00000000 */
2696 | 0x00, /* 00000000 */
2697 |
2698 | /* 224 0xE0 '\340' */
2699 | 0x00, /* 00000000 */
2700 | 0x00, /* 00000000 */
2701 | 0x00, /* 00000000 */
2702 | 0x34, /* 00110100 */
2703 | 0x48, /* 01001000 */
2704 | 0x48, /* 01001000 */
2705 | 0x48, /* 01001000 */
2706 | 0x34, /* 00110100 */
2707 | 0x00, /* 00000000 */
2708 | 0x00, /* 00000000 */
2709 |
2710 | /* 225 0xE1 '\341' */
2711 | 0x18, /* 00011000 */
2712 | 0x24, /* 00100100 */
2713 | 0x44, /* 01000100 */
2714 | 0x48, /* 01001000 */
2715 | 0x48, /* 01001000 */
2716 | 0x44, /* 01000100 */
2717 | 0x44, /* 01000100 */
2718 | 0x58, /* 01011000 */
2719 | 0x40, /* 01000000 */
2720 | 0x00, /* 00000000 */
2721 |
2722 | /* 226 0xE2 '\342' */
2723 | 0x00, /* 00000000 */
2724 | 0x7C, /* 01111100 */
2725 | 0x44, /* 01000100 */
2726 | 0x44, /* 01000100 */
2727 | 0x40, /* 01000000 */
2728 | 0x40, /* 01000000 */
2729 | 0x40, /* 01000000 */
2730 | 0x40, /* 01000000 */
2731 | 0x00, /* 00000000 */
2732 | 0x00, /* 00000000 */
2733 |
2734 | /* 227 0xE3 '\343' */
2735 | 0x00, /* 00000000 */
2736 | 0x00, /* 00000000 */
2737 | 0x00, /* 00000000 */
2738 | 0x7C, /* 01111100 */
2739 | 0x28, /* 00101000 */
2740 | 0x28, /* 00101000 */
2741 | 0x28, /* 00101000 */
2742 | 0x28, /* 00101000 */
2743 | 0x00, /* 00000000 */
2744 | 0x00, /* 00000000 */
2745 |
2746 | /* 228 0xE4 '\344' */
2747 | 0x00, /* 00000000 */
2748 | 0x7C, /* 01111100 */
2749 | 0x24, /* 00100100 */
2750 | 0x10, /* 00010000 */
2751 | 0x08, /* 00001000 */
2752 | 0x10, /* 00010000 */
2753 | 0x24, /* 00100100 */
2754 | 0x7C, /* 01111100 */
2755 | 0x00, /* 00000000 */
2756 | 0x00, /* 00000000 */
2757 |
2758 | /* 229 0xE5 '\345' */
2759 | 0x00, /* 00000000 */
2760 | 0x00, /* 00000000 */
2761 | 0x00, /* 00000000 */
2762 | 0x3C, /* 00111100 */
2763 | 0x48, /* 01001000 */
2764 | 0x48, /* 01001000 */
2765 | 0x48, /* 01001000 */
2766 | 0x30, /* 00110000 */
2767 | 0x00, /* 00000000 */
2768 | 0x00, /* 00000000 */
2769 |
2770 | /* 230 0xE6 '\346' */
2771 | 0x00, /* 00000000 */
2772 | 0x00, /* 00000000 */
2773 | 0x00, /* 00000000 */
2774 | 0x48, /* 01001000 */
2775 | 0x48, /* 01001000 */
2776 | 0x48, /* 01001000 */
2777 | 0x48, /* 01001000 */
2778 | 0x74, /* 01110100 */
2779 | 0x40, /* 01000000 */
2780 | 0x40, /* 01000000 */
2781 |
2782 | /* 231 0xE7 '\347' */
2783 | 0x00, /* 00000000 */
2784 | 0x00, /* 00000000 */
2785 | 0x00, /* 00000000 */
2786 | 0x7C, /* 01111100 */
2787 | 0x10, /* 00010000 */
2788 | 0x10, /* 00010000 */
2789 | 0x10, /* 00010000 */
2790 | 0x0C, /* 00001100 */
2791 | 0x00, /* 00000000 */
2792 | 0x00, /* 00000000 */
2793 |
2794 | /* 232 0xE8 '\350' */
2795 | 0x38, /* 00111000 */
2796 | 0x10, /* 00010000 */
2797 | 0x38, /* 00111000 */
2798 | 0x44, /* 01000100 */
2799 | 0x44, /* 01000100 */
2800 | 0x38, /* 00111000 */
2801 | 0x10, /* 00010000 */
2802 | 0x38, /* 00111000 */
2803 | 0x00, /* 00000000 */
2804 | 0x00, /* 00000000 */
2805 |
2806 | /* 233 0xE9 '\351' */
2807 | 0x00, /* 00000000 */
2808 | 0x38, /* 00111000 */
2809 | 0x44, /* 01000100 */
2810 | 0x44, /* 01000100 */
2811 | 0x7C, /* 01111100 */
2812 | 0x44, /* 01000100 */
2813 | 0x44, /* 01000100 */
2814 | 0x38, /* 00111000 */
2815 | 0x00, /* 00000000 */
2816 | 0x00, /* 00000000 */
2817 |
2818 | /* 234 0xEA '\352' */
2819 | 0x00, /* 00000000 */
2820 | 0x38, /* 00111000 */
2821 | 0x44, /* 01000100 */
2822 | 0x44, /* 01000100 */
2823 | 0x44, /* 01000100 */
2824 | 0x44, /* 01000100 */
2825 | 0x28, /* 00101000 */
2826 | 0x6C, /* 01101100 */
2827 | 0x00, /* 00000000 */
2828 | 0x00, /* 00000000 */
2829 |
2830 | /* 235 0xEB '\353' */
2831 | 0x00, /* 00000000 */
2832 | 0x18, /* 00011000 */
2833 | 0x20, /* 00100000 */
2834 | 0x18, /* 00011000 */
2835 | 0x24, /* 00100100 */
2836 | 0x24, /* 00100100 */
2837 | 0x24, /* 00100100 */
2838 | 0x18, /* 00011000 */
2839 | 0x00, /* 00000000 */
2840 | 0x00, /* 00000000 */
2841 |
2842 | /* 236 0xEC '\354' */
2843 | 0x00, /* 00000000 */
2844 | 0x00, /* 00000000 */
2845 | 0x00, /* 00000000 */
2846 | 0x38, /* 00111000 */
2847 | 0x54, /* 01010100 */
2848 | 0x54, /* 01010100 */
2849 | 0x54, /* 01010100 */
2850 | 0x38, /* 00111000 */
2851 | 0x00, /* 00000000 */
2852 | 0x00, /* 00000000 */
2853 |
2854 | /* 237 0xED '\355' */
2855 | 0x00, /* 00000000 */
2856 | 0x00, /* 00000000 */
2857 | 0x04, /* 00000100 */
2858 | 0x38, /* 00111000 */
2859 | 0x54, /* 01010100 */
2860 | 0x54, /* 01010100 */
2861 | 0x38, /* 00111000 */
2862 | 0x40, /* 01000000 */
2863 | 0x00, /* 00000000 */
2864 | 0x00, /* 00000000 */
2865 |
2866 | /* 238 0xEE '\356' */
2867 | 0x00, /* 00000000 */
2868 | 0x3C, /* 00111100 */
2869 | 0x40, /* 01000000 */
2870 | 0x40, /* 01000000 */
2871 | 0x38, /* 00111000 */
2872 | 0x40, /* 01000000 */
2873 | 0x40, /* 01000000 */
2874 | 0x3C, /* 00111100 */
2875 | 0x00, /* 00000000 */
2876 | 0x00, /* 00000000 */
2877 |
2878 | /* 239 0xEF '\357' */
2879 | 0x00, /* 00000000 */
2880 | 0x38, /* 00111000 */
2881 | 0x44, /* 01000100 */
2882 | 0x44, /* 01000100 */
2883 | 0x44, /* 01000100 */
2884 | 0x44, /* 01000100 */
2885 | 0x44, /* 01000100 */
2886 | 0x44, /* 01000100 */
2887 | 0x00, /* 00000000 */
2888 | 0x00, /* 00000000 */
2889 |
2890 | /* 240 0xF0 '\360' */
2891 | 0x00, /* 00000000 */
2892 | 0x00, /* 00000000 */
2893 | 0xFC, /* 11111100 */
2894 | 0x00, /* 00000000 */
2895 | 0xFC, /* 11111100 */
2896 | 0x00, /* 00000000 */
2897 | 0xFC, /* 11111100 */
2898 | 0x00, /* 00000000 */
2899 | 0x00, /* 00000000 */
2900 | 0x00, /* 00000000 */
2901 |
2902 | /* 241 0xF1 '\361' */
2903 | 0x00, /* 00000000 */
2904 | 0x10, /* 00010000 */
2905 | 0x10, /* 00010000 */
2906 | 0x7C, /* 01111100 */
2907 | 0x10, /* 00010000 */
2908 | 0x10, /* 00010000 */
2909 | 0x00, /* 00000000 */
2910 | 0x7C, /* 01111100 */
2911 | 0x00, /* 00000000 */
2912 | 0x00, /* 00000000 */
2913 |
2914 | /* 242 0xF2 '\362' */
2915 | 0x00, /* 00000000 */
2916 | 0x20, /* 00100000 */
2917 | 0x10, /* 00010000 */
2918 | 0x08, /* 00001000 */
2919 | 0x10, /* 00010000 */
2920 | 0x20, /* 00100000 */
2921 | 0x00, /* 00000000 */
2922 | 0x38, /* 00111000 */
2923 | 0x00, /* 00000000 */
2924 | 0x00, /* 00000000 */
2925 |
2926 | /* 243 0xF3 '\363' */
2927 | 0x00, /* 00000000 */
2928 | 0x08, /* 00001000 */
2929 | 0x10, /* 00010000 */
2930 | 0x20, /* 00100000 */
2931 | 0x10, /* 00010000 */
2932 | 0x08, /* 00001000 */
2933 | 0x00, /* 00000000 */
2934 | 0x38, /* 00111000 */
2935 | 0x00, /* 00000000 */
2936 | 0x00, /* 00000000 */
2937 |
2938 | /* 244 0xF4 '\364' */
2939 | 0x00, /* 00000000 */
2940 | 0x0C, /* 00001100 */
2941 | 0x10, /* 00010000 */
2942 | 0x10, /* 00010000 */
2943 | 0x10, /* 00010000 */
2944 | 0x10, /* 00010000 */
2945 | 0x10, /* 00010000 */
2946 | 0x10, /* 00010000 */
2947 | 0x10, /* 00010000 */
2948 | 0x10, /* 00010000 */
2949 |
2950 | /* 245 0xF5 '\365' */
2951 | 0x10, /* 00010000 */
2952 | 0x10, /* 00010000 */
2953 | 0x10, /* 00010000 */
2954 | 0x10, /* 00010000 */
2955 | 0x10, /* 00010000 */
2956 | 0x10, /* 00010000 */
2957 | 0x10, /* 00010000 */
2958 | 0x10, /* 00010000 */
2959 | 0x60, /* 01100000 */
2960 | 0x00, /* 00000000 */
2961 |
2962 | /* 246 0xF6 '\366' */
2963 | 0x00, /* 00000000 */
2964 | 0x00, /* 00000000 */
2965 | 0x10, /* 00010000 */
2966 | 0x00, /* 00000000 */
2967 | 0x7C, /* 01111100 */
2968 | 0x00, /* 00000000 */
2969 | 0x10, /* 00010000 */
2970 | 0x00, /* 00000000 */
2971 | 0x00, /* 00000000 */
2972 | 0x00, /* 00000000 */
2973 |
2974 | /* 247 0xF7 '\367' */
2975 | 0x00, /* 00000000 */
2976 | 0x00, /* 00000000 */
2977 | 0x20, /* 00100000 */
2978 | 0x54, /* 01010100 */
2979 | 0x08, /* 00001000 */
2980 | 0x20, /* 00100000 */
2981 | 0x54, /* 01010100 */
2982 | 0x08, /* 00001000 */
2983 | 0x00, /* 00000000 */
2984 | 0x00, /* 00000000 */
2985 |
2986 | /* 248 0xF8 '\370' */
2987 | 0x30, /* 00110000 */
2988 | 0x48, /* 01001000 */
2989 | 0x48, /* 01001000 */
2990 | 0x30, /* 00110000 */
2991 | 0x00, /* 00000000 */
2992 | 0x00, /* 00000000 */
2993 | 0x00, /* 00000000 */
2994 | 0x00, /* 00000000 */
2995 | 0x00, /* 00000000 */
2996 | 0x00, /* 00000000 */
2997 |
2998 | /* 249 0xF9 '\371' */
2999 | 0x00, /* 00000000 */
3000 | 0x00, /* 00000000 */
3001 | 0x00, /* 00000000 */
3002 | 0x10, /* 00010000 */
3003 | 0x38, /* 00111000 */
3004 | 0x10, /* 00010000 */
3005 | 0x00, /* 00000000 */
3006 | 0x00, /* 00000000 */
3007 | 0x00, /* 00000000 */
3008 | 0x00, /* 00000000 */
3009 |
3010 | /* 250 0xFA '\372' */
3011 | 0x00, /* 00000000 */
3012 | 0x00, /* 00000000 */
3013 | 0x00, /* 00000000 */
3014 | 0x00, /* 00000000 */
3015 | 0x10, /* 00010000 */
3016 | 0x00, /* 00000000 */
3017 | 0x00, /* 00000000 */
3018 | 0x00, /* 00000000 */
3019 | 0x00, /* 00000000 */
3020 | 0x00, /* 00000000 */
3021 |
3022 | /* 251 0xFB '\373' */
3023 | 0x00, /* 00000000 */
3024 | 0x04, /* 00000100 */
3025 | 0x08, /* 00001000 */
3026 | 0x08, /* 00001000 */
3027 | 0x50, /* 01010000 */
3028 | 0x50, /* 01010000 */
3029 | 0x20, /* 00100000 */
3030 | 0x20, /* 00100000 */
3031 | 0x00, /* 00000000 */
3032 | 0x00, /* 00000000 */
3033 |
3034 | /* 252 0xFC '\374' */
3035 | 0x60, /* 01100000 */
3036 | 0x50, /* 01010000 */
3037 | 0x50, /* 01010000 */
3038 | 0x50, /* 01010000 */
3039 | 0x00, /* 00000000 */
3040 | 0x00, /* 00000000 */
3041 | 0x00, /* 00000000 */
3042 | 0x00, /* 00000000 */
3043 | 0x00, /* 00000000 */
3044 | 0x00, /* 00000000 */
3045 |
3046 | /* 253 0xFD '\375' */
3047 | 0x60, /* 01100000 */
3048 | 0x10, /* 00010000 */
3049 | 0x20, /* 00100000 */
3050 | 0x70, /* 01110000 */
3051 | 0x00, /* 00000000 */
3052 | 0x00, /* 00000000 */
3053 | 0x00, /* 00000000 */
3054 | 0x00, /* 00000000 */
3055 | 0x00, /* 00000000 */
3056 | 0x00, /* 00000000 */
3057 |
3058 | /* 254 0xFE '\376' */
3059 | 0x00, /* 00000000 */
3060 | 0x00, /* 00000000 */
3061 | 0x38, /* 00111000 */
3062 | 0x38, /* 00111000 */
3063 | 0x38, /* 00111000 */
3064 | 0x38, /* 00111000 */
3065 | 0x38, /* 00111000 */
3066 | 0x38, /* 00111000 */
3067 | 0x00, /* 00000000 */
3068 | 0x00, /* 00000000 */
3069 |
3070 | /* 255 0xFF '\377' */
3071 | 0x00, /* 00000000 */
3072 | 0x00, /* 00000000 */
3073 | 0x00, /* 00000000 */
3074 | 0x00, /* 00000000 */
3075 | 0x00, /* 00000000 */
3076 | 0x00, /* 00000000 */
3077 | 0x00, /* 00000000 */
3078 | 0x00, /* 00000000 */
3079 | 0x00, /* 00000000 */
3080 | 0x00, /* 00000000 */
3081 | };
3082 | const int font_size = sizeof(font);
3083 |
--------------------------------------------------------------------------------
/main.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include "renderer.h"
8 |
9 | #define VERSION 1
10 | #define SUBVERSION 2
11 |
12 | #define HOOKS_NUM 17 // Hooked functions num
13 | #define PHYS_BUTTONS_NUM 16 // Supported physical buttons num
14 | #define TARGET_REMAPS 42 // Supported target remaps num
15 | #define BUTTONS_NUM 38 // Supported buttons num
16 | #define MENU_MODES 9 // Menu modes num
17 | #define LONG_PRESS_TIME 350000 //0.35sec
18 | #define COLOR_DEFAULT 0x00FFFFFF
19 | #define COLOR_HEADER 0x00FF00FF
20 | #define COLOR_CURSOR 0x0000FF00
21 | #define COLOR_ACTIVE 0x0000FFFF
22 | #define COLOR_DISABLE 0x000000FF
23 | #define CHA_W 12 //Character size in pexels
24 | #define CHA_H 20
25 | #define L_0 5 //Left margin for text
26 | #define L_1 18
27 | #define L_2 36
28 |
29 | #define BUFFERS_NUM 64
30 | #define ANALOGS_DEADZONE_DEF 30
31 | #define ANALOGS_FORCE_DIGITAL_DEF 0
32 | #define ANOLOGS_OPTIONS_NUM 8
33 | #define GYRO_SENS_DEF 127
34 | #define GYRO_DEADZONE_DEF 15
35 | #define GYRO_OPTIONS_NUM 6
36 | #define MULTITOUCH_FRONT_NUM 6
37 | #define MULTITOUCH_REAR_NUM 4
38 | #define TOUCH_OPTIONS_NUM 18
39 | #define TOUCH_MODE_DEF 1
40 | #define CNTRL_OPTIONS_NUM 3
41 | #define SETTINGS_NUM 4
42 | #define CREDITS_NUM 3
43 |
44 | #ifndef max
45 | # define max(a,b) (((a)>(b))?(a):(b))
46 | # define min(a,b) (((a)<(b))?(a):(b))
47 | # define lim(a,b,c) (((a)>(b))?(((a)<(c))?(a):(c)):(b))
48 | #endif
49 |
50 | static const uint16_t TOUCH_POINTS_DEF[16] = {
51 | 600, 272, //Front TL
52 | 1280, 272, // TR
53 | 600, 816, // BL
54 | 1280, 816, // BR
55 | 600, 272, //Rear TL
56 | 1280, 272, // TR
57 | 600, 608, // BL
58 | 1280, 608 // BR
59 | };
60 |
61 | static const uint8_t CNTRL_DEF[CNTRL_OPTIONS_NUM] = {
62 | 0, 0, 0
63 | };
64 |
65 | static const uint8_t SETTINGS_DEF[SETTINGS_NUM] = {
66 | 4, 3, //Opening keys
67 | 1, //Autosave game profile
68 | 0 //Startup delay
69 | };
70 |
71 | enum{
72 | MAIN_MENU = 0,
73 | REMAP_MENU,
74 | ANALOG_MENU,
75 | TOUCH_MENU,
76 | GYRO_MENU,
77 | CNTRL_MENU,
78 | FUNCS_LIST,
79 | SETTINGS_MENU,
80 | CREDITS_MENU
81 | };
82 |
83 | enum{
84 | POSITIVE = 0, NEGATIVE
85 | };
86 |
87 | enum{
88 | PEEK = 0, READ
89 | };
90 |
91 | static uint8_t btn_mask[BUTTONS_NUM];
92 | static uint8_t analogs_options[ANOLOGS_OPTIONS_NUM];
93 | static uint8_t gyro_options[GYRO_OPTIONS_NUM];
94 | static uint16_t touch_options[TOUCH_OPTIONS_NUM];
95 | static uint8_t controller_options[CNTRL_OPTIONS_NUM];
96 | static uint8_t settings_options[SETTINGS_NUM];
97 |
98 | static uint8_t used_funcs[HOOKS_NUM-1];
99 |
100 | //Circular cache to store remapped keys buffers per each ctrs hook
101 | static SceCtrlData *remappedBuffers[HOOKS_NUM-5][BUFFERS_NUM];
102 | static int remappedBuffersSizes[HOOKS_NUM];
103 | static int remappedBuffersIdxs[HOOKS_NUM];
104 |
105 | //Circular cache to store Touch buffers per each touch hook
106 | static SceTouchData *remappedBuffersFront[4][BUFFERS_NUM];
107 | static int remappedBuffersFrontSizes[4];
108 | static int remappedBuffersFrontIdxs[4];
109 | static SceTouchData *remappedBuffersRear[4][BUFFERS_NUM];
110 | static int remappedBuffersRearSizes[4];
111 | static int remappedBuffersRearIdxs[4];
112 | uint8_t newEmulatedFrontTouchBuffer = 0;
113 | uint8_t newEmulatedRearTouchBuffer = 0;
114 |
115 | typedef struct EmulatedTouch{
116 | SceTouchReport reports[MULTITOUCH_FRONT_NUM];
117 | uint8_t num;
118 | }EmulatedTouch;
119 | EmulatedTouch etFront, etRear, prevEtFront, prevEtRear;
120 | static uint8_t etFrontIdCounter = 64;
121 | static uint8_t etRearIdCounter = 64;
122 | static uint16_t TOUCH_SIZE[4] = {
123 | 1920, 1088, //Front
124 | 1919, 890 //Rear
125 | };
126 |
127 | static uint8_t delayedStartDone = 0;
128 | static uint64_t startTick;
129 | static uint8_t new_frame = 1;
130 | static int screen_h = 272;
131 | static int screen_w = 480;
132 | static uint32_t ticker;
133 | static uint8_t show_menu = 0;
134 | static int cfg_i = 0;
135 | static int menu_i = MAIN_MENU;
136 |
137 | static uint32_t curr_buttons;
138 | static uint32_t old_buttons;
139 | static uint64_t tick;
140 | static uint64_t pressedTicks[PHYS_BUTTONS_NUM];
141 |
142 | static uint8_t current_hook = 0;
143 | static SceUID hooks[HOOKS_NUM];
144 | static tai_hook_ref_t refs[HOOKS_NUM];
145 | static int model;
146 | static char titleid[16];
147 | static uint8_t internal_touch_call = 0;
148 | static uint8_t internal_ext_call = 0;
149 | static char fname[128];
150 |
151 | static char* str_menus[MENU_MODES] = {
152 | "MAIN MENU",
153 | "REMAP MENU",
154 | "ANALOG MENU",
155 | "TOUCH MENU",
156 | "GYRO_MENU",
157 | "CONNECTED CONTROLLERS",
158 | "USED FUNCTIONS",
159 | "SETTINGS",
160 | "CREDITS"
161 | };
162 |
163 | static char* str_main_menu[] = {
164 | "Change remap settings",
165 | "Change analog remap settings",
166 | "Change touch remap settings",
167 | "Change gyro remap settings",
168 | "Setup external gamepads",
169 | "Show imported functions",
170 | "Settings",
171 | "Credits",
172 | "Return to the game"
173 | };
174 |
175 | static char* str_credits[] = {
176 | "Thanks to ",
177 | "Tain Sueiras, nobodywasishere and RaveHeart",
178 | "for their awesome support on Patreon"
179 | };
180 |
181 | static char* str_yes_no[] = {
182 | "No", "Yes"
183 | };
184 |
185 | static char* str_settings[] = {
186 | "Save as Game profile", "Load Game profile", "Save as Global profile", "Load Global profile"
187 | };
188 |
189 | static char* str_funcs[HOOKS_NUM-1] = {
190 | "sceCtrlPeekBufferPositive",
191 | "sceCtrlPeekBufferPositive2",
192 | "sceCtrlReadBufferPositive",
193 | "sceCtrlReadBufferPositive2",
194 | "sceCtrlPeekBufferPositiveExt",
195 | "sceCtrlPeekBufferPositiveExt2",
196 | "sceCtrlReadBufferPositiveExt",
197 | "sceCtrlReadBufferPositiveExt2",
198 | "sceCtrlPeekBufferNegative",
199 | "sceCtrlPeekBufferNegative2",
200 | "sceCtrlReadBufferNegative",
201 | "sceCtrlReadBufferNegative2",
202 | "sceTouchRead",
203 | "sceTouchRead2",
204 | "sceTouchPeek",
205 | "sceTouchPeek2"
206 | };
207 | static uint32_t btns[PHYS_BUTTONS_NUM] = {
208 | SCE_CTRL_CROSS, SCE_CTRL_CIRCLE, SCE_CTRL_TRIANGLE, SCE_CTRL_SQUARE,
209 | SCE_CTRL_START, SCE_CTRL_SELECT, SCE_CTRL_LTRIGGER, SCE_CTRL_RTRIGGER,
210 | SCE_CTRL_UP, SCE_CTRL_RIGHT, SCE_CTRL_LEFT, SCE_CTRL_DOWN, SCE_CTRL_L1,
211 | SCE_CTRL_R1, SCE_CTRL_L3, SCE_CTRL_R3
212 | };
213 |
214 | static char* str_btns[PHYS_BUTTONS_NUM] = {
215 | "Cross", "Circle", "Triangle", "Square",
216 | "Start", "Select",
217 | "LT/L2", "RT/R2",
218 | "Up", "Right", "Left", "Down",
219 | "L1", "R1", "L3", "R3"
220 | };
221 | static char* str_sections[] = {
222 | "Buttons", "LStick", "RStick",
223 | "FrontTouch", "RearTouch", "Gyroscope",
224 | "","Disabled"
225 | };
226 | static char* str_analog_directions[] = {
227 | "Left", "Right", "Up", "Down"
228 | };
229 | static char* str_touch_zones[] = {
230 | "TopLeft", "TopRight", "BotLeft", "BotRight"
231 | };
232 | static char* str_gyro_directions[] = {
233 | "Left", "Right", "Up", "Down",
234 | "Roll Left","Roll Right"
235 | };
236 | static char* str_touch_points[] = {
237 | "Point A", "Point B", "Point C", "Point D"
238 | };
239 |
240 | // Generic clamp function
241 | int32_t clamp(int32_t value, int32_t mini, int32_t maxi) {
242 | if (value < mini) { return mini; }
243 | if (value > maxi) { return maxi; }
244 | return value;
245 | }
246 |
247 | // Reset options per-menu
248 | void resetRemapsOptions(){
249 | for (int i = 0; i < BUTTONS_NUM; i++) {
250 | btn_mask[i] = PHYS_BUTTONS_NUM;
251 | }
252 | }
253 | void resetAnalogsOptions(){
254 | for (int i = 0; i < ANOLOGS_OPTIONS_NUM; i++)
255 | analogs_options[i] = i < 4 ? ANALOGS_DEADZONE_DEF : ANALOGS_FORCE_DIGITAL_DEF;
256 | }
257 | void resetTouchOptions(){
258 | for (int i = 0; i < TOUCH_OPTIONS_NUM - 2; i++)
259 | touch_options[i] = TOUCH_POINTS_DEF[i];
260 | touch_options[16] = TOUCH_MODE_DEF;
261 | touch_options[17] = TOUCH_MODE_DEF;
262 | }
263 | void resetGyroOptions(){
264 | for (int i = 0; i < GYRO_OPTIONS_NUM; i++)
265 | gyro_options[i] = i < 3 ? GYRO_SENS_DEF : GYRO_DEADZONE_DEF;
266 | }
267 | void resetCntrlOptions(){
268 | for (int i = 0; i < CNTRL_OPTIONS_NUM; i++)
269 | controller_options[i] = CNTRL_DEF[i];
270 | }
271 | void resetSettingsOptions(){
272 | for (int i = 0; i < SETTINGS_NUM; i++)
273 | settings_options[i] = SETTINGS_DEF[i];
274 | }
275 |
276 | char* getControllerName(int id){
277 | if (id == SCE_CTRL_TYPE_UNPAIRED) return "Unpaired controller";
278 | else if (id == SCE_CTRL_TYPE_PHY) return "Physical controller for VITA";
279 | else if (id == SCE_CTRL_TYPE_VIRT) return "Virtual controller for PSTV";
280 | else if (id == SCE_CTRL_TYPE_DS3) return "DualShock 3";
281 | else if (id == SCE_CTRL_TYPE_DS4) return "DualShock 4";
282 | else return "Unknown controller";
283 | }
284 |
285 | //Calculate starting index for scroll menu
286 | int calcStartingIndex(int idx, int entriesNum, int screenEntries){
287 | int bottom_l = 3;
288 | int ret = max(0, idx - (screenEntries - bottom_l));
289 | while (ret > 0 && (entriesNum - ret - 2) < screenEntries) ret--;
290 | return ret;
291 | }
292 | // Config Menu Renderer
293 | void drawConfigMenu() {
294 | char* _blank = " ";
295 |
296 | //DRAW HEADER
297 | drawStringF(0, 0, _blank);
298 | drawStringF(0, CHA_H, _blank);
299 | setTextColor(COLOR_HEADER);
300 | drawStringF(L_0, 10, "remaPSV v.%hhu.%hhu %s", VERSION, SUBVERSION, str_menus[menu_i]);
301 | drawString(screen_w - CHA_W*strlen(titleid) - 10, 10, titleid);
302 |
303 | //DRAW MENU
304 | uint8_t slim_mode = 0;//Mode for low res framebuffers;
305 | if (screen_w < 850)
306 | slim_mode = 1;
307 | int i, y = CHA_H;
308 | int screen_entries = ((float)screen_h - 10) / CHA_H - 1;
309 | int avaliable_entries = screen_entries - 4 - (slim_mode ? 1 : 0);
310 | char *footer1 ="", *footer2="";
311 | switch (menu_i){
312 | case MAIN_MENU:
313 | for (i = calcStartingIndex(cfg_i, sizeof(str_main_menu)/sizeof(char*), avaliable_entries); i < sizeof(str_main_menu)/sizeof(char*); i++) {
314 | if (cfg_i == i){//Draw cursor
315 | setTextColor(COLOR_CURSOR);
316 | drawString(L_0, y + CHA_H, (ticker % 16 < 8) ? "x" : "X");
317 | }
318 |
319 | setTextColor((i == cfg_i) ? COLOR_CURSOR : COLOR_DEFAULT);
320 | drawStringF(L_1, y += CHA_H, "%s", str_main_menu[i]);
321 | if (y + 40 > screen_h) break;
322 | }
323 | footer1 = "(X):select";
324 | footer2 = "(O):close";
325 | break;
326 | case REMAP_MENU:
327 | for (i = calcStartingIndex(cfg_i, BUTTONS_NUM, avaliable_entries); i < BUTTONS_NUM; i++) {
328 | if (cfg_i == i){//Draw cursor
329 | setTextColor(COLOR_CURSOR);
330 | drawString(L_0 + CHA_W*10, y + CHA_H, (ticker % 16 < 8) ? "<" : ">");
331 | }
332 |
333 | char *srcSection = "", *srcAction = "", *targetSection = "", *targetAction = "";
334 | //Source section
335 | if (i == 0) srcSection = str_sections[0];
336 | else if (i == PHYS_BUTTONS_NUM) srcSection = str_sections[3];
337 | else if (i == PHYS_BUTTONS_NUM + 4) srcSection = str_sections[4];
338 | else if (i == PHYS_BUTTONS_NUM + 8) srcSection = str_sections[1];
339 | else if (i == PHYS_BUTTONS_NUM + 12) srcSection = str_sections[2];
340 | else if (i == PHYS_BUTTONS_NUM + 16) srcSection = str_sections[5];
341 | //Source Action
342 | if (i < PHYS_BUTTONS_NUM) srcAction = str_btns[i];
343 | else if (i < PHYS_BUTTONS_NUM + 4) srcAction = str_touch_zones[i - PHYS_BUTTONS_NUM];
344 | else if (i < PHYS_BUTTONS_NUM + 8) srcAction = str_touch_zones[i - PHYS_BUTTONS_NUM-4];
345 | else if (i < PHYS_BUTTONS_NUM + 12) srcAction = str_analog_directions[i - PHYS_BUTTONS_NUM-8];
346 | else if (i < PHYS_BUTTONS_NUM + 16) srcAction = str_analog_directions[i - PHYS_BUTTONS_NUM-12];
347 | else if (i < PHYS_BUTTONS_NUM + 22) srcAction = str_gyro_directions[i - PHYS_BUTTONS_NUM-16];
348 | //Target Section
349 | if (btn_mask[i] < PHYS_BUTTONS_NUM) targetSection = str_sections[0];
350 | else if (btn_mask[i] == PHYS_BUTTONS_NUM) targetSection = str_sections[6];
351 | else if (btn_mask[i] == PHYS_BUTTONS_NUM + 1) targetSection = str_sections[7];
352 | else if (btn_mask[i] < PHYS_BUTTONS_NUM + 6) targetSection = str_sections[1];
353 | else if (btn_mask[i] < PHYS_BUTTONS_NUM + 10) targetSection = str_sections[2];
354 | else if (btn_mask[i] < PHYS_BUTTONS_NUM + 18) targetSection = str_sections[3];
355 | else if (btn_mask[i] < PHYS_BUTTONS_NUM + 26) targetSection = str_sections[4];
356 | //Target Action
357 | if (btn_mask[i] < PHYS_BUTTONS_NUM) targetAction = str_btns[btn_mask[i]];
358 | else if (btn_mask[i] < PHYS_BUTTONS_NUM + 2) targetAction = "";
359 | else if (btn_mask[i] < PHYS_BUTTONS_NUM + 6) targetAction = str_analog_directions[btn_mask[i] - PHYS_BUTTONS_NUM-2];
360 | else if (btn_mask[i] < PHYS_BUTTONS_NUM + 10) targetAction = str_analog_directions[btn_mask[i] - PHYS_BUTTONS_NUM-6];
361 | else if (btn_mask[i] < PHYS_BUTTONS_NUM + 14) targetAction = str_touch_zones[btn_mask[i] - PHYS_BUTTONS_NUM-10];
362 | else if (btn_mask[i] < PHYS_BUTTONS_NUM + 18) targetAction = str_touch_points[btn_mask[i] - PHYS_BUTTONS_NUM-14];
363 | else if (btn_mask[i] < PHYS_BUTTONS_NUM + 22) targetAction = str_touch_zones[btn_mask[i] - PHYS_BUTTONS_NUM-18];
364 | else if (btn_mask[i] < PHYS_BUTTONS_NUM + 26) targetAction = str_touch_points[btn_mask[i] - PHYS_BUTTONS_NUM-22];
365 |
366 | setTextColor(COLOR_HEADER);
367 | drawString(L_0, y += CHA_H, srcSection);
368 |
369 | if (i == cfg_i) setTextColor(COLOR_CURSOR);
370 | else if (btn_mask[i] == PHYS_BUTTONS_NUM) setTextColor(COLOR_DEFAULT);
371 | else if (btn_mask[i] == PHYS_BUTTONS_NUM + 1) setTextColor(COLOR_DISABLE);
372 | else setTextColor(COLOR_ACTIVE);
373 | drawString(L_0 + CHA_W*11, y, srcAction);
374 |
375 | if (btn_mask[i] == PHYS_BUTTONS_NUM) setTextColor(COLOR_DEFAULT);
376 | else if (btn_mask[i] == PHYS_BUTTONS_NUM + 1) setTextColor(COLOR_DISABLE);
377 | else setTextColor(COLOR_ACTIVE);
378 | if (btn_mask[i] != PHYS_BUTTONS_NUM)
379 | drawString(L_0 + CHA_W*19, y, " -> ");
380 |
381 | drawString(L_0 + CHA_W*23, y, targetSection);
382 | drawString(L_0 + CHA_W*34, y, targetAction);
383 | if (y + 60 > screen_h) break;
384 | }
385 | setTextColor(COLOR_HEADER);
386 | footer1 = "(<)(>):change (LT)(RT):section ([]):reset";
387 | footer2 = " (start):reset all (O):back";
388 | break;
389 | case ANALOG_MENU:
390 | for (i = calcStartingIndex(cfg_i, ANOLOGS_OPTIONS_NUM, avaliable_entries); i < ANOLOGS_OPTIONS_NUM; i++) {
391 | if (y + 60 > screen_h) break;
392 |
393 | if (cfg_i == i){//Draw cursor
394 | setTextColor(COLOR_CURSOR);
395 | drawString(L_0 + 26*CHA_W, y + CHA_H, (ticker % 16 < 8) ? "<" : ">");
396 | }
397 |
398 | if (!(i % 4)){ //Headers
399 | setTextColor(COLOR_HEADER);
400 | drawString(L_0, y+CHA_H, (i == 0) ? "Deadzone" : "Force digital");
401 | }
402 |
403 | if (i == cfg_i) setTextColor(COLOR_CURSOR);
404 | else if (analogs_options[i] != ((i/2*2 < 4) ? ANALOGS_DEADZONE_DEF : ANALOGS_FORCE_DIGITAL_DEF))
405 | setTextColor(COLOR_ACTIVE);
406 | else setTextColor(COLOR_DEFAULT);
407 | drawStringF(L_0+14*CHA_W, y+=CHA_H, "%s",
408 | !(i % 2) ? (((i / 2) % 2 ) ? "Right Analog" : "Left Analog "): "");
409 | if (i < 4)
410 | drawStringF(L_0+27*CHA_W, y, "[%s axis]: %hhu",
411 | (i % 2) ? "Y" : "X",
412 | analogs_options[i]);
413 | else
414 | drawStringF(L_0+27*CHA_W, y, "[%s axis]: %s",
415 | (i % 2) ? "Y" : "X",
416 | str_yes_no[analogs_options[i]]);
417 | }
418 | footer1 = "(<)(>):change ([]):reset (start):reset all" ;
419 | footer2 = "(O):back";
420 | break;
421 | case TOUCH_MENU:
422 | for (i = calcStartingIndex(cfg_i, TOUCH_OPTIONS_NUM, avaliable_entries); i < TOUCH_OPTIONS_NUM; i++) {
423 | if (y + 60 > screen_h) break;
424 |
425 | if (cfg_i == i){//Draw cursor
426 | setTextColor(COLOR_CURSOR);
427 | drawString(L_0+ ((i<16) ? 16*CHA_W : 32*CHA_W), y + CHA_H, (ticker % 16 < 8) ? "<" : ">");
428 | }
429 |
430 | if (i == 0 || i == 8){ //Headers
431 | setTextColor(COLOR_HEADER);
432 | drawString(L_0, y+CHA_H, (i == 0) ? "Front" : "Rear");
433 | }
434 |
435 | if (i < 16){ //Points
436 | if (i == cfg_i) setTextColor(COLOR_CURSOR);
437 | else if (touch_options[i] != TOUCH_POINTS_DEF[i])
438 | setTextColor(COLOR_ACTIVE);
439 | else setTextColor(COLOR_DEFAULT);
440 | if (i < 16){
441 | if (!(i % 2))
442 | drawString(L_0+6*CHA_W, y+CHA_H, str_touch_points[(i % 8)/2]);
443 | drawStringF(L_0+14*CHA_W, y+=CHA_H, "%s:", !(i % 2) ? "x" : "y");
444 | drawStringF(L_0+17*CHA_W, y, "%hu", touch_options[i]);
445 | }
446 | if (y + 60 > screen_h) break;
447 | }
448 |
449 | if (i == 16){ //Front touch mode
450 | if (16 == cfg_i) setTextColor(COLOR_CURSOR);
451 | else if (touch_options[16] == TOUCH_MODE_DEF) setTextColor(COLOR_DEFAULT);
452 | else setTextColor(COLOR_ACTIVE);
453 | drawString(L_0, y+=CHA_H, "Disable Front touch if remapped:");
454 | drawString(L_0+33*CHA_W, y, str_yes_no[touch_options[16]]);
455 | if (y + 60 > screen_h) break;
456 | }
457 |
458 | if (i==17){ //Rear touch mode
459 | if (17 == cfg_i) setTextColor(COLOR_CURSOR);
460 | else if (touch_options[17] == TOUCH_MODE_DEF) setTextColor(COLOR_DEFAULT);
461 | else setTextColor(COLOR_ACTIVE);
462 | drawString(L_0, y+=CHA_H, "Disable Rear touch if remapped:");
463 | drawString(L_0+33*CHA_W, y, str_yes_no[touch_options[17]]);
464 | if (y + 60 > screen_h) break;
465 | }
466 | }
467 | footer1 = "(<)(>)[TOUCH](RS):change ([]):reset (start):reset all";
468 | footer2 = "(O): back";
469 | break;
470 | case GYRO_MENU:
471 | for (i = calcStartingIndex(cfg_i, GYRO_OPTIONS_NUM, avaliable_entries); i < GYRO_OPTIONS_NUM; i++) {
472 | if (y + 60 > screen_h) break;
473 |
474 | if (cfg_i == i){//Draw cursor
475 | setTextColor(COLOR_CURSOR);
476 | drawString(L_0+17*CHA_W, y + CHA_H, (ticker % 16 < 8) ? "<" : ">");
477 | }
478 |
479 | if (!(i % 3)){ //Headers
480 | setTextColor(COLOR_HEADER);
481 | drawString(L_0, y+CHA_H, (i == 0) ? "Sensivity" : "Deadzone");
482 | }
483 |
484 | if (i == cfg_i) setTextColor(COLOR_CURSOR);
485 | else if (gyro_options[i] != ((i < 3) ? GYRO_SENS_DEF : GYRO_DEADZONE_DEF))
486 | setTextColor(COLOR_ACTIVE);
487 | else setTextColor(COLOR_DEFAULT);
488 | drawStringF(L_0+10*CHA_W, y+=CHA_H, "%s axis:",
489 | ((i % 3) == 2) ? "Z" : ((i % 3) ? "Y" : "X"));
490 | drawStringF(L_0+18*CHA_W, y, "%hhu", gyro_options[i]);
491 | }
492 | footer1 = "(<)(>):change ([]):reset (start):reset all";
493 | footer2 = "(O): back";
494 | break;
495 | case CNTRL_MENU:;
496 | SceCtrlPortInfo pi;
497 | int res = sceCtrlGetControllerPortInfo(&pi);
498 | if (res != 0){//Should not ever trigger
499 | setTextColor(COLOR_DISABLE);
500 | drawString(L_1, y+= CHA_H, "Error getting controllers info");
501 | } else {
502 | //Cursor
503 | setTextColor(COLOR_CURSOR);
504 | drawString(L_0, y + CHA_H + CHA_H * cfg_i, (ticker % 16 < 8) ? "<" : ">");
505 |
506 | //Use external controller
507 | setTextColor(cfg_i == 0 ? COLOR_CURSOR :
508 | (controller_options[0] == CNTRL_DEF[0] ? COLOR_DEFAULT : COLOR_ACTIVE));
509 | drawStringF(L_1, y += CHA_H, "Use external controller: %s", str_yes_no[controller_options[0]]);
510 |
511 | //Port selection
512 | setTextColor(cfg_i == 1 ? COLOR_CURSOR :
513 | (controller_options[1] == CNTRL_DEF[1] ? COLOR_DEFAULT : COLOR_ACTIVE));
514 | drawStringF(L_1, y += CHA_H, "Selected port: {%i} %s %s",
515 | controller_options[1],
516 | getControllerName(pi.port[controller_options[1]]),
517 | controller_options[1] ? "" : "[DEFAULT]");
518 |
519 | //Button swap
520 | setTextColor(cfg_i == 2 ? COLOR_CURSOR :
521 | (controller_options[2] == CNTRL_DEF[2] ? COLOR_DEFAULT : COLOR_ACTIVE));
522 | drawStringF(L_1, y += CHA_H, "Swap L1<>LT R1<>RT : %s", str_yes_no[controller_options[2]]);
523 |
524 | //Ports stats
525 | y+=CHA_H;
526 | setTextColor(COLOR_DEFAULT);
527 | drawString(L_1, y+= CHA_H, "Detected controllers:");
528 | for (int i = max(0, cfg_i - (avaliable_entries + 1)); i < 5; i++){
529 | setTextColor((L_1 == cfg_i) ? COLOR_CURSOR : ((pi.port[i] != SCE_CTRL_TYPE_UNPAIRED) ? COLOR_ACTIVE : COLOR_DEFAULT));
530 | drawStringF(L_1, y += CHA_H, "Port %i: %s", i, getControllerName(pi.port[i]));
531 | if (y + 40 > screen_h) break;
532 | }
533 | }
534 | footer1 = "(<)(>):change ([]):reset (start):reset all";
535 | footer2 = "(O): back";
536 | break;
537 | case FUNCS_LIST:
538 | for (i = calcStartingIndex(cfg_i, HOOKS_NUM - 1, avaliable_entries); i < HOOKS_NUM - 1; i++) {
539 | if (cfg_i == i){//Draw cursor
540 | setTextColor(COLOR_CURSOR);
541 | drawString(L_0, y + CHA_H, "-");
542 | }
543 | setTextColor((i == cfg_i) ? COLOR_CURSOR : (used_funcs[i] ? COLOR_ACTIVE : COLOR_DEFAULT));
544 | drawStringF(L_1, y += CHA_H, "%s : %s", str_funcs[i], used_funcs[i] ? "Yes" : "No");
545 | if (y + 40 > screen_h) break;
546 | }
547 | setTextColor(COLOR_HEADER);
548 | footer2 = "(O):back";
549 | break;
550 | case SETTINGS_MENU:;
551 | //Cursor
552 | setTextColor(COLOR_CURSOR);
553 | if (cfg_i <= 2)
554 | drawString(L_0, y + CHA_H + CHA_H * cfg_i, (ticker % 16 < 8) ? "<" : ">");
555 | else
556 | drawString(L_0, y + CHA_H + CHA_H * cfg_i, (ticker % 16 < 8) ? "x" : "X");
557 | //Menu trigger keys
558 | setTextColor(cfg_i == 0 ? COLOR_CURSOR :
559 | (settings_options[0] == SETTINGS_DEF[0] ? COLOR_DEFAULT : COLOR_ACTIVE));
560 | drawStringF(L_1, y += CHA_H, "Menu trigger first key : %s",
561 | str_btns[settings_options[0]]);
562 | setTextColor(cfg_i == 1 ? COLOR_CURSOR :
563 | (settings_options[1] == SETTINGS_DEF[1] ? COLOR_DEFAULT : COLOR_ACTIVE));
564 | drawStringF(L_1, y += CHA_H, " second key : %s",
565 | str_btns[settings_options[1]]);
566 |
567 | //Save game profile on close
568 | setTextColor(cfg_i == 2 ? COLOR_CURSOR :
569 | (settings_options[2] == SETTINGS_DEF[2] ? COLOR_DEFAULT : COLOR_ACTIVE));
570 | drawStringF(L_1, y += CHA_H, "Save Game profile on close: %s", str_yes_no[settings_options[2]]);
571 |
572 | //Startup delay
573 | setTextColor(cfg_i == 3 ? COLOR_CURSOR :
574 | (settings_options[3] == SETTINGS_DEF[3] ? COLOR_DEFAULT : COLOR_ACTIVE));
575 | drawStringF(L_1, y += CHA_H, "Startup delay : %hhu seconds", settings_options[3]);
576 |
577 | //Profile management
578 | for (int i = 0; i < sizeof(str_settings)/sizeof(char*); i++){
579 | setTextColor((cfg_i == (4 + i)) ? COLOR_CURSOR : COLOR_DEFAULT);
580 | drawString(L_1, y += CHA_H, str_settings[i]);
581 | }
582 |
583 | //Footer
584 | footer1 = "(<)(>):change ([]):reset (start):reset all";
585 | footer2 = "(O): back";
586 | break;
587 | case CREDITS_MENU:
588 | y+=CHA_H;
589 | for (i = calcStartingIndex(cfg_i, CREDITS_NUM, avaliable_entries); i < CREDITS_NUM; i++) {
590 | setTextColor(COLOR_DEFAULT);
591 | drawStringF(L_2, y += CHA_H, "%s", str_credits[i]);
592 | if (y + 40 > screen_h) break;
593 | }
594 | footer2 = "(O):back";
595 | break;
596 | default:
597 | break;
598 | }
599 |
600 | //DRAW FOOTER
601 | setTextColor(COLOR_HEADER);
602 | if (!slim_mode){
603 | drawStringF(0, screen_h-CHA_H*1.5, _blank);
604 | drawStringF(0, screen_h-CHA_H, _blank);
605 | drawStringF(0, screen_h-CHA_H, _blank);
606 | drawStringF(10, screen_h-CHA_H, footer1);
607 | drawStringF(screen_w - CHA_W*strlen(footer2), screen_h-CHA_H, footer2);
608 | } else {
609 | drawStringF(0, screen_h-CHA_H*2.5, _blank);
610 | drawStringF(0, screen_h-CHA_H*2, _blank);
611 | drawStringF(0, screen_h-CHA_H, _blank);
612 | drawStringF(10, screen_h-CHA_H*2, footer1);
613 | drawStringF(screen_w - CHA_W*strlen(footer2) - 10, screen_h-CHA_H, footer2);
614 | }
615 |
616 | //DRAW TOUCH POINTER over everything else
617 | if (menu_i != TOUCH_MENU || cfg_i >= 16)
618 | return;
619 | int left = touch_options[cfg_i - (cfg_i % 2)] - 8;
620 | left *= (float)screen_w / ((cfg_i < 8) ? TOUCH_SIZE[0] : TOUCH_SIZE[2]);
621 | left = min((max(0, left)), screen_w);
622 | int top = touch_options[cfg_i - (cfg_i % 2) + 1] - 10;
623 | top *= (float)screen_h / ((cfg_i < 8) ? TOUCH_SIZE[1] : TOUCH_SIZE[3]); //Scale to framebuffer size
624 | top = min((max(0, top)), screen_h);//limit into screen
625 | setTextColor((ticker % 4) ? COLOR_CURSOR : COLOR_DISABLE);
626 | drawString(left, top, (ticker % 2) ? "" : "@");
627 | }
628 |
629 | void storeTouchPoint(EmulatedTouch *et, uint16_t x, uint16_t y){
630 | for (int i = 0; i < et->num; i++)
631 | if (et->reports[i].x == x && et->reports[i].y == y)
632 | return;
633 | et->reports[et->num].x = x;
634 | et->reports[et->num].y = y;
635 | et->num++;
636 | }
637 |
638 | //Anything -> Btn, Analog, Touch
639 | void applyRemapRule(uint8_t btn_idx, uint32_t* map, uint32_t* stickpos) {
640 | if (btn_mask[btn_idx] < PHYS_BUTTONS_NUM) { // -> Btn
641 | if (!(*map & btns[btn_mask[btn_idx]])) {
642 | *map += btns[btn_mask[btn_idx]];
643 | }
644 |
645 | } else if (btn_mask[btn_idx] == PHYS_BUTTONS_NUM) { // -> Original
646 | if (btn_idx < PHYS_BUTTONS_NUM) {
647 | if (!(*map & btns[btn_idx])) {
648 | *map += btns[btn_idx];
649 | }
650 | } // -> Analog
651 | } else if (PHYS_BUTTONS_NUM + 1 < btn_mask[btn_idx] && btn_mask[btn_idx] < PHYS_BUTTONS_NUM + 10) {
652 | stickpos[btn_mask[btn_idx] - (PHYS_BUTTONS_NUM + 2)] += 127;
653 | } else if (btn_mask[btn_idx] < PHYS_BUTTONS_NUM + 24){ // -> Touch
654 | if (btn_mask[btn_idx] < PHYS_BUTTONS_NUM + 14){ //Front touch default
655 | if (etFront.num == MULTITOUCH_FRONT_NUM) return;
656 | storeTouchPoint(&etFront,
657 | TOUCH_POINTS_DEF[(btn_mask[btn_idx] - (PHYS_BUTTONS_NUM + 10)) * 2],
658 | TOUCH_POINTS_DEF[(btn_mask[btn_idx] - (PHYS_BUTTONS_NUM + 10)) * 2 + 1]);
659 | } else if (btn_mask[btn_idx] < PHYS_BUTTONS_NUM + 18){ //Front touch custom
660 | if (etFront.num == MULTITOUCH_FRONT_NUM) return;
661 | storeTouchPoint(&etFront,
662 | touch_options[(btn_mask[btn_idx] - (PHYS_BUTTONS_NUM + 14)) * 2],
663 | touch_options[(btn_mask[btn_idx] - (PHYS_BUTTONS_NUM + 14)) * 2 + 1]);
664 | } else if (btn_mask[btn_idx] < PHYS_BUTTONS_NUM + 22){ //Rear touch default
665 | if (etRear.num == MULTITOUCH_REAR_NUM) return;
666 | storeTouchPoint(&etRear,
667 | TOUCH_POINTS_DEF[8 + (btn_mask[btn_idx] - (PHYS_BUTTONS_NUM + 18)) * 2],
668 | TOUCH_POINTS_DEF[8 + (btn_mask[btn_idx] - (PHYS_BUTTONS_NUM + 18)) * 2 + 1]);
669 | } else if (btn_mask[btn_idx] < PHYS_BUTTONS_NUM + 26){ //Rear touch custom
670 | if (etRear.num == MULTITOUCH_REAR_NUM) return;
671 | storeTouchPoint(&etRear,
672 | touch_options[8 + (btn_mask[btn_idx] - (PHYS_BUTTONS_NUM + 22)) * 2],
673 | touch_options[8 + (btn_mask[btn_idx] - (PHYS_BUTTONS_NUM + 22)) * 2 + 1]);
674 | }
675 | }
676 | }
677 |
678 | //Used to handle analog->analog mapping
679 | void applyRemapRuleForAnalog(uint8_t btn_idx, uint32_t* map, uint32_t* stickpos, uint8_t stickposval) {
680 | if (PHYS_BUTTONS_NUM + 1 < btn_mask[btn_idx] && btn_mask[btn_idx] < PHYS_BUTTONS_NUM + 10
681 | && !analogs_options[4 + (int) ((btn_idx - PHYS_BUTTONS_NUM - 8) / 2)]) {
682 | // Analog -> Analog [ANALOG MODE]
683 | stickpos[btn_mask[btn_idx] - (PHYS_BUTTONS_NUM + 2)] += 127 - stickposval;
684 | } else {
685 | // Analog -> Analog [DIGITAL MODE] and Analog -> Button
686 | applyRemapRule(btn_idx, map, stickpos);
687 | }
688 | }
689 |
690 | //Used to handle analog->gyro mapping
691 | void applyRemapRuleForGyro(uint8_t btn_idx, uint32_t* map, uint32_t* stickpos, float gyroval){
692 | if (PHYS_BUTTONS_NUM + 1 < btn_mask[btn_idx] && btn_mask[btn_idx] < PHYS_BUTTONS_NUM + 10) {
693 | // Gyro -> Analog remap
694 | stickpos[btn_mask[btn_idx] - (PHYS_BUTTONS_NUM + 2)] += gyroval;
695 | } else {
696 | // Gyro -> Btn remap
697 | if ((((btn_idx == PHYS_BUTTONS_NUM + 16 || btn_idx == PHYS_BUTTONS_NUM + 17)) && gyroval > gyro_options[3] * 10) ||
698 | (((btn_idx == PHYS_BUTTONS_NUM + 18 || btn_idx == PHYS_BUTTONS_NUM + 19)) && gyroval > gyro_options[4] * 10) ||
699 | (((btn_idx == PHYS_BUTTONS_NUM + 20 || btn_idx == PHYS_BUTTONS_NUM + 21)) && gyroval > gyro_options[5] * 10))
700 | applyRemapRule(btn_idx, map, stickpos);
701 | }
702 | }
703 |
704 | void applyRemap(SceCtrlData *ctrl) {
705 | // Gathering real touch data
706 | SceTouchData front, rear;
707 | internal_touch_call = 1;
708 | sceTouchPeek(SCE_TOUCH_PORT_FRONT, &front, 1);
709 | sceTouchPeek(SCE_TOUCH_PORT_BACK, &rear, 1);
710 | internal_touch_call = 0;
711 |
712 | // Gathering gyro data
713 | SceMotionState motionstate;
714 | sceMotionGetState(&motionstate);
715 |
716 | // Applying remap rules for physical buttons
717 | int i;
718 | uint32_t new_map = 0;
719 | uint32_t stickpos[8] = { };
720 | for (i=0;ibuttons & btns[i]) applyRemapRule(i, &new_map, stickpos);
722 | }
723 |
724 | // Applying remap rules for front virtual buttons
725 | int left = TOUCH_SIZE[0]/2; int top = TOUCH_SIZE[1]/2;
726 | for (i=0;i left && front.report[i].y > top) // Bot Right
728 | applyRemapRule(PHYS_BUTTONS_NUM + 3, &new_map, stickpos);
729 | else if (front.report[i].x <= left && front.report[i].y > top) // Bot Left
730 | applyRemapRule(PHYS_BUTTONS_NUM + 2, &new_map, stickpos);
731 | else if (front.report[i].x > left && front.report[i].y <= top) // Top Right
732 | applyRemapRule(PHYS_BUTTONS_NUM + 1, &new_map, stickpos);
733 | else if (front.report[i].x <= left && front.report[i].y <= top)// Top Left
734 | applyRemapRule(PHYS_BUTTONS_NUM, &new_map, stickpos);
735 | }
736 |
737 | // Applying remap rules for rear virtual buttons
738 | left = TOUCH_SIZE[2]/2; top = TOUCH_SIZE[3]/2;
739 | for (i=0;i left && rear.report[i].y > top) // Bot Right
741 | applyRemapRule(PHYS_BUTTONS_NUM + 7, &new_map, stickpos);
742 | else if (rear.report[i].x <= left && rear.report[i].y > top) // Bot Left
743 | applyRemapRule(PHYS_BUTTONS_NUM + 6, &new_map, stickpos);
744 | else if (rear.report[i].x > left && rear.report[i].y <= top) // Top Right
745 | applyRemapRule(PHYS_BUTTONS_NUM + 5, &new_map, stickpos);
746 | else if (rear.report[i].x <= left && rear.report[i].y <= top) // Top Left
747 | applyRemapRule(PHYS_BUTTONS_NUM + 4, &new_map, stickpos);
748 | }
749 |
750 | // Applying remap rules for left analog
751 | if (ctrl->lx < 127 - analogs_options[0]) // Left
752 | applyRemapRuleForAnalog(PHYS_BUTTONS_NUM + 8, &new_map, stickpos, ctrl->lx);
753 | else if (ctrl->lx > 127 + analogs_options[0]) // Right
754 | applyRemapRuleForAnalog(PHYS_BUTTONS_NUM + 9, &new_map, stickpos, 255 - ctrl->lx);
755 | if (ctrl->ly < 127 - analogs_options[1]) // Up
756 | applyRemapRuleForAnalog(PHYS_BUTTONS_NUM + 10, &new_map, stickpos, ctrl->ly);
757 | else if (ctrl->ly > 127 + analogs_options[1]) // Down
758 | applyRemapRuleForAnalog(PHYS_BUTTONS_NUM + 11, &new_map, stickpos, 255 - ctrl->ly);
759 |
760 | // Applying remap rules for right analog
761 | if (ctrl->rx < 127 - analogs_options[2]) // Left
762 | applyRemapRuleForAnalog(PHYS_BUTTONS_NUM + 12, &new_map, stickpos, ctrl->rx);
763 | else if (ctrl->rx > 127 + analogs_options[2]) // Right
764 | applyRemapRuleForAnalog(PHYS_BUTTONS_NUM + 13, &new_map, stickpos, 255 - ctrl->rx);
765 | if (ctrl->ry < 127 - analogs_options[3]) // Up
766 | applyRemapRuleForAnalog(PHYS_BUTTONS_NUM + 14, &new_map, stickpos, ctrl->ry);
767 | else if (ctrl->ry > 127 + analogs_options[3]) // Down
768 | applyRemapRuleForAnalog(PHYS_BUTTONS_NUM + 15, &new_map, stickpos, 255 - ctrl->ry);
769 |
770 | // Applying remap for gyro
771 | if (motionstate.angularVelocity.y > 0)
772 | applyRemapRuleForGyro(PHYS_BUTTONS_NUM + 16, &new_map, stickpos,
773 | motionstate.angularVelocity.y * gyro_options[0]);
774 | if (motionstate.angularVelocity.y < 0)
775 | applyRemapRuleForGyro(PHYS_BUTTONS_NUM + 17, &new_map, stickpos,
776 | -motionstate.angularVelocity.y * gyro_options[0]);
777 | if (motionstate.angularVelocity.x > 0)
778 | applyRemapRuleForGyro(PHYS_BUTTONS_NUM + 18, &new_map, stickpos,
779 | motionstate.angularVelocity.x * gyro_options[1]);
780 | if (motionstate.angularVelocity.x < 0)
781 | applyRemapRuleForGyro(PHYS_BUTTONS_NUM + 19, &new_map, stickpos,
782 | -motionstate.angularVelocity.x * gyro_options[1]);
783 | if (motionstate.angularVelocity.z > 0)
784 | applyRemapRuleForGyro(PHYS_BUTTONS_NUM + 20, &new_map, stickpos,
785 | motionstate.angularVelocity.z * gyro_options[2]);
786 | if (motionstate.angularVelocity.z < 0)
787 | applyRemapRuleForGyro(PHYS_BUTTONS_NUM + 21, &new_map, stickpos,
788 | -motionstate.angularVelocity.z * gyro_options[2]);
789 |
790 | // Nulling analogs if they're remapped
791 | if ((ctrl->lx < 127 && btn_mask[PHYS_BUTTONS_NUM+8] != PHYS_BUTTONS_NUM) ||
792 | (ctrl->lx > 127 && btn_mask[PHYS_BUTTONS_NUM+9] != PHYS_BUTTONS_NUM))
793 | ctrl->lx = 127;
794 | if ((ctrl->ly < 127 && btn_mask[PHYS_BUTTONS_NUM+10] != PHYS_BUTTONS_NUM) ||
795 | (ctrl->ly > 127 && btn_mask[PHYS_BUTTONS_NUM+11] != PHYS_BUTTONS_NUM))
796 | ctrl->ly = 127;
797 | if ((ctrl->rx < 127 && btn_mask[PHYS_BUTTONS_NUM+12] != PHYS_BUTTONS_NUM) ||
798 | (ctrl->rx > 127 && btn_mask[PHYS_BUTTONS_NUM+13] != PHYS_BUTTONS_NUM))
799 | ctrl->rx = 127;
800 | if ((ctrl->ry < 127 && btn_mask[PHYS_BUTTONS_NUM+14] != PHYS_BUTTONS_NUM) ||
801 | (ctrl->ry > 127 && btn_mask[PHYS_BUTTONS_NUM+15] != PHYS_BUTTONS_NUM))
802 | ctrl->ry = 127;
803 |
804 |
805 | // Remove minimal drift if digital remap for stick directions is used
806 | if (stickpos[0] || stickpos[1] || stickpos[2] || stickpos[3]){
807 | if (abs(ctrl->lx - 127) < analogs_options[0])
808 | ctrl->lx = 127;
809 | if (abs(ctrl->ly - 127) < analogs_options[1])
810 | ctrl->ly = 127;
811 | }
812 | if (stickpos[4] || stickpos[5] || stickpos[6] || stickpos[7]){
813 | if (abs(ctrl->rx - 127) < analogs_options[2])
814 | ctrl->rx = 127;
815 | if (abs(ctrl->ry - 127) < analogs_options[3])
816 | ctrl->ry = 127;
817 | }
818 |
819 | //Storing remap for analog axises
820 | if (stickpos[0] || stickpos[1])
821 | ctrl->lx = clamp(ctrl->lx - stickpos[0] + stickpos[1], 0, 255);
822 | if (stickpos[2] || stickpos[3])
823 | ctrl->ly = clamp(ctrl->ly - stickpos[2] + stickpos[3], 0, 255);
824 | if (stickpos[4] || stickpos[5])
825 | ctrl->rx = clamp(ctrl->rx - stickpos[4] + stickpos[5], 0, 255);
826 | if (stickpos[6] || stickpos[7])
827 | ctrl->ry = clamp(ctrl->ry - stickpos[6] + stickpos[7], 0, 255);
828 |
829 | //Storing remap for HW buttons
830 | ctrl->buttons = new_map;
831 |
832 | //Telling that new emulated touch buffer is ready to be takn
833 | newEmulatedFrontTouchBuffer = 1;
834 | newEmulatedRearTouchBuffer = 1;
835 | }
836 |
837 | //Keep same touch id for continuus touches
838 | uint8_t generateTouchId(int x, int y, int panel){
839 | if (panel == SCE_TOUCH_PORT_FRONT){
840 | for (int i = 0; i < prevEtFront.num; i++)
841 | if (prevEtFront.reports[i].x == x && prevEtFront.reports[i].y == y)
842 | return prevEtFront.reports[i].id;
843 | etFrontIdCounter = (etFrontIdCounter + 1) % 127;
844 | return etFrontIdCounter;
845 | } else {
846 | for (int i = 0; i < prevEtRear.num; i++)
847 | if (prevEtRear.reports[i].x == x && prevEtRear.reports[i].y == y)
848 | return prevEtRear.reports[i].id;
849 | etRearIdCounter = (etRearIdCounter + 1) % 127;
850 | return etRearIdCounter;
851 | }
852 | }
853 |
854 |
855 | void addVirtualTouches(SceTouchData *pData, EmulatedTouch *et,
856 | uint8_t touchPointsMaxNum, int panel){
857 | int touchIdx = 0;
858 | while (touchIdx < et->num && pData->reportNum < touchPointsMaxNum){
859 | pData->report[pData->reportNum].x = et->reports[touchIdx].x;
860 | pData->report[pData->reportNum].y = et->reports[touchIdx].y;
861 | et->reports[touchIdx].id = generateTouchId(
862 | et->reports[touchIdx].x, et->reports[touchIdx].y, panel);
863 | pData->report[pData->reportNum].id = et->reports[touchIdx].id;
864 | pData->reportNum ++;
865 | touchIdx ++;
866 | }
867 | }
868 |
869 | void updateTouchInfo(SceUInt32 port, SceTouchData *pData){
870 | if (port == SCE_TOUCH_PORT_FRONT) {
871 | if ((touch_options[16] == 1 && //Disable if remapped
872 | (btn_mask[PHYS_BUTTONS_NUM] != PHYS_BUTTONS_NUM ||
873 | btn_mask[PHYS_BUTTONS_NUM+1] != PHYS_BUTTONS_NUM ||
874 | btn_mask[PHYS_BUTTONS_NUM+2] != PHYS_BUTTONS_NUM ||
875 | btn_mask[PHYS_BUTTONS_NUM+3] != PHYS_BUTTONS_NUM)) ||
876 | btn_mask[PHYS_BUTTONS_NUM] == PHYS_BUTTONS_NUM+1 ||
877 | btn_mask[PHYS_BUTTONS_NUM+1] == PHYS_BUTTONS_NUM+1 ||
878 | btn_mask[PHYS_BUTTONS_NUM+2] == PHYS_BUTTONS_NUM+1 ||
879 | btn_mask[PHYS_BUTTONS_NUM+3] == PHYS_BUTTONS_NUM+1)
880 | pData->reportNum = 0; //Disable pad
881 |
882 | if (!newEmulatedFrontTouchBuffer){//New touchbuffer not ready - using previous one
883 | addVirtualTouches(pData, &prevEtFront,
884 | MULTITOUCH_FRONT_NUM, SCE_TOUCH_PORT_FRONT);
885 | return;
886 | }
887 |
888 | addVirtualTouches(pData, &etFront,
889 | MULTITOUCH_FRONT_NUM, SCE_TOUCH_PORT_FRONT);
890 | prevEtFront = etFront;
891 | etFront.num = 0;
892 | newEmulatedFrontTouchBuffer = 0;
893 | } else {
894 | if ((touch_options[17] == 1 &&//Disable if remapped
895 | (btn_mask[PHYS_BUTTONS_NUM+4] != PHYS_BUTTONS_NUM ||
896 | btn_mask[PHYS_BUTTONS_NUM+5] != PHYS_BUTTONS_NUM ||
897 | btn_mask[PHYS_BUTTONS_NUM+6] != PHYS_BUTTONS_NUM ||
898 | btn_mask[PHYS_BUTTONS_NUM+7] != PHYS_BUTTONS_NUM)) ||
899 | btn_mask[PHYS_BUTTONS_NUM+4] == PHYS_BUTTONS_NUM+1 ||
900 | btn_mask[PHYS_BUTTONS_NUM+5] == PHYS_BUTTONS_NUM+1 ||
901 | btn_mask[PHYS_BUTTONS_NUM+6] == PHYS_BUTTONS_NUM+1 ||
902 | btn_mask[PHYS_BUTTONS_NUM+7] == PHYS_BUTTONS_NUM+1)
903 | pData->reportNum = 0; //Disable pad
904 |
905 | if (!newEmulatedRearTouchBuffer){//New touchbuffer not ready - using previous one
906 | addVirtualTouches(pData, &prevEtRear,
907 | MULTITOUCH_REAR_NUM, SCE_TOUCH_PORT_BACK);
908 | return;
909 | }
910 |
911 | addVirtualTouches(pData, &etRear,
912 | MULTITOUCH_REAR_NUM, SCE_TOUCH_PORT_BACK);
913 | prevEtRear = etRear;
914 | etRear.num = 0;
915 | newEmulatedRearTouchBuffer = 0;
916 | }
917 | }
918 |
919 | void saveSettings(){
920 | // Just in case the folder doesn't exist
921 | sceIoMkdir("ux0:/data/remaPSV", 0777);
922 |
923 | // Opening settings config file and saving the config
924 | SceUID fd = sceIoOpen("ux0:/data/remaPSV/settings.bin", SCE_O_WRONLY | SCE_O_CREAT | SCE_O_TRUNC, 0777);
925 | sceIoWrite(fd, settings_options, SETTINGS_NUM);
926 | sceIoClose(fd);
927 | }
928 |
929 | void loadSettings(){
930 | resetSettingsOptions();
931 |
932 | // Just in case the folder doesn't exist
933 | sceIoMkdir("ux0:/data/remaPSV", 0777);
934 |
935 | // Loading config file for the selected app if exists
936 | SceUID fd = sceIoOpen("ux0:/data/remaPSV/settings.bin", SCE_O_RDONLY, 0777);
937 | if (fd >= 0){
938 | sceIoRead(fd, settings_options, SETTINGS_NUM);
939 | sceIoClose(fd);
940 | }
941 | }
942 |
943 | void saveGlobalConfig(void) {
944 | SceUID fd;
945 | // Just in case the folder doesn't exist
946 | sceIoMkdir("ux0:/data/remaPSV", 0777);
947 |
948 | // Opening remap config file and saving it
949 | fd = sceIoOpen("ux0:/data/remaPSV/remap.bin", SCE_O_WRONLY | SCE_O_CREAT | SCE_O_TRUNC, 0777);
950 | sceIoWrite(fd, btn_mask, BUTTONS_NUM);
951 | sceIoClose(fd);
952 |
953 | // Opening analog config file and saving the config
954 | fd = sceIoOpen("ux0:/data/remaPSV/analogs.bin", SCE_O_WRONLY | SCE_O_CREAT | SCE_O_TRUNC, 0777);
955 | sceIoWrite(fd, analogs_options, ANOLOGS_OPTIONS_NUM);
956 | sceIoClose(fd);
957 |
958 | // Opening touch config file and saving the config
959 | fd = sceIoOpen("ux0:/data/remaPSV/touch.bin", SCE_O_WRONLY | SCE_O_CREAT | SCE_O_TRUNC, 0777);
960 | sceIoWrite(fd, touch_options, TOUCH_OPTIONS_NUM*2);
961 | sceIoClose(fd);
962 |
963 | // Opening gyro config file and saving the config
964 | fd = sceIoOpen("ux0:/data/remaPSV/gyro.bin", SCE_O_WRONLY | SCE_O_CREAT | SCE_O_TRUNC, 0777);
965 | sceIoWrite(fd, gyro_options, GYRO_OPTIONS_NUM);
966 | sceIoClose(fd);
967 |
968 | // Opening gyro config file and saving the config
969 | fd = sceIoOpen("ux0:/data/remaPSV/controllers.bin", SCE_O_WRONLY | SCE_O_CREAT | SCE_O_TRUNC, 0777);
970 | sceIoWrite(fd, controller_options, CNTRL_OPTIONS_NUM);
971 | sceIoClose(fd);
972 | }
973 |
974 | void saveGameConfig(void) {
975 | SceUID fd;
976 | // Just in case the folder doesn't exist
977 | sceIoMkdir("ux0:/data/remaPSV", 0777);
978 | sprintf(fname, "ux0:/data/remaPSV/%s", titleid);
979 | sceIoMkdir(fname, 0777);
980 |
981 | // Opening remap config file and saving it
982 | sprintf(fname, "ux0:/data/remaPSV/%s/remap.bin", titleid);
983 | fd = sceIoOpen(fname, SCE_O_WRONLY | SCE_O_CREAT | SCE_O_TRUNC, 0777);
984 | sceIoWrite(fd, btn_mask, BUTTONS_NUM);
985 | sceIoClose(fd);
986 |
987 | // Opening analog config file and saving the config
988 | sprintf(fname, "ux0:/data/remaPSV/%s/analogs.bin", titleid);
989 | fd = sceIoOpen(fname, SCE_O_WRONLY | SCE_O_CREAT | SCE_O_TRUNC, 0777);
990 | sceIoWrite(fd, analogs_options, ANOLOGS_OPTIONS_NUM);
991 | sceIoClose(fd);
992 |
993 | // Opening touch config file and saving the config
994 | sprintf(fname, "ux0:/data/remaPSV/%s/touch.bin", titleid);
995 | fd = sceIoOpen(fname, SCE_O_WRONLY | SCE_O_CREAT | SCE_O_TRUNC, 0777);
996 | sceIoWrite(fd, touch_options, TOUCH_OPTIONS_NUM*2);
997 | sceIoClose(fd);
998 |
999 | // Opening gyro config file and saving the config
1000 | sprintf(fname, "ux0:/data/remaPSV/%s/gyro.bin", titleid);
1001 | fd = sceIoOpen(fname, SCE_O_WRONLY | SCE_O_CREAT | SCE_O_TRUNC, 0777);
1002 | sceIoWrite(fd, gyro_options, GYRO_OPTIONS_NUM);
1003 | sceIoClose(fd);
1004 |
1005 | // Opening gyro config file and saving the config
1006 | sprintf(fname, "ux0:/data/remaPSV/%s/controllers.bin", titleid);
1007 | fd = sceIoOpen(fname, SCE_O_WRONLY | SCE_O_CREAT | SCE_O_TRUNC, 0777);
1008 | sceIoWrite(fd, controller_options, CNTRL_OPTIONS_NUM);
1009 | sceIoClose(fd);
1010 | }
1011 |
1012 | void loadGlobalConfig(void) {
1013 | resetRemapsOptions();
1014 | resetAnalogsOptions();
1015 | resetTouchOptions();
1016 | resetGyroOptions();
1017 | resetCntrlOptions();
1018 |
1019 | SceUID fd;
1020 |
1021 | // Just in case the folder doesn't exist
1022 | sceIoMkdir("ux0:/data/remaPSV", 0777);
1023 |
1024 | // Loading config file for the selected app if exists
1025 | fd = sceIoOpen("ux0:/data/remaPSV/remap.bin", SCE_O_RDONLY, 0777);
1026 | if (fd >= 0){
1027 | sceIoRead(fd, btn_mask, BUTTONS_NUM);
1028 | sceIoClose(fd);
1029 | }
1030 |
1031 | // Loading analog config file
1032 | fd = sceIoOpen("ux0:/data/remaPSV/analogs.bin", SCE_O_RDONLY, 0777);
1033 | if (fd >= 0){
1034 | sceIoRead(fd, analogs_options, ANOLOGS_OPTIONS_NUM);
1035 | sceIoClose(fd);
1036 | }
1037 |
1038 | // Loading touch config file
1039 | fd = sceIoOpen("ux0:/data/remaPSV/touch.bin", SCE_O_RDONLY, 0777);
1040 | if (fd >= 0){
1041 | sceIoRead(fd, touch_options, TOUCH_OPTIONS_NUM*2);
1042 | sceIoClose(fd);
1043 | }
1044 |
1045 | // Loading gyro config file
1046 | fd = sceIoOpen("ux0:/data/remaPSV/gyro.bin", SCE_O_RDONLY, 0777);
1047 | if (fd >= 0){
1048 | sceIoRead(fd, gyro_options, GYRO_OPTIONS_NUM);
1049 | sceIoClose(fd);
1050 | }
1051 |
1052 | // Loading controllers config file
1053 | fd = sceIoOpen("ux0:/data/remaPSV/controllers.bin", SCE_O_RDONLY, 0777);
1054 | if (fd >= 0){
1055 | sceIoRead(fd, controller_options, CNTRL_OPTIONS_NUM);
1056 | sceIoClose(fd);
1057 | }
1058 | }
1059 |
1060 | void loadGameConfig(void) {
1061 | // Check if folder exists
1062 | SceIoStat stat = {0};
1063 | sprintf(fname, "ux0:/data/remaPSV/%s", titleid);
1064 | int ret = sceIoGetstat(fname, &stat);
1065 | if (ret < 0)
1066 | return;
1067 |
1068 | resetRemapsOptions();
1069 | resetAnalogsOptions();
1070 | resetTouchOptions();
1071 | resetGyroOptions();
1072 | resetCntrlOptions();
1073 |
1074 | SceUID fd;
1075 |
1076 | // Loading remap config file for the selected app if exists
1077 | sprintf(fname, "ux0:/data/remaPSV/%s/remap.bin", titleid);
1078 | fd = sceIoOpen(fname, SCE_O_RDONLY, 0777);
1079 | if (fd >= 0){
1080 | sceIoRead(fd, btn_mask, BUTTONS_NUM);
1081 | sceIoClose(fd);
1082 | }
1083 |
1084 | // Loading analog config file for the selected app if exists
1085 | sprintf(fname, "ux0:/data/remaPSV/%s/analogs.bin", titleid);
1086 | fd = sceIoOpen(fname, SCE_O_RDONLY, 0777);
1087 | if (fd >= 0){
1088 | sceIoRead(fd, analogs_options, ANOLOGS_OPTIONS_NUM);
1089 | sceIoClose(fd);
1090 | }
1091 |
1092 | // Loading touch config file for the selected app if exists
1093 | sprintf(fname, "ux0:/data/remaPSV/%s/touch.bin", titleid);
1094 | fd = sceIoOpen(fname, SCE_O_RDONLY, 0777);
1095 | if (fd >= 0){
1096 | sceIoRead(fd, touch_options, TOUCH_OPTIONS_NUM*2);
1097 | sceIoClose(fd);
1098 | }
1099 |
1100 | // Loading gyro config file for the selected app if exists
1101 | sprintf(fname, "ux0:/data/remaPSV/%s/gyro.bin", titleid);
1102 | fd = sceIoOpen(fname, SCE_O_RDONLY, 0777);
1103 | if (fd >= 0){
1104 | sceIoRead(fd, gyro_options, GYRO_OPTIONS_NUM);
1105 | sceIoClose(fd);
1106 | }
1107 |
1108 | // Loading gyro config file for the selected app if exists
1109 | sprintf(fname, "ux0:/data/remaPSV/%s/controllers.bin", titleid);
1110 | fd = sceIoOpen(fname, SCE_O_RDONLY, 0777);
1111 | if (fd >= 0){
1112 | sceIoRead(fd, controller_options, CNTRL_OPTIONS_NUM);
1113 | sceIoClose(fd);
1114 | }
1115 | }
1116 |
1117 | uint8_t isBtnActive(uint8_t btnNum){
1118 | return ((curr_buttons & btns[btnNum]) && !(old_buttons & btns[btnNum]))
1119 | || (pressedTicks[btnNum] != 0 && tick - pressedTicks[btnNum] > LONG_PRESS_TIME);
1120 | }
1121 |
1122 | //Set custom touch point xy using RS
1123 | void analogTouchPicker(SceCtrlData *ctrl){
1124 | if (cfg_i >= 16)
1125 | return;
1126 | int o_idx1 = cfg_i - (cfg_i % 2);
1127 | int shiftX = ((float)(ctrl->rx - 127)) / 8;
1128 | int shiftY = ((float)(ctrl->ry - 127)) / 8;
1129 | if (abs(shiftX) > 30 / 8)
1130 | touch_options[o_idx1] = lim(touch_options[o_idx1] + shiftX,
1131 | 0, TOUCH_SIZE[(o_idx1 < 8) ? 0 : 2]);
1132 | if (abs(shiftY) > 30 / 8)
1133 | touch_options[o_idx1+1] = lim(touch_options[o_idx1+1] + shiftY,
1134 | 0, TOUCH_SIZE[((o_idx1+1) < 8) ? 1 : 3]);
1135 | }
1136 |
1137 | //Set custom touch point xy using touch
1138 | void touchPicker(int padType){
1139 | if ((padType == SCE_TOUCH_PORT_FRONT && cfg_i >= 8) ||
1140 | (padType == SCE_TOUCH_PORT_BACK && (cfg_i < 8 || cfg_i >= 16)))
1141 | return;
1142 | SceTouchData std;
1143 | internal_touch_call = 1;
1144 | int ret = sceTouchRead(padType, &std, 1);
1145 | internal_touch_call = 0;
1146 | if (ret && std.reportNum){
1147 | touch_options[cfg_i - (cfg_i % 2)] = std.report[0].x;
1148 | touch_options[cfg_i - (cfg_i % 2) + 1] = std.report[0].y;
1149 | }
1150 | }
1151 |
1152 | // Input Handler for the Config Menu
1153 | void configInputHandler(SceCtrlData *ctrl) {
1154 | if ((ctrl->buttons & btns[settings_options[0]])
1155 | && (ctrl->buttons & btns[settings_options[1]]))
1156 | return; //Menu trigger butoons should not trigger any menu actions on menu open
1157 | if (new_frame) {
1158 | new_frame = 0;
1159 | int menu_entries = 0;
1160 | switch (menu_i) {
1161 | case MAIN_MENU:
1162 | menu_entries = sizeof(str_main_menu) / sizeof(char*);
1163 | break;
1164 | case REMAP_MENU:
1165 | menu_entries = BUTTONS_NUM;
1166 | break;
1167 | case ANALOG_MENU:
1168 | menu_entries = ANOLOGS_OPTIONS_NUM;
1169 | break;
1170 | case TOUCH_MENU:
1171 | menu_entries = TOUCH_OPTIONS_NUM;
1172 | touchPicker(SCE_TOUCH_PORT_FRONT);
1173 | touchPicker(SCE_TOUCH_PORT_BACK);
1174 | analogTouchPicker(ctrl);
1175 | break;
1176 | case GYRO_MENU:
1177 | menu_entries = GYRO_OPTIONS_NUM;
1178 | break;
1179 | case CNTRL_MENU:
1180 | menu_entries = CNTRL_OPTIONS_NUM;
1181 | break;
1182 | case FUNCS_LIST:
1183 | menu_entries = HOOKS_NUM - 1;
1184 | break;
1185 | case SETTINGS_MENU:
1186 | menu_entries = SETTINGS_NUM + 4;
1187 | break;
1188 | default:
1189 | break;
1190 | }
1191 | tick = ctrl->timeStamp;
1192 | curr_buttons = ctrl->buttons;
1193 | for (int i = 0; i < PHYS_BUTTONS_NUM; i++){
1194 | if ((curr_buttons & btns[i]) && !(old_buttons & btns[i]))
1195 | pressedTicks[i] = tick;
1196 | else if (!(curr_buttons & btns[i]) && (old_buttons & btns[i]))
1197 | pressedTicks[i] = 0;
1198 |
1199 | if (!isBtnActive(i))
1200 | continue;
1201 |
1202 | switch (btns[i]) {
1203 | case SCE_CTRL_DOWN:
1204 | cfg_i = (cfg_i + 1) % menu_entries;
1205 | break;
1206 | case SCE_CTRL_UP:
1207 | if (--cfg_i < 0) cfg_i = menu_entries -1;
1208 | break;
1209 | case SCE_CTRL_RIGHT:
1210 | switch (menu_i){
1211 | case REMAP_MENU:
1212 | btn_mask[cfg_i] = (btn_mask[cfg_i] + 1) % TARGET_REMAPS;
1213 | break;
1214 | case ANALOG_MENU:
1215 | if (cfg_i < 4) analogs_options[cfg_i] = (analogs_options[cfg_i] + 1) % 128;
1216 | else analogs_options[cfg_i] = !analogs_options[cfg_i];
1217 | break;
1218 | case TOUCH_MENU:
1219 | if (cfg_i < 8)//Front Points xy
1220 | touch_options[cfg_i] = (touch_options[cfg_i] + 1)
1221 | % ((cfg_i % 2) ? TOUCH_SIZE[1] : TOUCH_SIZE[0]);
1222 | else if (cfg_i < 16)//Rear Points xy
1223 | touch_options[cfg_i] = (touch_options[cfg_i] + 1)
1224 | % ((cfg_i % 2) ? TOUCH_SIZE[3] : TOUCH_SIZE[2]);
1225 | else //yes/no otion
1226 | touch_options[cfg_i] = !touch_options[cfg_i];
1227 | break;
1228 | case GYRO_MENU:
1229 | gyro_options[cfg_i] = (gyro_options[cfg_i] + 1) % 200;
1230 | break;
1231 | case CNTRL_MENU:
1232 | if (cfg_i == 1)
1233 | controller_options[cfg_i] = min(5, controller_options[cfg_i] + 1);
1234 | else
1235 | controller_options[cfg_i] = !controller_options[cfg_i];
1236 | break;
1237 | case SETTINGS_MENU:
1238 | if (cfg_i < 2)
1239 | settings_options[cfg_i]
1240 | = min(PHYS_BUTTONS_NUM - 1, settings_options[cfg_i] + 1);
1241 | else if (cfg_i == 2)
1242 | settings_options[cfg_i] = !settings_options[cfg_i];
1243 | else if (cfg_i == 3)
1244 | settings_options[cfg_i]
1245 | = min(60, settings_options[cfg_i] + 1);
1246 | break;
1247 | }
1248 | break;
1249 | case SCE_CTRL_LEFT:
1250 | switch (menu_i){
1251 | case REMAP_MENU:
1252 | if (btn_mask[cfg_i])
1253 | btn_mask[cfg_i]--;
1254 | else
1255 | btn_mask[cfg_i] = TARGET_REMAPS - 1;
1256 | break;
1257 | case ANALOG_MENU:
1258 | if (analogs_options[cfg_i])
1259 | analogs_options[cfg_i]--;
1260 | else
1261 | analogs_options[cfg_i] = cfg_i < 4 ? 127 : 1;
1262 | break;
1263 | case TOUCH_MENU:
1264 | if (touch_options[cfg_i])
1265 | touch_options[cfg_i]--;
1266 | else {
1267 | if (cfg_i < 8)//front points xy
1268 | touch_options[cfg_i] = ((cfg_i % 2) ? TOUCH_SIZE[1] - 1 : TOUCH_SIZE[0] - 1);
1269 | if (cfg_i < 16)//rear points xy
1270 | touch_options[cfg_i] = ((cfg_i % 2) ? TOUCH_SIZE[3] - 1 : TOUCH_SIZE[2] - 1);
1271 | else //yes/no options
1272 | touch_options[cfg_i] = !touch_options[cfg_i];
1273 | }
1274 | break;
1275 | case GYRO_MENU:
1276 | if (gyro_options[cfg_i])
1277 | gyro_options[cfg_i]--;
1278 | else
1279 | gyro_options[cfg_i] = 199;
1280 | break;
1281 | case CNTRL_MENU:
1282 | if (cfg_i == 1)
1283 | controller_options[cfg_i] = max(0, controller_options[cfg_i] - 1);
1284 | else
1285 | controller_options[cfg_i] = !controller_options[cfg_i];
1286 | break;
1287 | case SETTINGS_MENU:
1288 | if (cfg_i < 2)
1289 | settings_options[cfg_i]
1290 | = max(0, settings_options[cfg_i] - 1);
1291 | else if (cfg_i == 2)
1292 | settings_options[cfg_i] = !settings_options[cfg_i];
1293 | else if (cfg_i == 3)
1294 | settings_options[cfg_i]
1295 | = max(0, settings_options[cfg_i] - 1);
1296 | break;
1297 | }
1298 | break;
1299 | case SCE_CTRL_LTRIGGER:
1300 | case SCE_CTRL_L1:
1301 | if (menu_i == REMAP_MENU){ //Sections navigation
1302 | if (btn_mask[cfg_i] < 16)
1303 | btn_mask[cfg_i] = 38; //Rear touch custom
1304 | else if (btn_mask[cfg_i] < 17)
1305 | btn_mask[cfg_i] = 0; //HW Buttons
1306 | else if (btn_mask[cfg_i] < 18)
1307 | btn_mask[cfg_i] = 16; //Original
1308 | else if (btn_mask[cfg_i] < 22)
1309 | btn_mask[cfg_i] = 17; //Disabled
1310 | else if (btn_mask[cfg_i] < 26)
1311 | btn_mask[cfg_i] = 18; //Left stick
1312 | else if (btn_mask[cfg_i] < 30)
1313 | btn_mask[cfg_i] = 22; //Right stick
1314 | else if (btn_mask[cfg_i] < 34)
1315 | btn_mask[cfg_i] = 26; //Front touch default
1316 | else if (btn_mask[cfg_i] < 38)
1317 | btn_mask[cfg_i] = 30; //Front touch custom
1318 | else
1319 | btn_mask[cfg_i] = 34; //Rear touch default
1320 | }
1321 | break;
1322 | case SCE_CTRL_RTRIGGER:
1323 | case SCE_CTRL_R1:
1324 | if (menu_i == REMAP_MENU){ //Sections navigation
1325 | if (btn_mask[cfg_i] < 16)
1326 | btn_mask[cfg_i] = 16; //Original
1327 | else if (btn_mask[cfg_i] < 17)
1328 | btn_mask[cfg_i] = 17; //Disabled
1329 | else if (btn_mask[cfg_i] < 18)
1330 | btn_mask[cfg_i] = 18; //Left stick
1331 | else if (btn_mask[cfg_i] < 22)
1332 | btn_mask[cfg_i] = 22; //Right stick
1333 | else if (btn_mask[cfg_i] < 26)
1334 | btn_mask[cfg_i] = 26; //Front touch default
1335 | else if (btn_mask[cfg_i] < 30)
1336 | btn_mask[cfg_i] = 30; //Front touch custom
1337 | else if (btn_mask[cfg_i] < 34)
1338 | btn_mask[cfg_i] = 34; //Rear touch default
1339 | else if (btn_mask[cfg_i] < 38)
1340 | btn_mask[cfg_i] = 38; //Rear touch custom
1341 | else
1342 | btn_mask[cfg_i] = 0; //HW Buttons
1343 | }
1344 | break;
1345 | case SCE_CTRL_SQUARE:
1346 | switch (menu_i){
1347 | case REMAP_MENU:
1348 | btn_mask[cfg_i] = PHYS_BUTTONS_NUM;
1349 | break;
1350 | case ANALOG_MENU:
1351 | analogs_options[cfg_i] = (cfg_i < 4) ? ANALOGS_DEADZONE_DEF : ANALOGS_FORCE_DIGITAL_DEF;
1352 | break;
1353 | case TOUCH_MENU:
1354 | if (cfg_i < 16)
1355 | touch_options[cfg_i] = TOUCH_POINTS_DEF[cfg_i];
1356 | else
1357 | touch_options[cfg_i] = TOUCH_MODE_DEF;
1358 | break;
1359 | case GYRO_MENU:
1360 | gyro_options[cfg_i] = (cfg_i < 3) ? GYRO_SENS_DEF : GYRO_DEADZONE_DEF;
1361 | break;
1362 | case CNTRL_MENU:
1363 | controller_options[cfg_i] = CNTRL_DEF[cfg_i];
1364 | break;
1365 | case SETTINGS_MENU:
1366 | if (cfg_i <= 2)
1367 | settings_options[cfg_i] = SETTINGS_DEF[cfg_i];
1368 | break;
1369 | }
1370 | break;
1371 | case SCE_CTRL_START:
1372 | switch (menu_i){
1373 | case REMAP_MENU:
1374 | resetRemapsOptions();
1375 | break;
1376 | case ANALOG_MENU:
1377 | resetAnalogsOptions();
1378 | break;
1379 | case TOUCH_MENU:
1380 | resetTouchOptions();
1381 | break;
1382 | case GYRO_MENU:
1383 | resetGyroOptions();
1384 | break;
1385 | case CNTRL_MENU:
1386 | resetCntrlOptions();
1387 | break;
1388 | case SETTINGS_MENU:
1389 | resetSettingsOptions();
1390 | break;
1391 | }
1392 | break;
1393 | case SCE_CTRL_CROSS:
1394 | if (menu_i == MAIN_MENU){
1395 | if (cfg_i == menu_entries-1) {
1396 | show_menu = 0;
1397 | saveGameConfig();
1398 | } else {
1399 | menu_i = cfg_i + 1;
1400 | cfg_i = 0;
1401 | }
1402 | } else if (menu_i == SETTINGS_MENU){
1403 | if (cfg_i == SETTINGS_NUM) {
1404 | saveGameConfig();
1405 | } else if (cfg_i == SETTINGS_NUM + 1) {
1406 | loadGameConfig();
1407 | } else if (cfg_i == SETTINGS_NUM + 2) {
1408 | saveGlobalConfig();
1409 | } else if (cfg_i == SETTINGS_NUM + 3) {
1410 | loadGlobalConfig();
1411 | }
1412 | }
1413 | break;
1414 | case SCE_CTRL_CIRCLE:
1415 | if (menu_i == MAIN_MENU) {
1416 | show_menu = 0;
1417 | saveSettings();
1418 | if (settings_options[0])
1419 | saveGameConfig();
1420 | } else {
1421 | menu_i = MAIN_MENU;
1422 | cfg_i = 0;
1423 | }
1424 | break;
1425 | }
1426 | }
1427 | old_buttons = curr_buttons;
1428 | }
1429 | }
1430 |
1431 | int remap(SceCtrlData *ctrl, int count, int hookId, int logic) {
1432 | if (count < 1)
1433 | return count; //Nothing to do here
1434 |
1435 | //Invert for negative logic
1436 | if (logic == NEGATIVE)
1437 | ctrl[count - 1].buttons = 0xFFFFFFFF - ctrl[count - 1].buttons;
1438 |
1439 | //Checking for menu triggering
1440 | if (!show_menu
1441 | && (ctrl[count - 1].buttons & btns[settings_options[0]])
1442 | && (ctrl[count - 1].buttons & btns[settings_options[1]])) {
1443 | show_menu = 1;
1444 | cfg_i = 0;
1445 | //Clear buffers;
1446 | remappedBuffersIdxs[hookId] = 0;
1447 | remappedBuffersSizes[hookId] = 0;
1448 | }
1449 | if (show_menu){
1450 | configInputHandler(&ctrl[count - 1]);
1451 | for (int i = 0; i < count; i++)
1452 | ctrl[i].buttons = (logic == POSITIVE) ? 0 : 0xFFFFFFFF;
1453 | return count;
1454 | }
1455 | int buffIdx = (remappedBuffersIdxs[hookId] + 1) % BUFFERS_NUM;
1456 |
1457 | //Storing copy of latest buffer
1458 | remappedBuffersIdxs[hookId] = buffIdx;
1459 | remappedBuffersSizes[hookId] = min(remappedBuffersSizes[hookId] + 1, BUFFERS_NUM);
1460 | SceCtrlData c = ctrl[count-1];
1461 | remappedBuffers[hookId][buffIdx] = &c;
1462 |
1463 | //Applying remap to latest buffer
1464 | applyRemap(remappedBuffers[hookId][buffIdx]);
1465 |
1466 | //Invert for negative logic
1467 | if (logic == NEGATIVE)
1468 | remappedBuffers[hookId][buffIdx]->buttons =
1469 | 0xFFFFFFFF - remappedBuffers[hookId][buffIdx]->buttons;
1470 |
1471 | //Limit returned buffers with amount we have cached
1472 | count = min(count, remappedBuffersSizes[hookId]);
1473 |
1474 | //Restoring stored buffers
1475 | for (int i = 0; i < count; i++)
1476 | ctrl[i] = *remappedBuffers[hookId]
1477 | [(BUFFERS_NUM + buffIdx - count + i + 1) % BUFFERS_NUM];
1478 | return count;
1479 | }
1480 |
1481 | void swapTriggersBumpers(SceCtrlData *ctrl, int count){
1482 | if (!controller_options[2])
1483 | return;
1484 | for (int i = 0; i < count; i++){
1485 | uint32_t b = 0;
1486 | for (int j = 0; j < PHYS_BUTTONS_NUM; j++)
1487 | if (ctrl[i].buttons & btns[j]){
1488 | if (btns[j] == SCE_CTRL_LTRIGGER) b+= SCE_CTRL_L1;
1489 | else if (btns[j] == SCE_CTRL_L1) b+= SCE_CTRL_LTRIGGER;
1490 | else if (btns[j] == SCE_CTRL_RTRIGGER) b+= SCE_CTRL_R1;
1491 | else if (btns[j] == SCE_CTRL_R1) b+= SCE_CTRL_RTRIGGER;
1492 | else b += btns[j];
1493 | }
1494 | ctrl[i].buttons = b;
1495 | }
1496 | }
1497 |
1498 | //Used to enable R1/R3/L1/L3
1499 | int patchToExt(int port, SceCtrlData *ctrl, int count, int read){
1500 | if (!controller_options[0] || show_menu)
1501 | return count;
1502 | SceCtrlData pstv_fakepad[count];
1503 | int ret;
1504 | internal_ext_call = 1;
1505 | if (read)
1506 | ret = sceCtrlReadBufferPositiveExt2(controller_options[1], &pstv_fakepad[0], count);
1507 | else
1508 | ret = sceCtrlPeekBufferPositiveExt2(controller_options[1], &pstv_fakepad[0], count);
1509 | internal_ext_call = 0;
1510 | if (ret < 0)
1511 | return count;
1512 | for (int i = 0; i < ret; i++)
1513 | ctrl[i].buttons = pstv_fakepad->buttons;
1514 | swapTriggersBumpers(ctrl, ret);
1515 | return ret;
1516 | }
1517 |
1518 | int retouch(SceUInt32 port, SceTouchData *pData, SceUInt32 nBufs, uint8_t hookId){
1519 | if (!internal_touch_call && show_menu) { //Disable in menu
1520 | pData[0] = pData[nBufs - 1];
1521 | pData[0].reportNum = 0;
1522 | return 1;
1523 | }
1524 | if (show_menu){ //Clear buffers when in menu
1525 | remappedBuffersFrontIdxs[hookId] = 0;
1526 | remappedBuffersRearIdxs[hookId] = 0;
1527 | remappedBuffersFrontSizes[hookId] = 0;
1528 | remappedBuffersRearSizes[hookId] = 0;
1529 | }
1530 | if (nBufs && !show_menu) {
1531 | if (port == SCE_TOUCH_PORT_FRONT){
1532 | //Get next cache real index
1533 | int buffIdx = (remappedBuffersFrontIdxs[hookId] + 1) % BUFFERS_NUM;
1534 |
1535 | //Storing copy of latest buffer
1536 | remappedBuffersFrontIdxs[hookId] = buffIdx;
1537 | remappedBuffersFrontSizes[hookId] = min(remappedBuffersFrontSizes[hookId] + 1, BUFFERS_NUM);
1538 | SceTouchData d = pData[nBufs-1];
1539 | remappedBuffersFront[hookId][buffIdx] = &d;
1540 |
1541 | //Updating latest buffer with simulated touches
1542 | updateTouchInfo(port, remappedBuffersFront[hookId][buffIdx]);
1543 |
1544 | //Limit returned buufers num with what we have stored
1545 | nBufs = min(nBufs, remappedBuffersFrontSizes[hookId]);
1546 |
1547 | //Restoring stored buffers
1548 | for (int i = 0; i < nBufs; i++)
1549 | pData[i] = *remappedBuffersFront[hookId]
1550 | [(BUFFERS_NUM + buffIdx - nBufs + i + 1) % BUFFERS_NUM];
1551 |
1552 | } else {
1553 | //Real index
1554 | int buffIdx = (remappedBuffersRearIdxs[hookId] + 1) % BUFFERS_NUM;
1555 |
1556 | //Storing copy of latest buffer
1557 | remappedBuffersRearIdxs[hookId] = buffIdx;
1558 | remappedBuffersRearSizes[hookId] = min(remappedBuffersRearSizes[hookId] + 1, BUFFERS_NUM);
1559 | SceTouchData d = pData[nBufs-1];
1560 | remappedBuffersRear[hookId][buffIdx] = &d;
1561 |
1562 | //Updating latest buffer with simulated touches
1563 | updateTouchInfo(port, remappedBuffersRear[hookId][buffIdx]);
1564 |
1565 | //Limit returned buufers num with what we have stored
1566 | nBufs = min(nBufs, remappedBuffersRearSizes[hookId]);
1567 |
1568 | //Restoring stored buffers
1569 | for (int i = 0; i < nBufs; i++)
1570 | pData[i] = *remappedBuffersRear[hookId]
1571 | [(BUFFERS_NUM + buffIdx - nBufs + i + 1) % BUFFERS_NUM];
1572 | }
1573 | }
1574 | return nBufs;
1575 | }
1576 |
1577 | // Simplified generic hooking function
1578 | void hookFunction(uint32_t nid, const void *func) {
1579 | hooks[current_hook] = taiHookFunctionImport(&refs[current_hook],TAI_MAIN_MODULE,TAI_ANY_LIBRARY,nid,func);
1580 | current_hook++;
1581 | }
1582 |
1583 | int sceCtrlPeekBufferPositive_patched(int port, SceCtrlData *ctrl, int count) {
1584 | int ret = TAI_CONTINUE(int, refs[0], port, ctrl, count);
1585 | used_funcs[0] = 1;
1586 | ret = patchToExt(port, ctrl, ret, PEEK);
1587 | return remap(ctrl, ret, 0, POSITIVE);
1588 | }
1589 |
1590 | int sceCtrlPeekBufferPositive2_patched(int port, SceCtrlData *ctrl, int count) {
1591 | int ret = TAI_CONTINUE(int, refs[1], port, ctrl, count);
1592 | used_funcs[1] = 1;
1593 | ret = patchToExt(port, ctrl, ret, PEEK);
1594 | return remap(ctrl, ret, 1, POSITIVE);
1595 | }
1596 |
1597 | int sceCtrlReadBufferPositive_patched(int port, SceCtrlData *ctrl, int count) {
1598 | int ret = TAI_CONTINUE(int, refs[2], port, ctrl, count);
1599 | used_funcs[2] = 1;
1600 | ret = patchToExt(port, ctrl, ret, READ);
1601 | return remap(ctrl, ret, 2, POSITIVE);
1602 | }
1603 |
1604 | int sceCtrlReadBufferPositive2_patched(int port, SceCtrlData *ctrl, int count) {
1605 | int ret = TAI_CONTINUE(int, refs[3], port, ctrl, count);
1606 | used_funcs[3] = 1;
1607 | ret = patchToExt(port, ctrl, ret, READ);
1608 | return remap(ctrl, ret, 3, POSITIVE);
1609 | }
1610 |
1611 | int sceCtrlPeekBufferPositiveExt_patched(int port, SceCtrlData *ctrl, int count) {
1612 | int ret = TAI_CONTINUE(int, refs[4], port, ctrl, count);
1613 | used_funcs[4] = 1;
1614 | ret = patchToExt(port, ctrl, ret, PEEK);
1615 | return remap(ctrl, ret, 4, POSITIVE);
1616 | }
1617 |
1618 | int sceCtrlPeekBufferPositiveExt2_patched(int port, SceCtrlData *ctrl, int count) {
1619 | int ret = TAI_CONTINUE(int, refs[5], port, ctrl, count);
1620 | if (internal_ext_call) return ret;
1621 | used_funcs[5] = 1;
1622 | return remap(ctrl, ret, 5, POSITIVE);
1623 | }
1624 |
1625 | int sceCtrlReadBufferPositiveExt_patched(int port, SceCtrlData *ctrl, int count) {
1626 | int ret = TAI_CONTINUE(int, refs[6], port, ctrl, count);
1627 | used_funcs[6] = 1;
1628 | ret = patchToExt(port, ctrl, ret, READ);
1629 | return remap(ctrl, ret, 6, POSITIVE);
1630 | }
1631 |
1632 | int sceCtrlReadBufferPositiveExt2_patched(int port, SceCtrlData *ctrl, int count) {
1633 | int ret = TAI_CONTINUE(int, refs[7], port, ctrl, count);
1634 | if (internal_ext_call) return ret;
1635 | used_funcs[7] = 1;
1636 | return remap(ctrl, ret, 7, POSITIVE);
1637 | }
1638 |
1639 | int sceCtrlPeekBufferNegative_patched(int port, SceCtrlData *ctrl, int count) {
1640 | int ret = TAI_CONTINUE(int, refs[8], port, ctrl, count);
1641 | used_funcs[8] = 1;
1642 | return remap(ctrl, ret, 8, NEGATIVE);
1643 | }
1644 |
1645 | int sceCtrlPeekBufferNegative2_patched(int port, SceCtrlData *ctrl, int count) {
1646 | int ret = TAI_CONTINUE(int, refs[9], port, ctrl, count);
1647 | used_funcs[9] = 1;
1648 | return remap(ctrl, ret, 9, NEGATIVE);
1649 | }
1650 |
1651 | int sceCtrlReadBufferNegative_patched(int port, SceCtrlData *ctrl, int count) {
1652 | int ret = TAI_CONTINUE(int, refs[10], port, ctrl, count);
1653 | used_funcs[10] = 1;
1654 | return remap(ctrl, ret, 10, NEGATIVE);
1655 | }
1656 |
1657 | int sceCtrlReadBufferNegative2_patched(int port, SceCtrlData *ctrl, int count) {
1658 | int ret = TAI_CONTINUE(int, refs[11], port, ctrl, count);
1659 | used_funcs[11] = 1;
1660 | return remap(ctrl, ret, 11, NEGATIVE);;
1661 | }
1662 |
1663 | int sceTouchRead_patched(SceUInt32 port, SceTouchData *pData, SceUInt32 nBufs) {
1664 | int ret = TAI_CONTINUE(int, refs[12], port, pData, nBufs);
1665 | used_funcs[12] = 1;
1666 | return retouch(port, pData, ret, 0);
1667 | }
1668 |
1669 | int sceTouchRead2_patched(SceUInt32 port, SceTouchData *pData, SceUInt32 nBufs) {
1670 | int ret = TAI_CONTINUE(int, refs[13], port, pData, nBufs);
1671 | used_funcs[13] = 1;
1672 | return retouch(port, pData, ret, 1);
1673 | }
1674 |
1675 | int sceTouchPeek_patched(SceUInt32 port, SceTouchData *pData, SceUInt32 nBufs) {
1676 | int ret = TAI_CONTINUE(int, refs[14], port, pData, nBufs);
1677 | used_funcs[14] = 1;
1678 | return retouch(port, pData, ret, 2);
1679 | }
1680 |
1681 | int sceTouchPeek2_patched(SceUInt32 port, SceTouchData *pData, SceUInt32 nBufs) {
1682 | int ret = TAI_CONTINUE(int, refs[15], port, pData, nBufs);
1683 | used_funcs[15] = 1;
1684 | return retouch(port, pData, ret, 3);
1685 | }
1686 |
1687 | void delayedStart(){
1688 | delayedStartDone = 1;
1689 | // Enabling analogs sampling
1690 | sceCtrlSetSamplingMode(SCE_CTRL_MODE_ANALOG_WIDE);
1691 | sceCtrlSetSamplingModeExt(SCE_CTRL_MODE_ANALOG_WIDE);
1692 | // Enabling gyro sampling
1693 | sceMotionReset();
1694 | sceMotionStartSampling();
1695 | }
1696 |
1697 | int sceDisplaySetFrameBuf_patched(const SceDisplayFrameBuf *pParam, int sync) {
1698 | if (!delayedStartDone
1699 | && startTick + settings_options[3] * 1000000 < sceKernelGetProcessTimeWide()){
1700 | delayedStart();
1701 | }
1702 | if (show_menu) {
1703 | new_frame = 1;
1704 | ticker++;
1705 | screen_h = pParam->height;
1706 | screen_w = pParam->width;
1707 | updateFramebuf(pParam);
1708 | drawConfigMenu();
1709 | }
1710 | return TAI_CONTINUE(int, refs[16], pParam, sync);
1711 | }
1712 |
1713 | void _start() __attribute__ ((weak, alias ("module_start")));
1714 | int module_start(SceSize argc, const void *args) {
1715 |
1716 | // Getting game Title ID
1717 | sceAppMgrAppParamGetString(0, 12, titleid , 256);
1718 |
1719 | // For some reason, some Apps are refusing to start
1720 | // if this plugin is active; so stop the
1721 | // initialization of the module.
1722 | if(!strcmp(titleid, "NPXS10028") || //Adrenaline
1723 | strstr(titleid, "PSPEMU") || //ABM Bubbles
1724 | !strcmp(titleid, "NPXS10013")) //PS4link
1725 | {
1726 | return SCE_KERNEL_START_SUCCESS;
1727 | }
1728 |
1729 | //Set current tick for delayed startup calculation
1730 | startTick = sceKernelGetProcessTimeWide();
1731 |
1732 | // Setup stuffs
1733 | loadSettings();
1734 | loadGlobalConfig();
1735 | loadGameConfig();
1736 | model = sceKernelGetModel();
1737 |
1738 | // Initializing used funcs table
1739 | for (int i = 0; i < HOOKS_NUM - 1; i++) {
1740 | used_funcs[i] = 0;
1741 | }
1742 |
1743 | // Enabling both touch panels sampling
1744 | sceTouchSetSamplingState(SCE_TOUCH_PORT_FRONT, SCE_TOUCH_SAMPLING_STATE_START);
1745 | sceTouchSetSamplingState(SCE_TOUCH_PORT_BACK, SCE_TOUCH_SAMPLING_STATE_START);
1746 |
1747 | // Detecting touch panels size
1748 | SceTouchPanelInfo pi;
1749 | int ret = sceTouchGetPanelInfo(SCE_TOUCH_PORT_FRONT, &pi);
1750 | if (ret >= 0){
1751 | TOUCH_SIZE[0] = pi.maxAaX;
1752 | TOUCH_SIZE[1] = pi.maxAaY;
1753 | }
1754 | ret = sceTouchGetPanelInfo(SCE_TOUCH_PORT_BACK, &pi);
1755 | if (ret >= 0){
1756 | TOUCH_SIZE[2] = pi.maxAaX;
1757 | TOUCH_SIZE[3] = pi.maxAaY;
1758 | }
1759 |
1760 | // Hooking functions
1761 | hookFunction(0xA9C3CED6, sceCtrlPeekBufferPositive_patched);
1762 | hookFunction(0x15F81E8C, sceCtrlPeekBufferPositive2_patched);
1763 | hookFunction(0x67E7AB83, sceCtrlReadBufferPositive_patched);
1764 | hookFunction(0xC4226A3E, sceCtrlReadBufferPositive2_patched);
1765 | hookFunction(0xA59454D3, sceCtrlPeekBufferPositiveExt_patched);
1766 | hookFunction(0x860BF292, sceCtrlPeekBufferPositiveExt2_patched);
1767 | hookFunction(0xE2D99296, sceCtrlReadBufferPositiveExt_patched);
1768 | hookFunction(0xA7178860, sceCtrlReadBufferPositiveExt2_patched);
1769 | hookFunction(0x104ED1A7, sceCtrlPeekBufferNegative_patched);
1770 | hookFunction(0x81A89660, sceCtrlPeekBufferNegative2_patched);
1771 | hookFunction(0x15F96FB0, sceCtrlReadBufferNegative_patched);
1772 | hookFunction(0x27A0C5FB, sceCtrlReadBufferNegative2_patched);
1773 | hookFunction(0x169A1D58, sceTouchRead_patched);
1774 | hookFunction(0x39401BEA, sceTouchRead2_patched);
1775 | hookFunction(0xFF082DF0, sceTouchPeek_patched);
1776 | hookFunction(0x3AD3D0A1, sceTouchPeek2_patched);
1777 | hookFunction(0x7A410B64, sceDisplaySetFrameBuf_patched);
1778 |
1779 | return SCE_KERNEL_START_SUCCESS;
1780 | }
1781 |
1782 | int module_stop(SceSize argc, const void *args) {
1783 |
1784 | // Freeing hooks
1785 | while (current_hook-- > 0) {
1786 | taiHookRelease(hooks[current_hook], refs[current_hook]);
1787 | }
1788 |
1789 | return SCE_KERNEL_STOP_SUCCESS;
1790 |
1791 | }
--------------------------------------------------------------------------------
/remaPSV.yml:
--------------------------------------------------------------------------------
1 | remaPSV:
2 | attributes: 0
3 | version:
4 | major: 1
5 | minor: 2
6 | main:
7 | start: module_start
8 | stop: module_stop
9 |
--------------------------------------------------------------------------------
/renderer.c:
--------------------------------------------------------------------------------
1 | /*
2 | * This File is Part Of :
3 | * ___ ___ ___ ___ ___ ___
4 | * / /\ ___ /__/\ / /\ /__/\ / /\ / /\ ___
5 | * / /::\ / /\ \ \:\ / /:/ \ \:\ / /:/_ / /::\ / /\
6 | * / /:/\:\ / /:/ \ \:\ / /:/ \__\:\ / /:/ /\ / /:/\:\ / /:/
7 | * / /:/~/:/ /__/::\ _____\__\:\ / /:/ ___ ___ / /::\ / /:/ /:/_ / /:/~/::\ / /:/
8 | * /__/:/ /:/___ \__\/\:\__ /__/::::::::\ /__/:/ / /\ /__/\ /:/\:\ /__/:/ /:/ /\ /__/:/ /:/\:\ / /::\
9 | * \ \:\/:::::/ \ \:\/\ \ \:\~~\~~\/ \ \:\ / /:/ \ \:\/:/__\/ \ \:\/:/ /:/ \ \:\/:/__\/ /__/:/\:\
10 | * \ \::/~~~~ \__\::/ \ \:\ ~~~ \ \:\ /:/ \ \::/ \ \::/ /:/ \ \::/ \__\/ \:\
11 | * \ \:\ /__/:/ \ \:\ \ \:\/:/ \ \:\ \ \:\/:/ \ \:\ \ \:\
12 | * \ \:\ \__\/ \ \:\ \ \::/ \ \:\ \ \::/ \ \:\ \__\/
13 | * \__\/ \__\/ \__\/ \__\/ \__\/ \__\/
14 | *
15 | * Copyright (c) Rinnegatamante
16 | *
17 | */
18 |
19 | #include
20 | #include
21 | #include
22 | #include
23 | #include
24 | #include "font.h"
25 |
26 | unsigned int* vram32;
27 | int pwidth, pheight, bufferwidth;
28 | uint32_t color;
29 |
30 | void updateFramebuf(const SceDisplayFrameBuf *param){
31 | pwidth = param->width;
32 | pheight = param->height;
33 | vram32 = param->base;
34 | bufferwidth = param->pitch;
35 | }
36 |
37 | void setTextColor(uint32_t clr){
38 | color = clr;
39 | }
40 |
41 | void drawCharacter(int character, int x, int y){
42 | for (int yy = 0; yy < 10; yy++) {
43 | int xDisplacement = x;
44 | int yDisplacement = (y + (yy<<1)) * bufferwidth;
45 | uint32_t* screenPos = vram32 + xDisplacement + yDisplacement;
46 |
47 | uint8_t charPos = font[character * 10 + yy];
48 | for (int xx = 7; xx >= 2; xx--) {
49 | uint32_t clr = ((charPos >> xx) & 1) ? color : 0xFF000000;
50 | *(screenPos) = clr;
51 | *(screenPos+1) = clr;
52 | *(screenPos+bufferwidth) = clr;
53 | *(screenPos+bufferwidth+1) = clr;
54 | screenPos += 2;
55 | }
56 | }
57 | }
58 |
59 |
60 |
61 | void drawString(int x, int y, const char *str){
62 | for (size_t i = 0; i < strlen(str); i++)
63 | drawCharacter(str[i], x + i * 12, y);
64 | }
65 |
66 | void drawStringF(int x, int y, const char *format, ...){
67 | char str[512] = { 0 };
68 | va_list va;
69 |
70 | va_start(va, format);
71 | vsnprintf(str, 512, format, va);
72 | va_end(va);
73 |
74 | drawString(x, y, str);
75 | }
76 |
--------------------------------------------------------------------------------
/renderer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This File is Part Of :
3 | * ___ ___ ___ ___ ___ ___
4 | * / /\ ___ /__/\ / /\ /__/\ / /\ / /\ ___
5 | * / /::\ / /\ \ \:\ / /:/ \ \:\ / /:/_ / /::\ / /\
6 | * / /:/\:\ / /:/ \ \:\ / /:/ \__\:\ / /:/ /\ / /:/\:\ / /:/
7 | * / /:/~/:/ /__/::\ _____\__\:\ / /:/ ___ ___ / /::\ / /:/ /:/_ / /:/~/::\ / /:/
8 | * /__/:/ /:/___ \__\/\:\__ /__/::::::::\ /__/:/ / /\ /__/\ /:/\:\ /__/:/ /:/ /\ /__/:/ /:/\:\ / /::\
9 | * \ \:\/:::::/ \ \:\/\ \ \:\~~\~~\/ \ \:\ / /:/ \ \:\/:/__\/ \ \:\/:/ /:/ \ \:\/:/__\/ /__/:/\:\
10 | * \ \::/~~~~ \__\::/ \ \:\ ~~~ \ \:\ /:/ \ \::/ \ \::/ /:/ \ \::/ \__\/ \:\
11 | * \ \:\ /__/:/ \ \:\ \ \:\/:/ \ \:\ \ \:\/:/ \ \:\ \ \:\
12 | * \ \:\ \__\/ \ \:\ \ \::/ \ \:\ \ \::/ \ \:\ \__\/
13 | * \__\/ \__\/ \__\/ \__\/ \__\/ \__\/
14 | *
15 | * Copyright (c) Rinnegatamante
16 | *
17 | */
18 |
19 | #ifndef _RENDERER_H_
20 | #define _RENDERER_H_
21 |
22 | void updateFramebuf(const SceDisplayFrameBuf *param);
23 | void drawCharacter(int character, int x, int y);
24 | void drawString(int x, int y, const char *str);
25 | void drawStringF(int x, int y, const char *format, ...);
26 | void setTextColor(uint32_t clr);
27 |
28 | #endif
--------------------------------------------------------------------------------