1
0
Fork 0
forked from len0rd/rockbox
Commit graph

1308 commits

Author SHA1 Message Date
Hairo R. Carela
e6ddf94fbd rgnano: Add simulator button click mappings
Was missing this in the fisrt commit.

Change-Id: I685c61cc419f720ece6ca4402839af0de70f8645
2025-08-18 19:06:04 -04:00
Hairo R. Carela
7b0f408c71 rgnano: UI simulator support
Change-Id: Id488d16e01ef49a9d1b57641bc1c22ed2fef4931
2025-08-05 08:30:30 -04:00
Hairo R. Carela
8e7fa2932e simulator: Fix battery level for targets with PERCENTAGE_MEASURE
Previous code returned 0 in targets using only `PERCENTAGE_MEASURE` which means the simulator closed itself (due to low battery) shortly after boot.

Change-Id: I8b66dd085e02a8e565893aad4c8b643233dd3852
2025-08-04 02:01:26 -04:00
William Wilgus
4f3bbeaffc Remove BATTERY_TYPES
Change-Id: I4fa03a10d0032fd6f92722bbe1d4b7eec0b95cb4
2025-03-11 02:26:38 -04:00
William Wilgus
10f8312db4 FS#13538 export and import battery level tables
when battery_bench is run
exports a file in the rockbox directory called 'battery_levels.default'

if the user wants their own levels they can rename the file battery_levels.cfg
and it will be loaded at boot

some minimal error checking is performed prior to using the values

added manual entry

Change-Id: Ia0126faced0c7229fcf8385a1bcb584b5a9dc378
2025-03-06 11:54:21 -05:00
Christian Soffke
18aa0f6278 Creative Zen Vision: fix config file (?!)
If I'm interpreting the git history correctly,
the config file for Zen Vision was at some point
inadvertently replaced with one for the
Zen Vision:M.

This deletes the currently unused creativezv.h,
and moves its contents into zenvision.h.

The config files appear to be identical except for
CREATIVE_ZV vs CREATIVE_ZVM define, different
keypads (CREATIVEZVM_PAD vs CREATIVEZV_PAD) and
BOOTFILE_EXT (zv vs zvm), a different model name
and number, as well as different LCD dimensions
and DPI.

The buttonmap still seems to require adjustment.

Change-Id: I9a5e65df750db21be5f5a1ed7a80a50706237781
2025-01-08 08:06:45 -05:00
William Wilgus
fc26ba3f20 Simulator ClipZip ClipPlus add power and volume buttons
Change-Id: I6c7997f436bd0d7f5c0421489823d481b0396eea
2024-12-29 01:38:21 -05:00
Christian Soffke
a86b1999d0 simulator: fix missing Werror option + eliminate lib duplicate
configure:
Ensure Werror option doesn't get lost when simcc resets GCCOPTS

uisimulator.make:
Remove ignored duplicate SIMLIB on Darwin

codecs.make:
Eliminate some redundancy

Change-Id: Ieee6f677fd22666cb58aa6fe53eabdc0b0f8c190
2024-12-19 15:04:46 -05:00
Christian Soffke
cede12f197 simulator: fix missing background bmp on MacOS
Change-Id: I6ad8b78519764dad53d8353d14432f791a7a85a5
2024-12-17 12:03:33 +01:00
Christian Soffke
1745b74576 Make simulator compile on MacOS
Tested on MacOS Sequoia (Apple Silicon) with the
latest Xcode command line tools, gcc 14
(Homebrew GCC 14.2.0_1) and sdl2 (Homebrew 2.30.9)

Make sure 'gcc' (and 'gcc-ar') is in your PATH
ahead of the Xcode-provided "gcc"(clang). E.g.
by setting up symlinks in /usr/local/bin that
point to gcc-14 and gcc-ar-14.

Notes:
- The appropriate bmp from uisimulator/bitmaps
  has to be manually copied to your build folder
  and renamed to UI256.bmp, if you want the sim
  background to be displayed

Change-Id: I559f33d2165065f913f30c016b85906af380fb81
2024-11-30 22:19:02 -05:00
Solomon Peachy
7927423e34 SDL: Migrate to SDL2
Incorporates large portions of g#5879 g#5282 g#5285 g#5286 g#5287

Differences from the above patches:

 * Removed all MacOS-specific stuff
 * Removed support for SDL1 entirely
 * Properly implement mousewheel support
 * Bumped up minimum stack size for sigalstack threading
 * Check for overflow before enqueing scrollwheel events

Tested on:

 * sdl application (Linux)
 * Simulator (x86_64, Linux) -- xduoox3/ipod4g/sansafuze
 * Simulator (i686, Windows) -- xduoox3
 * Simulator (arm64, Linux)

Change-Id: Ia3012dd1be123feb2888798a42d5b7cc149f382b
2024-10-06 12:05:53 -04:00
Solomon Peachy
8f8fb13edb dbtool: Fix build when we have HOTSWAP but not MULTIVOLUME
(Not sure how that can happen, but... eh)

Change-Id: I7754f1678698e8781df76c2f88bdf12cc43a5e0e
2024-09-22 10:41:25 -04:00
William Wilgus
a2cc7546d8 Add DeviceData to bootloaders
same vein as bootdata but for devices that need to pass info back to a
running firmware

Change-Id: I0cdcdc0475804dfbbee415ab487104ae8fc8ac69
2024-09-02 13:29:43 -04:00
Solomon Peachy
ad0c131918 sim: stub out volume_partition() for sim targets
Not sure why this doesn't blow up in more places, but eh..

Change-Id: I45214243c0d03a2156dca8f727caadde5f34c23f
2024-08-12 16:10:12 -04:00
Solomon Peachy
13830439fa Fix multidrive/multivolume hosted builds.
Generalize the fix in 2348779ae6 to apply to hosted as well as simulator
builds.  Original regression introduced in c0ac043c6d

Change-Id: Ia786533cc318555e3bb842eb21a73a1f76888379
2024-07-26 10:54:07 -04:00
Solomon Peachy
e8d7a8baaf simulator: Fix browsing into secondary drive on multidrive targets
Change-Id: I4e993acdedb516f0ae4fc230a62cb00de8dcef86
2024-07-25 21:28:01 -04:00
William Wilgus
2348779ae6 [Bugfix #2] initialize the volume names for the sim
and fix red for the devices that don't have ext drives

Change-Id: I66b8ea1e1b22a42cee2957a504756e7f785bd0ae
2024-07-25 00:32:40 -04:00
William Wilgus
67db38e766 [Bugfix] initialize the volume names for the sim
init_volume_names() wasn't being called by the sim

Change-Id: Ife0d345cf29bd4a0a658ed194ee85ca4852bc92f
2024-07-24 23:43:36 -04:00
Solomon Peachy
4628009503 simulator: A few MULTIVOLUME cleanups in the code.
Change-Id: Ia170c06df7624a801ce043e49e078afffa79eee2
2024-07-19 22:04:00 -04:00
Solomon Peachy
9ddd9826d3 Delete a redundant AGPTek Rocker simulator bitmap
Change-Id: Id7f1402ad149af2805b34508ac129c6630d07449
2024-07-17 21:43:00 -04:00
Solomon Peachy
07cf874191 simulator: Fix one set of errors, a new set crops up.
Change-Id: I86d6cbee8eec52f04e760b45ab849249ae7162c4
2024-07-07 16:45:48 -04:00
Solomon Peachy
c51a9821e7 rk27xx: Fix simulator errors brought upon by HAVE_MULTIDRIVE but not HAVE_HOTSWAP
Change-Id: I0171d01dfffbb936e8041c0e2fc5207c620ddce3
2024-07-07 16:02:38 -04:00
Solomon Peachy
60c3fdbc11 More red fixes:
* hostfs_removeable()/present() needed IF_MDVOID() in their prototypes
 * SIM_EXT_INSERTED/EXTRACTED are gated by HAVE_HOTSWAP

Change-Id: Id8c688f3538db99586a4f5062c83466374451883
2024-07-07 15:40:27 -04:00
Solomon Peachy
5a2bd580cd Hopefully fix the last of the stragglers.
* xDuoo X3 fix some warnings due to an incorrect #ifdef
 * stub storage_removeable() and storage_present() for non-HOTSWAP builds
 * sim_trigger_external() is gated by HOTSWAP, not MULTIDRIVE

Change-Id: I38f14fdfeba13957899c378051d49afc2e8245e5
2024-07-07 15:13:53 -04:00
Solomon Peachy
1528b44349 More red fixes
Change-Id: If22cdb286edac47b08b158bee6910ba7a539b041
2024-07-07 14:47:07 -04:00
Solomon Peachy
520875ff00 simulator: Fix numerous latent issues
Interactions between HAVE_MULTIVOLUME, HAVE_MULTIDRIVE, and HAVE_HOTSWAP

Change-Id: Ia93792d6a778bf1e5b9bfbc46d982bbba7544651
2024-07-07 13:18:17 -04:00
William Wilgus
aca41be3ca [Feature] Simulator add headphone and lineout toggling
Change-Id: I0b019414643e5c9037c0128093488da49e1a4c0d
2024-05-30 12:12:29 -04:00
William Wilgus
7ec1151ddd [BugFix] add button maps for iPod6GSim
Change-Id: I395d940a1b7dd3cb858a178150762b2301a3ca12
2024-05-30 11:01:29 -04:00
William Wilgus
efcea66280 Revert "readdir_r use in tagcache.check_dir, ft_load"
This reverts commit 0c737d3b2e.

Reason for revert: Not really a concern as open_stream returns an independent buffer since g#566

Change-Id: Idbd2f4a7cc2ea6362b7714629469eeb7b3d19b3b
2024-05-02 13:38:32 -04:00
William Wilgus
0c737d3b2e readdir_r use in tagcache.check_dir, ft_load
Change-Id: Ibcde39ed247e100dd47ae877fb2a3625bbb38d8b
2024-05-02 09:33:29 -04:00
William Wilgus
fdc3668a6a [BugFix] Multiboot Database duplicate files
When the sd card is mounted into the root namespace the database
picks up files through both paths

previously we hid the mounted drive but this causes issues with users
databases when the drive letter changes

Adds a way to keep track of volumes mounted in the root namespace

Hides the enumerated volume in root

Database:
we can just parse the root directory ('/') and get to any mounted
volume but we can also enumerate a volume in the root directory
when this occurs it leads to multiple entries since the files can
be reached through multiple paths ex, /Foo could also be /SD1/Foo
Instead we will attempt to rewrite the root with any non-hidden volumes
failing that just leave the paths alone

Change-Id: I7bdba8cfaf63902d2a3852d28484bcf8ca317ebd
2024-03-23 01:03:33 -04:00
Aidan MacDonald
85232fadbb simulator: fix off by one error in USB ack calculations
The sim's printout of the number of expected USB acks was off by one.
Since the sim queue is not registered for broadcasts, it will not
receive an ack message and does not need to account for itself when
determining the number of acks to expect, unlike the USB code.

Change-Id: I6715039c05c1ea95099716c5251d401e37f5b085
2022-05-22 15:34:42 +01:00
William Wilgus
9daacabd65 [RESTORED!] Allow mounting of any directory as the root directory.
Provide definitions for the macros:
* RB_ROOT_VOL_HIDDEN(v) to exclude certain items from the root.
* RB_ROOT_CONTENTS to return a string with the name of the
directory to mount in the root.

Defaults are in export/rbpaths.h

It's a bit much for those that don't need the full functionality.
Some conditional define can cut it back a lot to cut out things only
needed if alternate root mounts are required. I'm just not bothering
yet. The basic concept would be applied to all targets to keep file
code from forking too much.

Change-Id: I3b5a14c530ff4b10d97f67636237d96875eb8969
Author: Michael Sevakis
2022-03-03 18:58:07 -05:00
Aidan MacDonald
ad05c872fe powermgmt: Add battery current measurement
This allows targets to report the actual discharging or
charging current if they are able to.

Change-Id: I0b538e6ac94346f1434e45f83c8da8c1260a53a3
2021-12-23 11:39:58 +00:00
Aidan MacDonald
4506f2b58d powermgmt: Refactor battery measurement code
I've tried to clean up cruft and clarify what's being
done, prior to adding new features. The behavior should
be unchanged.

Change-Id: If8a68b7b48173d283df981a21cdd854b714e7695
2021-12-23 00:12:43 +00:00
Christian Soffke
a3684e090e m3k simulator: remove white border
Change-Id: I1503dadc966af568c8a4482e1d7f5641092594f0
2021-12-10 19:46:09 +01:00
Christian Soffke
f1eb0483d6 m3k simulator: add screen bezel
Change-Id: I4a34e5be7a459f909b81266b70c30f2968068696
2021-12-10 18:01:38 +01:00
Aidan MacDonald
f1215a338b uisimulator: remove an unused file
Appears to be a holdover from archos.

Change-Id: I93a2c04f64a3beff86281943dddc1138a893ff86
2021-11-27 15:22:31 -05:00
Aidan MacDonald
ee27ba416f uisimulator: add keyboard mappings for M3K scrollstrip
Change-Id: I2e6d5464fac6d9e1e292b17f5c1bbf646c1555de
2021-11-12 19:51:23 +00:00
William Wilgus
684565b8f3 USB fix red for device without HAVE_USB_POWER again.
Change-Id: I3122d532cbb8d5b5cb9040f08707c1514bc1b18e
2021-10-31 21:36:21 -04:00
William Wilgus
d72a0ed65d Use USB events for storing plugin_menu state
use usb connected callback to cancel menu reentry after USB plug/unplug

Change-Id: I8267deed6e8ada94ca527392f56f50ef22def1d7
2021-10-31 12:42:24 -04:00
William Wilgus
894a9d9063 USB add Insertion and Extraction callback events
We have this nice event library laying around probably a few more places
we could use event callbacks

Change-Id: I9180fa9d78788d161f2587110644ca3e08df6f50
2021-10-31 12:02:38 -04:00
Christian Soffke
bf54002bc1 Fiio M3k UI Simulator: Fix upside-down mapping for volume buttons
Change-Id: I57a1ee1ac43ea0eb5587e6249ef6bb06ab7342af
2021-10-16 16:49:56 -04:00
Aidan MacDonald
09fc9ee9a3 sim: change Eros Q native bitmap to a symlink
Change-Id: Id55ef276af0de52d7cbd8c7cdc6da46f171a01bd
2021-07-18 14:15:25 +01:00
Aidan MacDonald
07a3f6bcdb add Eros Q native simulator build
Change-Id: Ifdc882d19020da2e18234d6276409ad3e7efa138
2021-07-18 13:51:30 +01:00
Aidan MacDonald
4c60bc9e68 New port: Shanling Q1 native
- Audio playback works
- Touchscreen and buttons work
- Bootloader works and is capable of dual boot
- Plugins are working
- Cabbiev2 theme has been ported
- Stable for general usage

Thanks to Marc Aarts for porting Cabbiev2 and plugin bitmaps.

There's a few minor known issues:

- Bootloader must be installed manually using 'usbboot' as there is
  no support in jztool yet.

- Keymaps may be lacking, need further testing and feedback.

- Some plugins may not be fully adapted to the screen size and could
  benefit from further tweaking.

- LCD shows abnormal effects under some circumstances: for example,
  after viewing a mostly black screen an afterimage appears briefly
  when going back to a brightly-lit screen. Sudden power-off without
  proper shutdown of the backlight causes a "dissolving" effect.

- CW2015 battery reporting driver is buggy, and disabled for now.
  Battery reporting is currently voltage-based using the AXP192.

Change-Id: I635e83f02a880192c5a82cb0861ad3a61c137c3a
2021-07-13 22:01:33 +01:00
James Buren
d6dcb99684 uisimulator: implement sim_modtime
Change-Id: I1094632df092ba63605631333e939cf30b585a59
2021-07-11 13:48:26 +00:00
Solomon Peachy
e9ae1e9a8b Fix red introduced in 841e704fc3
Change-Id: I5a924f77231a4764f3ad9b196875f5bf073945d6
2021-07-07 13:49:24 +00:00
Dana Conrad
41ced369f6 ErosQ Simulator: fix keymap
The eros q simulator keys have been weird for a while, found out why.

Change-Id: Icb4209774448bc3c0d67dd87f802661cf12874b2
2021-06-07 22:01:47 +00:00
Solomon Peachy
7d0d32dbc6 Nuke the never-functional iriver ifp-7xx port
It never worked, and hasn't compiled in something like a decade, Given
the HW capabilities (limited onboard flash, no expandability) there's
really no point in trying to fix/complete it.

Change-Id: I7d175089840396f8891645bd10010d730dd5bfdc
2021-04-26 07:42:58 -04:00