Commit Graph

34171 Commits

Author SHA1 Message Date
William Wilgus 1da2708a7c Fix timer Agptek Rocker (other hosted players)
on timer_unregister callbacks are not removed

It seems (at least on the Rocker) timers continue to fire (for a bit??)

Now we store the registered callback in the sigev structure and check
that the callback matches the one registered when the timer is created.

This should stop the possible case of a new timer getting spurious callbacks
We also now NULL the callbacks on un-register which should stop the segfaults

Added some notes to timer.c and timer.h

Change-Id: Ia155c3a4e4af89f474d55ed845560ccc1fab85aa
2019-10-17 21:19:00 +02:00
Franklin Wei 3d6d90382e iPod Classic: enable IRAM1 in bootloader
7442742 ("iPod Classic: disable IRAM1") was causing subsequent ipod6g
bootloader builds to result in a completely black screen upon
installation, with recovery only possible with a reflash through DFU
mode.

IRAM1 is re-enabled for bootloader only.

Change-Id: I92d489c91f81cad55d66a8647c1e61a45f468770
2019-10-13 23:23:32 -04:00
William Wilgus 7f1e6b4638 lua rockev cleanup
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
2019-10-07 22:07:22 -05:00
William Wilgus 19084181a1 lua rockev fix possible race on thread exit
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
2019-10-08 01:09:52 +02:00
Franklin Wei c0cc9aa9e8 quake: clean up asm mixer
Fixes my ugly formatting.
2019-10-07 14:52:30 -04:00
William Wilgus 01cccaf2d2 lua move strip_extension and create_numbered_filename out of main binary
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
2019-09-28 03:15:15 +02:00
William Wilgus 4fb783582f lua rocklib_aux.pl support for enums
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
2019-09-27 11:11:34 -05:00
William Wilgus bad739c0d8 Fix red lua remove and consolidate some rb plugin functions
I'll revisit adding enums once I research it a bit more

Change-Id: If10c445cf770e5b90defc543f08d8de0817b2f3d
2019-09-27 00:17:33 -05:00
William Wilgus de06a06351 lua remove and consolidate some rb plugin functions
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
2019-09-26 23:45:38 -05:00
William Wilgus 5afdcdd460 Bug fix icon.c crashes with negative icon index
The index for Icon_NOICON is -1 which is caught properly
as is icon > Icon_Last_Themeable

But if you pass an index lower than Icon_NOICON screen_put_iconxy()
tries to read memory prior to the iconset resulting in a crash

Change-Id: I415e650932d65214d883a1595e22261f22e776b6
2019-09-24 23:51:12 -05:00
William Wilgus 60825970e9 Bug fix menu -- general
Several places in the menu code assume MT_MENU though no guarantee existed
menu type is now explicitly checked prior to use of the submenu variable

Change-Id: Ib9013684309eb2d4cf4a8a809d097b096d3fcffc
2019-09-20 19:23:18 -05:00
William Wilgus 70aeac4666 Fix red dynamic menus
missed one.

Change-Id: Ifa986b0a3397fed8ef28931ecbcdd2910d203ea3
2019-09-20 03:57:38 -05:00
William Wilgus 10e5e56f3c Bug fix dynamic menus
Dynamic menus had a buffer_len variable in the parent function but it
was discarded before passing to the callbacks

Why!!?? No clue but everything that used it was assuming MAXPATH
Wouldn't be surprised to see some bugs pop out from this one..

init_menu_lists() was assuming MENU_HAS_DESC and setting the
menu title + icon based on such even though it could be invalid
didn't see anywhere in the code that was currently using MENU_DYNAMIC_DESC
in relation to a top level menu but considering it caused all kinds
of corruption to the menu when I tried its probably been tried
and abandoned before...

Change-Id: I8d961d748918bfa8ea6adb5ad60491af4d739d6e
2019-09-20 03:07:29 -05:00
William Wilgus d0883d747a lua give luadir the ability to return table of attributes
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
2019-09-18 21:20:42 -05:00
William Wilgus 13245ebf76 lua add menu callback
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
2019-09-14 04:48:04 -05:00
William Wilgus f9225da811 Fix red Lua extend error splash timeout and stop cutting off info
Change-Id: Icd6fe0fa1088ab59b8214f7c860f262ce67fe205
2019-09-06 21:13:16 -05:00
William Wilgus bbd4a6cb91 Lua extend error splash timeout and stop cutting off info
Change-Id: Ia1a9e39b9f203002cbbea85ef965e66c334b83fc
2019-09-06 20:19:42 -05:00
William Wilgus 267d04d2bd Lua add metadata and settings reading helper module
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
2019-09-07 03:10:59 +02:00
Solomon Peachy a3cbd86a51 Slovak language update (From Peter Lecký)
Change-Id: I1d148efaa90ac36985db031dbff7bd85f179d50b
2019-09-01 09:06:22 -04:00
William Wilgus c251d1879f lua fix mem_read_write, strtol
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
2019-08-28 00:56:08 -05:00
William Wilgus b99d4d7fa9 lua optimize poly_draw add draw_number, poly_points modules
Change-Id: Id36e765f18234f5a4f3092d090c0adffa3da1612
2019-08-26 22:17:33 -05:00
Vencislav Atanasov 9f551b09f6
sdl: Fix path substitution in log messages, fix game names in comments
Change-Id: I7854d55153d656e84e791759f8ed664e41bff7e5
2019-08-22 22:00:43 +03:00
Igor B. Poretsky 9e186e34ab Save and apply settings after resetting settings in menu.
Change-Id: I8c38d34d04f59090f02f4b7374860ece153a57ce
2019-08-20 15:36:54 +02:00
Igor B. Poretsky 293e3e0fd7 FS#9213 - Fix for audio dropout after startup
Original Patch by Martin Buck
Updated by Igor Poretsky
2019-08-20 13:17:23 +02:00
William Wilgus ecfb4590ad lua fix polydraw missing functions
Change-Id: I9e2537e4839e2b4f9beddbc887610213ed954a87
2019-08-20 01:58:16 -05:00
William Wilgus 8b7ae89b43 Playlist rework
consolidate some of the playlist create functions
remove extensions from playlist naming (you can still add it if you desire)
switch to strlcpy, strlcpy functions

Change-Id: Ibd62912da4d1f68ed5366baa887d92d4c6b1f933
2019-08-18 10:18:31 -05:00
William Wilgus 5a4cdb96b9 Playlist Fix failure to append default file name pt2
fix create_playlist too

Change-Id: Ic1de1382d5b534991253d662cb1b3aa5520f8887
2019-08-17 09:06:14 -05:00
William Wilgus fd19a2caa2 Playlist Fix failure to append default file name
FS#12992 - Can't create playlist with all tracks on device (regression)
references this issue

empty_playlist() only sets filename[0] = '\0'
the code was checking filename[1]..
bug ensued

strip extra leading '/' from default path

Change-Id: Ibd8973666ee45583b9e11e3ba317c0e247f085c1
2019-08-17 06:34:52 -05:00
William Wilgus 0ff6a31d7d opus reset decoder on seek completion to prevent stack overflow
apparently we should be doing this anyway

mark4o> The packets overlap and may reuse state set by other recent packets,
        so if you seek to a different position,
        resetting the state helps to ensure that the subsequent
        packets won't use the state set by the unrelated packets
        that were processed before the seek.

remove stack bump WORKAROUND_FS13060

Change-Id: I1c14e23b1721a360b91e3e55202c1557aef0fcc6
2019-08-14 17:54:35 +02:00
Solomon Peachy 8570d4063b Fix build on IHIFI 800 and iBasso DX50
Change-Id: I564f838b96577edbc01b602e94e9293efedfac14
2019-08-14 16:48:43 +02:00
Solomon Peachy de68310bac Fix compile on IHIFI770/770C/800 targets.
Change-Id: If8b150627c2b9746b24123d263edc69d91df855d
2019-08-14 15:54:36 +02:00
Solomon Peachy 58452a4cb2 Make 'filter roll off' strings conditional, for specific targets only.
Patch by Igor Poretsky

Change-Id: Ic22ee5169015c5bdc3d7e7513dacaf2a536264f0
2019-08-14 15:00:36 +02:00
Solomon Peachy 22c6326974 Improvements for vbrfix plugin:
* Properly account for ID3v1 tags
 * Play time computation fixes
 * Add speech feedback

Patch by Igor Poretsky

Change-Id: Ia6df8fb171882a88527cfa9d3b76b705f09becdd
2019-08-13 17:07:07 +02:00
Solomon Peachy c46147c6b2 Tweak how the pictureflow plugin is invoked
- Only load when database is ready
 - Assign to file browser only when returning to WPS
 - Minor speech fixes

Patch by Igor Poretsky
Re-synchronized by myself

Change-Id: If9c943b3af415a2decd3dd5803d730bd790d09fe
2019-08-13 16:41:14 +02:00
Igor B. Poretsky e3ed277f68 Enhanced shortcuts speech feedback
Trying to guess proper talk clip if it is not specified
explicitly. Using spelling as a fallback.

Change-Id: I9eeca3fbe23086c2d8fd45360546b6afaa9c7067
2019-08-13 13:08:33 +02:00
William Wilgus 3d06d35bf6 lua rock events crash on error in main state
on errors thread stack overflows
yielding before thread_exit() is a bad idea apparently

Change-Id: Iac45d4321fac496738384fdbbeb480356ef2a1bb
2019-08-12 07:28:24 +02:00
Sebastian Leonhardt 3b75f98700 Windows shortcuts: remove warnings
Change-Id: I987cbf14da2f320ddbe3190b48ba5f8006d2ea3f
2019-08-11 22:57:08 +02:00
Sebastian Leonhardt 5c701b0280 Add support for Windows shortcuts (*.lnk files)
Supports only relative links across the same volume.

Change-Id: I4f61bb9d5f2385d5b15d2b9d9a3f814a7ac85b54
2019-08-11 22:26:49 +02:00
Franklin Wei a9a891b47b quake: credit the PQ authors
We do use their code...

Change-Id: Ia32dc0168a00fcea416418e4caa48b51818ef5d2
2019-08-09 23:05:46 -04:00
Franklin Wei 49dd38c184 quake: further optimize D_DrawSpans8
Found on http://forums.insideqc.com/viewtopic.php?f=3&t=3327

Adds 1.1FPS (+8%) on ipod6g.

Change-Id: I608588ff99d70ff5ce28d2c649afa4b10038cc03
2019-08-09 23:05:46 -04:00
Franklin Wei 4397194110 quake: enable PQ_OPT5 (a fixed-point DrawSpans8)
This boosts performance to 13.0FPS on ipod6g for `timedemo demo1'. That's a
+34% increase from baseline.

Change-Id: I50bae7783ff2fce46e8257c251c6b639c069e7cb
2019-08-09 21:27:55 -04:00
Franklin Wei f5bb7fddec quake: merge the remaining Pocket Quake PQ_OPT changes
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
2019-08-09 21:27:55 -04:00
Franklin Wei ee70dad305 quake: merge some fixed-point optimizations from PocketQuake
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
2019-08-09 21:27:42 -04:00
Igor B. Poretsky 3fffabf50d Negative values speaking fix for some certain situations 2019-08-09 06:57:03 +02:00
Igor B. Poretsky 20798aaa1c xduoox3: LANG_DISK_NAME strings for non-English languages and proper corresponding voice strings 2019-08-09 06:55:46 +02:00
Igor B. Poretsky 0340513421 Russian translations fix 2019-08-09 06:53:37 +02:00
Solomon Peachy 7737327bfe Fix mikmod plugin build on armv4 targets (broke in 5b23c9e)
Change-Id: I1c79fbe44c13396388c533c4664b4ce1db150ac9
2019-08-08 23:04:11 +02:00
Solomon Peachy 5b23c9eb0a Introduce HW_SAMPR_MIN_GE_22 macro
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
2019-08-08 22:37:30 +02:00
Solomon Peachy a430e275dd Fix lua compile error on most targets, introduced in 8d77ec8
Change-Id: I217f78a9e348a18552563c6c3b235c9aed956f54
2019-08-08 15:09:04 +02:00
William Wilgus 8d77ec88a5 lua LCD fix
forgot to set new size after realloc

forgot to set sizelineinfo to 0 after free

Change-Id: Iaf7533aafaba1e2abf9599c9e1d0b75d913a8c36
2019-08-08 07:36:04 -05:00