Age | Commit message (Collapse) | Author |
|
Readline didn't handle lines longer than LUAL_BUFFERSIZE it now
reads these in chunks.
Change-Id: Iffe12447e5441ff6b479ce3de1d36df64c276183
|
|
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
|
|
FB_SCALARPACK(lua_tointeger()) was calling lua_tointeger 3x on color targets
Change-Id: I7b3d73bba5dbc0aa4388b123de11410572fe67c5
|
|
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
|
|
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
|
|
Lessen confusion for end users looking for the underlying function names in
plugin.h
Change-Id: I6662dc7bd9f22d83af372b3d3c5af53d9a1eac9a
|
|
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
|
|
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
|
|
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
|
|
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
|
|
Change-Id: I08256f31e733d2674054e8e589d539d1396a0ee6
|
|
Some of the lcd functions had support for multiple screens but this wasn't
very safe since the screen number wasn't bounded within the screens[] array
This adds support for all the lcd functions along with checking that screen#
is bounded properly, adds around 600 bytes to devices with a remote screen
devices without a remote screen lock to SCREEN_MAIN
Change-Id: I618bbc7b3919c7b0ff375fb2d71949d7cab43c87
|
|
rli_marshal and rli_copy allow the use of a custom lua function
instead of the built-ins, this custom function can signal to stop
before the whole image is iterated.
Originally it was checking for a return of 0
which was additional overhead for the built-in functions
(which never stop early) as well.
Now custom_transform sets the x & y deltas to 0 to indicate early
exit removing an extra 'if' per cycle and return from all of the
rli_transform functions
The lcd_xxx_bitmap functions all require x, y, w, h, screen these calls
have been consolidated into a single function get_bmp_bounds()
Change-Id: I88de3149c58d1bfb40e9d1a91341fb86cbd63b51
|
|
Change-Id: Ia6d47a13ec8ae407661a78c56513ac0c164216da
|
|
Put rliimage functions into the rb.image metatable instead of the rb. table
Change-Id: Iecdc564c2ea9739656e2025b51bb5d5c62e3dbc1
|
|
While luaL_addstring() works perfectly fine for the
final buffer once Lual_pushresult() is called
kbd_input doesn't display a previous input properly
since the buffer hasn't been finalized yet
Change-Id: Ic50acaa8b7b17077dec8750dd2b6382624e8a549
|
|
Removes unneeded functions from kbd_input
Consolidates message filling function for gui_syncyesno_run & do_menu
Change-Id: If3c3cea3cbf37a8dc52983c0db174de6d54b35f8
|
|
The way to call the playlist functions has changed
rb.playlist("option", var)
rb.playlist_add(filename) = becomes rb.playlist("add", filename)
added playlist.lua to the includes for conversion to old functions
if your script is broken by this change you simply add `require("playlist")`
to the top for the old functionality
added rb.playlist_tracks(dir, filename) to playlist.lua
this will allow you to add all tracks in a playlist.m3u8
to a lua table
Change-Id: I87fcc56be365d8495d214f069331b6ddbfbef1db
|
|
audio_play was removed from the rocklib I assume due to inconsistent
behavior I've readded it with a check for audio paused which instead
uses rewind/ff and then resumes audio
the way to call the audio functions has changed as well
rb.audio("option", var)
so rb.audio_play(0, 0) becomes rb.audio("play", 0, 0)
audio_audio_flush_and_reload_tracks becomes
rb.audio("flushandreloadtracks")
all functions except audio("getfilepos") return the previous (or still current)
status
added audio.lua to the includes for conversion to old functions
if your script is broken by this change you simply add `require("audio")`
to the top for the old functionality
Change-Id: I364adf0c85d9c12b98cde29c26fbe5ee05b9d331
|
|
I didn't realize that some devices used the *num variable
this fixes that oversight
Change-Id: I2ecd6f475bebdd6ce745b360be3762a069bfc2b1
|
|
Both of these functions modified the string in the lua stack
per lua manual:
'When a C function receives a string argument from Lua,
there are only two rules that it must observe: Not to pop the string
from the stack while accessing it and never to modify the string'
strip_extension will still work with old parameters
and is thus backwards compatible
strip_extension("filename")
create_numbered_filename has changed slightly and IS NOT backwards compatible
create_numbered_filename(path, prefix, suffix, [number])
(number defaults to -1)
Change-Id: I34cf7e2f6f691f33d5ac2b2e995855a171fb99b3
|
|
allows rocklib_img to be excluded if needed
stops rocklib_aux from generating redundant prototypes for
lcd_mono_bitmap[_part]
Change-Id: Ie208ad71ab5f9a7deb026dc01a5b0a0631a0d29c
|
|
changes return to unsigned int to match underlying aliased function
Change-Id: I7015c7ad929344441249aa7c4f2af361142fcaf4
|
|
change offending bool return to int
warning: cast between incompatible function types from
'_Bool (*)(void)' to 'int (*)(void)' [-Wcast-function-type]
forgot to remove -- typedef int (*menu_function)(void);
Change-Id: Ie4c8d3ddb0fb7843c4ec584203350d658d6bee3e
|
|
frees up around 500 bytes by using the builtin string functionality
Change-Id: Icd4ec921d3fec339b8a4b7f80c9c63d51d4c101c
|
|
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
|
|
Change-Id: Ia5e83702313c1c184480290d3b0e6a66f01b7277
|
|
Change-Id: I9eb3b4d2bc88293b09679c27fbceaaa7788ba553
|
|
int is an incompatible type for targets that have 32bit fb_data
need to use FB_SCALARPACK for them
Change-Id: Ib3b5ff19c54d8d1bb76af33d0538a17a71301514
|
|
optimize both size and speed
fix invert for color screens
Change-Id: I7edecae32dcb3daf5b3ed984a0e5b3d463269e60
|
|
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
|
|
Change-Id: Ibc4aac79e6fce92ad4414ed50122c2d4d6295f89
|
|
- increase decoder thread stack size just enough (2KiB) to
avoid stack overflows when seeking in opus files
- only do so on devices with at least 8MiB of RAM
Change-Id: I7e7182ae866338b4aad6ed7e32391ddd667121bd
|
|
use a table approach for registering integer / string constants
Change-Id: Idbccae9c2203de1c694f6dd5a7014a7fccedae9b
|
|
Change-Id: Icd10e4c348deec7729d4a6e2bf1152e1dfc70243
|
|
* rotate screen counterclockwise
* rotate directional buttons
Change-Id: Icbdf26fe1e14638eb8b0746a9eea99e0236ac6b1
|
|
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
|
|
This reverts commit 6f0320a9535bc1aa81d83fa879ac14d5ee603658.
Change-Id: I7425d422a4a0af7a49e9194cfe0bb55d431bc401
|
|
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>
|
|
Allow user to select cpu undervolt
There have been quite a few issues across the SANSA AMS line related
to CPU undervolting while most players show greatly increased runtime
some crash.
Rather than constanly upping the voltage we now have a
setting with a safe value for all players and the option for lower voltages
I plan to add a few other options here later such as disk
timings and maybe some other clocks/experimental settings
Added: Disk Low speed option for AS3525v2 devices cuts
frequency to 12 MHz from 24 MHz
Added: Disk Low speed option for AS3525v1 devices cuts
frequency to 15.5 MHz from 31 MHz
Added: I2c Low Speed AS3525 devices, should be bigger improvement for v1 devices
Fixed: Debug menu for AS3525v2 No SDSLOT frequency,
Showed IDE freq though it is unused
Added: DBOP and SSP underclocking affects display on v1/v2 respectively
Fixed: debug menu now has SSP frequency, and SSP_CPSR
Update: made settings menu more generic
Update: cleaned up code
Added: Clip v1 & Fuze v1 didn't have HAVE_ADJUSTABLE_CPU_VOLTAGE.
not sure why but, waiting on testing to confirm
Added: C200v2 and E200v2 devices and HAVE_ADJUSTABLE_CPU_VOLTAGE.
Fixed: v1 devices don't like display timing set lower (dbop)
v1 devices don't have a divider set for ssp (causes divide by 0)
Fixed: ClipZip display lags with Max SSP divider changed from 0xFE to 0x32
Fixed: v1 devices didn't work properly with highspeed sd cards
Added code from http://gerrit.rockbox.org/r/#/c/1704/
Added powersave and IDE interface enable/disable
Added: V2 devices now have powersave enabled on sd interface
Update: cleaned up code, lang defines, added manual entries
Update ssp clock mechanism added calculated ssp divider to clipzip
Update turn display clock off when clip+ turns off display
Fixed: clipzip wrong register for SSP clock
Change-Id: I04137682243be92f0f8d8bf1cfa54fbb1965559b
TODO: add other players?
|
|
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
|
|
On the clip zip most debug menu items get cut off and there is
no way to read most of the debug menu items.
This patch makes the menu button scroll the text 1 character
to the right with each press and the center (select) button
re-aligns the text
Adds SSP frequency(v2) & register
Adds SD slot frequency(v2)
Change-Id: If4705d6790e25061931ca654062e22fc2e0a6f16
|
|
Change-Id: Ic5ae1e5f904a3da4bba07cdef7f4bb003dc091b2
|
|
Change-Id: I51edd5319882b2928b565c27615e20937399a1f9
|
|
Change-Id: I0c62f06fea3ccb55efa21b719a44a263dedc32e2
|
|
Change-Id: I0de8a1468379f60140fb30b6c086fe15ea753da2
|
|
This reverts commit a81c63160c5d1da3a5c2b407fae58daead6199a8.
Change-Id: Ie6d3e780fd6318b6173943167015f78f4a9c327a
|
|
This reverts commit c332180afd8ac408883ba79c6c4d9c86120198e0.
Change-Id: Ic7a85a0fe82cd13514e85011e0a5cbd79ec36c2b
|
|
Change-Id: I48189c3ce29f27d4b3bb4f874c80636c1f0ca6b6
|
|
Lets see if this works..
Change-Id: I1fa7f17a07b3a7b479f987694ffcd59bc4e0bf5b
|