Commit graph

4256 commits

Author SHA1 Message Date
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
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
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
Boris Gjenero
1b4ee1f33a Fix Samsung YH92X/YH820 keypad conditional in text_editor
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
2017-05-06 21:34:21 -04:00
Franklin Wei
271c30f206 puzzles: remember the previous preset when selecting
Change-Id: I22c84257a3aa9b19bf5e94f9de51204bbade08c5
2017-05-04 20:37:04 -04:00
Franklin Wei
f15c117a8f puzzles: fix optimization flags
Change-Id: Ib0524fd4594e9524612eca0da54b3d13dc79b22c
2017-05-04 20:10:58 -04:00
Franklin Wei
4bc3bfe612 puzzles: simplify makefile
Change-Id: I14b4bda7e706e73d2d4475c9d536fbef9e2b9577
2017-05-02 18:33:25 -04:00
Franklin Wei
cce3adb179 add fake stdio.h
Change-Id: Iec6159b095b29b5ffb3ef5a46d068012fbe10f00
2017-04-30 19:13:13 -04:00
Franklin Wei
ecd7c72254 add rule for rbcompat.h
Change-Id: Icb7320f9233f2c121a8487d5b5c4cbcb483e9345
2017-04-30 18:33:55 -04:00
Franklin Wei
078d52c290 fix puzzles: round 4
Change-Id: Ibba738b8179c166f680dee0ce7536890fca1c0e4
2017-04-30 18:33:55 -04:00
Franklin Wei
36aedfd165 fix puzzles... round 3
Change-Id: I014ace22f0b83d8e407bd46df361532207f984bc
2017-04-30 16:32:57 -04:00
Franklin Wei
28fef2e415 Fix puzzles... again
Change-Id: I34dd8673ebcbc7fcd55681175d0e18c8bbc5fe6c
2017-04-30 13:57:13 -04:00
Franklin Wei
881746789a puzzles: refactor and resync with upstream
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
2017-04-29 18:24:42 -04:00
Franklin Wei
35d69c80a6 Rewrite void* arithmetic
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
2017-03-15 18:27:25 -04:00
Franklin Wei
8628c60469 Remove redundant code
cppcheck reported: [speedread.c:151]: (style) Condition 'h<0' is always true

Change-Id: I78fe0bbd205b0ca5b03a71ace81ef4f9b616e268
2017-03-15 18:14:13 -04:00
Franklin Wei
9ecabc0a75 fix build for mono targets
Change-Id: I704231b10987ae2adddedebb975538f222843bce
2017-03-15 15:19:00 -04:00
Franklin Wei
6fb865a066 fix name
Change-Id: I6113d48f763195cdea36b8a9efd9e5dd18098c99
2017-03-15 15:05:35 -04:00
Franklin Wei
1bab5562c2 Speed-reading plugin
Partially based on `spread0r', an open-source ebook reader: https://github.com/xypiie/spread0r

Similar to Spritz(TM): http://spritzinc.com

Change-Id: I6aa54addd1910a83a266aea561406b6268449b67
2017-03-15 15:02:53 -04:00
Franklin Wei
0a9f71790b xworld: fix several horrendous bugs
- 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
2017-02-12 20:36:31 -05:00
Franklin Wei
e4a04fa105 xworld: get rid of annoying warning
Change-Id: I9faf00a97d0718efb0e4667018e9ff81ba80ee83
2017-02-12 20:36:31 -05:00
Franklin Wei
f483a07950 puzzles: fix makefile producing temporary files in the build directory (sorry!)
- thanks to Michael Sevakis for catching this

Change-Id: Ia02ba7a06a55bc0741df9ce2c21f868d7e0abdd4
2017-02-10 17:12:34 -05:00
Franklin Wei
abd75a17d1 puzzles: fix up makefile
- rewrote a bunch of repetitive rules with a pattern rule

Change-Id: I86a61a7ed8398f18789e5efaf4996d9eafd50651
2017-02-09 22:36:05 -05:00
Amaury Pouly
d7871914ac Fix dangerous casts
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
2017-02-04 17:24:47 +01:00
William Wilgus
1fa7c56351 Fix for Chessbox bug FS#10363
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
2017-02-01 01:33:48 +01:00
William Wilgus
37522ec63a Remove Whitespaces from chessbox
Remove 1616 Whitespaces from chessbox

Change-Id: I84c0dbd4a177eba50b9f7427f5695ae4b266aa5e
2017-01-31 01:09:23 +01:00
Franklin Wei
0056ea8a25 puzzles: more accurate sin() and cos()
- now uses fp_sincos()

Change-Id: I20c8224cac98fc677097161737d25dd9038bede2
2017-01-16 20:54:56 +01:00
Franklin Wei
1b882cb156 puzzles: change default optimization to -O2
Change-Id: I606df468f92f8d550827c122a9cfd5248866afdb
2017-01-16 20:54:37 +01:00
Franklin Wei
39434309d0 puzzles: fix copyright year
Change-Id: Iaa02e7a1fe4c17be7c4decbd5eb71206469710e9
2017-01-16 20:54:15 +01:00
Franklin Wei
2bc5173d45 puzzles: fix overlay loader (monolithic builds only)
Change-Id: I7f27e96036b5d22e946cc72146cd0f5a791deaf7
2017-01-16 20:53:13 +01:00
Franklin Wei
fb2da13cd2 puzzles: disable unplayable puzzles (Solo and Loopy)
- accidentally enabled in c200v2 fix

Change-Id: I252191fc47da9fe1a664a260cb53f6a5a1eea437
2017-01-16 20:25:03 +01:00
Matthias Mohr
d984725cbf Renamed defines UNALIGNED to ROCKBOX_UNALIGNED - UNALIGNED is already
defined in mingw environments.

Renamed defines of UNALIGNED to ROCKBOX_UNALIGNED so that they don't
conflict with definitions in mingw32 cross-compiling environments
(defined in _mingw.h).

Change-Id: I369848c0f507e6bf5ff9ab4a60663bbbda6edc52
2017-01-15 21:32:49 +01:00
Franklin Wei
a724dbbe91 fix whitespace
Change-Id: I9b0659c218f92051a4de99ec03b97a2b1d067e29
2017-01-15 14:32:24 -05:00
Franklin Wei
0bdb255a4e puzzles: fix building on c200v2
- disables Solo and Loopy

Change-Id: I3de15c0ad001683a4303950972af2f5988d438d0
2017-01-15 14:29:24 -05:00
Franklin Wei
d221ca6e5b puzzles: antialiased line drawing via Wu's algorithm and optional "shortcuts" for undo/redo
- line drawing should eventually be moved to xlcd, but for now it's very unportable code
- also fixes a minor issue with the configuration screens

Change-Id: I897f01b7210cbbec32665c2bc67920c965ea0bec
2017-01-15 14:29:24 -05:00
Amaury Pouly
793c0411be Fix compilation of puzzles on Windows
mingw exports vsscanf and that clashes with rbwrappers' definition.

Change-Id: I87481ff4e93547059b2e1fa8083bedcf8633343a
2017-01-15 18:30:30 +01:00
Franklin Wei
c1b913bb7d Revert "puzzles: antialiased line drawing and optional "shortcuts" for undo/redo"
This reverts commit 8e4429853d.

Change-Id: Id622d58ad4b3b9dd3313811c8a2f83202d21f5ee
2017-01-13 23:52:04 -05:00
Franklin Wei
823f726f83 puzzles: fix configuration menu (again!)
Change-Id: I440f3cea1bbeb3e7bda4aebefaaece3e8f3d44fd
2017-01-13 23:22:51 -05:00
Franklin Wei
8e4429853d puzzles: antialiased line drawing and optional "shortcuts" for undo/redo
- line drawing should eventually be moved to xlcd, but for now it's very nonportable code
- fixes a minor issue with the configuration screens

Change-Id: I897f01b7210cbbec32665c2bc67920c965ea0bec
2017-01-13 23:22:51 -05:00
Franklin Wei
637c7414a9 puzzles: enable fallback to audiobuf when smalloc() fails
- upon a failed smalloc(), the audio buffer will be used for further allocations
- should fix things on low-memory targets (c100 and c200v2), but breaks playback
- playback should still be intact on other targets

Change-Id: Ic239f1316efadc957050afacf5c614dbbca3f805
2017-01-13 19:00:09 -05:00
Franklin Wei
2915370b7d puzzles: add cursor interface to untangle
- makes it playable
- submitted to upstream

Change-Id: Ib672ee374d500a994bc8e78eb01fea529ec5132f
2017-01-07 15:32:35 -05:00
Sebastian Leonhardt
1728565e24 Midiplay: only boost cpu in sensible code parts
Change-Id: I9aaf7f2844e9f90030dbf0a63ebec80db4851e18
2017-01-06 21:39:56 +01:00
Sebastian Leonhardt
5279d60e0a Midi Player: fix premature stopping of audio buffer playback
Change-Id: I3794e8d8837722442b25e2b48db1b5b3c3c2dc51
2017-01-06 20:44:25 +01:00
Sebastian Leonhardt
69e9738a1c Midi Player: fix playback of buffer remains when seeking
Change-Id: Iccf4444b9c8ae421b9e44332791a789a767ae411
2017-01-06 20:18:42 +01:00
Sebastian Leonhardt
e813c3f50b Fix red (midi plugin: action rename)
Change-Id: Ie21711cbf98aad1fbfc24924c9281caf39f22af5
2017-01-06 20:01:45 +01:00
Sebastian Leonhardt
e05545bc2b Midi Player: give button actions meaningful names
Change-Id: I53183e024c202f6c35903fc9a74db7e49d4bdc20
2017-01-06 19:43:59 +01:00
Frank Gevaerts
afd482f51b midi: Recalculate (and rename) the note frequency table.
gustable[] contained plain note frequencies in milliHertz, but
was named and documented to appear like a table of magic numbers.
The values also seemed to be slightly inaccurate (up to about
0.01Hz, so probably irrelevant).

This changes the name to freqtable to make the purpose clearer, and
uses slightly better values.

Change-Id: I6b568d834c8c2c92161bed5290572a29733e28dc
2017-01-06 19:29:00 +01:00
Franklin Wei
dbee727664 puzzles: fix a minor bug in the configuration screen
- when an invalid string setting was entered, the string value would
  continue to be used after being freed

Change-Id: I3a9da016f6f32eac8636b9f55e4e09006bc6059e
2017-01-04 21:12:17 -05:00
Franklin Wei
1464cb942b puzzles: minor polishing touches on the user interface
- the debug menu has been neatly hidden away in the classic Android style ;)
- playback control option added to the pause menu when possible
- also fixes a minor redraw issue

Change-Id: I00d0186986a8e659991948336b26b4f2e2a0ce66
2017-01-04 20:53:21 -05:00
Franklin Wei
31907283a4 puzzles: fix a few things
- old acos() function was broken, replaced with a call to atan2(); this fixes "Cube!"
- Makefile extended to support building "unfinished games", but not enabled
- a backdrop issue fixed in rockbox.c

Change-Id: I9393e958d43de32f4ccf18e1cb409f75c2e1ed3c
2017-01-04 20:36:04 -05:00
Franklin Wei
d7770a1cdd puzzles: rename bcopy() to bcopy_wrapper() and make static
- fixes a name collision on linux

Change-Id: I9f162b5c8a1f319fa6495ff9343fb6007cc20edf
2017-01-03 00:15:28 +01:00
Franklin Wei
6e5f287606 Fixes and re-sync for puzzles
- Updates to latest upstream (7cae89fb4b22c305b3fd98b4e1be065ad527a9f7).
- Also fixes a bug relating to updating parts of the display.
- Adds some docs.

Change-Id: Idfcce66e0cf3c59e467bab42eafc161df2e495bb
2017-01-01 15:00:09 -05:00
Franklin Wei
575bd890e7 work around little bugs in puzzles
Change-Id: I80d72a6bb0189eb842385aa622506d5efe319053
2016-12-18 12:51:40 -05:00
Franklin Wei
90f1370bbf Add circle drawing/filling to xlcd
Change-Id: I5d28ade42145d9d82babcf62c0db7948927cafec
2016-12-18 18:35:52 +01:00
Franklin Wei
c6996ab731 add missing file to puzzles
Change-Id: I63b80718f48eede54c3312d9e66c77bfd2472a79
2016-12-18 12:24:33 -05:00
Franklin Wei
1a6a8b52f7 Port of Simon Tatham's Puzzle Collection
Original revision: 5123b1bf68777ffa86e651f178046b26a87cf2d9

MIT Licensed. Some games still crash and others are unplayable due to
issues with controls. Still need a "real" polygon filling algorithm.

Currently builds one plugin per puzzle (about 40 in total, around 100K
each on ARM), but can easily be made to build a single monolithic
overlay (800K or so on ARM).

The following games are at least partially broken for various reasons,
and have been disabled on this commit:

Cube:     failed assertion with "Icosahedron" setting
Keen:     input issues
Mines:    weird stuff happens on target
Palisade: input issues
Solo:     input issues, occasional crash on target
Towers:   input issues
Undead:   input issues
Unequal:  input and drawing issues (concave polys)
Untangle: input issues

Features left to do:
 - In-game help system
 - Figure out the weird bugs

Change-Id: I7c69b6860ab115f973c8d76799502e9bb3d52368
2016-12-18 18:13:22 +01:00
Franklin Wei
16e22b5b9f Add tentative new element names, IUPAC approval expected around November
Change-Id: I40adb1adb27894b15d3bc3a2388bd2059e75636e
2016-12-04 18:05:51 +01:00
Franklin Wei
e7d952db07 remove debug macro
Change-Id: I1bf6ecc5bb5275fd4addd3fdb62a89df441afe81
2016-11-19 13:41:46 -05:00
Franklin Wei
05733649bc XWorld: some fixes
Fixes sound on most platforms, original root cause was bad menu code
as well as DMA callbacks taking too long. Worked around with smaller
chunk sizes. Permanent fix would include moving mixing out of the
callback. Rewrites input with code from rockboy/doom. Cherry-picks a
change from Gregory Montoir's `rawgl' to patch the code wheel
screen. Finally, adds a motion blur filter on select targets.

Change-Id: I8df549c923c5075800c6625c36c8202e53de1d27
2016-11-19 19:17:14 +01:00
Frank Gevaerts
2a2800b528 pdbox: fix bug shown by new gcc warning
Change-Id: Ife308a3090f9bc62f2e98d2d979fdf393c22054d
2016-10-12 16:52:49 +02:00
Sebastian Leonhardt
e6687c11f2 Rockboy: revert FS#11745 patch
William Shipley sent this patch via mailing list. Original Message:
  "There was a patch to rockboy in 2010 that fixed a problem where
  the bottom tile row would be rendered at the top.

  Here's the relevant issue from that time:
  http://www.rockbox.org/tracker/11745

  Note that Stummi openly admits it was a hack, not a true fix.

  Sometime in the 6 years since, the root cause was fixed. Currently,
  rockboy on the Clip+ and other 64px models shows the top of the gb
  screen along the bottom of the display.

  I confirmed that reversing this patch fixes the issue on my own
  Clip+"

I don't have any of the mentioned targets, so someone else has to test.

Change-Id: Id29b78c4ece0af53ba1280029c18b76808a21da2
2016-10-03 18:16:47 +02:00
Frank Gevaerts
4f7f7f286d Fix misleading indentation as pointed out by the new gcc warning
Change-Id: Ia9c0b09ffb57dccbc7d13fce3b3a8a7d46b84857
2016-08-12 15:33:28 +02:00
Michael Giacomelli
838780109e test_mem: print clock speed in MHz so it fits on smaller screens.
Change-Id: I81383c115bd9abac44ffc2ecdd8807855c80cf0e
2016-08-03 20:26:54 +02:00
Frank Gevaerts
0f89b041c0 Fix endianness handling for sha1 (used by the otp plugin)
Change-Id: I408d88d984f9026539c2d1bc2a9608243802c152
2016-06-28 13:33:50 +02:00
Franklin Wei
30d7ead6af One-Time Password client (HOTP and TOTP)
* Implements RFC 4226 (HOTP) and RFC 6238 (TOTP)

* Adds sha1.c to apps/plugins/lib (orignally tools/hmac-sha1.c)

* See manual entry for more information

Change-Id: Ia4a4031b29f97361b541e71438aa7f3ea82212f2
2016-06-05 14:25:09 -04:00
Michael Giacomelli
ee7dfb526e Manually unboost if not using boost in test_codec
Right now GUI boost interfers with test_codec running unboosted
by varying the CPU frequency.  This at least makes it more consistent
if run without user input.

Change-Id: I121615098d6bd72ccd13c4e665cc2e4d45d7b58c
2016-05-14 23:11:52 +02:00
Sebastian Leonhardt
45a02dcf81 Plugin 2048: Optimize for 128x96 screen
Change-Id: I47c2d857fbf9e53696e005b075d8a6f041738fe3
2016-04-07 11:52:09 +02:00
Boris Gjenero
134e5914a1 Align test_disk buffer for DMA.
Some targets can only use storage DMA if the memory location is storage
aligned. The required alignment can be more strict than word alignment,
which was used previously. This change ensures that aligned transfers
in test_disk can use DMA.

Change-Id: I605b4d57f9e9c04920587017032f14449645693a
2016-04-01 19:57:44 +02:00
Boris Gjenero
26697d0891 Fix FS#12981 JPEG decoding problem when entropy data starts with FF
This changes JPEG fill and invalid byte handling to be like
mozjpeg, and bases entropy data start on SOS marker location.

Thanks to Stefan Waldmann and Dean Tersigni for reporting.

Change-Id: I3c79cc6ac8d714fdc75c12b57ba427d611c99519
Chaange-Id: Ibc7c17d38d5be63642bdaf6adfd6acc2a6cf4450
2016-04-01 19:29:41 +02:00
Frank Gevaerts
8d50cdca37 lua: don't include rockbox-specific libc headers for the button helper tool.
This fixes the "implicit declaration of function 'printf'" warning

Change-Id: I97d247bcab26ddba4d22e0fd19af45fdb47b8cce
2016-03-18 15:52:22 +01:00
Frank Gevaerts
2292782839 A better fix than b58b9c2.
I misunderstood the code a bit when I committed b58b9c2. The
read_char_no_whitespace() probably have to be done.

Change-Id: I024420149a04dbeed4d714795282bb7f88a8e1da
2016-03-13 23:01:35 +01:00
Frank Gevaerts
b58b9c26c9 Remove clearly broken error checking, as pointed out by newer gcc.
Note that the error checking is probably useful if done correctly,
but I have no way to test this, so just removing the offending code
is the only way forward. Thanks to the fairly creative bug, the code
did nothing at all anyway.

Change-Id: Ifeef57202f31e842ca1befa331f8b34e1c76757c
2016-03-13 22:52:45 +01:00
Sebastian Leonhardt
e6cd53ad53 Replace SAMSUNG_YH920_PAD with YH92X
seems more logical to me, and is more consistent, since
"SAMSUNG_YH92X_PAD" is already used in the tex files.

Change-Id: Ie9a9d850ea86155a7dcf86c88a22a420a10a3837
2016-01-25 09:23:09 +01:00
Sebastian Leonhardt
166da9add8 Plugin 2048: optimize small tiles
Change 12x12 and 22x22 sized tiles to hand-optimized ones
with better readibility :)
Tile values >= 1024 are abbreviated to "1k", "2k" etc.

Change-Id: I15f4649b20442b71027a3b1564bc51c7e72105ce
2016-01-11 20:13:25 +01:00
Sebastian Leonhardt
87229a49b2 Plugin Frotz: Match keymap and manual
Change source to match manual description:
use UP key to open virtual keyboard.

Change-Id: I5c6ffc356db42f305c918053c31a9595bf0dc3ac
2016-01-09 19:46:21 +01:00
Sebastian Leonhardt
5e91ec1401 Samsung YH820/92x keymap bugfixes
This patch fixes some (mostly small) plugin issues with the "big"
YH-keymap patch (a507b). Only one fix affects the main keymaps
(virtual keyboard "DONE" now exits after long key /release/ instead
of long button /press/).

Change-Id: Id34f925ebfa97ae4974cd9405fbe1fee4f597833
2015-12-27 18:14:41 +01:00
Szymon Dziok
5b7c9d40e7 fix yellow.
Change-Id: I3fb322f28b23e4b7a27a71e66c50887d298de554
2015-11-16 00:34:57 +01:00
Sebastian Leonhardt
a507bb2837 YH8xx,YH9xx: Keymap improvement
The main "innovation" in this patch are two "virtual buttons"
for the record switch on YH92x targets. When the switch state
changes, a single BUTTON_REC_SW_ON or .._OFF button event will
be generated. Thus keymap code can react on switching, but
not on the actual state of the switch.

Wherever sensible, the following user scheme is applied:
- use PLAY as confirm button
- use REW button or Long REW to exit
- use REC (YH820) or FFWD (YH92X) as modifier key for button combos

Change-Id: Ic8d1db9cc6869daed8dda98990dfdf7f6fd5d5a1
2015-11-15 23:46:39 +01:00
Sebastian Leonhardt
f01fb3ca59 Fix chessbox keymap handling
Let's give the defined, yet unused keymaps some sense :)

Change-Id: I372217351f7edc35c69c8c29fba782d32c895d5b
2015-09-30 16:13:55 +02:00
Sebastian Leonhardt
729e7130a0 Snake2: add 128x96x16 bitmaps
These fit by pure chance exactly the YH820 screen :)

Change-Id: I0f7a7f5d14aa0497da5ddf63cf1f95a2c4989460
2015-09-28 23:19:19 +02:00
Sebastian Leonhardt
072d3cb268 Fix Pong button handling
* allow button combos for QUIT (fixes MPIO_HD300)
* allow quitting during PAUSE mode

Change-Id: Iaf8ffc65cdcfe6c1d25bfbad3e38764eea2664cc
2015-09-25 10:23:37 +02:00
Sebastian Leonhardt
d552ff2648 Chip8: implement missing key
KEYA is defined for Fuze+ (even in the manual),
but wasn't implemented yet.

Change-Id: Ib0a93544926c15893b1cce967db931f3b515422c
2015-09-25 10:22:53 +02:00
Sebastian Leonhardt
59928e6cf5 Shopper: slightly improve plugin and manual
* improve manual (hopefully fixes fs#11988). Parts of the
  description are taken from fs#10820.
* move ACTION_STD_CONTEXT from alternate select to alternate
  menu action, as not all targets have ACTION_STD_MENU
* add menu entries for "Quit" and "Quit without saving"

Change-Id: Iec86a1608756a899f9f9d7ec7d479838dfd1d95f
2015-09-24 23:15:24 +02:00
Franklin Wei
d8ee5fcfc4 2048: Cleanup
- more whitespace to enhance readability
 - better/fixed/more comments ;)
 - some minor optimizations
 - general code cleanup

Change-Id: I2b5f69aba0f83f989abb2c636920646e4315583f
2015-04-19 17:48:12 +02:00
Christ van Willegen
ea334cf650 Rename 'expanded' to 'expended'. Was this a typo?
Change-Id: I2feaee4225f04e3b93f8ccde555090437238ee0f
2015-04-19 12:23:22 +02:00
Sebastian Leonhardt
06e76a375b Chopper game improvement
This tiny patch gives the player a bit time to
overlook the terrain and move the thumb to the
action button.

Change-Id: I63a4347c5bdafdd354f8c95b2bcdc64e046133a5
2015-04-11 00:27:44 +02:00
Christ van Willegen
926829cba3 Re-seed the random generator for each new game.
Change-Id: I1b814e8475798830d204b4838d98b8b671d93e02
2015-04-08 09:45:02 +02:00
Thomas Jarosch
079d7fbb8b Revert "PictureFlow: Add move callback for buflib allocations"
It's not needed as picture flow has it's own buffer.

This reverts commit 9076b433d1.

Detailed explanation from Thomas Martiz (thanks!):

buflib buffers can be passed to yielding functions just fine. Problems
only arise if the are concurrent allocations, for example if two threads
allocate from the same context simultaneously or if the callee does it's
own allocations. This can't happen in the pictureflow case, it has it's
own context and a single thread allocating from it.

Therefore the problem isn't yield() itself, but possible concurrent
buflib_alloc() calls that result from the thread switch. This is because
compaction only ever happens on allocation (and not in a backgroud
thread or so).
2015-03-01 18:23:17 +01:00
Frank Gevaerts
272b558639 Lamp plugin: Allow toggling the button light using "select".
Change-Id: I0f276a74010ef463ebdb0eb0cc00fc50123966f0
2015-02-22 12:22:40 +01:00
Thomas Orgis
8aa72f07f4 Enhancement of the metronome plugin:
- square sine tick and tock sounds (more annoying, more useful;-)
- optical indication of tics on display
- unification of mode of operation for SWCODEC and HWCODEC (tested on simulator)
  Both playback and display drawing happen in main loop, always.
- operating in two modes now:
-- 1. classic dumb metronome
--- active when openened as application without file to open
--- the usual functionality with tapping and bpm change
--- controls indicated on display
-- 2. track mode with programmable series of parts
--- active when started as viewer for a .tempo file
--- differing meters (4/4, 3/4, 6/8, etc.)
--- patterns (tick/tock/silence on each beat)
--- smooth tempo changes in those tracks

This version had lots of testing regarding metronome accuracy,
resulting in the realization that PLL A and PLL B differ
on the Clip+, causing drift. There is still drift when the timer
intervall is too small, so I settled on 2 ms as compromise.

This is the final version, after adding documentation and extensive
help from Sebastian Leonhardt testing it on slower hardware (YH820),
where it works up to 650 actual bpm with display indication.

Latest change: Documentation nitpicks.

Change-Id: I764c8252526db188352385c5462f9453d882beb9
2015-02-03 22:41:40 +01:00
Udo Schläpfer
dbabd0d9c3 iBasso DX50/DX90: Major code cleanup and reorganization.
Reorganization

- Separated iBasso devices from PLATFORM_ANDROID. These are now standlone
  hosted targets. Most device specific code is in the
  firmware/target/hosted/ibasso directory.
- No dependency on Android SDK, only the Android NDK is needed.
  32 bit Android NDK and Android API Level 16.
- Separate implementation for each device where feasible.

Code cleanup

- Rewrite of existing code, from simple reformat to complete reimplementation.
- New backlight interface, seperating backlight from touchscreen.
- Rewrite of device button handler, removing unneeded code and fixing memory
  leaks.
- New Debug messages interface logging to Android adb logcat (DEBUGF, panicf,
  logf).
- Rewrite of lcd device handler, removing unneeded code and fixing memory leaks.
- Rewrite of audiohw device handler/pcm interface, removing unneeded code and
  fixing memory leaks, enabling 44.1/48kHz pthreaded playback.
- Rewrite of power and powermng, proper shutdown, using batterylog results
  (see http://gerrit.rockbox.org/r/#/c/1047/).
- Rewrite of configure (Android NDK) and device specific config.
- Rewrite of the Android NDK specific Makefile.

Misc

- All plugins/games/demos activated.
- Update tinyalsa to latest from https://github.com/tinyalsa/tinyalsa.

Includes

- http://gerrit.rockbox.org/r/#/c/993/
- http://gerrit.rockbox.org/r/#/c/1010/
- http://gerrit.rockbox.org/r/#/c/1035/

Does not include http://gerrit.rockbox.org/r/#/c/1007/ due to new backlight
interface and new option for hold switch, touchscreen, physical button
interaction.

Rockbox needs the iBasso DX50/DX90 loader for startup, see
http://gerrit.rockbox.org/r/#/c/1099/

The loader expects Rockbox to be installed in /mnt/sdcard/.rockbox/. If
/mnt/sdcard/ is accessed as USB mass storage device, Rockbox will exit
gracefully and the loader will restart Rockbox on USB disconnect.

Tested on iBasso DX50.
Compiled (not tested) for iBasso DX90.
Compiled (not tested) for PLATFORM_ANDROID.

Change-Id: I5f5e22e68f5b4cf29c28e2b40b2c265f2beb7ab7
2015-02-02 21:57:55 +01:00
Marcin Bukat
9ffd9327e3 Fix red/yellow
Change-Id: Ie01251af2cd843979b5fdefcfa541ba377d13bd7
2015-01-12 12:02:24 +01:00
Marcin Bukat
89ba7e818c Get rid of stupid _backlight_* function names
_remote_backlight_* and _buttonlight_* are cleaned as well

Change-Id: I73653752831bbe170c26ba95d3bc04c2e3a5cf30
2015-01-12 11:09:27 +01:00