the builtin audio filetypes all use an int to signal (FILE_ATTR_AUDIO)
it takes less space to give them their own array and apply the attrib at runtime
bit of const correctness and some other small cleanup
Change-Id: I1cc3de9fe4ec1d5e49c8154cffdef3f05cf0b235
The default viewer icons file seems to have
been removed in the rewrite of buildzip.pl
(see commit 66b6fdb).
So, this only worked accidentally, once some
theme put a viewers.bmp file in the icons folder,
potentially leading to confusing behavior.
Deactivating viewer icons (instead of reverting
to some default file) when they are set to "-"
is probably expected behavior at this point.
Change-Id: I5010764676c67592bf20abfb3d0780edb1d555d4
The 'll' printf modifier is currently broken. Fortunately all but
one of the uses is printing MB instead of bytes, which means we can
cast the value to a 'unsigned long' without risk of overflow/wraps.
...There's one remaining use ('%llx') which still needs to be sorted
out.
Change-Id: I89f406f6c085be153531d1ec1f2a314ae172b129
Normally, if a device uses larger physical sector size than the logical
size and supports so-called "512e" mode, we let the device deal with
partial sector reads/writes.
However, if MAX_VIRT_SECTOR_SIZE is defined, we support
partitioning/filesystems that use a larger "virtual" sector than the
logical sector. typically this matches the physical sector size of the
drive, which means that despite a small logical sector size, all I/O
is done in terms of the physical sector size.
Therefore, when MAX_VIRT_SECTOR_SIZE and MAX_PHYS_SECTOR_SIZE are
enabled (currently only ipod5g and ipod6g), prefer software-based
partial sector I/O.
Change-Id: I0815ad0a2f987b89bb2debfbf3d0ed64cdf85525
If identify device word 209 is valid, check to see if the drive report
on the alignment of LBA0 with respect to physical sector 0.
If it's not aligned, bail immediately. Supporting this properly
won't be hard, but it's not someting we want to do unless necessary.
Change-Id: I3d5bb8fad9e32fff43dfb6454393728d7c01b93b
No functional change.
We always have it turned in for ipod6g, but this makes some of the
flow/logic easier to follow.
Change-Id: I3abeace4f70afb197e819e0944e0e76f4edc4800
img may have already been loaded, in which case
bm.data will intentionally have been set to NULL
(see NOTE in load_skin_bmp)
Also see commit 01cbb79 and previous fix 35f9a5b
Change-Id: I581ed63836f30a6b669b3d1fd5886fc1b3664386
Each artist name is only stored once, regardless of case,
so we have to perform a case-insensitive comparison with
the current artist.
Change-Id: I571c0e49c032a6d5c64f6e3289513ba7fe279cb8
These are PP502x-based devices shipped with ATA drives. However,
PIO is flaky when used with the various ATA/CF<->SD adapters, so
turn it in across the board.
Change-Id: I65384d95e2e4498eb03f43ac990b01e0c6d060c5
This isn't strictly needed for FAT32, but the core file cache code
needs to be able to reference >32bit sector addresses.
Change-Id: I57838f1228c1d45f6a8c4755c5d1f9063c13b3dd
cfg_vals aren't needed for most settings
F_TABLE_SETTING, F_CHOICE_SETTING, F_BOOL_SETTING
can use cfg_vals but only a few custom settings use it otherwise
for these settings we define F_HAS_CFGVALS and use the setting union instead (as these all use UNUSED)
noticed that settings_dumper missed most cfg values so didn't show text setting values
saves ~300 bytes
Change-Id: Ie504c8cfe2a6cf471117c3afe5cf9a770a7f1784
This way if there's no valid partition/filesystem we still report the
"correct" sector size out via USB.
Update the ipod5g/6g bootloaders so they do the right thing too.
Change-Id: I0d93ae7e6664f1591d8edf1c0252c586e329cd4b
Normally, we figure out the virual sector size from the filesystem info.
However, if there's no filesystem, we fall back to the hardware's
logical sector size.
Some device firmware (eg ipod5g/6g) need their partition tables set up
with larger-than-logical sector sizes; this way we can present the
"correct" sector size to maintain interoperability with the stock
firmware and make it so that the drive can still be properly partitioned
from within rockbox.
This patch adds support for DEFAULT_VIRT_SECTOR_SIZE. Nothing uses it yet.
Change-Id: Iae746a50ffc37c51abb2c9b82d3c4596f1fa7559
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
Only used if MAX_LOG_SECTOR_SIZE is defined
This allows a single build to seamlessly work with (eg) 512B or 4K sectors.
Change-Id: I85d2a6612afca6a1d7a3bd49c588b5745ab2b220
Comment copy was added in c647e62c as workaround for FS#11033 and no longer needed (I tested really long lines and scroll no longer throw any errors on my Sansa e200v2)
Change-Id: I96a5b26096829034692dffc2abc730ff2bdd5d9c
Increase buffer size by 368 bytes by using id3v1buf.
Limit tag size only if metadata fails to fit without limitation.
Change-Id: I82d551ac75c2e8fcb9ff0ef318445e0e6a1f8148
Basically this requires un-hardcoding SECTOR_SIZE everywhere, in
favor of using a variable containing what was reported in IDENTIFY INFO.
Note that the rest of the storage subsystem still needs to be fixed up!
Change-Id: I7f2dbd54ff2bc16b15010721e011949cbf308e12
The 'struct font' definition says:
const void *offset; /* offsets into bitmap data,
uint16_t if bits_size < 0xFFDB else uint32_t*/
However convbdf was unconditionally using 'unsigned short' without
checking bits_size. This generated a bogus table if used with an
uncapped SYSFONT due to offeset overflows. And a pile of complier
warnings.
That said, we're still capping SYSFONT at 255 chars due to space
constraints -- 14-Rockbox-mix jumps from 2.6K to 1022K if left
uncapped. Yowza.
Change-Id: I4577da08ab1633ab7abbc167523196f38c8a348a
This lets us *natively* handle varying physical sector sizes
without playing games and lying about the logical sector size.
(The original drives use 4K _physical_ sectors with 512B logical
sectors, but you have to access everything in 4K blocks...)
Achieve this by splitting the MAX_PHYS_SECTOR_SIZE code out
of the main ATA driver and re-using it.
Change-Id: I0bc615ab4562f1e3e83171a8633c74fb60c7da1f