summaryrefslogtreecommitdiffstats
path: root/apps/plugins
AgeCommit message (Collapse)AuthorFilesLines
2019-07-12wolf3d: allow entering in-game jukebox by holding fire buttonFranklin Wei1-1/+7
Change-Id: I8936178191e682b70c64ef6ae04d6636e5cf3521
2019-07-11lua reduce heap allocated buffer sizes, organize luaconf.hWilliam Wilgus1-141/+194
Change-Id: Ib9e568ea73a01474facd57cc155e62fa3dc093f7
2019-07-11lua late bound cfunction tablesWilliam Wilgus1-0/+132
We have quite a bit of ram tied up in lua with our c libraries I was searching for a way to free up some of this when I came across read only tables in e-lua but that involved a lot of patching through the source Instead I came up with this.. it frees about 15k ram without much slowdown in code execution since after a function gets called it is automatically added to the table If you have a performance issue you can call the bind method to bind a specific function or the whole table in one shot for instance rb table rb("lcd_clear") -- binds/returns function rb.lcd_clear() rb(nil) -- binds every function in rb table + removes latebind metatable .. -- added pairs and ipairs code from lua 5.2 -- cleaned up code + made more seamless existing fields are now saved rather than overwritten when table is bound Change-Id: I1c20e76b736c032dedc727d2e58928641e40191d
2019-07-11lua inbinary stringsWilliam Wilgus10-25/+88
Allows saving of ram by reusing strings already stored in the binary and storing a pointer instead of malloc and copy to get them inside the lua state Saves about 1.5K overall Derivative of work by bogdanm RAM optimizations: pseudo RO strings, functions in Flash https://github.com/elua/elua/commit/d54659b5723bcd2b1e3900362398c72c18a9aa0b Change-Id: I21d6dcfa32523877efd9f70fb0f88f2a02872649
2019-07-10wolf3d: increase default viewport sizeFranklin Wei1-1/+1
Makes things a little bigger by default (but not maximized). Change-Id: I9e4ae725e22458f1e5140a560ff242159ef582d7
2019-07-10wolf3d: write configs to /.rockbox/wolf3d instead of /.wolf4sdlFranklin Wei2-2/+2
Let's keep things neat. Change-Id: I995b2c4949d3adbbd7ea4ef361f0712aa222612e
2019-07-10lua add track length & elapsed to rb.audio()William Wilgus1-4/+20
track elapsed is needed to use fast-forward and rewind effectively track length might as well be added too.. Change-Id: I906c92eb5260164c6177d8c0a8ff879b1fad7898
2019-07-09wolf3d: fix FM OPL alignment bug in a cleaner wayFranklin Wei2-9/+8
wl_def.h has a #pragma pack(1), which causes issues when we take the address of an unaligned struct field. This fixes the issue by disabling packing in fmopl_gpl.c. Change-Id: I526880fa73226e8028855896f7efc3a66571b3ec
2019-07-09sdl: fix buildFranklin Wei1-3/+3
-T flag is program-specific. Change-Id: I730a9c19be43e79c7ff4e6d4fb5b8f498f08515e
2019-07-09wolf3d: add missing SOURCES.wolfFranklin Wei1-0/+27
I'm dumb... Change-Id: I5e8ebcf3d7e739c1cd50509b15fe585819ba7fb9
2019-07-09Wolfenstein 3-D!Franklin Wei65-4/+44152
This is a port of Wolf4SDL, which is derived from the original id software source release. The port runs on top of the SDL plugin runtime and is loaded as an overlay. Licensing of the game code is not an issue, as discussed below (essentially, the Debian project treats Wolf4SDL as GPLv2, with an email from John Carmack backing it up): http://forums.rockbox.org/index.php?topic=52872 Included is a copy of MAME's Yamaha OPL sound chip emulator (fmopl_gpl.c). This file was not part of the original Wolf4SDL source (which includes a non-GPL'd version), but was rather rebased from from a later MAME source which had been relicensed to GPLv2. Change-Id: I64c2ba035e0be7e2f49252f40640641416613439
2019-07-09sdl: silence audio driver debug outputFranklin Wei1-2/+2
Change-Id: I7aae3419f56f9cf952d9383f2a6cf9e9950e9a6d
2019-07-09sdl: a couple minor fixesFranklin Wei3-20/+18
Prevents system SDL from interfering with thread driver selection. Also adds test code for alignment faults. Change-Id: I8bc181922c4a9e764429897dbbaa1ffaabd01126
2019-07-09lua remove error messages for pre-compiled chunksWilliam Wilgus2-3/+3
We don't have the functionality in the viewer to run pre-compiled chunks plus if anyone ever wants to add it its easy enough to remove the define frees 3K Change-Id: I8d2086e04b51e3ce147ab8741a7d354cb9bf1ade
2019-06-17Boomshine Fix rb.touchscreen_set_mode()William Wilgus1-1/+1
Change-Id: I5bc835f1e006ed923cf0b7a3fcf91d4e357913ed
2019-06-16sdl: add pointer to wiki for docsFranklin Wei1-0/+2
Change-Id: I6e87658351f32d3c40d9ca2b635ae2f654fdd3aa
2019-06-16sdl: prevent simulator build from using pthreadsFranklin Wei1-2/+0
The simulator build will pull in the host SDL headers, which we can't filter out easily. A simple workaround is to simply remove the pthread include from our SDL. Change-Id: I09de0f2e85b891aa88958e21426ab450af516e76
2019-05-31Fix IRAM overflow introduced in 7a8c9daf7efMarcin Bukat1-3/+8
There is no easy way to determine iram available for test_mem plugin and PLUGIN_BUFFER_SIZE is definitely wrong. Restore previous IRAM buffer sizing Change-Id: Ia563efd46497438c111efc8d7d2bf65904ca9847
2019-05-15Work around DX90 compile errorFranklin Wei1-0/+1
Change-Id: I80751a41d0711c52558ba198c22d1f012998302c
2019-05-15puzzles: refactor rockbox frontendFranklin Wei3-33/+41
Cleaned up a bit of copy-pasted code and added some useful comments. Change-Id: I9a6f37acbeeda58b3ea8c65ee96230372400f323
2019-05-15puzzles: resync with upstreamFranklin Wei11-496/+2525
This brings the puzzles source to upstream commit e2135d5. (I've made my own changes on top of that.) This brings in a couple bugfixes and a new solver for Dominosa. Change-Id: I11d46b43171787832330a5e2e0d2f353f36f727d
2019-02-01blackjack: various fixesSebastian Leonhardt1-16/+19
- fix double down wins/looses too much money - fix splitting doubles lost/won amount of first split - fix insurance pays out too litle - fix splitting allows to overdraw account - fix insurance allows to overdraw account Change-Id: Ib58954d6b960fb2a78f5b4d29496974b7c58fb65
2019-01-24lua rewrite boomshineWilliam Wilgus1-283/+386
rewrite the logic of boomshine to make it more difficult especially small screens rewrite of the game engine to make memory usage more consistent throught the level and decrease overall memory usage this also removes most of the stuttering in play Add test of device speed this should improve very slow devices but the threshold might still need tweaked Change-Id: I49f5269c69405f6b6060ab18f52c96e3f69ebb14
2019-01-02Fix compile wanings in pacbox and invadrox introduced in d4942ccSolomon Peachy2-4/+0
Change-Id: I5d599d4b25207dcf03ed3f4be76d10907d36a99b
2019-01-02Add Xuelin iHIFI 770/770C/800 supportSolomon Peachy49-7/+1063
Taken from the xvortex fork (Roman Stolyarov) Ported, rebased, and cleaned up by myself. Change-Id: I7b2bca2d29502f2e4544e42f3d122786dd4b7978
2019-01-02Keymap improvements for the xDuoo X3Solomon Peachy1-1/+1
- Synchronized with actual state of Vortex version in general. - Playback resume has been moved to the Power button. - Option button acts identically in most contexts: main menu on short press and quickscreen on long press. - Defined A-B repeat mode control buttons. - Level change action in chessbox has been moved to the volume down button. (Patch by Igor Poretsky) Change-Id: I48046ff123d2bccdc0d0c4ed8b088e2053aefa5e
2018-12-24Fix lua helpers -- supress line markers in preproc source generation scriptsWilliam Wilgus1-3/+3
In newer builds line markers prevent lua helper scripts from grabbing some inputs especially _bool This patch adds the -P switch Inhibit generation of linemarkers in the output from the preprocessor. This might be useful when running the preprocessor on something that is not C code, and will be sent to a program which might be confused by the linemarkers. Change-Id: I66c3b099729f6651300f9fcf4670533a20cc90c1
2018-12-23Handle SYS_POWEROFF event in recorder and chessbox pluginsSolomon Peachy1-3/+16
Credit to Igor Poretsky Change-Id: I151d3511b9cee269190d87df7fa7dd355aaafc9b
2018-12-21puzzles: resync with upstreamFranklin Wei116-8423/+8845
This brings the code to upstream commit 3ece3d6 (I've made my own Rockbox- specific changes on top of that). Changes include using C99 `bool' throughout, and minor logic fixes for some puzzles. Change-Id: Ie823e73ae49a8ee1de411d6d406df2ba835af541
2018-12-17Lua Fix settings_helper for the gigaBeastSWilliam Wilgus2-17/+51
the gigabeatS has an embedded struct that needs to be parsed Change-Id: I88c9101afaaa95182f37ade1410cccb4fb768e33
2018-12-16Lua add read/write access to global_status, global_settings, audio_current_trackWilliam Wilgus3-1/+540
moved items to rb.system added read access to audio_current_track and audio_next_track Change-Id: Ia055b8cb3848e540067818f596ffd1058da057fb
2018-12-08Pdbox hide cast-function-type fix overlapping memcpyWilliam Wilgus2-3/+3
dsoundfile.c used memcpy for overlapping memory regions switched to memmove Suppress the 160+ warnings for cast-function-type This plugin would require major work to fix these warnings Change-Id: I309d914839c1e70126a05b387863fd21613497a9
2018-11-26mpegplayer fix warningsWilliam Wilgus4-11/+13
this should fix 'warning: cast between incompatible function types' Change-Id: I7d192b8953fd14511431cb50254900f566eb0574
2018-11-24lua add LCD_DEFAULT_FG, fix 2-bit screen fg/bg inversionWilliam Wilgus2-2/+6
Change-Id: Ibe2bc6602ff27524a3b96d9523780acbfbf03c76
2018-11-17Lua fix crash on arm devicesWilliam Wilgus1-1/+1
This is a seemingly random bug that only affects (as far as I can tell) arm devices it isn't actually random as code changes cause it to appear/disappear based on alignment Change-Id: I4cbc4370677959319f8589fe454e854c45623468
2018-11-15Lua fix reader bug in lzioWilliam Wilgus1-1/+6
When loading a file, Lua may call the reader function again after it returned end of input https://www.lua.org/bugs.html#5.1.5-2 Change-Id: Ic2f4d727705a0b8f48ce792f6a9f7af25a503037
2018-11-11lua update to 5.1.5William Wilgus15-105/+124
Modify Rocklua towards upstream 5.1.5 Clean up some of the Rocklua implementation Change-Id: Iac722e827899cf84f5ca004ef7ae7ddce5f7fbbe
2018-11-05Lua fix pixel-painter score saveWilliam Wilgus1-5/+5
pixel-painter was depending on the old readline code that returned nil for empty lines however empty lines should have returned an empty string Change-Id: Ic06ce920a7ab38e1fb8f7197d637e74ed9e35653
2018-11-05Lua Boomshine Update with circles + levelsWilliam Wilgus1-85/+193
added a few more levels and increased difficulty based on level Rliimage allows us to use circles in boomshine Optimized some of the code to exceed the speed of the original Change-Id: I68eb74f8b68fcdc8a9d022cd172374744425f15d
2018-11-02Lua fix failure to read lines longer than LUAL_BUFFERSIZEWilliam Wilgus1-13/+10
Readline didn't handle lines longer than LUAL_BUFFERSIZE it now reads these in chunks. Change-Id: Iffe12447e5441ff6b479ce3de1d36df64c276183
2018-11-02Lua optimize combine and rework similar functionsWilliam Wilgus4-67/+221
rb.strncasecmp strcasecmp just exclude count -> rb.strncasecmp(s1, s2) rb.backlight_brightness_set backlight_set_brightness -- redundant rb.backlight_brightness_use_setting -> rb.backlight_brightness_set() rb.buttonlight_brightness_set buttonlight_set_brightness -- redundant rb.buttonlight_brightness_use_setting -> rb.buttonlight_brightness_set() rb.mixer_frequency rb.mixer_set_frequency -> mixer_frequency(freq) rb.mixer_get_frequency -> mixer_frequency rb.backlight_onoff rb.backlight_on -> rb.backlight_onoff(true) rb.backlight_off -> rb.backlight_onoff(false) rb.touchscreen_mode rb.touchscreen_set_mode -> rb.touchscreen_mode(mode) rb.touchscreen_get_mode -> rb.touchscreen_mode() rb.schedule_cpu_boost rb.trigger_cpu_boost -> rb.schedule_cpu_boost(true) rb.cancel_cpu_boost -> rb.schedule_cpu_boost(false) Includes rbcompat.lua for backwards compatibility if your script is broken by this change you simply add `require("rbcompat")` to the top for the old functionality Change-Id: Ibffd79a0d9be6d7d6a65cc4af5c0a1c6a0f3f94d
2018-11-02lua fix rlimage FB_SCALARPACK()William Wilgus1-8/+14
FB_SCALARPACK(lua_tointeger()) was calling lua_tointeger 3x on color targets Change-Id: I7b3d73bba5dbc0aa4388b123de11410572fe67c5
2018-11-01Lua fix dir string constants and pcm_play_pause & pcm_set_frequencyWilliam Wilgus2-3/+3
String constants were already expanded in the first macro pcm functions were looking for stack position #1 when they needed stack pos #2 Change-Id: I7b4fb90953ab2395b77cbd550fdd257fafca6aae
2018-11-01Lua Fix utf8encode, remove utf16 functionsWilliam Wilgus2-0/+16
The auto generated utf8/16 encode/decode functions did not work. Upon implementing them correctly I found that lua handles the utf-8 form properly but I could not get utf-16 to work without crashing maybe someone can come along later and implement utf-16 safe string functions but for now utf-16 is removed. Change-Id: I97a044e200dc27f683a45487cd93fce667c670c4
2018-10-31Lua Add underscores in audio, pcm, playlist functionsWilliam Wilgus4-28/+25
Lessen confusion for end users looking for the underlying function names in plugin.h Change-Id: I6662dc7bd9f22d83af372b3d3c5af53d9a1eac9a
2018-10-30lua consolidate pcm_ functionsWilliam Wilgus4-2/+108
The way to call the pcm functions has changed rb.pcm("option", var) rb.pcm_set_frequency(freq) = becomes rb.pcm("pcmsetfrequency", freq) added pcm.lua to the includes for conversion to old functions if your script is broken by this change you simply add `require("pcm")` to the top for the old functionality added rb.pcm("calculatepeaks") Change-Id: I092057b0c0b5575e567862661f122da1ca2680e8
2018-10-30Lua restore audio_set_recording_gain, audio_set_output,inputWilliam Wilgus1-2/+5
Did not mean to wipe out these function when I consolidated audio Made the regex for audio_ and playlist_ exact matches instead of fuzzy Change-Id: I7537d1b494afb114c8b6333ea177b1e482f6b672
2018-10-30Lua update strftime.c from dietlibc sourceWilliam Wilgus1-36/+38
Adds %F -- %Y-%m-%d Fixes possible buffer overflow when writing final \0 Frees a bit of code on NON-RTC targets Change-Id: I1c2600a68ee88c6c99f411ae6646861578683f90
2018-10-29Lua replace fscanfWilliam Wilgus6-295/+66
Rocklua was using the full fscanf implementation to simply read %ld for the file:read("*n") function wasting 1k on unneeded/unused functionality Instead, I've implemented a filetol function to duplicate it without the extra overhead using strtol which as an added bonus ERANGE errors now resolve to LONG_MIN and LONGMAX instead of integer overflow filetol() reads long int from an open file, skips preceding whitespaces returns -1 if error, 1 on success. *num set to LONG_MAX or LONG_MIN on overflow. If number of digits is > than LUAI_MAXNUMBER2STR filepointer will continue till the next non digit but buffer will stop being filled with characters. Preceding zero is ignored. Change-Id: Ia42d0f73c63a894625bca4581e9b7e1cc7387fd2
2018-10-30Lua remove strncat.c & strcspn.cWilliam Wilgus5-85/+39
Change-Id: I08256f31e733d2674054e8e589d539d1396a0ee6