summaryrefslogtreecommitdiff
path: root/apps (follow)
Commit message (Collapse)AuthorAge
* stuffpuzzlesmanualFranklin Wei2017-07-22
| | | | Change-Id: Ic707fb03c2472b9a0c4ea3e64eb3620c411f661c
* puzzles: fix star drawing in SignpostFranklin Wei2017-07-17
| | | | | | | - change point ordering to make concave polygon rendering work - also enables an "Easter egg" of sorts Change-Id: I3b4044a374dce1cff889d5f3744de9e634978591
* puzzles: dynamic text size via custom font packFranklin Wei2017-07-17
| | | | | | | | | | | | | | | | | 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
* puzzles: allow using hints in FifteenFranklin Wei2017-07-12
| | | | | | This maps the select button to the "h" key for Fifteen only. Change-Id: I7a5a61cec46e86254218fabfb191974f98c12319
* zen/zenxfi: map menu button to pitch screen toggle modeAmaury Pouly2017-06-29
| | | | | | The toggle action was unmapped for some reason Change-Id: I061d790801215a99f56771993169341e46e54a77
* puzzles: remove redundant help contentFranklin Wei2017-06-03
| | | | | | | | | | | 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
* puzzles: correct drawmode for textFranklin Wei2017-06-02
| | | | | | | 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
* puzzles: work around inconsistent namingFranklin Wei2017-05-22
| | | | Change-Id: I0541485af087d0bea845e05fbcf61b01be91bf6f
* puzzles: clarify target-specific macrosFranklin Wei2017-05-21
| | | | Change-Id: I1f68f25a557bb2daa5e83a6d6f02711abeec5165
* puzzles: fix Bridges crash on Clip ZipFranklin Wei2017-05-18
| | | | | | - small screen could lead to invalid viewport coordinates Change-Id: I1f2a323554e4ed31f250218220b464a02bffa308
* puzzles: fix buildingFranklin Wei2017-05-17
| | | | | | | - disables help on c200v2 - renames conflicting function Change-Id: I0c4ff1bb40e7e3cafd0170090f22b80bf0656741
* puzzles: full help systemFranklin Wei2017-05-16
| | | | | | | | | - 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
* Fix unsafe substitutions in Makefile.Amaury Pouly2017-05-12
| | | | | | Strange things can happen in the (unlikely) case that ROOTDIR=/rockbox Change-Id: I085f928fd859b307667e8fccf40b29a9c325f7ae
* Buffering: Switch to a more general handle caching typeMichael Sevakis2017-05-08
| | | | | | | | | | | | | | | | | | | It sort of implemented an MRU cache but just kept track of the most recent access and checked the one after it, otherwise searching from the beginning. Implement a true MRU list of all open handles. Handles of the current track will tend to stay up front for faster access. Switch to common linked list functions Use double-linked lists to have insert, remove and move_handle operations in O(1)-- no more searching to find the previous handle, which is very often required. Smaller code too. :) Change-Id: I9ae8f3f96d225a5d54b94133f499268007274784
* Fix Samsung YH92X/YH820 keypad conditional in text_editorBoris Gjenero2017-05-06
| | | | | | | | All the *_PAD values are always #defined. So the change made in 5e91ec1 was applied to all devices instead of only those it was meant to be applied to. Change-Id: Iba72316ecf2e3c83132b47484731cd177686b19e
* puzzles: remember the previous preset when selectingFranklin Wei2017-05-04
| | | | Change-Id: I22c84257a3aa9b19bf5e94f9de51204bbade08c5
* puzzles: fix optimization flagsFranklin Wei2017-05-04
| | | | Change-Id: Ib0524fd4594e9524612eca0da54b3d13dc79b22c
* puzzles: simplify makefileFranklin Wei2017-05-02
| | | | Change-Id: I14b4bda7e706e73d2d4475c9d536fbef9e2b9577
* Commit FS#13111 by Sebastiano Pistore.Michael Giacomelli2017-05-02
| | | | | | Updates Italian translation. Change-Id: I6d2a6f133c00626e3a7736a0e4600979c34036bd
* add fake stdio.hFranklin Wei2017-04-30
| | | | Change-Id: Iec6159b095b29b5ffb3ef5a46d068012fbe10f00
* add rule for rbcompat.hFranklin Wei2017-04-30
| | | | Change-Id: Icb7320f9233f2c121a8487d5b5c4cbcb483e9345
* fix puzzles: round 4Franklin Wei2017-04-30
| | | | Change-Id: Ibba738b8179c166f680dee0ce7536890fca1c0e4
* fix puzzles... round 3Franklin Wei2017-04-30
| | | | Change-Id: I014ace22f0b83d8e407bd46df361532207f984bc
* Fix puzzles... againFranklin Wei2017-04-30
| | | | Change-Id: I34dd8673ebcbc7fcd55681175d0e18c8bbc5fe6c
* puzzles: refactor and resync with upstreamFranklin Wei2017-04-29
| | | | | | | | | | This brings puzzles up-to-date with upstream revision 2d333750272c3967cfd5cd3677572cddeaad5932, though certain changes made by me, including cursor-only Untangle and some compilation fixes remain. Upstream code has been moved to its separate subdirectory and future syncs can be done by simply copying over the new sources. Change-Id: Ia6506ca5f78c3627165ea6791d38db414ace0804
* Fix some problems with playback crashingMichael Sevakis2017-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm not sure all the situations it affects, to be honest. The fix aimed to address the strange symptom here: http://forums.rockbox.org/index.php/topic,50793.0.html It turns out that ringbuf_add_cross was used when handles were butted up against one another with the first parameter equal to the last, which it interprets as being an empty case when it should be interpreted as full in the context it was used. To fix this, introduce full/empty variants of ringbuf_add_cross and ringbuf_sub and use them at the appropriate time. The other way to address the problem is ensure there's always at least a space byte between the end of one handle and the start of another but this make the code a bit trickier to reason about than using additional function variants. bufopen() may yield after creating a handle and so do some more locking so that the buffering thread doesn't mess things up by moving anything or not seeing the yet-to-be linked-in allocation. Add alignof() macro to use proper method to get alignment of struct memory_handle. That should be useful in general anyway. It's merely defined as __alignof__ but looks nicer. Change-Id: If21739eaa33a4f6c084a28ee5b3c8fceecfd87ce
* Fix a problem with audio not starting on a list of short filesMichael Sevakis2017-04-06
| | | | | | | | | | | | Forced audio start was left out when a third codec attempts to start a second track transition. Only one pending transition is allowed at a time. There wouldn't be enough PCM in the buffer to trigger audio playback and audio would just return without giving the pcm buffer a kick. Fixes FS#13100 - Player failed on short tracks Change-Id: I338b0b12022c591930451fd5ed26a2a73008835f
* Database: Fix destabilization if ramcache fails to load + misc.Michael Sevakis2017-04-01
| | | | | | | | | | | | | | | | | | | It seems to like not having any idea any attempt was made to load it so just try to put it back like the option was never on. Integrity check other tags besides the filename. Fix a few logfs that spat out warnings and add a bit more detail to a couple. Move a buffer lock to the right spot. Better aligning macro. Add a "continue" that should have been there when filename is seeked over during load. Change-Id: Ib0c517a7b77d3ba0dd6530ddef19bed62116e4a8
* Rewrite void* arithmeticFranklin Wei2017-03-15
| | | | | | | cppcheck reported: [chessbox/chessbox_pgn.c:51]: (portability) 'bufptr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. Change-Id: Ib2139489fa316fb61b4bcdc08f17b97eb6ad0be7
* Remove redundant codeFranklin Wei2017-03-15
| | | | | | cppcheck reported: [speedread.c:151]: (style) Condition 'h<0' is always true Change-Id: I78fe0bbd205b0ca5b03a71ace81ef4f9b616e268
* fix build for mono targetsFranklin Wei2017-03-15
| | | | Change-Id: I704231b10987ae2adddedebb975538f222843bce
* fix nameFranklin Wei2017-03-15
| | | | Change-Id: I6113d48f763195cdea36b8a9efd9e5dd18098c99
* Speed-reading pluginFranklin Wei2017-03-15
| | | | | | | | Partially based on `spread0r', an open-source ebook reader: https://github.com/xypiie/spread0r Similar to Spritz(TM): http://spritzinc.com Change-Id: I6aa54addd1910a83a266aea561406b6268449b67
* Do some housekeeping with fat.h and SECTOR_SIZEMichael Sevakis2017-03-12
| | | | | | | | | | | | | | Many includes of fat.h are pointless. Some includes are just for SECTOR_SIZE. Add a file 'firmware/include/fs_defines.h' for that and to define tuneable values that were scattered amongst various headers. Remove some local definitions of SECTOR_SIZE since they have to be in agreement with the rest of the fs code anyway. (We'll see what's in fact pointless in a moment ;) Change-Id: I9ba183bf58bd87f5c45eba7bd675c7e2c1c18ed5
* Tweak a few tagcache things.Michael Sevakis2017-02-13
| | | | | | | | | | | | | | * Take out pointless dircache_search; nothing can be reconstructed with the given info in find_entry_ram(); don't even try there. Path AND index id must be known. Work it out later. * Timed yield must be far more often than once every 1/4 second (?!) * Do better the memory-remaining checks for ramcache load. * Root separator mustn't be doubled up when searching files. Change-Id: I091813f4495f3bd0d0c4672bc674df52343b3e48
* xworld: fix several horrendous bugsFranklin Wei2017-02-12
| | | | | | | | - unregisters timer on exit, preventing possible crash - disables synchronization mechanisms when used from an IRQ - prevents memory allocations from overflowing the audio buffer (unlikely) Change-Id: I3c2c4ebe93c10ca9176ed0455e7aacc2d10c059e
* xworld: get rid of annoying warningFranklin Wei2017-02-12
| | | | Change-Id: I9faf00a97d0718efb0e4667018e9ff81ba80ee83
* Improve radio RDS driver and frameworkMichael Sevakis2017-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove unused bits like the radio event and simplify basic radio interface. It can be more self-contained with rds.h only required by radio and tuner code. * Add post-processing to text a-la Silicon Labs AN243. The chip's error correction can only do so much; additional checks are highly recommended. Simply testing for two identical messages in a row is extremely effective and I've never seen corrupted text since doing that, even with mediocre reception. Groups segments must arrive in order, not randomly; logic change only accepts them in order, starting at 0. Time readout was made a bit better but really we'd need to use verbose mode and ensure that no errors were seen during receiving of time and more checks would be need to have a stable PI. The text is the important bit anyway. * Time out of stale text. * Text is no longer updated until a complete group has been received, as is specified in the standard. Perhaps go back to scrolling text lines in the radio screen? * Add proper character conversion to UTF-8. Only the default G0 table for the moment. The other two could be added in. * Add variants "RDS_CFG_PROCESS" and "RDS_CFG_PUSH" to allow the option for processed RDS data to be pushed to the driver and still do proper post-processing (only text conversion for now for the latter). Change-Id: I4d83f8b2e89a209a5096d15ec266477318c66925
* Fix tagtree from blowing up when its buffer movesMichael Sevakis2017-02-10
| | | | | | | | | | | | | | | I noticed that after booting with the external storage removed, playing from tagtree, inserting the card, forcing dircache to reallocate from the debug screen, and trying to reenter tagtree, it would data abort because the dircache reallaction to a larger size caused the tagtree buffer to move. Adjustment to at least one pointer (csi) was missed. Since it's non-trivial there to determine when things should be NULL and when they shouldn't, add check for menu too before moving it. As for the rest, who knows. Change-Id: Iea6538a2091b4b47083f39296555efc47edf8ba8
* puzzles: fix makefile producing temporary files in the build directory (sorry!)Franklin Wei2017-02-10
| | | | | | - thanks to Michael Sevakis for catching this Change-Id: Ia02ba7a06a55bc0741df9ce2c21f868d7e0abdd4
* Fix warnings and errors from 7373cf5Michael Sevakis2017-02-10
| | | | | | dircache.h has to be included no matter what. Change-Id: Ib9ae4277615e8573b931d42fc6f1b3681d898bca
* Restore dircache hookup in the database ramcache.Michael Sevakis2017-02-10
| | | | | | | Do a few other changes to dircache and file code flags to accomodate its demands. Change-Id: I4742a54e8cfbe4d8b9cffb75faaf920dd907cf8a
* puzzles: fix up makefileFranklin Wei2017-02-09
| | | | | | - rewrote a bunch of repetitive rules with a pattern rule Change-Id: I86a61a7ed8398f18789e5efaf4996d9eafd50651
* Fix dangerous castsAmaury Pouly2017-02-04
| | | | | | | | | On Windows 64-bit, the size of long is 32-bit, thus any pointer to long cast is not valid. In any case, one should use intptr_t and ptrdiff_t when casting to integers. This commit attempts to fix all instances reported by GCC. When relevant, I replaced code by the macros PTR_ADD, ALIGN_UP from system.h Change-Id: I2273b0e8465d3c4689824717ed5afa5ed238a2dc
* Implement speaker enable/disable on jack (un)plugAmaury Pouly2017-02-04
| | | | | | | | | | | | | | | | | | | | | The implementation is not very complicated but there are a few things worth noting. There was a previous "speaker enable" setting but it was a boolean. I decided to replace it with a choice setting that has 2 options (on, off) if headphones cannot be detect on this target, or 3 options (on, off, auto) if we can detect headphones. This will break the old setting on target that cannot detect jack but it makes the code more uniform and avoid maintaining two settings with more #ifdef. The third option (auto) uses the LANG_AUTO text, which I think is clear enough (disable speaker on jack plug). In order to avoid code duplication (both in apps and firmware), I decided to keep the audiohw_enable_speaker function as-is: it takes a boolean and doesn't care about the speaker policy. I introduced a new audio_enable_speaker that takes directly the mode (which follows the setting encoding): 0=off, 1=on and 2=auto. This way one calls audio_enable_speaker and it changes the speaker once to reflect the request mode. The apps code then uses this function in the places where it makes sense: on setting load, setting change and jack (un)plug event. Change-Id: I027873f698eb4bc365d7c02b515297806355d9e2
* Fix for Chessbox bug FS#10363William Wilgus2017-02-01
| | | | | | | | | | | | | | | | Chessbox was overflowing GameList[240] causing the board to flip + crash GameCnt changed to unsigned char which allows the array to roll over to 0 after 255 define MAX_GAME_CNT 256 and GameList[MAX_GAME_CNT] along with 1 byte GameCnt should fix this issue dbg save routine left in for now to help identify any other problems Added bounds checking to prevent second bug found when loading .pgn files Change-Id: I2b615c8ecbed4368724412f80ce07346f3cf30a7
* Remove Whitespaces from chessboxWilliam Wilgus2017-01-31
| | | | | | Remove 1616 Whitespaces from chessbox Change-Id: I84c0dbd4a177eba50b9f7427f5695ae4b266aa5e
* AMS: Return ascodec to interrupt-based I2C2 driverMichael Sevakis2017-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Slightly revised and regularized internal interface. Callback is used for read and write to provide completion signal instead of having two mechanisms. 2. Lower overhead for asynchronous or alterate completion callbacks. We now only init what is required by the transfer. A couple unneeded structure members were also nixed. 3. Fixes a bug that would neglect a semaphore wait if pumping the I2C interrupts in a loop when not in thread state or interrupts are masked. 4. Corrects broken initialization order by defining KDEV_INIT, which makes kernel_init() call kernel_device_init() to initialize additional devices _after_ the kernel, threading and synchronization objects are safe to use. 5. Locking set_cpu_frequency has to be done at the highest level in system.c to ensure the boost counter and the frequency are both set in agreement. Reconcile the locking inteface between PP and AMS (the only two currently using locking there) to keep it clean. Now works fine with voltages in GIT HEAD on my Fuze v2, type 0. Previously, everything crashed and died instantly. action.c calling set_cpu_frequency from a tick was part of it. The rest may have been related to 3. and 4. Honestly, I'm not certain! Testing by Mihail Zenkov indicates it solves our problems. This will get the developer builds running again after the kernel assert code push. Change-Id: Ie245994fb3e318dd5ef48e383ce61fdd977224d4
* action.c must desist in calling set_cpu_frequency from a tickMichael Sevakis2017-01-21
| | | | | | | | | | | | | The function is neither reentrant nor ISR callable. Instead of using a ticked-based timeout, have the button driver provide the unboost after a delay when waiting for a button. HAVE_GUI_BOOST gets immediate boost after dequeuing any message, otherwise the queue has to have at least three messages waiting for it to trigger a boost-- essentially the behavior that existed but now combined in one place. Change-Id: I1d924702840f56a1a65abe41fa92b4e753c4e75a
* Selective Backlight Softlock Fix misleading indentation.William Wilgus2017-01-17
| | | | Change-Id: Iffbdd3c5bd8d2d23f4f7e3af42e16ab0c1dc312b