Commit graph

36964 commits

Author SHA1 Message Date
Christian Soffke
ea5ce8034b Replace "Reload After Saving" with option to remove queued tracks
The "Reload After Saving" setting was added in
g3347 (4f83e66) to solve FS#13287, by allowing
you to bookmark a modified playlist after saving,
without having to manually reload it first.

Since the rewrite of playlist_save in g5192
(90e3571), a modified playlist doesn't have to be
reloaded anymore in order to be bookmarked after
it's been saved, unless it contains queued tracks.

To cover the remaining use cases of the previously
available option, Rockbox will now offer to remove
any queued tracks from a playlist when saving it.

Change-Id: I2d6f12bcce14d8ff41a4d921ce84d628774103ac
2024-04-21 18:28:16 +02:00
Christian Soffke
e5c65a0039 ft_assemble_path: fix prematurely cut-off path
bug report at https://forums.rockbox.org/index.php/topic,54842.msg

Change-Id: I423c28e277084502b7aaff7c3a8e3b6ba37f54e8
2024-04-20 15:41:21 +02:00
William Wilgus
123858287b fix red rli_img
devices > 16 bit depth use a struct of values for the pixels
this needs converted to use by functions expecting a single integer as
a pixel value

Change-Id: I540d667239bc581e1d31dfe1e07c51ba10803ddf
2024-04-18 13:40:01 -04:00
William Wilgus
a6570b7d37 lua use lcd_drawline to draw lines inside rliimages
rewrite draw_text to use new viewport buffer

set_viewport now accepts rliimage to allowe interfacing with rb. functions

fix long standing 2-bit bug with text drawing in lua
fix 2-bit img
saving bug (i'm guessing just a one off, just enabled clipping)

fix font_getstringsize bug

fix shape of numbers draw_num.lua also add auto centering

add page scrolling to printtable

add a new demo script 'stars'

Change-Id: I866905cee82ee89ebc0eb020a56a7ecdb101bf5e
2024-04-18 13:11:51 -04:00
Solomon Peachy
7f1b49693c translations: Update US English "translation"
Change-Id: I1d91ebac7f878b68759afd408b8a90cf353cf782
2024-04-18 12:25:50 -04:00
Solomon Peachy
ac9003546f release: Revamp release scripts
Covers bins, voices, manuals, fonts, and source tarballs.

Only thing remaining is build-info integration

Change-Id: I3a93fd87bbeb725fc8e1b38c5787e33fa00f3f37
2024-04-17 22:10:52 -04:00
Solomon Peachy
c38aeb3fbc voice: add a 'make talkclips' target for voice builds.
This will use the configured tts engine and language to generate
the talk clips for a specified directory.

  TALKDIR=/path/to/somehere make talkclips
  TALKDIR=/path/to/somehere make talkclips-force

If 'TALKDIR' is not defined then it will error out gracefully.

Normally if a talkclip is present already it will not regenerate the file,
but 'make talkclip-force' will regenerate it anyway.

Change-Id: I62683f9e5ca395fd303ac6029096c20da1e96d01
2024-04-17 14:55:17 -04:00
Solomon Peachy
ebd952da2f voice: minor refactoring in the voice gen script
Change-Id: If0082ca2cb89e36fd5a1c4664cad0c594501db31
2024-04-17 11:21:32 -04:00
Solomon Peachy
613a1432d6 voice: Improvements to the talk clip generation
This covers the voiced directory and filenames

 * Don't regenerate a talk clip if one is present (?)
 * Format awareness; ie if the TTS engine generates an mp3 file,
   convert it to a wav file so we can encode it properly
 * Use a global variable for the wavtrim threshold

Change-Id: I9f441b573704bdf7675794fd0e1984446308463b
2024-04-17 09:02:20 -04:00
Solomon Peachy
39c9c350ae voice: Fix voicefile generation
I updated the scripts to use a generic '.enc' as the filename as we
haven't used true '.mp3' files for some time (and even then, only on the
Archos devices) but I missed the voicefont generation tool.

Change-Id: I450de9215664b6559058b175afc25aa874d11dcc
2024-04-17 09:01:45 -04:00
Solomon Peachy
c8dd31aab7 voice: Fix the 'gtts' voice generation backend.
* Language and dialect need to be specified separately
 * Convert the mp3 files generated by gtts into wav into rbspeex
   (Uses ffmpeg currently)

Change-Id: I6d7b9494e70a61537519221522202ea28469cc70
2024-04-16 18:37:43 -04:00
Christian Soffke
9af812c320 playlist viewer: fix track info for first track of a stopped current playlist
A playlist that hasn't finished and is resumed without starting
playback has its index set to 0 by empty_playlist_unlocked.
So ignore the index for stopped playlists.

Change-Id: I575ceacbcd2369eaa3ae4e47de7b2f7e999248f5
2024-04-16 22:56:43 +02:00
Christian Soffke
b06073f771 buffering: ensure sufficient buffer size loading bitmaps
Commits 5aa0fc3 and 32f1418 (g#4451, g#4452) changed the
amount of space that was allocated for loading bitmaps
used to display album art.

Testing revealed that the size of the JPEG decode buffer
can reach up to (38 * 1024)B in some cases.

When the limit is reached, additional space is required
by the resize_on_load function.

Change-Id: If93b45754a4f5948b6160f659182e4618e01912e
2024-04-13 16:19:48 +02:00
Christian Soffke
05b070b0b8 playlist viewer: get Info for playing track from RAM
No need to hit the disk to retrieve
metadata for the currently playing track

Change-Id: I944910adfb750d3f8fb52b8c057e98d58700cf17
2024-04-11 14:01:27 +02:00
William Wilgus
b57536db8d [BugFix] Hosted incoming directory component leading slashes #2
Fix the rest..

Change-Id: Ie551772a073cba3eb6de176cd73a59d419057183
2024-04-07 16:46:02 -04:00
William Wilgus
d1f14c7b46 [BugFix] Hosted incoming directory component leading slashes
leading slashes in directory components to path_append
makes a path with a leading slash absolute and discards
the basepath

Change-Id: I65253080c0ca4278b559894104ab25ab199a3100
2024-04-07 14:13:21 -04:00
Solomon Peachy
4e1faa032f lcd: fix yellow from accidental commit
Change-Id: I05c2676bcd5a4a0f75804af0e5367da5acd4ee55
2024-04-06 21:37:14 -04:00
Solomon Peachy
75ad7c9792 Remove duplicate 'const' declaration in percent_to_volt_charge[]
Affetcs many hosted targets; probably was a typo that was copy-pasted
everywhere else.

Change-Id: Ifbb31e7ff1fce4874fa0f3c108db59f152e2f927
2024-04-06 21:26:53 -04:00
Solomon Peachy
7b25c32388 lcd: Do not alias lcd_write_yuv420_lines_odither() to lcd_write_yuv420_lines()
Causes a warning with GCC8 as the protoypes are not the same.

Only affects targets that lack an asm-optimized version (eg mips)

Change-Id: I22e4657f3fb71ebbb915e4f290bf3670b1b87636
2024-04-06 21:26:53 -04:00
William Wilgus
76a9a524c0 skin_tokens.c get_dir() improve path detection
get_dir grabs a component of a path
it now handles
multiple slashes, no leading slashes

Change-Id: I6c4a377796652808a02b44f6da0a63b201dd8f46
2024-04-04 14:40:17 -05:00
William Wilgus
3714288f7a add bootpath to bootdata debug menu
show the full path to the currently booted firmware

Change-Id: I9c0b4335ef410a0a5132f1097a29368306497206
2024-04-03 15:57:06 -04:00
William Wilgus
8c994db247 multiboot_select plugin check volume root for valid firmware -- Try 2
I'm not sure why but on my fuze v2 I don't get the '.' nd '..'
directories back from readdir

that make removing '.' to find /.rockbox inconsistent

Instead filter out files and strcmp the incoming dirs
to BOOTDIR (.rockbox) and clear it when they match

Change-Id: Id8f3312cb3ae624dff1be21f745034c08c4ae1a7
2024-04-02 21:04:44 -04:00
William Wilgus
4a91d37613 multiboot_select plugin check volume root for valid firmware
Change-Id: I5feb4b00ae385ff8967de27682d4e4a528dc2ae5
2024-04-02 19:58:12 -04:00
William Wilgus
15fdaa3abc [Fix Red] 957920e9 lcd-bitmap-common 16-bit devices
Bootloaders need lcd_ prepended as well

Change-Id: Id95020bb0dd022fcc9693863a7824e959f994a0e
2024-04-02 19:43:58 -04:00
William Wilgus
957920e915 lcd-bitmap-common 16-bit devices remove branch in character loop
do the depth check outside of the loop
make a helper function to have same
fn signatures between
mono_bitmap_part & lcd_alpha_bitmap_part

Change-Id: I42fab535133607f937430357dab7a20fa97805a8
2024-04-02 19:28:19 -04:00
Aidan MacDonald
5641e8140a tagcache: Rename find_tag() -> tc_find_tag()
The overly-generic name "find_tag()" is part of the skin parser
library and this can cause problems depending on what's included
from headers. Unfortunately.

Change-Id: I0cb02b1203daa6ff36595ed6c6f40b5b56bd3e58
2024-04-01 18:21:37 +01:00
Aidan MacDonald
9d585cbc05 Fix red in f026cc4e17
Change-Id: I9ea1e18a8658a51bf0c917bec372f7509569ede2
2024-04-01 18:21:37 +01:00
Aidan MacDonald
f026cc4e17 tagcache: Add menu entry for customizing the DB path
Allow the database path to be set from the file browser's
"Set As" context menu, so it can be changed without editing
the .cfg file by hand.

Change-Id: Ie1a84bcb2084ee3b1a0a18cc51f564238515f164
2024-04-01 17:23:06 +01:00
Aidan MacDonald
ac1f92d9e8 tagcache: Fix missing void in tagcache_rebuild() definition
Change-Id: I04629547979a71f61693d87abb298b7c1d5efce4
2024-04-01 17:06:29 +01:00
Aidan MacDonald
89a6fc087d manual: Document database "Select directories to scan" option
Change-Id: I527f30df924fa2ca16684385ef805f05fc836a38
2024-04-01 17:06:29 +01:00
Roman Artiukhin
f5a852304b Sansa e200v2: bootloader: enable SD boot
Use rockbox_main.e200v2 for boot redirect

Max allowed size: 120860
Thumb build: 119579

Change-Id: I4683b1bdd247d41eaf4393b999db4ef5cd7a4010
2024-04-01 11:44:22 -04:00
Aidan MacDonald
cc210a7161 Fix red in c36d7768c5
Change-Id: Iadcfd322b32cf8523579c9e21a59928a621f15e1
2024-04-01 16:30:41 +01:00
Roman Artiukhin
c36d7768c5 Sansa e200v2: bootloader: fit size
Max allowed size: 120860
Old thumb build: 128494
New thumb build: 118514 (fits!)

Disabled:
Logo;
alpha blending capabilities for bitmaps;
Arm stack unwinder (backtrace);

Related forum discussion: https://forums.rockbox.org/index.php/topic,54768.0.html

Fixes FS#12380

Change-Id: I978720d795cb0ef5169103e467cf8386c21d8e93
2024-04-01 11:02:04 -04:00
William Wilgus
2570909e52 [Feature] Add root_realpath to Rockbox Info
Change-Id: I5a6bb78495a00960d0aa0f1a3fad227e4b8e17f3
2024-04-01 08:39:55 -05:00
William Wilgus
8e9a840d1d [Fix Yellow] 1dc22c7241 use path_append for setting directories is several settings
Change-Id: I30ee97f7f47d52c178de05bcabb62b65fcd9d784
2024-04-01 08:11:05 -04:00
William Wilgus
1dc22c7241 use path_append for setting directories is several settings
sprintf, strcpy, memccpy can all just go thru path_append
with the added benefit of some path sanitizing too

Change-Id: I33510b56a364b8b3a0b06f2ff14b76491f6e3870
2024-04-01 07:35:53 -04:00
Solomon Peachy
47784a777e FS#13403: Fix compilation error in scsitools
Change-Id: I2aa402d09a482d9f559dece13f1acf75a658c4da
2024-03-31 20:12:12 -04:00
Aidan MacDonald
e631fc4723 tree: handle trailing slashes in currdir when navigating up
Make ft_exit() ignore trailing slashes. Previously if these
ended up in "currdir" then pressing the back button would just
leave you in the same directory.

Change-Id: Ic539e02a9860fa13ca3235beaf99bb474c66e151
2024-03-31 18:45:40 +01:00
Aidan MacDonald
856e3d548b Fix red in dc9d354ed2
Change-Id: Ic6639e85c42f7ebf435ebad2740e921b7b932ead
2024-03-31 18:20:24 +01:00
Aidan MacDonald
dc9d354ed2 multiboot: Add v1 boot protocol
v1 passes the drive and partition number of the boot volume
instead of using the volume number. The volume number isn't
reliable because the same filesystem might get a different
volume number once the firmware is loaded, which will cause
the firmware to use the wrong root volume and fail to locate
the correct .rockbox directory.

Using drive and partition numbers avoids this issue because
drive numbering is fixed and determined by the target.

Change-Id: I7e68b892d9424a1f686197a6122e139b438e5f7e
2024-03-31 16:57:19 +01:00
Aidan MacDonald
6ffd42548b multiboot: Refactor boot data validation, add version numbers
Instead of verifying the CRC before every access of the boot data,
verify the CRC once at startup and set a flag to indicate the boot
data is valid.

Also add a framework to support multiple boot protocol versions.
Firmware declares the maximum supported protocol version using a
version byte in the boot data header. The bootloader chooses the
highest version supported by it and the firmware when deciding
what boot protocol to use.

Change-Id: I810194625dc0833f026d2a23b8d64ed467fa6aca
2024-03-31 16:57:19 +01:00
Aidan MacDonald
af644e02a1 Fix red in 5fd5f56cac
Change-Id: Icbc6e234a2fcdd7c8e0cdd0562f49fcbdf52480b
2024-03-31 16:57:19 +01:00
Aidan MacDonald
5fd5f56cac Disable unused LCD scroll functions in bootloaders
These functions just reset some state related to the scroll engine,
which is already disabled for bootloaders. They get called from the
LCD code and compiled into the binary, but have no real effect when
the rest of the scroll engine is not present. Replacing the calls
with inline stubs gets rid of this dead code from bootloaders.

Change-Id: I12a6d8926e19477ae3a5913e7fc8aff41cecd970
2024-03-31 11:36:16 -04:00
Aidan MacDonald
b0a8cacd1d rolo: simplify parsing scramble header in load_firmware()
The standard load_firmware() function is used on targets which
use the "scramble -add" method for generating Rockbox binaries.

While it tries to be a bit more generic and allows the CRC/data
offsets to be placed anywhere in the file, there are no targets
which actually need this flexibility, because they are all using
plain old "scramble -add".

So we can actually simplify load_firmware() and remove defines
from the target headers. All the targets used CRC offset = 0 and
data offset = 8, except for a few which I assume never supported
ROLO or were never tested -- eg. samsungyh820: the CRC and data
offsets cannot both be 0.

The actual motivation for this is removing the calls to lseek(),
which can help make bootloaders a tiny bit smaller, as lseek is
typically not used anywhere else in bootloaders.

Change-Id: Ic2d01e5b75a32e88363f085e3e839146a0710bf4
2024-03-31 11:24:07 -04:00
Aidan MacDonald
7dc8d754a2 Disable legacy codepage handling in bootloaders
Turn off legacy codepage handling in the filesystem code for
bootloaders, and support ISO-8859-1 (Latin-1) only.

This only affects DOS 8.3 filename parsing when FAT32 long
names are unavailable; long names are Unicode and can always
be decoded properly regardless of this setting.

In reality, bootloaders never supported codepages other than
Latin-1 in the first place. They did contain the code to load
codepages from disk, but had no way to actually change the
codepage away from Latin-1.

Compiling out this useless codepage handling code frees up
precious space for very size-constrained bootloaders like the
Sansa e200v2.

Change-Id: I26b049dd648fed4a0cc61fa938faa84e9816ab7d
2024-03-31 11:07:08 -04:00
William Wilgus
4f652b49ae clipzip clean up lcd driver a bit
consolidate some of the lcd cmd / data calls

Change-Id: I2e2ccc7833806f7bf931138a04c48aa55ef4a13d
2024-03-31 01:25:16 -04:00
Aidan MacDonald
8bdf08cd2d Sansa e200v2: Enable thumb for bootloader by default
Thumb bootloaders were confirmed to work in this post:

https://forums.rockbox.org/index.php/topic,54768.msg253473.html#msg253473

Change-Id: Id52769b9b6a2acc167503fa61aec665f4090fdc1
2024-03-30 11:58:40 -04:00
Aidan MacDonald
9f3d83d03f tools: update shebang in thumb-cc.py
Some distros, including Ubuntu/Debian, don't provide a "python"
command unless an additional package is installed. Using "python3"
explicitly should work everywhere.

Using "/usr/bin/env" respects the user's PATH, so they can choose
a specific Python version instead of forcing the systemwide copy.

Change-Id: I02e3ead92939c42df6def79dec3dc2a62c62b1c3
2024-03-30 11:58:40 -04:00
William Wilgus
fe00906abb pathfuncs.c add path_strip_leading_separators()
added to path_append as well

Change-Id: Ieb6ec4f4c475ca5e60c8246c7f044bcc7651f6bf
2024-03-30 11:01:53 -04:00
Roman Artiukhin
777098fca9 usb: fix usb_storage_disconnect shouldn't call core_free for static buffer
Fixes Sansa e200v2 bootloader doesn't boot after 3301c5a

Change-Id: I8f4780961203beb18863f5d2b1f1e61857c4fe27
2024-03-30 09:10:45 +02:00