||3665eec: Increase set_time_screen() buffer size for hosted to keep the compiler happy.
The format strings in the snprintf can in theory need 60 characters This will not happen in practice (because seconds are 0..60 and not full-range integers etc.), but -D_FORTIFY_SOURCE will still warn about it, so we use 60 characters for HOSTED to make the compiler happy. Native builds still use 20, which is enough in practice.
||3cb272c: build: Fix puzzles build due to missing dependency
As rbcompat.h is -include'd on the command line, the mkdep script doesn't pick it up. Explicitly add the dependency to lang_enum.h to the makefile.
Also add lang_enum.h to the 'make clean' target!
||14d91ca: Fix Red - Talk support for plugins
generate lang_enum prior to apps
||6392e05: Plugin API
Reorganize Plugin functions in prep for API bump
Stub in sound_current
|3rd Feb 19:12
||55eb1c5: FS #7704 - Talk support for plugins
Original patch by Mario Lang Heavily updated by Igor Poretsky Further updated by myself
This patch breaks binary API compatibility by placing the new functions where they make the most logical sense. IMO this is the better approach to take given the scope of the changes needed for talk support.
Since binary API is changing, the patch also moves some other functions around to more logical locations.
As well as voice support in plugins, this patch voice-enables several simple plugins. There will be follow-up patches for many plugins that build on this one.
||9c17734: Silence warning in stdio_compat.h
||b0e9bb1: Limit float formatting to only targets building Quake
The Quake plugin is the only code that actually relies on float formatting. Because Quake only runs on targets with huge memory anyway, limiting their formatting to just those targets will minimize the increased memory use in the core.
This ports id Software's Quake to run on the SDL plugin runtime. The source code originated from id under the GPLv2 license. I used https://github.com/ahefner/sdlquake as the base of my port.
Performance is, unsurprisingly, not on par with what you're probably used to on PC. I average about 10FPS on ipod6g, but it's still playable.
Sound works well enough, but in-game music is not supported. I've written ARM assembly routines for the inner sound loop. Make sure you turn the "brightness" all the way down, or colors will look funky.
To run, extract Quake's data files to /.rockbox/quake. Have fun!
...and 141 more files.
||b70fecf: Add proper float formatting to vuprintf
Wanted to see how gnarly it is to do.
Big number handling could be done with better algorithms since it can get a bit slow with large integers or tiny fractions with many lead zeros when only a few digits are needed.
Anyway, it supports %e, %E, %f, %F, %g and %G. No %a or long double support seems warranted at the moment.
Assumes IEEE 754 double format but it's laid out to be able to replace a function to handle others if needed.
Tested in a driver program that has a duplicate vuprintf and the content was pasted in once it looked sound enough to put up a patch.
|27th Jun 09:28
||3e2b50e: lua events from rockbox
This library allows events to be subscribed / recieved within a lua script most events in rb are synchronous so flags are set and later checked by a secondary thread to make them (semi?) asynchronous.
There are a few caveats to be aware of:
FIRST, The main lua state is halted till the lua callback(s) are finished Yielding will not return control to your script from within a callback Also, subsequent callbacks may be delayed by the code in your lua callback SECOND, You must store the value returned from the event_register function you might get away with it for a bit but gc will destroy your callback eventually if you do not store the event THIRD, You only get one cb per event type
["action", "button", "custom", "playback", "timer"]
(Re-registration of an event overwrites the previous one)
Usage: possible events =["action", "button", "custom", "playback", "timer"]
local evX = rockev.register("event", cb_function, [timeout / flags]) cb_function([id] [, data]) ... end
rockev.suspend(["event"/nil][true/false]) passing nil affects all events stops event from executing, any but the last event before re-enabling will be lost, passing false, unregistering or re-registering an event will clear the suspend
rockev.trigger("event", [true/false], [id]) sets an event to triggered, NOTE!, CUSTOM_EVENT must be unset manually id is only passed to callback by custom and playback events
rockev.unregister(evX) Use unregister(evX) to remove an event Unregistering is not necessary before script end, it will be cleaned up on script exit
||b0de98a: Put -lfirmware in CORE_LIBS, to fix -thumb builds
For unknown reasons, -thumb builds need -lfirmware after -lrbcodec (but still before -lunwarminder)i. Other builds are still happy if we do that. Including it via CORE_LIBS instead of explicitly achieves that.
||8bd992c: lua disable bytecode dump & undump functions
Adds a flag to remove the ability to dump and load lua bytecode
||d5908f5: Fix Red lua move constants out of binary image
didn't consider sims might have reserved enums
||c9aeb42: lua move constants out of binary image
Rockbox constants are auto generated by a perl script like the majority of the plugin functions.
Constants are contained in rb_defines.lua, if the file exists it is auto loaded by the lua state for backwards compatibility