Commit graph

33491 commits

Author SHA1 Message Date
Franklin Wei
f31a400bac puzzles: add more parameter validation checks
Fixes some annoying crashes.

Change-Id: If3c293bd90e301c3e697d1e5fcb1b0aa2ea320fb
2017-08-16 11:40:42 -04:00
Franklin Wei
c78ff7f615 puzzles: fix floating-point formatting
This is pretty ad-hoc, but the only other ways are to rewrite
sprintf (which would use too much memory on the c200v2), or
implement support for floats in rockbox's formatter, neither of
which are acceptable.

Change-Id: I70d59fd3e90a16e2db9ae0a84cd8c14807f50b46
2017-08-16 11:40:42 -04:00
Franklin Wei
bf25f3e6e7 puzzles: compress extensive help text
This is only really needed to save a few bytes on the c200v2, but
since it adds negligible overhead, so it's implemented for all
targets.

A stripped down version of the LZ4 reference implementation is found
in lz4tiny.c.

Change-Id: Ib914ba71c84e04da282328662c752e533912e197
2017-08-16 11:40:37 -04:00
Franklin Wei
5645135092 Fix stupid omission
Change-Id: I9d65b8feeeb4c31e14fa60b370a12c0cc8b13f54
2017-08-16 11:02:55 -04:00
Franklin Wei
6df15ea653 Remove mutex_* calls from the MR:500 SPI driver
As before, they would trigger a panic.

Change-Id: I3c140f2897a9d3ed21e13f0a9e45025ede311de5
2017-08-16 10:51:29 -04:00
Franklin Wei
e00d78d5ab Remove bad mutex lock/unlock from tcc780x SD driver
This should make cowond2 work again.

Change-Id: Ib23d1548f72f9b604adad46fa1a1c0adee53c29e
2017-08-10 22:11:18 -04:00
Franklin Wei
0dbf7017be Remove bad mutex_* calls in telechips i2c driver
These were being called in a cpu mode they shouldn't have been,
leading to panics.

Change-Id: I7fbd0e4af5c6cbaf7177f9dafa901b3924617d7f
2017-08-10 21:53:55 -04:00
Franklin Wei
ca228d3d87 puzzles: cut size for c200v2
- font caching is disabled
- font table is dynamically allocated
- side effect: tlsf isn't reset between runs anymore, memory leaks will have a bigger impact

Change-Id: I0b25c22665d956895e8007883d522256010d04ab
2017-08-09 21:51:23 -04:00
Amaury Pouly
3e1c8cca92 fix yellow
Change-Id: I682e8298aa926c3c9c073b22abdcef7f5dfef9aa
2017-07-31 09:18:25 +02:00
Amaury Pouly
70b4d1a9a6 imx233: fix horrible bug in linreg offset calculation
This was actually harmless because it was only used for the debug screen.

Change-Id: I76e802c947fdefa8df498ecfeb53e4b6ce0e12bb
2017-07-31 01:04:24 +02:00
Amaury Pouly
17e48e81af imx233: don't print stmp3780 debug info on stmp3700
Change-Id: Iffad6f39b62af496e6bb5975610807228c2986c7
2017-07-31 01:04:24 +02:00
Amaury Pouly
ce39850e6b rbcodec: remove useless include
metadata.c does not need cuesheet.h, which in apps/ and has nothing to do with
rbcodec library.

Change-Id: I914a49e8c182f5c367d7db3479c2ff39565e5f07
2017-07-30 14:32:12 +02:00
Amaury Pouly
928d660a67 rbcodec: fix compilation in debug mode
Change-Id: I124cf59c641c2e161cc147b031d9bef5ef773dfb
2017-07-30 14:32:12 +02:00
Amaury Pouly
d1ca2e45e9 atjboottool: cleanup and add support for atj2127
Several people asked me recently how to decrypt atj2127 firmware. Someone
posted on github (https://github.com/nfd/atj2127decrypt) a decrypt utility
clearly reverse engineered from some unknown source. The code is an absolute
horror but I concluded that ATJ changed very little between ATJ213x and ATJ2127
so I added support for the ATJ2127, credit to this github code that I stole
and rewrite (code was under MIT licence). At the same time do some small code
cleanups.
Note that there is not 100% sure way that I know to distinguish between the
two firmware types, so the code tries to do an educated guess to detect
ATJ2127. If this does not work, use --atj21217 option. Also note that contrary
to the github tool that decrypts and unpack in one go, this tool only does one
step at once. So first decrypt: HEX -> AFI, then unpack AFI -> files.
I also added for a different version of AFI. Based on AFI files I have, there
are, I think, two versions: the "old" ones (pre-ATJ213x) and "new" ones. The
tool only supported the new one but for some reason the ATJ2127 uses the old
ones without a mostly empty header. Strangely, even this mostly empty header
does not seem to follow the old layout as reverse engineered by the s1mp3
project (https://sourceforge.net/p/s1mp3/code/HEAD/tree/trunk/s1fwx/heads.h),
so in fact there might be three versions. In any case, only the header is
different, the rest of the file is identical so at the moment I just don't
print any header info for "old" files.

Change-Id: I1de61e64f433f6cacd239cd3c1ba469b9bb12442
2017-07-30 14:32:12 +02:00
Franklin Wei
51984098ef puzzles: enable Mines
It should work now that arm memset() has been fixed for negative
values. This is the last puzzle that was disabled due to a crash.
2017-07-27 19:09:50 -04:00
Franklin Wei
c2546d3187 Fix arm memset() handling of negative arguments
This fixes the sgt-mines plugin. Same issue was present in an old
glibc as well:

https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=a7ed1adbecb6aac49af75aae3b3498798cf63abc
2017-07-27 19:09:50 -04:00
Franklin Wei
076cf0aa9b puzzles: new input scheme for Mines and Magnets
Both these puzzles now have long press mapped to spacebar.
2017-07-27 19:09:50 -04:00
Franklin Wei
f1b82b1acf puzzles: polish up the config menus 2017-07-27 19:09:50 -04:00
Franklin Wei
1a5149a0ae puzzles: tweak text positioning 2017-07-27 19:09:50 -04:00
Franklin Wei
aa7b168fd7 puzzles: font caching
This lets puzzles remember which fonts were loaded previously so
they can be preloaded when the puzzle is started (and the disk is
spinning), instead of while the game is being played.
2017-07-27 19:09:50 -04:00
Franklin Wei
eb43bce106 puzzles: add number chooser for integer settings
Sure beats typing on the virtual keyboard.
2017-07-27 19:09:50 -04:00
Franklin Wei
513fb8b332 puzzles: update debug menu
Add an option to visualize polygon rendering to aid in diagnosing
artifacts.
2017-07-27 19:09:50 -04:00
Franklin Wei
403d011bd8 puzzles: fix flag drawing in Mines
Yet another workaround to accomodate our polygon
drawing "algorithm" (if you can call it that).
2017-07-27 19:09:50 -04:00
Franklin Wei
68c5f93ea6 puzzles: update manual entry
Change-Id: I9c53eaa217ec8cd36ce3de4eaa1237c78bb0c1ea
2017-07-27 19:09:50 -04:00
Sebastian Leonhardt
34998e3151 Update manual copyright information for 2017 (FS#13095)
We're still working on this.

Change-Id: I9403f6757a81b05e44660e78d37e1bf478d223fa
2017-07-27 00:41:29 +02:00
Sebastian Leonhardt
a3e191e974 Manual (iRiver H300): Update list of supported FW versions (FS#13109)
Change-Id: Ifce260fa784cb3171f961a59d05a2f40bb49d3fd
2017-07-27 00:22:18 +02:00
Sebastian Leonhardt
087f4d5c13 Fix misspelling in Credits (FS#13093)
Change-Id: I35829acc5fa05195ce7de2d21c657a92dbc0776d
2017-07-26 23:55:32 +02:00
Franklin Wei
3a70222a73 puzzles: fix star drawing in Signpost
- change point ordering to make concave polygon rendering work
- also enables an "Easter egg" of sorts

Change-Id: I3b4044a374dce1cff889d5f3744de9e634978591
2017-07-17 17:03:03 -04:00
Franklin Wei
e7a35ba383 puzzles: dynamic text size via custom font pack
Up to now, we'd just ignore whatever font size the puzzle asked for,
and instead just go with either the UI font or system font regardless
of their size, which led to some horrible-looking puzzles. This patch
adds the ability to automatically load fonts of the proper size when
they are available, which makes text-based puzzles such as Pattern and
Slant function correctly with any UI font.

The font pack, which should be extracted to the system-wide fonts
directory consists of 3 small bitmap fonts from 7px to 10px and then
anti-aliased Deja Vu fonts from 10px to 36px. It is available in the
source tree (apps/plugins/puzzles/fonts.zip), or from
<http://download.rockbox.org/useful/sgt-fonts.zip>.

Change-Id: I05c8fe7bd6d867e14de9b941deb91e8c642ee4a8
2017-07-17 16:58:13 -04:00
Franklin Wei
84e13d5749 puzzles: allow using hints in Fifteen
This maps the select button to the "h" key for Fifteen only.

Change-Id: I7a5a61cec46e86254218fabfb191974f98c12319
2017-07-12 12:23:21 -04:00
Amaury Pouly
f9198ba35c zen/zenxfi: map menu button to pitch screen toggle mode
The toggle action was unmapped for some reason

Change-Id: I061d790801215a99f56771993169341e46e54a77
2017-06-29 13:27:36 +02:00
Cástor Muñoz
d6452729e3 mkimxboot: fix compilation issues with crypto lib
Change-Id: Ic81583dc7e872d332cbd4fd87143579cceeda484
2017-06-24 12:52:53 +02:00
Cástor Muñoz
fbbba9292b mks5lboot: updates
- fix Makefile to allow cross compilation
- Windows: use Sleep() instead of nanosleep()
- Windows: libusb now is optional
- OS X: use IOKit instead of libusb
- small rework on the DFU API

Change-Id: Ia4b07012c098ad608594e15f6effe9c9d2164b9b
2017-06-19 02:00:30 +02:00
Cástor Muñoz
cf168d4636 ipodpatcher: remove external ddk/ntddscsi.h dependency
Change-Id: Ib614f4181fe29ef04fcf64f90e37edc3a064270a
2017-06-19 02:00:30 +02:00
Amaury Pouly
37a945d203 nwztools/scsitool: add a command to query multiple nvp nodes at once
Change-Id: I89fed904b282a202bc845b08f4c8d1200a49636d
2017-06-18 23:16:18 +02:00
Amaury Pouly
91ede1ea08 nwztools/scsitool: fix devinfo, add dhp
The devinfo request returned the raw data, now the tool prints the various
fields. Also add support for the dhp (destination/headphones/color ...): this
one is untested because it's only supported starting from A10 or A20. There is
still a problem with the dpcc prop: although it should work for DEVINFO, it does
not, despite the fact that the get_dev_info command works and is internally (on
the Sony) translated into a dpcc request. I keep the code just in case.

Change-Id: I5aa8ef4afb0b11d3c0ddfa3d38f3e737ee1aff66
2017-06-18 13:37:26 +02:00
Amaury Pouly
8d5dcd395d nwztools/scsitool: print error on check sense
The detailled error message is only printed if -d switch is on command line,
otherwise there is no error message which is wrong so fix that.

Change-Id: I397541c467940e9b290ee8d4ae704368b1ce132b
2017-06-18 13:35:42 +02:00
Michael Giacomelli
365a005038 Slightly increase CVDD2 on AMSv2.
At least one person found an SD card that wouldn't work at 2.7v.

Change-Id: I84001f07acc9ce36c71165706cce28c2899ac6bf
2017-06-14 17:37:29 +02:00
Amaury Pouly
e9bb9a25ad nwztools: add KAS for NW-S10 (brute-forced using upgtool)
Change-Id: Ia37818faee29130ffe3690c83f85a39bd35637e0
2017-06-13 21:03:03 +02:00
Amaury Pouly
cd812218ab nwztools: add nvp description for NW-S10 series
Change-Id: Id6a6e51288f4ff24c0063b6c16b74109211e63c0
2017-06-13 20:41:43 +02:00
Amaury Pouly
28c3f6b4d3 Add NW-A36 and NW-A37 model IDs, based on the A30 service manual.
I am unsure about the names of the player, the manual says A36HN and A37HN but
at the same time there is a A35 and A35HN with the same ID, and Sony does not
usually put the "HN" in its device list.

Change-Id: Idbf32970aa334b30f1b8947a78b8eebd524b193b
2017-06-05 16:17:13 -05:00
Franklin Wei
552a271c6f puzzles: remove redundant help content
It used to be that each puzzle had a complete copy of the entire
puzzles manual and the "quick help" text for every single puzzle. This
was obviously a waste, so now each puzzle only has the sections of the
manual that apply to it, saving about 100KB or so per puzzle. This
also has the added benefit of shrinking binary size enough to allow
full help support on the c200v2, which has been enabled.

Change-Id: I76c799635de058e4a48e0c18b79537857af7cf85
2017-06-03 13:45:07 -04:00
Franklin Wei
cefbde0bbb puzzles: correct drawmode for text
DRMODE_FG should be used instead of DRMODE_COMPLEMENT to allow text to
be drawn in color, benefitting puzzles such as Slant and Pattern.

Change-Id: I292216490a58344cb93dc5c2ec1780229735313a
2017-06-02 18:19:10 -04:00
Franklin Wei
6d541fe9b6 puzzles: work around inconsistent naming
Change-Id: I0541485af087d0bea845e05fbcf61b01be91bf6f
2017-05-22 19:46:01 -04:00
Franklin Wei
6bba062599 puzzles: clarify target-specific macros
Change-Id: I1f68f25a557bb2daa5e83a6d6f02711abeec5165
2017-05-21 14:37:17 -04:00
Franklin Wei
504346ab48 puzzles: fix Bridges crash on Clip Zip
- small screen could lead to invalid viewport coordinates

Change-Id: I1f2a323554e4ed31f250218220b464a02bffa308
2017-05-18 18:03:53 -04:00
Franklin Wei
7b6f34a456 puzzles: fix building
- disables help on c200v2
- renames conflicting function

Change-Id: I0c4ff1bb40e7e3cafd0170090f22b80bf0656741
2017-05-17 17:42:30 -04:00
Franklin Wei
001860ce78 puzzles: full help system
- embeds the upstream halibut documentation for plugin use

- currently every plugin has a copy of the help text, but in the
  future a centralized system using overlays might be better

Change-Id: Idb6eb9accc2fa786a4c6bc2b704e7cf5fd3f78dd
2017-05-16 16:45:39 -04:00
Amaury Pouly
7482b82175 Fix formatting in configure
Change-Id: Ie877121bb60df6fb1fed4f778cc9aa0f5c426ed8
2017-05-16 12:16:25 +10:00
Amaury Pouly
3210457764 imx233: fix touchscreen driver
One cannot call lradc_acquire in IRQ context. The solution is to reserve the
channel once at init. There is an additional complication on STMP3600 where
channel mapping is fixed.

Change-Id: Idccbac634a4d9002703e2b1d57748beb9b245cbb
2017-05-16 12:14:43 +10:00