We used 16-bit variables to store the 'character code' everywhere but
this won't let us represent anything beyond U+FFFF.
This patch changes those variables to a custom type that can be 32 or 16
bits depending on the build, and adjusts numerous internal APIs and
datastructures to match. This includes:
* utf8decode() and friends
* font manipulation, caching, rendering, and generation
* on-screen keyboard
* FAT filesystem (parsing and generating utf16 LFNs)
* WIN32 simulator platform code
Note that this patch doesn't _enable_ >16bit unicode support; a followup
patch will turn that on for appropriate targets.
Appears to work on:
* hosted linux, native, linux simulator in both 16/32-bit modes.
Needs testing on:
* windows and macos simulator (16bit+32bit)
Change-Id: Iba111b27d2433019b6bff937cf1ebd2c4353a0e8
We used 16-bit variables to store the 'character code' everywhere but
this won't let us represent anything beyond U+FFFF.
This patch changes those variables to a custom type that can be 32 or 16
bits depending on the build, and adjusts numerous internal APIs and
datastructures to match. This includes:
* utf8decode() and friends
* on-screen keyboard
* font manipulation, caching, rendering, and generation
* VFAT code parses and generates utf16 dirents
* WIN32 simulator reads and writes utf16 filenames
Note that this patch doesn't _enable_ >16bit unicode support; a followup
patch will turn that on for appropriate targets.
Known bugs:
* Native players in 32-bit unicode mode generate mangled filename
entries if they include UTF16 surrogate codepoints. Root cause
is unclear, and may reside in core dircache code.
Needs testing on:
* windows simulator (16bit+32bit)
Change-Id: I193a00fe2a11a4181ddc82df2d71be52bf00b6e6
A bit of context, this device is a clone of the FunKey-S with a different form factor, hardware is mostly identical, the relevant difference is it has audio out (via usb-c, adapter to 3.5mm is included), this is the reason why the FunKey-SDK is needed for bulding.
This port is based on the old SDL 1.2 code because the device doesn't have SDL2 support. Alongside what was supported in the SDL 1.2 builds this port supports battery level, charging status and backlight control.
Change-Id: I7fcb85be62748644b667c0efebabf59d6e9c5ade
* Only bootloader builds
* Plugins disabled
* No keymaps to anything else
* No simulator
* Touchscreen not wired up yet
* Audio still untested
Bugs:
* rotary encoder does nothing in bootloader
(might be bootloader bug, might be something else)
Other stuff pulled in:
* Unify all of the (identical!) hibyos makefiles
* Rename the "bootloader" to more generic name
Change-Id: I6d8a3b58de726db8e89cf193c90960a070a575c2
The Echo R1 is a new open-hardware music player design, based
on the STM32H743 microcontroller. Schematics and hardware
documentation for it can be found here:
- https://github.com/amachronic/echoplayer
This is an incomplete port. The bootloader can be loaded using
OpenOCD and it can draw to the LCD using SPI. SDRAM is working
but hasn't been extensively tested.
Change-Id: Ifd2bee15c49868fbc989683d3ca14dce48bf3e18
-Wunterminates-string-initialization will complain if we try to shove
a "string" into a fixed array that is too small. Sometimes this is
intentional; when you are merely using "string" as a standin for
"non-terminated sequence of bytes". In these cases we need to mark
the "string" as "not actually a string" with an attribute. Applies to
GCC >=8, but this warning isn't pulled in by -Wextra until GCC >= 15.
Change-Id: Ib94410a22f4587940b16cf03d539fbadc3373686
Cortex-M7 support was added in GCC 5, while GCC 4.9 only
supports the M4. The instruction set is almost identical
between both processors; the only difference is that the
M7 supports double-precision floating point and the M4
doesn't.
Since Rockbox currently doesn't use the FPU, building M7
targets as M4 works fine.
Change-Id: I5880d6e81a85fa9b3e16e08d57e7955b4493df0b
Even though ARMv7-M has a hardware divider, 64-bit division is
handled in software and needs a div0 handler. The libgcc routines
call __aeabi_{i,l}div0 so we alias those to __div0.
Change-Id: I5152c43d39e25e03f31404753f13978a614aca06
Currently, only the development bootloader can be built successfully.
This is a part of the large iPod Nano 3G and iPod Nano 4G support patch.
Credit: Cástor Muñoz <cmvidal@gmail.com>
Change-Id: I74ea0da999ddb1d8ce5d0f5434141b3f0b5f7448
Currently, only a bootloader can be built successfully. The development bootloader is functional, it enables further progress on the port.
This is a part of the large iPod Nano 3G and iPod Nano 4G support patch.
Credit: Cástor Muñoz <cmvidal@gmail.com>
Change-Id: Idf85e42334b0e0ae36f9ed273e2940d5d7736e34
ARMv7-M has hardware division, so it doesn't require __div0
or any support functions for 32-bit division.
Change-Id: I840683a1a77d737f378899ca4bcf858216b81014
Add some logic to detect classic and M-profile cores, and make
this info available to the build system. All existing targets
are classic profile.
Change-Id: I07bfcd418bcaa6297b9bbf889fc189f167147428
Use AXP2101's egauge battery percent level if available (hw4 units).
If not available (_battery_level() will return -1 on hw1-hw3 units),
fall back to voltage battery level.
Also fix logic in axp2101_battery_status()
Change-Id: Ic300418532dae6f7772fff8bf5e2b32516f3b973
Currently only S5L8701 (Nano 2G) and S5L8702 (Classic/6G, Nano 3G) are defined. This change adds the remaining to CONFIG_CPU, as a preparation for porting to these platforms. It also defines the RTC types for Nano 3G and Nano 4G.
New CONFIG_CPU options:
S5L8720 - iPod Nano 4G
S5L8730 - iPod Nano 5G
S5L8723 - iPod Nano 6G
S5L8760 - iPod Nano 7G
Change-Id: I4e9e00163c0d0d5a5303f9eee428f9be47a48359
This is a preparation to introduce support for the following SoC models: S5L8720 (iPod Nano 4G, iPod Touch 2G), S5L8730 (iPod Nano 5G), S5L8723 (iPod Nano 6G) and S5L8740 (iPod Nano 7G)
The whole family consists of SoCs which are similar, running ARMv6 and Thumb2 instructions, but some peripherals are located at a different address.
No functional change is to be expected so far.
Change-Id: If1f7669c49cf110ccc52c5234cc42ffd6f2b4e80
When enabled this allows 512n and 4Kn drives to be used with a single build.
(So far all ATA SSDs use 512 byte logical sectors)
Change-Id: I902d2318ca8abb581699c0bca68d6e3ec227d064
(It would be interesting to try and work around this but it would have to
be done on a per-target/platform basis)
Change-Id: I7a27199082998420fea3c6abbbf5f3c526ccaec4
Multivolume support is only necessary if mounting multiple volumes
simultaneously, which the bootloader won't do.
Change-Id: I725061dd2aa47abe7652b0d27258dd3af821c913
* HAVE_MULTIDRIVE implies HAVE_MULTIVOLUME as the latter is always
removeable storage
* SD storage implies MULTIVOLUME
* ATA storage (with HAVE_LBA48) implies MULTIVOLUME
* Replace HAVE_MULTIDRIVE && NUM_DRIVES == 1 with HAVE_MULTIVOLUME
Since SD and ATA can exceed 2TB, we need multiple volumes to fully
utilize available storage with FAT32.
In practice I believe this only affects the ipod devices.
Change-Id: Ia597770948b0e2b47630f7264ad34f225a33a640
In verbose mode it will log valid the strings found, otherwise it will
only complain when we encounter a missing string.
Unfortunately a missing string is not inherently a problem, due to
conditional expressions. So all we can do is complain in checkwps
or if wps debugging is turned on.
Meanwhile, this is the first step in actually enumerating the translated
strings used by themes.
Change-Id: Ia93b333085e825d5b085c4d372ad8e13aa3e3ba1
Annoyingly, this makes all of the '.S' files we compile get treated as
divided syntax, so we need to make the syntax in them explicit.
Change-Id: I56a3916b7b24c84a1214a5d6bc4ed4d651f002cf
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
Define CONFIG_CPU if not defined
This fix makes sure that AAC-LC decoding is used both on device and simulator.
It's important for testing purposes as proper AAC-LC decoding requires changes both in decoder and in metadata handling.
Fixup for 4cd65b9d9.
Change-Id: Idef88825458761fffa3f5c5f4f221b555c509d89
Includes ipod video (5G) and earlier models, sansa c200 and others players not capable to decode AAC-HE.
Allows to play backward compatible files as AAC-LC.
Change-Id: Ic9f5c0f255d9a4308c3414d402f8f27f4328ca94
GCC 4.9 always emits assembly with divided syntax. Setting unified
syntax in inline assembly causes the assembler to complain about
GCC's generated code, because the directive extends past the scope
of the inline asm. Fix this by setting divided mode at the end of
the inline assembly block.
The assembler directives are hidden behind macros because later
versions of GCC won't need this workaround: they can be told to
use the unified syntax with -masm-syntax-unified.
Change-Id: Ic09e729e5bbb6fd44d08dac348daf6f55c75d7d8
The perceived loudness change of a change in volume depends
on the listening volume: at high volumes a 1 dB increment is
noticeable, but at low volumes a larger increment is needed
to get a comparable change in loudness.
Perceptual volume adjustment accounts for this fact, and
divides the hardware volume range into a number of steps.
Each step changes the dB volume by a variable amount, with
most of the steps concentrated at higher volumes. This
makes it possible to sweep over the entire hardware volume
range quickly, without losing the ability to finely adjust
the volume at normal listening levels.
Use "Volume Adjustment Mode" in the system settings menu
to select perceptual volume mode. The number of steps used
is controlled by "Number of Volume Steps". (Number of steps
has no effect in direct adjustment mode.)
It's still possible to set a specific dB volume level from
the sound settings menu when perceptual volume is enabled,
and perceptual volume does not affect the volume displayed
by themes.
Change-Id: I6f91fd3f7c5e2d323a914e47b5653033e92b4b3b
This is intended for improving the effectiveness of tools like
ASAN when debugging memory errors in the sim. It's not meant to
be a serious allocator for hosted targets.
Enable it by changing the buflib backend in config.h.
Change-Id: I0cf23cefa47ee35dede7b49e0e5b72dac60e8d3e
Enable INIT_ATTR support in config.h. Load init code to the
codec buffer, following the convention used by other targets
that support INIT_ATTR.
Change-Id: I8935fbaa100f0013bb328d71c4a49ec2ffafd003
Instead of putting "#ifdef LCD_STRIDEFORMAT" at every usage of the
macro it's simpler to have config.h define LCD_STRIDEFORMAT to the
default of horizontal stride when the target leaves it unspecified.
Change-Id: Ib187012aad65ac678dbd837b1464a83bad722411
If the USB controller is active when we hand over to Linux it'll
often trigger "irq nobody cared" warnings. Disabling the controller
before boot prevents that.
Also move the USB PHY bit workaround from the dualboot cleanup hook
to the main Linux boot function. Mainline kernels don't clear these
bits either.
Change-Id: Ieaf896c3b8c3e58a8c47de5afeb384ae2511a5fa
Searching in volume 0 is necessary for multiboot targets with only
one drive, like the M3K/Q1/ErosQ. Without this the search code will
never look at the redirect file on these targets.
The search bound is configured with a setting MULTIBOOT_MIN_VOLUME,
which defaults to 0, but is defined to 1 for Sansa players so they
keep their old behavior.
Change-Id: I6dc5cf98db4258731de2c68c3ab1182b4a4a655b