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
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
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
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
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
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
* 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
I'd overlooked this code path earlier. In the case of an unknown GRP, the
game would poll SDL for keyboard input, which it never received. Remove
that, and just warn the user instead.
Change-Id: Ibbabc0f8d43cb1276ed2fcfc3c6138517582e936
allows user to run plugin in background that voices
status messages
grouping is now working it counts ; as the end of a group
sleep timer remaining is not voiced if sleep timer is not active
TODO
manual entries
Change-Id: I39e8500df6440c07d2a3347513c749d5e155d1cc
As the PP series has no sense of cache coherency between its multiple
cores, we need to ensure the vo_data structure does not share cachelines
with anything else.
This was previously done by defining a uint8_t array and trying to
access it via typecasting hell, triggering a large pile of aliasing
violation warnings on newer toolchains and/or higher optimization
levels.
Instead of violating the C spec in an undefined-behaviour-sort-of-way,
create a union of the right size and alignment, and make one of its members
the structure we care about. Voila, everyone is happy.
Change-Id: Iad78f8132225437cd4aa10e6e5f6ae58ba996c19
Note: I left behind lcd_bitmap in features.txt, because removing it
would require considerable work in the manual and the translations.
Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
'swcodec' is now always set (and recording_swcodec for recording-capable
units) in feature.txt so the manual and language strings don't need to
all be fixed up.
Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
HAVE_LCD_BITMAP is now redundant.
lcd_bitmap is always-on in features.txt so manual and lang strings
don't have to change
Change-Id: I08eeb20de48099ffc2dc23782711af368c2ec794
rb core allows you to load custom keyboard layouts
this patch adds the ability to load a keyboard layout in a buffer
the custom layout is temporary and does not overwrite the current layout
use like so:
unsigned short kbd[64];
unsigned short *kbd_p = kbd;
if (!kbd_create_layout("ABCD1234\n", kbd, sizeof(kbd)))
kbd_p = NULL;
rb->kbd_input(buf,sizeof(buf), kbd_p);
Change-Id: I7be2bd4a1b4797a147fa70228a9749dc56ac052a
keep running into the rigid nature of do_menu
it isn't too bad when you don't need voice but once
you do the fun awaits
do_menu likes to talk on menu enter which is in a loop when you use do_menu
I would like to move the processing to the callback
TOO BAD you only get an action and the menu_item_ex struct
you sent it when calling the function
Change-Id: Iaefd0cc133435d675b7dd27a558c504d6ccb327a
We were improperly conditioning the state reset with `do_pausemenu'. We
should reset the input state no matter what.
Change-Id: Iaafc59b95e9f1f053b57a34f0f28f7c672c0e327
First I discovered a bug in the code to display the currently playing
album from the WPS
--on a NULL id3->albumartist field PF would crash
now checks for a match in id3->albumartist and then id3->artist
if neither exists then the search uses <untagged>
ditto for album
The album index feature (recently added) did not check for enough
room in the buffer on restore
--save and restore code cleaned up a bit
moved all buffers to their own struct
tracks with no title now show filename rather than <UNTAGGED>
Reworked album search function
album search was going quadriatic resulting in some outrageous
index build times [40mins+ for 4000 albums]
building now done in stages and duplicates removed at end
*MUCH FASTER*
Album art
empty album art is no longer stored in the art cache
PF will now allow you to cancel building album art without
forcing a rebuild next run,
it will continue searching for album art in the background
album art is now updated in the background on each start as well
tracklist now rolls over at the end
artist_index is now discarded after album_index is created
Cleaned up some of the myriad of global variables
Added quit prompt for index building
Added sanity checking for album_index loaded from disk
Change-Id: I8494cb7abcb1ae8645c223fc3c11dc0ee749883a
This works around an odd issue in Mines involving the zoom feature. The
chain of events leading to it is rather convoluted:
1. No save game is found, so no fonts are loaded from disk.
2. A new game is started.
3. The user selects the "Zoom" option.
4. The allocation of the zoom framebuffer causes the malloc code to grab
the audiobuffer. This causes all further font_load() calls to FAIL, due
to buflib allocations no longer working.
5. The user goes back to the normal view and uncovers a square.
6. Font loading fails, causing the drawing code to fall back to the system
font.
7. An unrelated bug (not yet tracked down) causes font_get(FONT_UI) to
return a different font.
8. font_getstringsize() returns the right size of the "wrong" font, leading
to centering issues upon rb_draw_text().
The real solution to this would be to fix font_get(), but this fix should
prevent the issue from happening if Mines has been run and saved at least
once before.
Change-Id: Ib9ad51376eeb3ca1113a1f3786124b612db88cd7
Frontends now have a way to retrieve the backend cursor position with some
changes I've submitted upstream. With this information, we can now follow
the cursor around in "interaction mode" while zoomed in, eliminating (most)
need for mode switching.
Also does some cleanup of the frontend code.
Change-Id: I1ba118f67564a3baed95435f5619b73cfa3ae87a
- zoom now remembers position between activations (but not when exiting the
plugin)
- key repeat enabled when panning
- moving mouse out of frame while zoomed will pan
- mouse can be moved diagonally
Change-Id: I39380ef7f36238700b6baa54cac036832933df67
We had some issues in Keen with the arithmetic operators not being rendered
properly. This is still a kludge (we should intelligently search the font)
but is still less ugly than the garbage it was drawing before.
Change-Id: I5b957c7371b659ea6d64847145f9913b2a892e48
We have a couple games like Untangle and mouse-mode games in which the
software poweroff is very annoying.
Change-Id: I554b89aecf8c7cc20c6c7f305be1b8807dc9283b
On some devices, the button driver allows a "software poweroff" by long-
pressing a certain key. This behavior is inconvnient when that button needs
to be held down for other purposes, such as moving the cursor in rockpaint
or sgt-untangle.
This patch allows selectively disabling the software poweroff (enabled by
default) from both core and plugin code.
Change-Id: I7580752888ae5c7c7c5eb1be5966e3d67f17d4b4
For some reason lcd_getstringsize was occasionally reverting to the system
font, rather than the loaded font. This was leading to improper font sizes
being reported.
Change-Id: Ie5fc31de9a6a7af739beb22efc3ec1383206eaea
I can't believe this has gone unnoticed for so long... We need to update
the game size upon loading games. Who knew?
Change-Id: I929f8139457853440ae687bd937af989fa7c6f93
The name buffer is using too much ram for some targets
will revisit later...
removed extraneous call to set_scrol_lline
Change-Id: I56d658149bcb0c50857d25924e37bcb46a612c75
- Extra data structure to store artist info.
- Create_album_index modified to perform a different query.
- Added load and save functions to store the data index in HDD.
- Album collisions fixed.
- New config options to perform rescans.
- Extra fields added to lang files: english and spanish.
Update CREDITS
Change-Id: I31814b38d8b4e7fa4b65f5e6e51aa5f00d271ece
using rockev for button presses
misc code refactoring, comments
drawing code is now split from game logic
cpu boost for targets that support it
removed quite a few if then statements by using dynamic functions
for ball draw, step, hit_check
shows two ways to do OO functions (closure and reference)
Change-Id: I63e795bbe90b033eabadc1f519cf3b635cf5e1a7
just a few tweaks to the RockEv backend to allow tighter event timing
originally there was a timeout where events would be consolidated
prior to running the event thread, this slowed the faster events
but it turns out this isn't really a big waster of time
The callback from C => lua is a far bigger bottleneck
Change-Id: Iffacbe49c4b83155099b1304590450f746576fa4
WIP for passing arguments to lua scripts
args are recognized by adding ?arg to the end of the script path
The easiest way to do this currently is to use the function rb.restart_lua
local sfile = rawget(_G, "_fullpath") or ""
local sArgs = rawget(_G, "_arguments")
if not sArgs then
rb.restart_lua(sfile .. "?my arguments")
else
rb.splash(1000, sfile .. "?" .. sArgs)
end
I'd eventually like to figure out a sensible way to do this from a
shortcut / quick list
Change-Id: I2b60fe3b8f1d04b57361fe532510bd6afee59fbf
(A lot of work was done on this thing, for a target that hasn't been compileable
at least since we moved to git..)
Change-Id: Ibface9392f3251b5be4bf1e0c4d12639c4f1662d
Provided by Roman Stolyarov
Integration, Refactoring, and Upstreaming by Solomon Peachy
X3II confirmed working by forum tester, X20 is nearly identical.
This includes bootloader, main firmware, and the flash image patcher.
Eventual Todo:
* Further refactor AGPTek Rocker & xduoo hiby bootloaders
* Further refactor AGPTek Rocker & xduoo hosted platform code
Change-Id: I34a674051d368efcc75d1d18c725971fe46c3eee
After a few issues with the timer code in the hosted players
I realized a few shortcomings in the original rockev code...
This rewrite gives thread_exit an explicit flag instead of 0
custom events now have a set-able timeout
previous lua hooks are restored
flags are stored in uint8_t
Change-Id: I9ca45246ac9233a2faa581e26a8cc5e5fb512e88
-Make pacbox AI score agnostic.
-Fix corner case of Game Over/reset with AI on.
-AI can now start on level where pattern starts facing right.
Change-Id: Ibc5416a53ebc07506c31434051b6d47b276cf668
This makes wolf3d work with the shareware files available on the wiki. This
will make things work out-of-the-box with Rockbox Utility.
Change-Id: I9118ecf8715c688565982fc4feb29a8641d68b6a
with the addition of suspending all events on thread start and exit
we don't really need to block on THREAD_QUIT in so many places
Removed suspend clearing on event unregister and updated comments
Change-Id: Id9c6a460def558c5331ee292035691a9f82b2c43
report of call after free on event thread on Agptek Rocker
I'm guessing its a race condition between the thread and the timer
but can't say for sure without some more testing
Change-Id: If11bd718b3cfa81ea13fff378df56d12afa17a7f
rb.strip_extension and rb.create_numbered_filename
have been moved to include_lua/files.lua
to use simply add require('files') to your script
Change-Id: I95af7b312c8614cb10da4b71b22714b3e282e08a
everything that would have been added has already been added or
needs more supporting functions so they've been excluded for the time being
Change-Id: I4ae4753c543287934702a3bd2eeccce5b032235d
removes some usless / duplicated functions
removes atoi - lua tonumber() does this for you
removes strlen - lua string.len does this for you
removes system_memory_guard - if a device that actually implements
system_memory_guard needs it we can add it back conditionally
consolidates talk_number and talk_spell (on backend)
consolidates talk_shutup and talk_force_shutup talk_shutup(bForce)
Change-Id: Id132642f087975a7c132e99a668a41c977942b81
for fname, isdir, attrib in luadir.dir(scrpath, true) do
passing true for the second argument returns table of
file/dir attributes in attrib
Change-Id: I7c999e2fc5dac95b8ccbe169f2119c31b63f6a41
forum user fprockboxer asked for a way to detect long presses within the
do_menu routine this adds that functionality
result = rb.do_menu("Title",t_items, start, menu_callback)
function menu_callback(action)
...
return action
end
Change-Id: I110c590095a743a57d0a7d45b24309899a4629cf
Adds example scripts for reading track metadata + dumping albumart
and rockbox settings
settings are now stored as a table of strings rather than a table of tables
as it saves ~15 kb of ram without adding much complexity
Change-Id: I611c312b2a60ab96e595e4710b17aedbd6c0689b
back when I wrote this I was running the sim on a 32 bit machine
I didn't catch the hardcoded LONG_MAX reference or the fact that
lua_tointeger maxes ot at 32 bits
on 64 bit machines strtol caused all kinds of issues especially since
it returned the real LONG_MIN/MAX values
Change-Id: I3571ebbd9df333f7cbf4077562412c27429bfadc
* Properly account for ID3v1 tags
* Play time computation fixes
* Add speech feedback
Patch by Igor Poretsky
Change-Id: Ia6df8fb171882a88527cfa9d3b76b705f09becdd
This boosts performance to 13.0FPS on ipod6g for `timedemo demo1'. That's a
+34% increase from baseline.
Change-Id: I50bae7783ff2fce46e8257c251c6b639c069e7cb
I didn't do _OPT3 because it's disabled in the PQ source.
This gives as +0.2FPS boost over the last commit.
Change-Id: I9c3c8fb7bd23262beb810da6e9469d6b6c4b2a81
The PocketQuake project, available below, has some nice fixed-point code:
https://web.archive.org/web/20150412233306/http://quake.pocketmatrix.com/PocketQuake0062_src.zip
I'd like to see most of them merged into our Quake port. This commit
gives +0.9FPS on ipod6g. (A big change given that it was running at
only 9.7FPS to begin with!)
Change-Id: I91931bdd5c22f14fb28616de938a03b4e7d7b076
Gives us the lowest HW sample rate that's >= 22KHz.
Needed because some targets that don't support 22K support 11K or 8K, so
HW_SAMPR_MIN will give us much lower quality than is acceptable.
Take advantage of this new macro in the SDL, MIDI, and MIKMOD plugins,
and implement a crude "fast enough" test to enable higher sample rates
on more capable targets.
Change-Id: I6ad38026fb3410c62da028e78512e027729bb851
LCD developed 9/2015 by Terry Ellison
We've already discarded the ldebug module from lua
it only makes sense to discard the debug info as well
adds 1.5 K to the binary
saves 8 Kb on the base state
once scripts start getting called i've seen 10-50Kb savings but it all depends on
what exactly you are running
Change-Id: Ibb74f344df1c4c96380ec6c98b010a810e9ae9cc
- Improved sound quality (use 44.1KHz)
- Conventional mixer is now used
- Playback is performed in a separate thread
- Speech feedback in menus
Patch by Igor Poretsky
Change-Id: I13baa224cefd67aefe6d62b988971bfbd421757d
This is not a very pretty fix, but code that doesn't crash is better than
code that crashes... "If it runs, it's done."
Change-Id: Ia1d0c537e5e5e60fb80cf7d7de2332e1c712806f
Forgot a return statement in Sys_FileRead (which slipped by since I've made
the questionable decision to disable all warnings...)
Change-Id: Ia0f3da52b43765b8e0e9953893ac7957ec2f6c2e
For some reason a NULL pointer creeps in, on the simulator only, it seems.
This makes sure that if it happens on target we'll know about it.
Change-Id: I7a5bc9dd3ef71f28d58d0d456d23007dc0d49ce3
COM_LoadStackFile was not thread-safe since it relied on a global variable
to pass the loadbuf parameter to COM_LoadFile. This was causing mysterious
crashes when model loading and audio mixing were happening simultaneously.
Change-Id: I505c5ef0ed49d0c4aa4b11cfed05647c75b5b40d
- Unfinished game is now saved along with current position.
- All savings are automatically done on shutdown.
- Implemented facility to view played games.
- Fixed bug that prevented program from the very first move.
Patch by Igor Poretsky
Change-Id: I997b97752e4362ed953309bea985d071f9db229b
paths.
If ROOTDIR=/rockbox and BUILDDIR=/rockbox/build-something, it is now possible to
successfully build both target binaries and simulators.
Change-Id: If12d1d5933c5a15feebf627a4f1636dc1e3a67fa