Commit graph

4593 commits

Author SHA1 Message Date
Solomon Peachy
f62eee569c iriver_flash: we need -fno-delete-null-pointer-checks
Change-Id: I36bbfc81d9cb79a9627e5ba7ee50e1305f54848b
2020-10-26 21:27:46 -04:00
William Wilgus
04e7bacc4c FIX RED Framebuffer_viewport_rewrite
Change-Id: I716929fbee48bef68d7383efb944f9d491fdfe4d
2020-10-26 15:25:07 -04:00
William Wilgus
ada919fc11 FIX RED framebuffer viewport rewrite
Change-Id: I4cb8f580e15440d06f8d5fabb2fbf5147c67b49c
2020-10-26 14:35:30 -04:00
William Wilgus
9b295ce135 FIX RED/YELLOW framebuffer viewport rewrite
Change-Id: Icfd3b00b646c593991f73550d8a316a80e5930a1
2020-10-26 14:02:49 -04:00
William Wilgus
40e98a2e49 Whitespace cleanup on fb_viewport Rewrite
Change-Id: I24aac41c8abecf7b78a44d7f59e842b791be4563
2020-10-26 12:38:22 -04:00
William Wilgus
3237ae4a4f LCD core move buf ptr and address look up function viewport struct
I'm currently running up against the limitations of the lcd_draw functions
I want these functions to be able to be used on any size buffer not
just buffers with a stride matching the underlying device

[DONE] allow the framebuffer to be decoupled from the device framebuffer
[DONE need examples] allow for some simple blit like transformations
[DONE] remove the device framebuffer from the plugin api
[DONE}ditto remote framebuffer
[DONE] remove _viewport_get_framebuffer you can call struct *vp = lcd_set_viewport(NULL) and vp->buffer->fb_ptr

while remote lcds may compile (and work in the sim) its not been tested on targets

[FIXED] backdrops need work to be screen agnostic

[FIXED] screen statusbar is not being combined into the main viewport correctly yet

[FIXED] screen elements are displayed incorrectly  after switch to void*

[FIXED] core didn't restore proper viewport on splash etc.

[NEEDS TESTING] remote lcd garbled data

[FIXED] osd lib garbled screen on bmp_part

[FIXED] grey_set_vp needs to return old viewport like lcd_set_viewport

[FIXED] Viewport update now handles viewports with differing buffers/strides by copying to the main buffer

[FIXED] splash on top of WPS leaves old framebuffer data (doesn't redraw)
[UPDATE] refined this a bit more to have clear_viewport set the clean bit and have skin_render do its own screen clear
scrolling viewports no longer trigger wps refresh
also fixed a bug where guisyncyesno was displaying and then disappearing

[ADDED!] New LCD macros that allow you to create properly size frame buffers in you desired size without wasting bytes
(LCD_ and LCD_REMOTE_)
LCD_STRIDE(w, h) same as STRIDE_MAIN
LCD_FBSTRIDE(w, h) returns target specific stride for a buffer W x H
LCD_NBELEMS(w, h) returns the number of fb_data sized elemenst needed for a buffer W x H
LCD_NATIVE_STRIDE(s) conversion between rockbox native vertical and lcd native stride (2bitH)
test_viewports.c has an example of usage

[FIXED!!] 2bit targets don't respect non-native strides
[FIXED] Few define snags

Change-Id: I0d04c3834e464eca84a5a715743a297a0cefd0af
2020-10-26 12:28:48 -04:00
Moshe Piekarski
12f3ed1699 make the plugin API frambuffer agnostic
Change-Id: I5abdc231093054c517ff53b9a456997e440e3f6e
2020-10-26 12:28:48 -04:00
James Buren
dd3ea521ad iriver_flash: correctly calculate when to stop erasing the bootloader
It was originally hard-coded at 0x200 which is 512 sectors. This
only works for the H100 and H120. The larger ROM of the H300 is 1024
sectors in size. In either case the bootloader starts 16 sectors before
the end of the ROM so rely on this fact to correctly calculate where to
stop the bootloader erasure.

Change-Id: Iec4112ebf24379f80a7bf1363035e005c434907e
2020-10-26 02:29:01 +00:00
James Buren
129001909d h300: enable support for iriver_flash
This also modifies the configuration file to include macros
defined in the H100 / H120 implementation.

Change-Id: Iae845889c98661ec548c04fc57e733dcc346c0f1
2020-10-26 01:07:14 +00:00
James Buren
1419070b3d iriver_flash: add support for SST39VF3201 ROM chips
These are used in the iRiver H300 series.

Change-Id: Iafbd165bdfd71b691698156d3fd91243c50b3b61
2020-10-25 23:18:21 +00:00
Solomon Peachy
2cf75bf008 fire: exit out of the plugin with both PLA_EXIT and PLA_CANCEL
Change-Id: I553fc5d02b7ee7004d791ba40cbd655f98c88f19
2020-10-23 16:09:19 +00:00
William Wilgus
3a7a46d1c0 Hosted targets Fix timer cycle calculation overflow
at 1 GHZ the intermediate calculation for cycles overflows 32 bits
this makes timer fail even with sensible values
solution divide both sides by 100

Change-Id: I18a4054c2d06fb72531d5496bba562f71b03984f
2020-10-23 15:35:11 +00:00
Solomon Peachy
186dbb4527 Convert FFT plugin to using PLA keymapings
Based on an old patch (g#188) by Jean-Louis Biasini

Change-Id: I698b8990b7cd57a28353e86cfc35788aa42455d2
2020-10-23 09:41:21 -04:00
Solomon Peachy
cddd8d66e2 Silence warnings that happen on newer GCCs
(code is presumably correct)

Change-Id: I3ee11b6a10dc87eb6f6178d6182397f0c7f686d5
2020-10-13 20:09:14 -04:00
Solomon Peachy
09785a8499 fix more yellow
Change-Id: I74bad58707d05ea167169d4315c05eb0cd1c8b7b
2020-10-13 17:23:56 -04:00
Solomon Peachy
b94db707fb Fix more warnings.
Change-Id: Ib3a9fc622a46b1fc72e94dcbc6d29d2e430cd81b
2020-10-13 15:48:31 -04:00
Solomon Peachy
ca326896d0 Fix compile warnings (set-but-not-used) on big endian targets
Change-Id: Ia433122d6c0af68a47d2f4a531a0787a9d3d9f72
2020-10-13 13:37:23 -04:00
James Buren
b5c2a4ab96 Add support for new bootloaders for iRiver h1x0 series
This resolves a long-standing issue with ATA errors in certain
situations, mostly in CF card modified units.

Change-Id: Iec23fa6de117a6c9657320432ed585170e95a4eb
2020-10-12 15:33:59 +00:00
Solomon Peachy
db6f21e295 hosted: sanitize handling of HOME_DIR
* HOME_DIR is now either "/" or special "<HOME>"
   * target-specific "home dir path" is defined solely by PIVOT_ROOT
 * PIVOT_ROOT path is now defined in toplevel config files
 * Make Samsung YP-R0/R1 and SONY_NWZ use PIVOT_ROOT too
 * Do not prepend PIVOT_ROOT path if the path already has it!
 * Do not play these games for __PCTOOL__ builds

Change-Id: I3d51ad902a5f9cafe45ba15ba654f30f1ec6113a
2020-10-11 17:47:34 -04:00
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