Commit graph

4574 commits

Author SHA1 Message Date
Solomon Peachy
a5add3982b Fix red introduced from keymap typos
Change-Id: Ia2094eab6fe48b8fa1b313c7548e5e02d630327f
2020-10-11 17:20:38 -04:00
Solomon Peachy
2a471e288c New port: AIGO EROS Q / EROS K
The Q and K have a slightly different case, but the hardware under the
shell is completely identical.

These models are rebadged versions:

 * Hifiwalker H2   (== Q)
 * AGPTek H3       (== K)
 * Surfans F20     (== K)

Other notes:

  * Significant improvements in the shared Hiby-platform launcher/loader
    * SD card can theoretically be hot-swapped now
    * Support external USB mass storage!
  * Some consolidation of Hiby-platform targets
  * Some consolidation of plugin keymaps

Todo/known issues:

 * Keymaps need to be gone over properly
 * Convert to HAVE_SCROLLWHEEL?

Change-Id: I5a8a4f22c38a5b69392ca7c0a8ad8c4e07d9523c
2020-10-11 16:37:17 -04:00
Franklin Wei
7c00e9b30b puzzles: improve frontend documentation
What it says on the tin.

Change-Id: Idf8f520e0c8c1fab98d292f4ad94e5231578f9ce
2020-10-09 22:01:00 -04:00
Solomon Peachy
aabc8aca47 New port: FiiO M3K
Most credit goes to:  Roman Skylarov
Additional integration and refactoring by myself.

 *** COMPLETELY UNTESTED ***

Change-Id: Ia64c36d92e0214c6b15f7a868df286f8113ea27b
2020-10-09 12:41:18 -04:00
Solomon Peachy
4231c2c83f codecs: Add support for the 'VTX' ZX Spectrum chiptunes format.
This codec requires floating point.

Original author:  Peter Sovietov
Ported to Rockbox:  Roman Skylarov
Further integration and bugfixes:  Solomon Peachy

Change-Id: I781ecd3592dfcdbbc694063334350342534f1d6c
2020-10-09 11:39:25 -04:00
Solomon Peachy
278522f811 plugins: Enable overlay features for all targets
Change-Id: I8dfbdf903c1fb82541382709a50e411f1bcdaa5d
2020-10-09 13:30:05 +00:00
Solomon Peachy
c18839e3f8 Fix red, hopefully.
Change-Id: I4ee6b9793260ac7dec9d72f27bfe242cd4adbf38
2020-10-09 13:04:38 +00:00
Solomon Peachy
7ad8b2eb3c Clean up some of the plugin SOURCES
Change-Id: Ib68a275c85550acb52306c7af1c3b9ab683362f0
2020-10-09 12:35:23 +00:00
Solomon Peachy
7a1bf01541 Undo the hacks that allowed targets without LEFT/RIGHT (UP/DN) to build.
Replaced them with warnings until they are fixed *PROPERLY*

Change-Id: I4425200e60f8b5224262a54f105b974cec471d22
2020-10-08 20:30:08 -04:00
Moshe Piekarski
cb9280c9e1
Fix DEBUG builds
Change-Id: Ie3b4caebf448444b7400541e44d11d40961781cb
2020-10-06 15:27:56 -05:00
William Wilgus
ef34126913 lua add better memory stats
lua gives you a memory used number that only reflects the current allocations
if fact it doesn't even give you a way to get the amount of ram free

rb.mem_stats() seeks to fill this gap by marking the memory allocated for lua
with a sentinel value which can later be checked to get a high water mark
of the ram used by lua and a pretty good idea of how much ram is available

Also includes an example script
usage:
used, allocd, free = rb.mem_stats()

Change-Id: Ia282869f989848324d7d88c7df4827fdbce4fb4e
2020-10-05 11:53:27 -04:00
William Wilgus
1aa739e3c3 lua misc tweaks and cleanup
checks button_status in rockev
strpbrk_n custom implementation allows setting max search len in source string
add some branch prediction where appropriate
fix formatting in splash_scroller script

Change-Id: Id5d8e9d83f4b3e361ccb67b403af8f9a8a31b8f0
2020-10-04 04:00:54 -04:00
William Wilgus
80c3b84e08 lua Add scrollable stack traceback WIP
lua currently splashes a stack traceback on error
for deep tracebacks and especially on devices with smaller screens
this leaves out a lot of vital information

in the past I have resorted to splitting the traceback string or
even saving the return to a file

This patch provides a scrollable buffer with rudimentary text reflow
to allow you to read the whole traceback string

Upon traceback if you press nothing the screen will display for 5 seconds
If you press OK or CANCEL it will quit immediately
PREV/NEXT scrolls the list on button press timeout is disabled

lua now provides rb.splash_scroller(timeout, str)

example script provided too

Change-Id: Idbc8ce0c514196f0fae48c43aeaea8b60d6da1a5
2020-10-03 22:09:52 +00:00
Solomon Peachy
cb9b5d3b50 Add 192 and 176KHz to mikmod and test_sampr plugins
Change-Id: I34e835ae0ae39da1ce50153eee86c14747705c4e
2020-09-30 22:52:56 -04:00
Solomon Peachy
c2c59457e1 lua: fix ipod builds broken by 127862c
Change-Id: Ibef7de6b4e87568206ede66c399093b66b827b69
2020-10-01 01:24:35 +00:00
Solomon Peachy
127862c947 lua: Include $TARGET when preprocessing the headers for the button helper
Change-Id: I3ab98b52991949adb1db2f13ea99ed24d827e575
2020-09-30 20:13:05 -04:00
William Wilgus
1c0648c603 lua rockevents reduce context switching for action and buttons
check if any buttons are waiting in the queue before triggering
the event thread for action & button events

makes button events quicker and also spend less time interrupting lua
both wins

Change-Id: I38346c084afdd99e4608f40b52053ee39730fb40
2020-09-30 16:33:38 +00:00
William Wilgus
018e0051bc lua playback example
cool little lua based audio player
creates dynamic playlist of 10 mp3s found on device if no music loaded

I had to limit the depth of search to 3 levels due to the recursive
nature of the current dirbrowser functions this could be rectified with a
bit more code

fixed a bug in print.lua that kept scrolling text even after screen clear

Change-Id: Ifd285332df41a409ecaeb1ea447ad15537b5d04c
2020-09-27 15:57:34 +00:00
William Wilgus
0f23cadbca lua -- add sort by name, size, date to filebrowse include
I had previously added the fuctionality to luadir but I didn't update
the examples

also breaks out the file_browser function to be a bit more accessible

Change-Id: I14067256b9d76a757f732840cbee1cf84d775b1b
2020-09-25 23:07:30 -04:00
Solomon Peachy
5d40d97585 voice: rename mp3_play_* functions to voice_play_*
Remove mp3_is_playing() entirely, in favor of pcm_is_playing()
Remove mp3_play_pause() entirely, as it's a dummy/no-op call
Remoce some archos-specific comments

Change-Id: I4e9ff323490a93add00809efd19e0d4e3f198b2d
2020-09-20 14:52:30 +00:00
William Wilgus
c62493e98a Xduoo X3 Add tree scrolling FS#13240, Emulate Multibutton presses
Fixes deficiencies with the button system on the X3

  The x3 has an interesting button layout.
  Multiple key presses are NOT supported unless
  [BUTTON_POWER] is one of the combined keys

  As you can imagine this causes problems as the power button takes
  precedence in the button system and initiates a shutdown if the
  key is held too long
  instead of BUTTON_POWER use BUTTON_PWRALT in combination with other keys
  IF using as a prerequsite button then BUTTON_POWER should be used

  Multiple buttons are emulated by button_read_device but there are a few
  caveats to be aware of:

  Button Order Matters!
   different keys have different priorities, higher priority keys 'overide'
   the lower priority keys
  VOLUP[7] VOLDN[6] PREV[5] NEXT[4] PLAY[3] OPTION[2] HOME[1]

  There will be no true release or repeat events, the user can let off the
   button pressed initially and it will still continue to appear to be
   pressed as long as the second key is held

Tree scrolling is PLAY+NEXT or PLAY+PREV

Change-Id: I88dfee1c70a6a99659e8227f5becacc50cc43910
2020-09-13 16:23:24 +00:00
Solomon Peachy
099bde885d mikmod: Fix emulated fseek()
Was causing XM loader to fail

Change-Id: I1dd1d87dd0d8587fae5f9db04a730fc42b625a11
2020-08-25 20:10:10 -04:00
Solomon Peachy
7972f8e448 xduoox3: Fix minesweeper plugin keymap.
(Broke in a654cecf8)

Change-Id: I5b07e27aed12019e2b0a5078bf06812da2ddd598
2020-08-25 15:54:25 -04:00
Solomon Peachy
9e64e31d56 xduoox3: More screenshots and button maps for plugins
Change-Id: Ic494102f191da5e32faa61b0f4bcefadee198200
2020-08-25 15:25:50 -04:00
William Wilgus
8ee035b6c8 Open_plugin add ability to import opx shortcuts, bug fix
shortcuts can be exported as .opx; now they can import as well

if parameter is a valid file..
 plugins with parameters are now hashed on the parameter path

fix bug with empty parameters not overwriting last valid parameter

Change-Id: I149519811f07cb4ba22b7113449e2f89f77f1eee
2020-08-19 02:06:16 -04:00
William Wilgus
889bcc0f76 WIP open_plugins.rock viewer
OP allows you to use Open With.. to call plugins with parameters
called directly it  acts as a shortcut list for plugins

  open_plugins.rock interfaces with the open_plugin core

  When opened directly it acts as a viewer for the plugin.dat file
  this allows you to edit the paths and parameters for
  core shortcuts as well as your added plugins

  If a plugin is supplied to the viewer it is added to the dat file

  If instead the plugin has previously been added then it is run
  with the parameters you previously supplied

-----------------------------------------------------------------------------
Added export to .opx files
this allows shortcuts to plugins with parameters to be called from
 the file browser

Change-Id: Ib8b05a60b049fb1d5881031ca09a07e3307d375a
2020-08-17 22:17:15 -04:00
William Wilgus
3550283442 Add open_plugin to core
open_plugin allows arbitrary plugins to be called
in hotkey and start screen

replaces PictureFlow Integration
shortcuts menu plays plugins now too

rather than store paths and parameters in the settings
that reside in memory instead entries in a file are searched by hash.
after all, the plugin has to be loaded from disk anyways

----------------------------------------------------------------------------
shortcut_viewer.rock--  can now call plugins rather than taking you to them
in the browser
-----------------------------------------------------------------------------
Added a new option to menus:
 F_CB_ON_SELECT_ONLY
 instead of option callback every time a item is accessed
 F_CB_ON_SELECT_ONLY fires callback only when item is selected
-----------------------------------------------------------------------------
Added manual entries
-----------------------------------------------------------------------------

Change-Id: I078b57b1d2b4dd633c89212c1082fcbc1b516e6a
2020-08-17 10:15:14 -04:00
William Wilgus
d553bb1149 root_menu move tag cache init check to pictureflow plugin
let pictureflow decide if the tag cache is ready instead of core

Change-Id: I2ab9b375d773dbbc28ea41fbf7bb6fb361ace8fd
2020-08-16 10:35:57 -04:00
William Wilgus
84bfd68fb5 Battery_bench & announce_status stack fix
had stack growing the wrong way

Change-Id: I51bf14526f5239e77e15dc0ffd76ad3ed8bdcbc8
2020-08-15 09:57:10 -04:00
Solomon Peachy
b4e70422a3 mikmod: Upgrade mikmod core from v3.2.0 to v3.3.11
* Get rid of the non-functional GT2 loader
 * Add the UMX loader
 * Add HQ mixer routines (and make it configurable)
 * Allow samplerate to be configured at run/playtime
 * Support >64KHz mixing/playback
 * Correctly restore non-boost status

(The diff to upstream is much smaller now too!)

Change-Id: Iaa4ac901ba9cd4123bb225656976e78271353a72
2020-08-11 03:29:12 +00:00
Solomon Peachy
0d4752e3f6 plugins: Make 'struct configdata' argument to the configfile helper const
So plugins can use const structures, possibly saving a little bit of RAM.

Change-Id: I15b0ef20e7554caf5f6d1c12f6ab109ddf3c0dbd
2020-08-09 10:27:32 -04:00
Solomon Peachy
be2c8734cb plugins: properly build duke3d/quake/wolf3d on MIPS and HOSTED targets
Change-Id: Ib8a9aa50c91dfc5d896c6f7491f3b30fca27479f
2020-08-08 23:22:56 +00:00
Franklin Wei
a74517ac65 duke3d: allow playing with unofficial data files
I'd overlooked this code path earlier. In the case of an unknown GRP, the
game would poll SDL for keyboard input, which it never received. Remove
that, and just warn the user instead.

Change-Id: Ibbabc0f8d43cb1276ed2fcfc3c6138517582e936
2020-08-02 23:54:23 -04:00
William Wilgus
da0dbc5d58 Battery_Bench use plugin buffer for thread stack, stop scrolling
Increase stack by using the remaining plugin buffer

Stops the scrolling message after user input

Change-Id: I3497467143411e262b4de983e3daab3fbc5d08ce
2020-08-02 11:48:23 -04:00
William Wilgus
7f27d2dd52 kbd_helper fix yellow
Change-Id: Ib54b36760678e88d3857ba70b0f4d1e1661bb0ad
2020-07-27 23:24:49 -04:00
William Wilgus
9e2eceeb33 kyb_helper small 'bug' fix
Change-Id: Ia91a662262497c1a93ce8f26902aab5921ee7185
2020-07-28 02:37:13 +00:00
Solomon Peachy
e1681345cc fix the red in be04c4b
Change-Id: I569561e5199c71a814b7f8118d63063f13958831
2020-07-28 01:18:14 +00:00
William Wilgus
be04c4be0a Voice TSR Plugin Demo
allows user to run plugin in background that voices
status messages

grouping is now working it counts ; as the end of a group

sleep timer remaining is not voiced if sleep timer is not active

TODO
manual entries

Change-Id: I39e8500df6440c07d2a3347513c749d5e155d1cc
2020-07-27 20:47:03 -04:00
Franklin Wei
796eba4c81 md5sum: clean up whitespace
Change-Id: I56781a8db29ac53df582dcc2faf6e5713ddcf186
2020-07-26 15:41:54 -04:00
Franklin Wei
2eb7ce475a Refactor 73b02a4.
Moves basename to a separate function, and documents some of the pointer
arithmetic it's doing.

Change-Id: I6f65ad99f163c2b223929f2ce7805b8935df71c0
2020-07-26 15:41:32 -04:00
Moshe Piekarski
73b02a4a2c Make md5sum more verbose
Solves FS#9539

Change-Id: I5278fa0fbb8347314ef6fb41e707b3832f1dd8cd
2020-07-26 15:15:38 -04:00
Solomon Peachy
a84176122c Fix two variable-set-but-not-used warnings
(found using -Os with gcc494 on the nano2g)

Change-Id: If0deee3e3cde50e6bf5aff595bebc0f134dcc393
2020-07-24 23:26:15 -04:00
Solomon Peachy
469866b6c9 mpegplayer: Fix aliasing rules violation on multi-core targets
As the PP series has no sense of cache coherency between its multiple
cores, we need to ensure the vo_data structure does not share cachelines
with anything else.

This was previously done by defining a uint8_t array and trying to
access it via typecasting hell, triggering a large pile of aliasing
violation warnings on newer toolchains and/or higher optimization
levels.

Instead of violating the C spec in an undefined-behaviour-sort-of-way,
create a union of the right size and alignment, and make one of its members
the structure we care about.  Voila, everyone is happy.

Change-Id: Iad78f8132225437cd4aa10e6e5f6ae58ba996c19
2020-07-25 02:57:35 +00:00
Solomon Peachy
e49c1af570 plugins: HAVE_BACKLIGHT in the test plugins
Change-Id: I97d17805ac7d37f10da6a29684102db97448e653
2020-07-24 19:42:32 -04:00
Solomon Peachy
9be5bc4cf0 plugins: More HAVE_BACKLIGHT cleanup
Change-Id: I70cf700f5bc3d4375c025efa62ef40fd2bd70293
2020-07-24 19:20:15 -04:00
Solomon Peachy
a3398a2143 plugins: Fix the builds for targets lacking HAVE_BACKLIGHT
Change-Id: Ifdb1501834b7ea63ca6f731bbd6414305d7e0001
2020-07-24 18:17:19 -04:00
Solomon Peachy
658026e626 [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.
Note:  I left behind lcd_bitmap in features.txt, because removing it
would require considerable work in the manual and the translations.

Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
2020-07-24 21:20:13 +00:00
Solomon Peachy
8cb555460f [3/4] Completely remove HWCODEC support
'swcodec' is now always set (and recording_swcodec for recording-capable
units) in feature.txt so the manual and language strings don't need to
all be fixed up.

Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
2020-07-24 21:20:13 +00:00
Solomon Peachy
0c4f89370d [2/4] get rid of HAVE_LCD_CHARCELLS
HAVE_LCD_BITMAP is now redundant.

lcd_bitmap is always-on in features.txt so manual and lang strings
don't have to change

Change-Id: I08eeb20de48099ffc2dc23782711af368c2ec794
2020-07-24 21:20:13 +00:00
Solomon Peachy
092c340a20 [1/4] Remove SH support and all archos targets
This removes all code specific to SH targets

Change-Id: I7980523785d2596e65c06430f4638eec74a06061
2020-07-24 21:20:13 +00:00