Commit graph

4053 commits

Author SHA1 Message Date
Amaury Pouly
2387d92c9c keymaps: cleanup
- remove useles define in pegbox
- improve keymap of nwz in mpegplayer
- fix whitespace alignement

Change-Id: I0d5e3c59f89ed8e0e02c386255286cfbb8693230
2014-07-17 10:29:18 +02:00
Nils Stec
c9816f57bf Introduce plugin keymaps for the Sony NWZ Series
Change-Id: I46b8766bd44118bce4931b7ee71815ae5f51cb2e
Reviewed-on: http://gerrit.rockbox.org/879
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-06-30 21:20:15 +02:00
Amaury Pouly
ae9b78ee2e Plugins: remove defined keys which are never used
Change-Id: I0195ae43f35c7355de66d5fa8caa24d8da6cb61e
Reviewed-on: http://gerrit.rockbox.org/883
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-06-30 20:35:12 +02:00
Thomas Martitz
8f6c779ff6 Fix some build errors and warnings.
Change-Id: I149c00fc6ba47d5134ad4f74c364bffd24079824
2014-06-21 00:49:05 +02:00
Thomas Martitz
a1842c04f9 lcd-24bit: Introduce a 24-bit mid-level LCD driver
With LCD driver all calculation will be performed on RGB888 and the hardware/OS
can display from our 24bit framebuffer.

It is not yet as performance optimized as the existing drivers but should be
good enough.The vast number of small changes is due to the fact that
fb_data can be a struct type now, while most of the code expected a scalar type.

lcd-as-memframe ASM code does not work with 24bit currently so the with 24bit
it enforces the generic C code.

All plugins are ported over. Except for rockpaint. It uses so much memory that
it wouldnt fit into the 512k plugin buffer anymore (patches welcome).

Change-Id: Ibb1964545028ce0d8ff9833ccc3ab66be3ee0754
2014-06-21 00:15:53 +02:00
Thomas Martitz
e49dcbf190 bitmaps: Use *x16.bmp also for upcoming 24bit targets (they are actually 24bit BMPs).
Change-Id: I5c7d16ad41e43c26a9ac3e01c52c3ca34a6b7495
2014-06-21 00:13:58 +02:00
Thomas Martitz
0267fafc5f bitmaps: Convert some bitmaps to 24bit BMP.
Change-Id: Ibd4171383be3383e0260686b920c78244989abd2
2014-06-21 00:13:58 +02:00
Sebastian Leonhardt
148e0ab416 YH820: game fix and improvements
* sudoku: make colour icons (without screen was squeezed)
* jewels: add colour bitmaps
* pegbox: make game fit on screen (add small header bitmap),
  improve keymap

I left the original pegbox keymaps for samsung's YH-92x,
because they seem to make some sense there (YH92x has a
REC switch instead of pushbutton).
Someone with a YH9xx target has to check what is better...

Change-Id: Id388c9d69e4a5a1d8ad4c3d7a05cdfc1dff0d06c
Reviewed-on: http://gerrit.rockbox.org/816
Reviewed-by: Szymon Dziok <b0hoon@o2.pl>
Tested: Szymon Dziok <b0hoon@o2.pl>
2014-05-27 20:14:23 +02:00
Sebastian Leonhardt
7f7aee3f24 Separate keymaps for YH-820 and YH-920/925
Although both players basically have the same keys, the
differences in the layout is rather big, so I think both
deserve their own keymaps.

(On the yh820 the FFWD/PLAY/REW buttons are located above the
direction keys, on the yh920 at the side of the player.
Furthermore the yh920/925 has a REC switch, whereas
yh820 has a push button.)

Change-Id: I0e62a1b101c387646c0bdb07ea142d9d2430ca15
Reviewed-on: http://gerrit.rockbox.org/814
Reviewed-by: Szymon Dziok <b0hoon@o2.pl>
2014-05-24 00:50:11 +02:00
Richard Burke
d35be7d0db Added high score and save/load functionality to xobox game.
Change-Id: I5e553a38b9290aeeb3cebaf1abf90ae6fc4ac362
Reviewed-on: http://gerrit.rockbox.org/799
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2014-05-02 00:56:10 +02:00
Thomas Martitz
957613420e plugins: Add plugin_release_audio_buffer().
Some plugins grab the whole audio buffer and still want to start playback
somehow (e.g. random_folder_advance_config). Since 22e802e the plugin buffer
is allocated via buflib and has to be released explicitely. For these plugins
the automatic free on exit is not sufficient and they need an API function for
that.

Fixes OOM panic on random_folder_advance_config when using start
shuffled playback.

Change-Id: I0d351daa782cb829f4ff80d34c05f40a2e0c142f
2014-04-09 09:04:10 +02:00
Amaury Pouly
68370b6eea Fix red
Change-Id: Ibfc5e559f619820d6c3f7de76353e54d27e9b160
2014-04-07 11:34:19 +02:00
David Jilke
d489444119 Complete Plugin Keymaps for Creative Zen X-Fi3
This patch completes the plugin keymaps for the Zen X-Fi3 and enables those plugins for compilation.
One key was changed in "button-target.h" for compatibility with Rockboy.
This also caused the changes to "keymap-zenxfi3.c", to keep the stock functionality (no further changes in here).

Change-Id: Ic222faf89e9a9a2332a49d6e532cedb6eb16d3d7
Reviewed-on: http://gerrit.rockbox.org/762
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-04-06 20:51:12 +02:00
Marcin Bukat
bfd0179042 Revert "Update lua plugin to 5.2.3"
FILE typedef to *void needs more work to not break sim and
application builds. I checked only a few random native builds
unfortunately. Sorry for inconvenience.
2014-04-02 20:46:06 +02:00
Richard Quirk
36378988ad Update lua plugin to 5.2.3
Prior to this patch the Lua plugin used version 5.1.4. This change
reduces the number of modifications in the Lua source using some new
defines and because the upstream source is now more flexible.

Unless otherwise stated, l*.[ch] files are taken unmodified from the
upstream lua-5.2.3.

fscanf.c:
file descriptors in rockbox are just ints, they are hidden behind a
void* now so liolib requires less modifications. fscanf is updated to
use void* too.

getc.c: this is a new file required for getc implementation in lauxlib.c

lauxlib.c: LoadF replaced FILE* with int, the rockbox file
descriptor int are cast to FILE* (actually void* due to typedef).
getc uses the PREFIX version. stdin is not used, as per 5.1.4.

lbaselib.c: now uses strspn in the number parsing. print uses DEBUGF now
rather than being commented out.

lbitlib.c: use the built-in version from 5.2.3 rather than Reuben
Thomas's external library. Backwards compatible and adds some new bit
operations.

ldo.c: the LUAI_THROW/TRY defines are now in the core lua code, so have
been removed from rockconf.h

liolib.c: here the implementation has changed to use the LStream from
the original source, and cast the FILE* pointers to int. This has
reduced the number of modifications from the upstream version.

llex.c: the only change from upstream is to remove the locale include.

lmathlib.c: updated from the 5.2.3 version and re-applied the changes
that were made vs 5.1.4 for random numbers and to remove unsupported
float functions.

loadlib.c: upstream version, with the 5.1.4 changes for missing
functions.

lobject.c: upstream version, with ctype.h added and sprintf changed to
snprintf.

loslib.c: upstream version with locale.h removed and 5.1.4 changes for
unsupportable functions.

lstrlib.c: sprintf changed to snprintf.

ltable.c: upstream with the hashnum function from 5.1.4 to avoid frexp
in luai_hashnum.

luaconf.h: updated to 5.2.3 version, restored relevant parts from the
original 5.1.4 configuration. The COMPAT defines that are no longer
available are not included.

lundump.c: VERSION macro conflicts with the core Rockbox equivalent.

rocklib.c: luaL_reg is no longer available, replaced by luaL_Reg
equivalent. Moved checkboolean/optboolean functions to this file and out
of core lua files. luaL_getn is no longer available, replaced by
luaL_rawlen. luaL_register is deprecated, use the newlib/setfuncs
replacements. rli_init has to be called before setting up the newlib to
avoid overwriting the rb table.

rocklib_aux.pl: use rli_checkboolean from rocklib.c.

rocklua.c: new default bits library used, update the library loading
code with idiomatic 5.2 code.

strcspn.c: no longer needed, but strspn.c is required for strspn in
lbaselib.c

Change-Id: I0c7945c755f79083afe98ec117e1e8cf13de2651
Reviewed-on: http://gerrit.rockbox.org/774
Tested: Richard Quirk <richard.quirk@gmail.com>
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2014-04-02 20:31:54 +02:00
Avi Eisenberg
b4a09868e1 Boost CPU before loading operations in textviewer
Change-Id: I88c813227c1c4c79fbf9cc2e0288d576a981c995
Reviewed-on: http://gerrit.rockbox.org/758
Reviewed-by: Avi Eisenberg <613ike@gmail.com>
Tested: Avi Eisenberg <613ike@gmail.com>
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2014-04-01 02:37:32 +02:00
Thomas Martitz
470989bd70 events: Rework event subsystem (add_event, send_event) to be more versatile.
add_event_ex is added that takes an extra user_data pointer. This pointer is
passed to the callback (add_event and add_event_ex have slightly different
callbacks types). All callbacks also get the event id passed. Events added
with add_event_ex must be removed with remove_event_ex because the user_data
pointer must match in addition to the callback pointer.

On the other add_event is simplified to omit the oneshort parameter which
was almost always false (still there with add_event_ex).

As a side effect the ata_idle_notify callbacks are changed as well, they
do not take a data parameter anymore which was always NULL anyway.

This commit also adds some documentation to events.h

Change-Id: I13e29a0f88ef908f175b376d83550f9e0231f772
2014-03-14 23:36:30 +01:00
Michael Sevakis
31b7122867 Implement time-based resume and playback start.
This complements offset-based resume and playback start funcionality.
The implementation is global on both HWCODEC and SWCODEC.

Basically, if either the specified elapsed or offset are non-zero,
it indicates a mid-track resume.

To resume by time only, set elapsed to nonzero and offset to zero.
To resume by offset only, set offset to nonzero and elapsed to zero.

Which one the codec uses and which has priority is up to the codec;
however, using an elapsed time covers more cases:

* Codecs not able to use an offset such as VGM or other atomic
formats

* Starting playback at a nonzero elapsed time from a source that
contains no offset, such as a cuesheet

The change re-versions pretty much everything from tagcache to nvram.

Change-Id: Ic7aebb24e99a03ae99585c5e236eba960d163f38
Reviewed-on: http://gerrit.rockbox.org/516
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested: Michael Sevakis <jethead71@rockbox.org>
2014-03-10 04:12:30 +01:00
Michael Sevakis
62b10e383c Oscilloscope: Fix loading of the speed setting for waveform view
Somehow, a long long time ago, I put MAX*/MAX* in the config data range
fields instead of MIN*/MAX* which forced the settings loader to acknowledge
only 100 as a valid setting other than the default.

Change-Id: Ifbfcafad27e239942449848d6a09426173bbde54
2014-03-06 19:10:46 -05:00
Thomas Martitz
191bd3da93 test_disk: Add an additional dirscan test that calls dir_get_info() also.
Especially on hosted dir_get_info() can be relatively. It is commonly called
after every readdir() for further information about the dir entry. So it's
peformance compared to readdir()-only is interesting.

Change-Id: I03ab41fb190acf738e04a5d3b2a4fe29276094f6
2014-02-25 09:57:18 +01:00
Thomas Martitz
be967515ac hosted: Rename a bit in functions to avoid name clashes with unix headers.
Change-Id: I2baa5532ddcbca8a839c31434309013f02173ed8
2014-02-23 23:36:11 +01:00
Jonathan Gordon
4b1221d556 fix red, strtok_r being annoying on sim builds
Change-Id: Ifb884a53d801db9534dd0c5ab5921800e971963e
2014-02-13 22:24:29 +11:00
Jonathan Gordon
6dbfd44b6e main_menu_config: New plugin to configur the main menu order
Plugins/Applications/main_menu_config allows you to edit the
main menu order without having to manually edit config.cfg.

Press the standard OK button to access the internal menu
which allows you to move items up/down in the order and toggle
their visibility. Exit via this menu to have the order saved.

(Suggestions welcome to improve this UI)

Change-Id: I59715ef1ca265aeb6f9666ef27026bc1093f2579
2014-02-13 22:11:23 +11:00
Avi Eisenberg
f723ca5805 Fixed bug where exiting textviewer after using up all the bookmarks caused that file unable to be read the next time.
Change-Id: I1924fe68c8528c03c4197f74a4f014edb0ac9f2a
2014-02-07 17:57:17 +01:00
Lorenzo Miori
e876f4df6d Samsung YP-R1 target port
This is the basic port to the new target Samsung
YP-R1, which runs on a similar platform as YP-R0.
Port is usable, although there are still
some optimizations that have to be done.

Change-Id: If83a8e386369e413581753780c159026d9e41f04
2014-02-05 09:56:21 +01:00
Thomas Martitz
6879af9784 rockbox: Improve button repeat handling.
Change-Id: I1259c43019c51828b2af73f312aee9cf399d57cf
2014-01-18 23:06:55 +01:00
Thomas Martitz
c448d7e79c rockboy: Fix button read method.
The old method simply polled the lastbtn variable in button.c. This approach
does not clear the button event queue which overflows as a result (panic
in the simulator). Use proper APIs to fix that and adopt the
method from the old read_scroll_wheel() function, which reads buttons until
the button queue is empty, for all targets.

Change-Id: Ibf198f6e597e7f51ab4ebcfcae4ebebbe8d7845c
2014-01-18 19:47:55 +01:00
Thomas Martitz
33f5fdeadf rockblox: Fix compilation under recent mingw-w64-gcc.
Change-Id: I703d967e9288e5c74556b54ad4f72ef2f6247083
2014-01-17 11:14:00 +01:00
Thomas Martitz
e766e6d9f3 reversi: Update viewport initialization to new member fields.
Change-Id: I37f77e4ad5abf04006dd6ee2a82de115ef204e3a
2014-01-07 23:01:07 +01:00
Thomas Martitz
d146970ca1 lcd/grey: Enable viewport fg_pattern and bg_pattern for all bitmap targets.
Greylib performed a horrible hack and stored fg and bg patterns in other
struct viewport fields. One of them was just removed. So instead of
this hack simply enable the *_pattern fields for mono targets as well,
so that greylib can use them normally.

Change-Id: Ib0842ebcc97f5bf9d9382b4471903afa2f96f39f
2014-01-07 22:14:41 +01:00
Thomas Martitz
e1c7b3b8f7 lcd-16bit: Remove {lss,lse,lst}_pattern fields from struct viewport.
These where used for line styling during scrolling, which is now done in apps/,
The  viewport struct doesn't need to record these anymore.

Change-Id: I810d9dcb2644b00a798c6e75acab69c74a78e77f
2014-01-07 14:13:48 +01:00
Thomas Martitz
4978094480 lcd-common: Remove support for custom line heights from viewport.
Since scrolling is now pixel-based this is not necessary anymore. custom line
height is handled by put_line() but can also possible to implement with
lcd_puts_scroll_func().

Change-Id: Iee9b12bf99afac93d95d2a1a6f5d5b4db237b21c
2014-01-07 14:13:48 +01:00
Thomas Martitz
2ef9aa51f3 test_gfx: Add benchmark for put_line().
Change-Id: I94cd5cec5ce169a4ddb60fcb3c09e2ffb50a3401
2014-01-07 14:13:41 +01:00
Thomas Martitz
5aa5a923f3 splitedit: Adapt put_line().
This plugin had a (broken) poor-mans list implementation which can be
better achieved through put_line().

Change-Id: I4ba92ba3a01b84a273b3f0a5d067b24c622ddc9e
2014-01-07 14:13:40 +01:00
Thomas Martitz
1c5d0b41ee scroll_engine: Rename scroll_stop* functions to be more consistent with the lcd api.
Change-Id: I8ada10b96bfb628cca0331689e8b936ae47c7e1c
2013-12-14 23:11:30 +01:00
Benjamin Brown
8b06039541 Fix typo in apps/plugins/lib/pluginlib_actions.c
BUTOTN_REL should be BUTTON_REL

Change-Id: I5b4aaeb87f31c5c0779656651b074512e22bcc4e
Reviewed-on: http://gerrit.rockbox.org/663
Reviewed-by: Benjamin Brown <foolshperson@gmail.com>
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2013-11-17 21:27:18 +01:00
Amaury Pouly
e387a746d2 sonynwz: add pluginlib keymap
Change-Id: I7753fb8d9a5f9e2e95dfaa03ce8d2469ae0bd74a
2013-11-14 16:44:16 +00:00
Amaury Pouly
42452d0fbd sonynwz: add battery_bench keymap
Change-Id: I7be9131356b8655f2dbb90f203b44b2225257450
2013-11-14 16:43:56 +00:00
Marcin Bukat
a2a2e14e0d lua: Switch memory allocator from dl to tlsf
Instead of providing yet another memory allocator implementation
use tlsf and simply link tlsf library.

Another small improvement is to *grow* memory pool by grabbing
audiobuffer instead of just switching to use audiobuf exclusively.
Tested with simple lua 'memory eater' script.

This patch extends tlsf lib slightly. You can provide
void *get_new_area(size_t * size) function which will override
weak dummy implementation provided in lib itself. This allows to
automaticaly initialize memory pool as well as grow memory
pool if needed (for example grab audiobuffer when pluginbuffer
is exhaused).

Change-Id: I841af6b6b5bbbf546c14cbf139a7723fbb982f1b
2013-08-26 09:42:47 +02:00
Lorenzo Miori
c01a728c5a Cube plugin fix
This small patch aims to fix a trivial
problem: when exiting the "cube" plugin
in a hosted environment (at least on YP-R0)
this caused the whole program, and consequently
also the player, to be turned off.
I don't know why the exit() function was
used here...

Change-Id: I7b58d4ca5c01c230f2c53204b51ec553c5fe1287
Reviewed-on: http://gerrit.rockbox.org/321
Reviewed-by: Bertrik Sikken <bertrik@sikken.nl>
2013-08-12 10:35:48 +02:00
Jean-Louis Biasini
f285a0f28b [ONDAV VX777][simulator] fix missing keymaps in test_touchscreen
Missing  TOUCHSCREEN_QUIT and TOUCHSCREEN_TOGGLE define

Change-Id: I3b9b3a1afc8e95ae95ca73ee9c31057d6e72098d
Reviewed-on: http://gerrit.rockbox.org/531
Reviewed-by: Frank Gevaerts <frank@gevaerts.be>
2013-07-29 19:07:19 +02:00
Jean-Louis Biasini
a9f20862a7 [Fuze+][Keymaps] Application and viewer keymaps update
Last core update for keymaps and manual. Manual is now 100% complete

Change-Id: I9ad33206ecea41a88cba7a355da911fa7ab0455d
Reviewed-on: http://gerrit.rockbox.org/521
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2013-07-18 20:24:06 +02:00
Michael Sevakis
1329cc29de Fix .ncbss from possibly overlapping .ncdata in plugins/codecs.
(Take #2)

If .bss wasn't large enough, and .ncdata was empty, .ncbss would be
at an address overlapping the alignment-padded end of .ncdata and
and linking would fail with an overlap error.

Adds plugin load end address that accounts for IRAM going past
the final .bss sections, making IRAM overlay compatible. load_code
could also use this instead of the file size.

The .lds becomes a bit more straightforward and explicit when
assigning addresses.

Change-Id: Id0c33f257710e97ece2c831e0feaaa32c1a14e05
2013-07-11 04:32:23 -04:00
Michael Sevakis
2948cb42ae Revert "Fix .ncbss from possibly overlapping .ncdata in plugins/codecs."
This reverts commit 5c2ad2fd36.

The .ncbss bug is still showing up. Will try again shortly.
2013-07-11 00:28:39 -04:00
Michael Sevakis
5c2ad2fd36 Fix .ncbss from possibly overlapping .ncdata in plugins/codecs.
If .bss wasn't large enough, and .ncdata was empty, .ncbss would be
at an address overlapping the alignment-padded end of .ncdata and
and linking would fail with an overlap error.

There also should no longer be an issue that needs special correction
with iramcopy and empty .bss. The .maps look good in that case.

Change-Id: I02bf73a0acef2c0c04b5d135ecf4e18fb97ee339
2013-07-10 22:37:17 -04:00
Michael Sevakis
74f90bdb18 Oops, two test plugins were left in apps/plugins/SOURCES.
Change-Id: I1df74c535a8c054223e8687e7c28bc6a130070d0
2013-07-05 22:32:56 -04:00
Michael Sevakis
d37bf24d90 Enable setting of global output samplerate on certain targets.
Replaces the NATIVE_FREQUENCY constant with a configurable frequency.

The user may select 48000Hz if the hardware supports it. The default is
still 44100Hz and the minimum is 44100Hz. The setting is located in the
playback settings, under "Frequency".

"Frequency" was duplicated in english.lang for now to avoid having to
fix every .lang file for the moment and throwing everything out of sync
because of the new play_frequency feature in features.txt. The next
cleanup should combine it with the one included for recording and
generalize the ID label.

If the hardware doesn't support 48000Hz, no setting will be available.

On particular hardware where very high rates are practical and desireable,
the upper bound can be extended by patching.

The PCM mixer can be configured to play at the full hardware frequency
range. The DSP core can configure to the hardware minimum up to the
maximum playback setting (some buffers must be reserved according to
the maximum rate).

If only 44100Hz is supported or possible on a given target for playback,
using the DSP and mixer at other samperates is possible if the hardware
offers them.

Change-Id: I6023cf0c0baa8bc6292b6919b4dd3618a6a25622
Reviewed-on: http://gerrit.rockbox.org/479
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
2013-07-06 04:22:04 +02:00
Frank Gevaerts
abb7d1dcfe plugin_midi: expand gustable[] to 128 entries
The code assumes that gustable[] has 128 entries, while it
only had 120. Since the entries follow a simple pattern (they
seem to be note frequencies, so each entry is the previous one
multiplied by the 2^(1/12)), expanding the table is the simple
fix.

Change-Id: If5b5a50378afd3206c9d550227dd9aac8e355c96
2013-06-16 18:33:57 +02:00
Frank Gevaerts
d4061a46d8 Silence some (harmless) warnings.
Change-Id: I8d1278b8cfaa376d2ad5a99dd552dc980c66e1da
2013-06-16 18:23:18 +02:00
Rafaël Carré
ab56afefc1 test_mem: silence -Wunused-but-set-variable warning
Change-Id: I4a14c8b0cf1a8c822166ce01087b31c06722d8ae
2013-06-13 18:56:23 +02:00