summaryrefslogtreecommitdiffstats
path: root/firmware/export/config/sim.h
AgeCommit message (Collapse)AuthorFilesLines
2024-03-31rolo: simplify parsing scramble header in load_firmware()Aidan MacDonald1-4/+0
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
2015-01-08Get rid of USE_ROCKBOX_USBAmaury Pouly1-1/+0
Except for unfinished or experimental ports, it isthe case that USE_ROCKBOX_USB and HAVE_USBSTACK are both defined or both undefined. Furthermore, it is a leftover of some early developments on the USB stack and doesn't make sense anymore. Change-Id: Ic87a865b6bb4c7c9a8d45d1f0bb0f2fb536b8cad Reviewed-on: http://gerrit.rockbox.org/1091 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-02-23Second try at undefing STORAGE_GET_INFO, the previous one was too hasty, sorry.Thomas Martitz1-1/+0
Change-Id: If938c132d46efcb531227d9fde8cce91104566e0
2014-02-23undef HAVE_STORAGE_GET_INFO for the sim, there is no useful implementation ↵Thomas Martitz1-0/+1
right now. Change-Id: I3050b97d10d9b4705321d8e37faf4d5a6c58485b
2014-02-23simulator: Simulate external storage for HAVE_MULTIDRIVE.Thomas Martitz1-3/+0
The virtual external storage can be inserted/extracted with the e key. This has little effect because there is no way to access the storage (yet, a later commit will change this). Except on ondio where the mmc needs to be extracted before entering USB (like on real target). Change-Id: I523402832f3b4ae71e0603b281aba4fb8592a897
2014-02-23storage: Add STORAGE_HOSTFSThomas Martitz1-1/+1
CONFIG_STORAGE & STORAGE_HOSTFS allows to use parts of the storage_* API to be compiled for application targets without compiling storage.c or performing actually raw storage access. This is primarily to enable application targets to implement HAVE_MULTIVOMULE/HAVE_HOTSWAP (in a later commit). SIMULATOR uses the same mechanism without explicitely defining STORAGE_HOSTFS (how to add a bit to an existing preprocessor token?). Change-Id: Ib3f8ee0d5231e2ed21ff00842d51e32bc4fc7292
2012-02-09Fix sim battery emulation: Set such a low sample value for battery smoothing ↵Nick Peskett1-0/+7
as to effectively disable it. Since smoothing was enabled for battery_status_update() in 109084d, the simulated charge/ discharge cycle was so fast that the battery level never really dropped much below 90%. Change-Id: Ide5c7ceef97bc9ed62d45e3a0afd99ff6f0550ea
2012-01-04Fix reds by implementing a few more stubs, and undefining HAVE_STORAGE_FLUSH ↵Thomas Martitz1-0/+1
in the sim. Also slight change on how to measure seconds. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31550 a1c6a512-1295-4272-9138-f99709370657
2012-01-03Rework powermgmt to enable code re-use on appliation and sims.Thomas Martitz1-0/+5
* Introduce CONFIG_BATTERY_MEASURE define, to allow targets (application) to break powermgmt.c's assumption about the ability to read battery voltage. There's now additionally percentage (android) and remaining time measure (maemo). No measure at all also works (sdl app). If voltage can't be measured, then battery_level() is king and it'll be used for power_history and runtime estimation. * Implement target's API in the simulator, i.e. _battery_voltage(), so it doesn't need to implement it's own powermgmt.c and other stubs. Now the sim behaves much more like a native target, although it still changes the simulated battery voltage quickly, * Other changes include include renaming battery_adc_voltage() to _battery_voltage(), for consistency with the new target functions and making some of the apps code aware that voltage and runtime estimation is not always available. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31548 a1c6a512-1295-4272-9138-f99709370657
2011-12-24Fix reds.Thomas Martitz1-2/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31416 a1c6a512-1295-4272-9138-f99709370657
2010-11-10Touchscreen: Improved scroll thresholdThomas Martitz1-0/+1
Remove the hardcoded (and way too small) scroll threshold (the distance moved in pixels before we think the users wants to scroll) and replace it with something based on the actual DPI of the screen. On Android we call the API for that, on other touchscreens we reimplemented Android's formula (as of 2.2) and calculate it. Flyspray: 11727 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28548 a1c6a512-1295-4272-9138-f99709370657
2010-08-02Rockbox as an application: Commit current Android port progress.Thomas Martitz1-1/+2
General state is: Rockbox is usable (plays music, saves configuration, touchscreen works too). Problems: - Playing music in the background (i.e. when switching to another app) doesn't work reliably, but I'm working on that now. - no cabbiev2 (only some preliminary files for it), no other default theme. - screen flickers sometimes if the updates are too frequent - no multi screen apk/package - strange behavior when a phone call comes in The java files (and the eclipse project) resides in android/, which is also supposed to be the build folder. I've put a small README in there for instructions. There are some steps needed after the make part, which are described there, and which eclipse mostly handles. But there ought to be some script/makefile rules which do that instead in the future. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27668 a1c6a512-1295-4272-9138-f99709370657
2010-06-21Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with ↵Thomas Martitz1-0/+1
#if (CONFIG_PLATFORM & PLATFORM_HOSTED) (or equivalently). The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR). The new define is to (de-)select code to compile on hosted platforms generally. Should be no functional change to targets or the simulator. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657
2010-05-15- Move uisimulator/sdl/*.[ch] into the target tree, under ↵Thomas Martitz1-0/+4
firmware/target/hosted/sdl, uisdl.c is split up across button-sdl.c and system-sdl.c. - Refactor the program startup. main() is now in main.c like on target, and the implicit application thread will now act as our main thread (previously a separate one was created for this in thread initialization). This is part of Rockbox as an application and is the first step to make an application port from the uisimulator. In a further step the sim bits from the sdl build will be separated out. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26065 a1c6a512-1295-4272-9138-f99709370657
2010-05-12Fix r25970 red and yellow *and* a bug uncovered for pp5002 where ↵Michael Sevakis1-0/+1
pcm_play_dma_start wasn't actually initializing the dma_play_data with the first buffer info (must've happened during pp502x DMA conversion). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25971 a1c6a512-1295-4272-9138-f99709370657
2010-05-06Move c/h files implementing/defining standard library stuff into a new libc ↵Thomas Martitz1-0/+2
directory, also standard'ify some parts of the code base (almost entirely #include fixes). This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
2010-01-19Fix FS#10867 and a few more potential issues by imitate target scrollwheel ↵Thomas Martitz1-0/+16
behavior more (although that behavior is suboptimal imo). Also, default for maximum backlight brightness in the sim and move stuff into sim.h. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24289 a1c6a512-1295-4272-9138-f99709370657
2009-12-07Rename targets to be consistent in all places. (FS #10819). Take 2.Björn Stenberg1-0/+81
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23883 a1c6a512-1295-4272-9138-f99709370657