summaryrefslogtreecommitdiff
path: root/apps/plugins (follow)
Commit message (Collapse)AuthorAge
...
* Lua remove unusable/unneeded functions from rocklib_auxWilliam Wilgus2018-10-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rocklib_aux is auto generated from plugin.h there are a few functions that get added automatically that are unusable without their companion functions or duplicate functionality already supplied by lua Duplicated functionality: rb->rand, rb->srand -- see math.rand math.srand rb->remove, rb->rename -- see os.remove, os.rename Unusable: rb->open_utf8 -- this should be added to the lua file open routines (if at all) rb->codec_run_proc, rb->codec_close -- without rb->codec_load_file these are pointless rb->timer_set_period, timer_unregister -- even with timer_register implemented lua is not -- reentrant and crashes the state when timer fires Shouldn't be used!: rb->strlcpy, rb->strlcat, rb->strcpy, rb->strcat -- lua reuses strings by hashed values you break this contract if -- you change strings behind its back plus lua provides a way to -- do these functions safely within the strings api Change-Id: I2f65704a90930378cbbceb254e52f61e8074471e
* mips: fix some compile warnings.Solomon Peachy2018-10-09
| | | | Change-Id: Ia5e83702313c1c184480290d3b0e6a66f01b7277
* Fix red rocklib_img 32-24 bit targetsWilliam Wilgus2018-10-08
| | | | | | | int is an incompatible type for targets that have 32bit fb_data need to use FB_SCALARPACK for them Change-Id: Ib3b5ff19c54d8d1bb76af33d0538a17a71301514
* Clean up rocklib_imgWilliam Wilgus2018-10-09
| | | | | | | optimize both size and speed fix invert for color screens Change-Id: I7edecae32dcb3daf5b3ed984a0e5b3d463269e60
* lua rocklib cleanupWilliam Wilgus2018-10-08
| | | | | | | | | | | removes tslf allocations from do_menu and gui_syncyesno_run in favor of lua_newuserdata removes some luaL_opt functions in favor of equivalent lua_to functions moves some definitions to the rocklib.h file Change-Id: Iaacc3249b8f1af2c220ce59dead0050c66cb3b04
* lua optimize integer and string consts in rocklibWilliam Wilgus2018-09-14
| | | | | | use a table approach for registering integer / string constants Change-Id: Idbccae9c2203de1c694f6dd5a7014a7fccedae9b
* lua move RLIMAGE to own fileWilliam Wilgus2018-09-14
| | | | Change-Id: Icd10e4c348deec7729d4a6e2bf1152e1dfc70243
* pacbox: fix screen and buttons for Creative ZenSebastian Leonhardt2018-08-05
| | | | | | | * rotate screen counterclockwise * rotate directional buttons Change-Id: Icbdf26fe1e14638eb8b0746a9eea99e0236ac6b1
* iPod Classic: disable IRAM1Cástor Muñoz2018-07-30
| | | | | | | | | | | | | | | | | | | | | | On Classic, IRAM1 (second 128Kb of a total of 256KB available IRAM) is slower than DRAM. Codecs that actually are using regions of IRAM1 runs faster when DRAM is used, so IRAM1 is disabled and only IRAM0 remains enabled: 48KB for core and 80KB for codecs/plugins. The next test_codec results shows how decode time is decreased: file boosted unboosted *.ra ~1.5% ~0.5% *.mpc ~21% ~4.5% *.ogg ~0.5% ~0% nero_he*.m4a ~8% ~1% nero*.m4a ~25% ~7% wmapro*.wma ~4.5% ~0% wma*.wma ~25% ~7% In addition there is a small power save when IRAM1 HW is disabled. Change-Id: I102adee11458e82037f23076d5d5956e23235de8
* Add cleaned-up xDuoo X3 supportSolomon Peachy2018-07-28
| | | | | | | | | Cleaned up, rebased, and forward-ported from the xvortex fork. (original credit to vsoftster@gmail.com) Change-Id: Ibcc023a0271ea81e901450a88317708c2683236d Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
* Lua -- Fix device hang when scroll function active on clear_screenWilliam Wilgus2018-07-27
| | | | | | | | | | | | | | | | I previously noticed that manually clearing the framebuffer while scroll function was active caused lua to crash I could reproduce in sim and on device but I thought using the plugin supplied rb->lcd_clear_screen was immune to this issue Unfortunately some devices exhibit this behavior with the plugin function as well This patch adds rb->lcd_scroll_stop() before lcd_clear_screen at lua start-up and to the supplied include file lcd.lua Change-Id: I9800145e5c834ea27df5db5f1bca50b0d40faa49
* Try #4 for lua makeWilliam Wilgus2018-07-24
| | | | | | | Last commit was just a test to see if it work this one cleans it up a bit and should be a bit faster Change-Id: Ifdff5c5b78bcc6889506de607193246beccdde6b
* Try # 3 for lua make fileWilliam Wilgus2018-07-24
| | | | Change-Id: I888612f3339ffcde28602a4e739b08f630de9c28
* Lua Fix image saving for 32 bit targets -- update make fileWilliam Wilgus2018-07-24
| | | | | | Hopefully this will fix the build faliures for a few targets Change-Id: I68f6c85513ef589e5f6a50a8efc7bfae9fd62acd
* Rocklua -- Extend / Fix rliImageWilliam Wilgus2018-07-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices(1-bit / 2-bit displays) have packed bit formats that need to be unpacked in order to work on them at a pixel level. This caused a few issues on 1 & 2-bit devices: Greatly Oversized data arrays for bitmaps Improper handling of native image data Framebuffer data was near unusable without jumping through hoops Conversion between native addressing and per pixel addressing incurs extra overhead but it is much faster to do it on the 'C' side rather than in lua. Not to mention the advantage of a unified interface for the end programer ------------------------------------------------------------------- Adds a sane way to access each pixel of image data Adds: -------------------------------------------------------------------- img:clear([color],[x1],[y1],[x2],[y2]) (set whole image or a portion to a particular value) -------------------------------------------------------------------- img:invert([x1],[y1],[x2],[y2]) (inverts whole image or a portion) -------------------------------------------------------------------- img:marshal([x1],[y1],[x2],[y2],[funct]) (calls funct for each point defined by rect of x1,y1 x2,y2 returns value and allows setting value of each point return nil to terminate early) -------------------------------------------------------------------- img:points([x1],[y1],[x2],[y2],[dx],[dy]) (returns iterator function that steps delta-x and delta-y pixels each call returns value of pixel each call but doesn't allow setting to a new value compare to lua pairs method) -------------------------------------------------------------------- img:copy(src,[x1],[y1],[x2],[y2],[w],[h],[clip][operation][clr/funct]) (copies all or part of an image -- straight copy or special ops optionally calls funct for each point defined by rect of x1, y1, w, h and x2, y2, w, h for dest and src images returns value of dst and src and allows setting value of each point return nil to terminate early) -------------------------------------------------------------------- img:line(x1, y1, x2, y2, color) -------------------------------------------------------------------- img:ellipse(x1, y1, x2, y2, color, [fillcolor] -------------------------------------------------------------------- Fixed handling of 2-bit vertical integrated screens Added direct element access for saving / restoring native image etc. Added more data to tostring() handler and a way to access individual items Added equals method to see if two variables reference the same image address (doesn't check if two separate images contain the same 'picture') Optimized get and set routines Fixed out of bound x coord access shifting to next line Added lua include files to expose new functionality Finished image saving routine Static allocation of set_viewport struct faster + saves ram over dynamic Cleaned up code Fixed pixel get/set for 1/2 bit devices Fixed handling for 24-bit devices (32?) ------------------------------------------------------------------------- Example lua script to follow on forums ------------------------------------------------------------------------- Change-Id: I8a9ff0ff72aacf4b1662767ccb2b312fc355239c
* Revert "Rocklua -- Extend / Fix rliImage"William Wilgus2018-07-22
| | | | | | This reverts commit 2daec3d3c3d84e7176a22bc073ca5530e8e44c6d. Change-Id: I53ea1f491e3c6d6fb759f426f203f927bd26b1e9
* Rocklua -- Extend / Fix rliImageWilliam Wilgus2018-07-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices(1-bit / 2-bit displays) have packed bit formats that need to be unpacked in order to work on them at a pixel level. This caused a few issues on 1 & 2-bit devices: Greatly Oversized data arrays for bitmaps Improper handling of native image data Framebuffer data was near unusable without jumping through hoops Conversion between native addressing and per pixel addressing incurs extra overhead but it is much faster to do it on the 'C' side rather than in lua. Not to mention the advantage of a unified interface for the end programer ------------------------------------------------------------------- Adds a sane way to access each pixel of image data Adds: -------------------------------------------------------------------- img:clear([color],[x1],[y1],[x2],[y2]) (set whole image or a portion to a particular value) -------------------------------------------------------------------- img:invert([x1],[y1],[x2],[y2]) (inverts whole image or a portion) -------------------------------------------------------------------- img:marshal([x1],[y1],[x2],[y2],[funct]) (calls funct for each point defined by rect of x1,y1 x2,y2 returns value and allows setting value of each point return nil to terminate early) -------------------------------------------------------------------- img:points([x1],[y1],[x2],[y2],[dx],[dy]) (returns iterator function that steps delta-x and delta-y pixels each call returns value of pixel each call but doesn't allow setting to a new value compare to lua pairs method) -------------------------------------------------------------------- img:copy(src,[x1],[y1],[x2],[y2],[w],[h],[clip][operation][clr/funct]) (copies all or part of an image -- straight copy or special ops optionally calls funct for each point defined by rect of x1, y1, w, h and x2, y2, w, h for dest and src images returns value of dst and src and allows setting value of each point return nil to terminate early) -------------------------------------------------------------------- img:line(x1, y1, x2, y2, color) -------------------------------------------------------------------- img:ellipse(x1, y1, x2, y2, color, [fillcolor] -------------------------------------------------------------------- Fixed handling of 2-bit vertical integrated screens Added direct element access for saving / restoring native image etc. Added more data to tostring() handler and a way to access individual items Added equals method to see if two variables reference the same image address (doesn't check if two separate images contain the same 'picture') Optimized get and set routines Fixed out of bound x coord access shifting to next line Added lua include files to expose new functionality Finished image saving routine Static allocation of set_viewport struct faster + saves ram over dynamic Cleaned up code Fixed pixel get/set for 1/2 bit devices ------------------------------------------------------------------------- Example lua script to follow on forums ------------------------------------------------------------------------- Change-Id: I7b9c1fd699442fb683760f781021091786c18509
* Textviewer night modeMoshe Piekarski2018-07-04
| | | | | | Add a night mode to textviewer. Change-Id: I6ddcd9c3c87473cbbffaeacf63a21ef11c0e5f44
* puzzles: resync with upstreamFranklin Wei2018-06-20
| | | | | | | | This brings the source to upstream commit 506b073 (though I have made some extra commits on top of that). Notably this includes a fix for a double-free bug that I myself introduced upstream. Change-Id: I02671586bbc34d63e05398ee971271fed42538cf
* Fix yellow for LCD_DEPTH == 32Marcin Bukat2018-06-20
| | | | Change-Id: I59e9ec8720555c17e882a3a8c7ed0ba281b8d7c7
* Agptek Rocker: Fix mpegplayer keymapMarcin Bukat2018-06-14
| | | | Change-Id: Iba438b49b66dc3bb3fbfc24b74ced9eaab993886
* puzzles: minor nitpicks to fbb6a2fFranklin Wei2018-06-12
| | | | | | Just some whitespace changes to maintain stylistic consistency. Change-Id: I50b5d52db2795cfcb4155bdffbfb80c1c3773112
* puzzles: fix typo introduced by fbb6a2fFranklin Wei2018-06-12
| | | | | | | | When zoomed in, the original commit made a mono bitmap (a.k.a. text) always have the red component set to 255. This would cause drawn text to always be red. Fixed. Change-Id: Iec06256a3a783948c60c70557de042b375224448
* Agptek Rocker: fix rockboy palleteMarcin Bukat2018-06-12
| | | | | | Contributed by Aapo Tahkola. Change-Id: Ibee14d4f307b2198c5c47f9593734bd5d31d379b
* Agptek Rocker: Build pluginsMarcin Bukat2018-06-12
| | | | | | Patch provided by Aapo Tahkola. Change-Id: I37a42a950d78d6b8aa3927ec7aeb30030f7be7a5
* Fix lua failure to catch divide by zero and NaN exceptionsWilliam Wilgus2018-06-05
| | | | | | | | | | | | | | | | I can only assume in the course of the original conversion to fixed point math in RbLua the fact that division by zero and NaN handling was to be caught as a graceful exception by the floating point handler was overlooked. As a result lua doesn't handle these exceptions and instead results in a panic on the device. This patch fixes this handling in the lexer for compile time Inf and Nan results and in the luavm for runtime division by zero (Inf) I missed the runtime exception of n%0 added checks for that as well.. Change-Id: I7746c087ea93678e5875f15ec6fe3f29f26bdb31
* Revert "rocklib -- Fix Red"William Wilgus2018-05-31
| | | | | | This reverts commit 37a20dffb6c285e625f049820a6aaadbbd7952aa. Change-Id: Ibf3a56f2b84e0e4af4c2ed890bc22b3555ab24ae
* Revert "Rocklua -- Clean-up source"William Wilgus2018-05-31
| | | | | | | This reverts commit 0565f671181f10e6eb38156d9f409825e2513290. Removing Typedef from rliimage Change-Id: Ib14241785c73de8ba6dc18ac76bec35eaed4661d
* rocklib -- Fix RedWilliam Wilgus2018-05-28
| | | | Change-Id: I83b967a266837ebdf887e0f2c2d169a69af9e287
* Rocklua -- Clean-up sourceWilliam Wilgus2018-05-28
| | | | Change-Id: I11dad15320f209655fd72c2365fe29afd65057d3
* Lua liolibWilliam Wilgus2018-05-28
| | | | | | Add Whitespace to EOF Change-Id: Iac253e7905c59518040d39bb5033e35f0deea948
* Fix lua lseek command / io libWilliam Wilgus2018-05-27
| | | | | | | | | | | | | | | | | | | | | | lua would not return or set arbitrary file positions file:seek("set", 0) worked file:seek("cur") worked but setting an offset or file:seek("end") failed I tracked this down to a bug checking the return of rb->lseek on error lseek returns a negative number and returns the file position otherwise, the function was checking for if(N) instead of if(N < 0) Fixed - limited size of lseek to size of signed LuaNumber Fixed - io:lines() stopped after first line containing only a newline instead of returning a blank line and continuing till EOF this fixes file:read("*l") as well Fixed - ssize_t for read() with error checking Change-Id: Ie859b288fb8f6814f1b3ae30992ecf78f2669de7
* puzzles: update frontend for new upstream, misc. changesFranklin Wei2018-04-24
| | | | | | | | The upstream code changed a little bit with regard to the request_keys() API. Also, we save some bytes (especially on the c200v2) by compiling with -ffunction-sections and -fdata-sections, which allows Net to fit once again. Change-Id: I3ab30127169c73e4cd8996f0c12e1223ee18d79f
* puzzles: update help text, make generation and testing cleanerFranklin Wei2018-04-24
| | | | | | | | This includes an upstream change to the Galaxies help text. `genhelp.sh' no longer leaves temporary files sitting around, and the self-test feature of lz4tiny.c works again. Change-Id: I787f4cb3c258baade31638d6be18f95b7aa0705e
* puzzles: resync with upstreamFranklin Wei2018-04-24
| | | | | | | This brings the upstream version to b3da238 (though some of my own changes are included on top of that). Change-Id: Ida73e8cd86765413147ce891af3cc2b7aeda2b2a
* puzzles: silence some warningsFranklin Wei2018-04-24
| | | | Change-Id: Id6fd9d8dd3021f5e2cb93565d7e419aaf07f9af0
* puzzles: save some bytesFranklin Wei2018-04-17
| | | | | | | | | This should cut just enough size off the binary to let Net still compile for the c200v2. This is probably close to the last time I'll be able to do this; I'm already resorting to dirty hacks like writing super terse error messages. Change-Id: I43344b9a601696d7ca56fc02af4a611fd9d1a150
* puzzles: clean up for rockboxFranklin Wei2018-04-17
| | | | | | Disabled vprintf() call in Filling, and reordered vertices in Unequal. Change-Id: Ia3d8cd46ae3a7909b7dc2a8de762aa3173634d1e
* puzzles: enable all the remaining gamesFranklin Wei2018-04-17
| | | | | | | | They all work now :). I merged in part of Chris Boyle's Android port of Puzzles to give the front end a way to know what keys the back end needs. This also re-syncs to the latest upstream sources. Change-Id: Ie0409bbb32f617ae5abf4f81be3b45d1552db9bb
* Oscilloscope plugin: bundle #define NEED_LASTBUTTON to a single placeSebastian Leonhardt2018-04-03
| | | | | | | This fixes a warning that was introduced with enabling plugins for the Zen XFi-2. Change-Id: I8fe9a4be301f2c4643d04ae42d2189e62c191592
* Zen XFi2: Enable PluginsSebastian Leonhardt2018-04-03
| | | | | | | Keymaps aren't tested, there may be room for improvement. Change-Id: I6b8fe697899b241ea6e96f4fe446d88671ad7818
* pacbox for small screens, up to 75x96Sebastian Leonhardt2018-04-03
| | | | Change-Id: I6e9adf2f6923f4d0078a54e9857fc8eacef259a6
* pacbox: clean-up screen size codeSebastian Leonhardt2018-04-02
| | | | | | | removes the code duplication for lcd scaling in pacbox.h/pacbox_lcd.h Change-Id: Ib0aeacc9934351c5e32cd4b7576cdc840e6ff7da
* puzzles: fix typoFranklin Wei2018-03-18
| | | | Change-Id: I6b8c18472749248508d4e5b1595b8903e687f67c
* puzzles: add formatting to help viewerFranklin Wei2018-03-17
| | | | | | | | The help text is now processed to generate a style array to pass to the display_text library in addition to the text itself. The help text is still compressed using LZ4, and still fits on the c200v2. Change-Id: I7a3a664f90f67a1a018956c72d2b62d92b8ffd17
* sdl: remove non-rockbox driversFranklin Wei2018-03-12
| | | | | | | We never use any of these other drivers, so having them around just takes up space. Change-Id: Iced812162df1fef3fd55522b7e700acb6c3bcd41
* sdl: clean up audio driverFranklin Wei2018-01-15
| | | | | | | | This prevents a (highly improbable) race condition when exiting, and uses pcm_set_frequency() instead of mixer_set_frequency(), since that seems like the Right Thing to Do (TM). Change-Id: Icb6a4597843215f08b3835490ac63f67c9a04736
* duke3d: bump audio sample rate to 22.1KHzFranklin Wei2018-01-15
| | | | | | Recent optimizations to sound mixing should allow this, up from 16KHz. Change-Id: I0ba5742c934118a3a6505b8dc58578b0cfe8ea77
* duke3d: further optimize audio mixingFranklin Wei2018-01-15
| | | | | | | | | Rather than holding intermediate results as fixed-point, this converts them directly to normal integers (in the range of the PCM sample) while mixing, instead of waiting till the end to perform a separate shifting step. Also, this precalculates some constants in the reverb code. Change-Id: Ie04e444d145bc28ce67eef9ae0ead6d328acf28a
* sdl: correct misleading commentsFranklin Wei2018-01-14
| | | | Change-Id: Ieb33d3fec1e0d834c5e294b79f280959497acb6a