Commit graph

4656 commits

Author SHA1 Message Date
William Wilgus
0f23cadbca lua -- add sort by name, size, date to filebrowse include
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
2020-09-25 23:07:30 -04:00
Solomon Peachy
5d40d97585 voice: rename mp3_play_* functions to voice_play_*
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
2020-09-20 14:52:30 +00:00
William Wilgus
c62493e98a Xduoo X3 Add tree scrolling FS#13240, Emulate Multibutton presses
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
2020-09-13 16:23:24 +00:00
Solomon Peachy
099bde885d mikmod: Fix emulated fseek()
Was causing XM loader to fail

Change-Id: I1dd1d87dd0d8587fae5f9db04a730fc42b625a11
2020-08-25 20:10:10 -04:00
Solomon Peachy
7972f8e448 xduoox3: Fix minesweeper plugin keymap.
(Broke in a654cecf8)

Change-Id: I5b07e27aed12019e2b0a5078bf06812da2ddd598
2020-08-25 15:54:25 -04:00
Solomon Peachy
9e64e31d56 xduoox3: More screenshots and button maps for plugins
Change-Id: Ic494102f191da5e32faa61b0f4bcefadee198200
2020-08-25 15:25:50 -04:00
William Wilgus
8ee035b6c8 Open_plugin add ability to import opx shortcuts, bug fix
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
2020-08-19 02:06:16 -04:00
William Wilgus
889bcc0f76 WIP open_plugins.rock viewer
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
2020-08-17 22:17:15 -04:00
William Wilgus
3550283442 Add open_plugin to core
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
2020-08-17 10:15:14 -04:00
William Wilgus
d553bb1149 root_menu move tag cache init check to pictureflow plugin
let pictureflow decide if the tag cache is ready instead of core

Change-Id: I2ab9b375d773dbbc28ea41fbf7bb6fb361ace8fd
2020-08-16 10:35:57 -04:00
William Wilgus
84bfd68fb5 Battery_bench & announce_status stack fix
had stack growing the wrong way

Change-Id: I51bf14526f5239e77e15dc0ffd76ad3ed8bdcbc8
2020-08-15 09:57:10 -04:00
Solomon Peachy
b4e70422a3 mikmod: Upgrade mikmod core from v3.2.0 to v3.3.11
* 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
2020-08-11 03:29:12 +00:00
Solomon Peachy
0d4752e3f6 plugins: Make 'struct configdata' argument to the configfile helper const
So plugins can use const structures, possibly saving a little bit of RAM.

Change-Id: I15b0ef20e7554caf5f6d1c12f6ab109ddf3c0dbd
2020-08-09 10:27:32 -04:00
Solomon Peachy
be2c8734cb plugins: properly build duke3d/quake/wolf3d on MIPS and HOSTED targets
Change-Id: Ib8a9aa50c91dfc5d896c6f7491f3b30fca27479f
2020-08-08 23:22:56 +00:00
Franklin Wei
a74517ac65 duke3d: allow playing with unofficial data files
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
2020-08-02 23:54:23 -04:00
William Wilgus
da0dbc5d58 Battery_Bench use plugin buffer for thread stack, stop scrolling
Increase stack by using the remaining plugin buffer

Stops the scrolling message after user input

Change-Id: I3497467143411e262b4de983e3daab3fbc5d08ce
2020-08-02 11:48:23 -04:00
William Wilgus
7f27d2dd52 kbd_helper fix yellow
Change-Id: Ib54b36760678e88d3857ba70b0f4d1e1661bb0ad
2020-07-27 23:24:49 -04:00
William Wilgus
9e2eceeb33 kyb_helper small 'bug' fix
Change-Id: Ia91a662262497c1a93ce8f26902aab5921ee7185
2020-07-28 02:37:13 +00:00
Solomon Peachy
e1681345cc fix the red in be04c4b
Change-Id: I569561e5199c71a814b7f8118d63063f13958831
2020-07-28 01:18:14 +00:00
William Wilgus
be04c4be0a Voice TSR Plugin Demo
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
2020-07-27 20:47:03 -04:00
Franklin Wei
796eba4c81 md5sum: clean up whitespace
Change-Id: I56781a8db29ac53df582dcc2faf6e5713ddcf186
2020-07-26 15:41:54 -04:00
Franklin Wei
2eb7ce475a Refactor 73b02a4.
Moves basename to a separate function, and documents some of the pointer
arithmetic it's doing.

Change-Id: I6f65ad99f163c2b223929f2ce7805b8935df71c0
2020-07-26 15:41:32 -04:00
Moshe Piekarski
73b02a4a2c Make md5sum more verbose
Solves FS#9539

Change-Id: I5278fa0fbb8347314ef6fb41e707b3832f1dd8cd
2020-07-26 15:15:38 -04:00
Solomon Peachy
a84176122c Fix two variable-set-but-not-used warnings
(found using -Os with gcc494 on the nano2g)

Change-Id: If0deee3e3cde50e6bf5aff595bebc0f134dcc393
2020-07-24 23:26:15 -04:00
Solomon Peachy
469866b6c9 mpegplayer: Fix aliasing rules violation on multi-core targets
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
2020-07-25 02:57:35 +00:00
Solomon Peachy
e49c1af570 plugins: HAVE_BACKLIGHT in the test plugins
Change-Id: I97d17805ac7d37f10da6a29684102db97448e653
2020-07-24 19:42:32 -04:00
Solomon Peachy
9be5bc4cf0 plugins: More HAVE_BACKLIGHT cleanup
Change-Id: I70cf700f5bc3d4375c025efa62ef40fd2bd70293
2020-07-24 19:20:15 -04:00
Solomon Peachy
a3398a2143 plugins: Fix the builds for targets lacking HAVE_BACKLIGHT
Change-Id: Ifdb1501834b7ea63ca6f731bbd6414305d7e0001
2020-07-24 18:17:19 -04:00
Solomon Peachy
658026e626 [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.
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
2020-07-24 21:20:13 +00:00
Solomon Peachy
8cb555460f [3/4] Completely remove HWCODEC support
'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
2020-07-24 21:20:13 +00:00
Solomon Peachy
0c4f89370d [2/4] get rid of HAVE_LCD_CHARCELLS
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
2020-07-24 21:20:13 +00:00
Solomon Peachy
092c340a20 [1/4] Remove SH support and all archos targets
This removes all code specific to SH targets

Change-Id: I7980523785d2596e65c06430f4638eec74a06061
2020-07-24 21:20:13 +00:00
William Wilgus
cb94b3ae2e keyboard add ability to specify temporary custom layouts
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
2020-07-22 06:48:28 -04:00
William Wilgus
c39f95465b do_menu pass internal synclist reference to callback
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
2020-07-19 22:10:26 +00:00
Franklin Wei
7d005335ba puzzles: always reset input state before pause menu
We were improperly conditioning the state reset with `do_pausemenu'. We
should reset the input state no matter what.

Change-Id: Iaafc59b95e9f1f053b57a34f0f28f7c672c0e327
2020-07-14 23:04:46 -04:00
Franklin Wei
987c6575b3 puzzles: more verbose debug output in font loading
No functional changes.

Change-Id: I7baa7bf37b3bdd57064c654a72d0e4e0d5600245
2020-07-14 23:04:46 -04:00
William Wilgus
45915101d5 Pictureflow Bugfixes & Usability fixes
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
2020-07-14 03:57:56 +00:00
Franklin Wei
4dcd1a9ed8 puzzles: load cached fonts unconditionally
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
2020-07-07 21:25:27 +00:00
Franklin Wei
5094aaa4d4 puzzles: Follow cursor in zoom mode and general code cleanup.
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
2020-07-06 23:00:13 -04:00
Sebastian Leonhardt
443ad25e75 plugin windows_lnk: fix missing return-on-error
(found by peachy & clang's static analyzer)

Change-Id: Idcc9b3bd0c3c1164892002b8f814d74b4a6b2a2d
2020-07-07 02:36:33 +00:00
Franklin Wei
5b8198d147 2048: use larger bitmaps on 96x96 screens (e.g. Clip Zip)
Apparently the smallest bitmaps are hard to see.

Change-Id: I0265ce4da15677f9c4c64457b1a1f849a0f3a7f8
2020-07-06 17:39:47 +00:00
Franklin Wei
051eb3ea31 puzzles: enhancements to mouse mode, zoom feature
- 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
2020-07-02 19:07:16 +00:00
Solomon Peachy
c1485455ea imageviewer: Fix potential null pointer dereference
(caught by clang-analyzer)

Change-Id: Ie24b7cd75c5e9814007674925f33b1a321f1d06d
2020-06-30 21:12:12 +00:00
Solomon Peachy
08d8b6472c fractals: Clean up ARM asm
No functional change, just using modern syntax.

Change-Id: I211bbcebd11da168c81dff4c409112d7a535b6ed
2020-06-30 16:30:35 +00:00
Franklin Wei
2e0a5969b6 puzzles: clean up and document some voodoo
Change-Id: I13d987cc148f053778474e99c719cc8439ec53c0
2020-06-27 20:28:50 -04:00
Franklin Wei
7da8137bdb puzzles: fix crash when loading a corrupt save
I misread the documentation here, thinking that the pointer would be set to
*point to* a null byte, not to a null pointer itself. [1]

[1]: https://www.chiark.greenend.org.uk/~sgtatham/puzzles/devel/midend.html#identify-game

Change-Id: I9b76bba9b1611dfd8e05d076a69f7554b5b74c53
2020-06-27 20:28:46 -04:00
Franklin Wei
c02a9c5ab3 puzzles: refuse to draw non-ASCII characters
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
2020-06-27 20:23:13 -04:00
Franklin Wei
4b108896cc puzzles: replace menu title kludge with more elegant solution
This hack has survived for far too long.

Change-Id: Idca0b647bd6e77f2afcd9a538513a6b9aa970fc7
2020-06-27 19:13:19 -04:00
Franklin Wei
5831801d16 puzzles: disable software poweroff in all puzzles
We have a couple games like Untangle and mouse-mode games in which the
software poweroff is very annoying.

Change-Id: I554b89aecf8c7cc20c6c7f305be1b8807dc9283b
2020-06-27 13:27:40 -04:00
Franklin Wei
a65a341a00 button: allow disabling software poweroff
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
2020-06-27 13:27:40 -04:00
Franklin Wei
f49442d7b7 puzzles: allow secondary select in Rectangles and Map
Change-Id: Ia32d41cd872140481e73b7565904fc196b7c5b01
2020-06-27 00:57:18 +00:00
William Wilgus
d9e084b530 Pictureflow Whitespace Cleanup
Change-Id: I7cda111a8d7a24cae31e3eeca1454480e27ebaaa
2020-06-26 07:08:32 -04:00
William Wilgus
aa4ec918e4 Pictureflow Fixes UniqBuf
rework of the unique name buffer

shares 1/4 of the total buffer

Change-Id: I17e46292ac880a082cb3f035e3c21abc318d8a31
2020-06-26 00:00:33 -04:00
William Wilgus
7c291250ef Revert "Pictureflow Fixes: Sansa C200"
This reverts commit b7f2cc5d6d.

Change-Id: I51ec9f5fade10ce0173ed45739af6baaa5c7f746
2020-06-26 03:43:26 +00:00
William Wilgus
6f0fd91343 Pictureflow Fixes: Sansa C200
Sansa C200 fix

Change-Id: I548b7142dde9ea4da5455686bed650aa40c9c90a
2020-06-25 22:35:24 +00:00
Franklin Wei
f6448cb440 puzzles: fix numerical chooser while zoomed in
We need to blit the zoom framebuffer to the screen in our chooser loop.

Change-Id: Id2ba1a79b61f14cc34ca9804486f69a2b32484ff
2020-06-25 18:00:52 -04:00
Franklin Wei
e666a7aea8 puzzles: fix text centering when zooming in
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
2020-06-25 17:42:02 -04:00
Franklin Wei
5a45e96f4d puzzles: update README
Change-Id: Ifea2580989f87bb1c4b357b847121bb5f66f4dfe
2020-06-25 16:53:22 -04:00
Franklin Wei
729d6b0cb7 puzzles: update copyright date
Change-Id: I57c0554cb0d2951631d28e249eacb34c4b36ef21
2020-06-25 16:46:03 -04:00
Franklin Wei
d75131569c puzzles: clean up error messages
Expands buffer size, and prints to LOGF.

Change-Id: I6dbcf60152d69c928270023c550976b802269d95
2020-06-25 16:46:03 -04:00
Franklin Wei
b67d9e9217 puzzles: fix crashes and odd behavior on load
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
2020-06-25 16:46:03 -04:00
Franklin Wei
48b0ef1cf2 puzzles: resync with upstream
This brings the upstream version to 9aa7b7c (with some of my changes as
well).

Change-Id: I5bf8a3e0b8672d82cb1bf34afc07adbe12a3ac53
2020-06-25 18:45:58 +00:00
Franklin Wei
dd3a8e0898 puzzles: remove dependency on gamedesc.txt
This should allow syncing with fully clean upstream source trees.

Change-Id: Ie476a4d2ef72a411150cacc2bd45265170670e1d
2020-06-25 18:45:26 +00:00
William Wilgus
3074ade465 Pictureflow Fixes -- Fixes
The name buffer is using too much ram for some targets
will revisit later...

removed extraneous call to set_scrol_lline

Change-Id: I56d658149bcb0c50857d25924e37bcb46a612c75
2020-06-25 12:02:16 -04:00
Adrián Tinoco
e8a3ade0ea PictureFlow fixes:
- 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
2020-06-25 14:56:07 +00:00
William Wilgus
ce61be4d59 lua boomshine update to use rockevents library
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
2020-06-25 13:50:57 +00:00
William Wilgus
df1b3c1d2c lua RockEv timing fixes
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
2020-06-23 11:17:17 +00:00
William Wilgus
e4ee5980c6 lua add _fullpath and argument parsing
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
2020-06-01 13:23:38 -05:00
Sebastian Leonhardt
2eb15354b7 fix plugin test_boost not properly unboosting
Change-Id: Ib33bb58fc7006c03caa692c377860bfdf463298e
2020-05-24 13:43:30 +02:00
Solomon Peachy
0cee5ba91b mikmod: Use -Wno-stringop-truncation with GCC >=8
This will silence a false warning/error when -D_FORTIFY_SOURCE is used

Change-Id: Ic75dbaaa1f419d63163c797d127e6d1928781fd2
2020-05-18 01:15:42 +02:00
Solomon Peachy
d73bfd1a42 pdbox/doom: Use -Wno-stringop-truncation with GCC >=8
This should shut up a lot of the sim build failures

Change-Id: Ieaa387585cb8ca0f8b2faff24c08aad9451b28ce
2020-05-18 00:47:04 +02:00
Thomas Jarosch
87f54b9745 Alpine CD changer emulation: Fix logic error in detecting non-playing status
cppcheck reported:
apps/plugins/alpine_cdc.c:721]: (warning) Logical disjunction always evaluates to true: EXPR != 4 || EXPR != 3.

Change-Id: Ib811defeac18832227aebe96f0524670c2afa76a
2020-04-17 04:33:17 +02:00
Solomon Peachy
dc3537e1c0 Silence a build warning in the superdom plugin.
Potential uninitialized variable, found by android NDK10 toolchain

Change-Id: Ia67f69997d9eab8fe4828111ed52576b0a1c423f
2020-04-13 17:26:22 -04:00
Solomon Peachy
46e2528992 av300: Continue cleaning out keymaps.
(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
2020-04-13 22:59:29 +02:00
Solomon Peachy
e28d1fe916 SDL: Silence a large number of compile warnings (WIP)
There are some real bugs in here, but we're drowning in warnings.

Change-Id: I7c2c0eafc8426327521bdd8a3ac2d3742ac16864
2020-04-11 19:29:47 +02:00
Marcin Bukat
180cef835b xDuoo X3II and X20 port
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
2020-04-06 18:15:41 +02:00
Moshe Piekarski
ced3a20aac Remove unused score tracker from Pacbox AI
Change-Id: I0a72f397f8d22b6543380e963383f6f7649a777b
2020-04-06 02:52:32 +02:00
Franklin Wei
6087c1caa5 Fix red introduced in 191ffe2.
Some leftover code from upstream was triggered by the __linux__ macro on
hosted targets.

Change-Id: Ib338e99d3b0d491d983dd92b8d554eed0c547c76
2020-04-05 00:44:30 -04:00
Solomon Peachy
0bf0d47072 Enable SDL for native MIPS and hosted targets.
Change-Id: I36f16530bf6dc108e44e1fd1ff5a550aa8139641
2020-04-05 01:34:24 +02:00
Solomon Peachy
c8111eb5b7 archos: Shut up a compiler warning by marking an inline function as static
Change-Id: I6222b87159235a28f2b69b512f95eafb8dd60564
2020-04-01 03:18:41 +02:00
Franklin Wei
f8cd15e226 sdl: disable alignment trap
Apparently causing issues on some devices.

Change-Id: I6adb65513bf65c559a0fa8980e693f1e5324d4ad
2020-02-01 22:11:56 -05:00
William Wilgus
f45db552f3 lua rockev rewrite
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
2019-11-15 14:28:03 +01:00
Franklin Wei
05dd4390c6 solitaire: reword menu to "Quit without Saving" and "Quit"
Patch submitted by Michael Carr.

Change-Id: I3a1555fe4b6182211203dc8770137e868c76e245
2019-11-03 21:44:48 -05:00
Moshe Piekarski
85a437780e Pacbox AI Improvements
-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
2019-11-03 21:31:19 -05:00
Franklin Wei
19c154fe8f wolf3d: change version to shareware
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
2019-10-30 00:07:09 -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
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
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
William Wilgus
ecfb4590ad lua fix polydraw missing functions
Change-Id: I9e2537e4839e2b4f9beddbc887610213ed954a87
2019-08-20 01:58:16 -05: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
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
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
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
William Wilgus
d61ea6c5ee lua LCD (Lua Compact Debug) patch
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
2019-08-08 07:11:30 +02:00
Franklin Wei
1dabca6c26 sdl: document some pointer voodoo
This was lifted straight from pictureflow...

Change-Id: Ie09184390e6fcea007e7daea001f075de307f878
2019-08-08 00:10:34 -04:00
Solomon Peachy
b1f2c795a6 Speech feedback in the pictureflow plugin
Patch by Igor Poretsky

Change-Id: I99d789e43d1093c69b4d76f58704303d3c1b3c80
2019-08-07 09:50:27 -04:00
Solomon Peachy
2ebb8da275 Mikmod plugin improvements
- 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
2019-08-07 09:48:15 -04:00
William Wilgus
951a614852 lua fix lua_close on os.exit(0)
Change-Id: Ib225ecf9ea64c95e438c4114b23239c118ab19a2
2019-08-05 21:25:01 -05:00
William Wilgus
1b41e6ec43 lua fix crashes EGC failure to lock stack in concat
Change-Id: I980637b1d8aa91d7ac0ed71fd0e7d21bda7876c4
2019-08-05 21:20:30 -05:00
Solomon Peachy
ed724fecb1 Midiplay plugin ehancements
- Improved robustness
 - Improved sound quality
 - Use mixer and DSP

Patch by Igor Poretsky

Change-Id: I6fa617158cbaa53ae842295cdbdbe3a478e49ded
2019-08-05 20:48:40 +02:00
Solomon Peachy
701bf06b26 Voice enable properties plugin
Patch by Igor Poretsky
Updated by Solomon Peachy

Change-Id: Ia2adf4a65723b08d6c438f836e3e811cba3dced0
2019-08-05 04:10:25 +02:00
Solomon Peachy
2a737d3e6f Fix stack overflow issues in properties plugin
Patch by Igor Poretsky
Updated by Solomon Peachy

Change-Id: I6b90845712ff92ce7b08b41e5ec92eb33faeff50
2019-08-05 03:25:17 +02:00
Solomon Peachy
40da2f7ba7 Speech enabled main menu config plugin
Patch by Igor Poretsky

Change-Id: Idffba2b1f1d225fc9278dcfab6a728fca5afe81d
2019-08-05 02:33:37 +02:00
Franklin Wei
08fd69c347 sdl: fall back to minimum supported sample rate if 22 kHz is not supported
Fixes too-fast audio playback on devices that don't support 22 kHz.

Change-Id: I78d4934bfd40f69c0d7bc9e8021df3f4edf0a9fb
2019-08-04 22:57:58 +02:00
Solomon Peachy
4ad76652ef Speech feedback in mpegplayer menus
Patch by Igor Poretsky

Change-Id: Idc6920e17be6537557f2b1cf00f7e559e30b45e8
2019-08-04 22:47:00 +02:00
Franklin Wei
7234de58ae sdl: don't set alignment trap if < ARMv5
This should fix crashes on ARM7TDMI as reported by foolsh.

Change-Id: I9aaf6196837d284a67a9e2b0edc72ecd644fd59f
2019-08-04 20:59:30 +02:00
William Wilgus
d1f349bf77 lua optimize print include, fix draw_poly
Change-Id: Ibb530cfa63681727be518173404952e897c9d297
2019-08-04 17:54:03 +02:00
William Wilgus
f85df30e3e lua add rlimg.lua example script split large includes to separate files
Change-Id: I67cac5bc4ce5525ab30abf9443f6cc1a33190512
2019-08-04 16:57:02 +02:00
Franklin Wei
827c881583 quake: update readme
Change-Id: Ic9ec250ad9c58dad33b703f0874c0307962fd199
2019-08-03 12:30:40 -04:00
Franklin Wei
7ba2ef566e sdl: use mutex in printf()
This prevents lines of output being overwritten by different threads.

Change-Id: I24cee52238b53c8a4b2536e082bb4bcd103d8d60
2019-08-03 05:05:35 +02:00
Franklin Wei
fee68fc612 quake: synchronize Mod_LoadModel and S_LoadSound
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
2019-08-03 05:05:05 +02:00
William Wilgus
9d2af8777f lua update tagnav.lua with reload menu and bug fixes
Change-Id: I0e7364a3432bf867cb368c131bf83643115f9d0b
2019-08-02 05:16:43 +02:00
Vencislav Atanasov
722ddcf6ba sdl: Fixes for the SDL apps, so they support building simulator on Windows
Change-Id: I277d391482a80e5bf9dd8049cd3b78c5cae7205e
2019-07-31 19:34:18 +02:00
Franklin Wei
94109a9506 quake: fix file loading errors
Forgot a return statement in Sys_FileRead (which slipped by since I've made
the questionable decision to disable all warnings...)

Change-Id: Ia0f3da52b43765b8e0e9953893ac7957ec2f6c2e
2019-07-30 03:44:43 +02:00
Franklin Wei
5e0bd5bfc0 quake: add notification upon strange error
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
2019-07-30 03:44:25 +02:00
Franklin Wei
caee6c578d quake: fix race condition
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
2019-07-30 03:44:09 +02:00
Franklin Wei
0b23348610 sdl: forward-declare fscanf_wrapper
Silences a few warnings (if you enable them).

Change-Id: Id9a9f4c688742c13ee3eb0777c40b4d4edcda224
2019-07-30 03:43:57 +02:00
Franklin Wei
c31700f922 quake: properly synchronize zone.c
Preventative measures. Somehow SDLQuake managed without these...

Change-Id: Icef15f3f653fa115ad8fb1ccc3f9682e453701c3
2019-07-30 03:42:36 +02:00
William Wilgus
138a4f9d3d lua rocklib_img optimize functions with multiple checkint calls
Uses int arrays and calls luaL_checkint in a loop

Change-Id: Ib73dab886f018c787bd995f64d990981d194069f
2019-07-29 05:54:27 -05:00
William Wilgus
90118f14cf lua add demo scripts, atexit handler, gui_scrollbar_draw
Change-Id: Ie8794e8a487f73952dae43e036787b6972fdbbee
2019-07-29 02:51:29 -05:00
Franklin Wei
8bafa1bc9b pacbox: fix red and enable AI on all targets
Change-Id: I4275e4ec374f3b5a6839890e4a2aa0f577f56522
2019-07-28 21:03:38 -04:00
Moshe Piekarski
b3295f0ed6 Pacbox AI
Pacman can make moves by itself

Change-Id: I7a39fed1e2bf5dbfb07e4d801d080a6e097730e9
2019-07-28 20:25:16 -04:00
Vencislav Atanasov
183e45e8d0
sdl: Remove platform-specific code
Also nuke the Makefiles of Duke Nukem 3D (pun intended).

Change-Id: If2707cf079bfb9299347f9c5f980780134b6ecda
2019-07-29 01:59:40 +03:00
Franklin Wei
e19857e712 duke3d: remove unused files
A bunch of cruft left over when I copied the files...

Change-Id: I29d12dae9e507af477fc06ff348c02aee68606a8
2019-07-29 00:50:23 +02:00
Franklin Wei
8379b230f6 lua: wrap thread_set_priority with #ifdef HAVE_PRIORITY_SCHEDULING
Should fix a compile-time error on simulator.

Change-Id: I5962479579350ebffe6dcce4f65a629b108ff936
2019-07-29 00:50:11 +02:00
Solomon Peachy
5572904887 chessbox: Fixes and enhancements
- 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
2019-07-28 18:39:41 -04:00
Vencislav Atanasov
7f9fc20afa Use full_path_subst on more places, to avoid replacing the wrong occurrences in
paths.

If ROOTDIR=/rockbox and BUILDDIR=/rockbox/build-something, it is now possible to
successfully build both target binaries and simulators.

Change-Id: If12d1d5933c5a15feebf627a4f1636dc1e3a67fa
2019-07-28 21:00:57 +02:00
Franklin Wei
d8330c9c18 sdl: gut OS/2, win32 code from SDL.c
This should help with compiling win32 simulators.

Change-Id: Icfbf78f7d0a8b0ddebffa8daac3adf55ac21f139
2019-07-28 14:27:49 -04:00
Franklin Wei
090bdedc62 quake: add README with some notes
Change-Id: I702e81f8715b505d4ed6d0eca861e3ddb680038d
2019-07-28 14:06:45 -04:00
Franklin Wei
711ddfdaad sdl: gut non-Rockbox platform detection code
This should prevent false positives when simulators for other systems (e.g.
win32).

Change-Id: Ib14a277fbfeb1b0ae141ebc4591d80a2cc0f526d
2019-07-28 13:59:32 -04:00