Commit graph

1148 commits

Author SHA1 Message Date
Thomas Jarosch
4e42cd712c RaaA: Add RTC support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29544 a1c6a512-1295-4272-9138-f99709370657
2011-03-08 20:54:42 +00:00
Thomas Jarosch
5c73e34d2d Bring idle poweroff to RaaA and the sim
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29543 a1c6a512-1295-4272-9138-f99709370657
2011-03-08 19:33:30 +00:00
Thomas Jarosch
acd8bffb95 Expose sys_poweroff() and cancel_shutdown() to RaaA. Hopefully fixes android build
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29485 a1c6a512-1295-4272-9138-f99709370657
2011-03-01 20:31:20 +00:00
Thomas Jarosch
2647d11354 Move sleep timer code outside of PLATFORM_NATIVE ifdef so RaaA can access it
Also remove redundant RaaA stubs for it.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29467 a1c6a512-1295-4272-9138-f99709370657
2011-02-28 23:05:00 +00:00
Thomas Martitz
d8f6c75ab9 Hopefully get shutdown/exit handling on SDL/maemo right.
Make shutdown_hw() not return as it's supposed to, ensure sim_do_exit() is called from main thread and move sim_kernel_shutdown() into it to simplify things.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29455 a1c6a512-1295-4272-9138-f99709370657
2011-02-28 03:24:48 +00:00
Dave Chapman
376c9f3ad0 FS#11966 - use separate modelnames and config files for RaaA. This adds an APPLICATION define that can be used in Makefiles, and target-name defines (-DSDLAPP, -DANDROID, -DNOKIAN8XX and -DNOKIAN900) for use elsewhere. LCD size is now hard-coded for the Nokia builds in their config files. A new --app parameter is passed to buildzip.pl to explicitly state that this is an application build - it was previously derived from the model name.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29418 a1c6a512-1295-4272-9138-f99709370657
2011-02-27 11:37:39 +00:00
Thomas Martitz
6d85de3419 Implement cooperative threads on hosted platforms using C code.
This replaces SDL threads with real cooperative threads, which are less cpu intensive and allow priority scheduling.
The backend for context switching is dependant on the host (sigaltstack/longjmp on Unix, Fibers on Windows).
configure has options to force or disallow SDL threads.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29327 a1c6a512-1295-4272-9138-f99709370657
2011-02-18 22:46:01 +00:00
Thomas Jarosch
258626f455 Fix the shutdown sequence for maemo, SDL and simulator builds
Do proper shutdown in RaaA builds like writeout of
last.FM scrobbler file and other neat things.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29309 a1c6a512-1295-4272-9138-f99709370657
2011-02-15 19:43:04 +00:00
Thomas Jarosch
5f037ac015 Initial maemo platform support
Adds Nokia N900, N810 and N800 support.

Features:
- Introduce maemo specific platform defines
- Play audio in silent mode
- Stop playback on incoming calls
- Battery level readout
- Bluetooth headset support
- Save CPU by disabling screen updates if the display
  is off or the app doesn't have input focus
- N900: GStreamer audio backend

Kudos to kugel for the code review.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29248 a1c6a512-1295-4272-9138-f99709370657
2011-02-08 20:05:25 +00:00
Andree Buschmann
992f897440 Make sim build compilable under Cygwin. Fixes FS#11832.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28899 a1c6a512-1295-4272-9138-f99709370657
2010-12-25 22:17:02 +00:00
Thomas Martitz
87c8be4a08 RaaA: Improve tagcache search to make the database built.
First, it add the ability to tagcache to walk through multiple search roots.
Second, it adds symlinks targets to the search roots if they're are not inside any of the current search roots, otherwise the symlink is ignored (unless it's a file).

The default search root is still /, so no search root will be actually added.
But the tagcache now isn't trapped by recursive symlinks anymore and successfully builds, and it's prepared for a future music directory setting.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28884 a1c6a512-1295-4272-9138-f99709370657
2010-12-23 19:02:18 +00:00
Marcin Bukat
5a4b7c3920 MPIO HD300 simulator. FS#11796 by Michael Leslie
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28775 a1c6a512-1295-4272-9138-f99709370657
2010-12-08 21:40:35 +00:00
Thomas Martitz
2c2416094f Get rid of get_user_file_path and do the path handling in wrappers for open() and friends.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28752 a1c6a512-1295-4272-9138-f99709370657
2010-12-06 22:26:31 +00:00
Thomas Martitz
0f274ac852 Fix player sim yellow
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28725 a1c6a512-1295-4272-9138-f99709370657
2010-12-02 21:31:38 +00:00
Jonathan Gordon
1ce7ba4931 Make the %tr (radio RSSI) tag work as a bar tag or as a conditional.
As a conditional it scales its value to the number of options you give it (like volume)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28613 a1c6a512-1295-4272-9138-f99709370657
2010-11-18 11:47:42 +00:00
Marcin Bukat
440d39a206 MPIO HD200 - Put key hints on simulator graphic
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28539 a1c6a512-1295-4272-9138-f99709370657
2010-11-09 19:29:26 +00:00
Marcin Bukat
650a2941fd MPIO HD200: fix red (I missed bootloader and simulator when renaming buttons)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28444 a1c6a512-1295-4272-9138-f99709370657
2010-11-02 10:51:04 +00:00
Marcin Bukat
56c4e9fa60 Separate mas35xx lowlevel stuff. Move SH specific bits to target tree. FS#11189 by me.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28425 a1c6a512-1295-4272-9138-f99709370657
2010-10-31 21:09:34 +00:00
Szymon Dziok
c8dfe0508e HDD6330: add the simulator.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28323 a1c6a512-1295-4272-9138-f99709370657
2010-10-21 22:20:16 +00:00
Teruaki Kawashima
c85ff1c0c9 fix button maps and assign some buttons for uisimulator.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28268 a1c6a512-1295-4272-9138-f99709370657
2010-10-13 12:54:25 +00:00
Thomas Martitz
0d4585b28f Extend lc_open() to also being able to load overlay plugins.
For this it needs to look at the plugin header. Since lc_open() doesn't know
it's a plugin, the header needs to be changed slightly to include the new lc_header (which needs to be the first element in plugin_header so it can be casted savely).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28054 a1c6a512-1295-4272-9138-f99709370657
2010-09-09 16:17:21 +00:00
Thomas Martitz
ded525e466 Revert r27972 to fix FS#11610 (but in a way android builds still work).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28050 a1c6a512-1295-4272-9138-f99709370657
2010-09-08 21:26:36 +00:00
Thomas Martitz
89dcb1c984 fix red.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28049 a1c6a512-1295-4272-9138-f99709370657
2010-09-08 20:42:34 +00:00
Thomas Martitz
e22aa75f5c Cleanup io.c a bit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28048 a1c6a512-1295-4272-9138-f99709370657
2010-09-08 20:39:55 +00:00
Thomas Martitz
be17fff138 Move comment
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27978 a1c6a512-1295-4272-9138-f99709370657
2010-09-02 00:24:43 +00:00
Thomas Martitz
f8381d9c39 Android: don't compile stubs.c and kill off libuisimulator entirely.
Seperate make rules in a almost empty android.make.
Also add forgotten powermgmt-android.c

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27977 a1c6a512-1295-4272-9138-f99709370657
2010-09-02 00:24:40 +00:00
Thomas Martitz
f05cdc46f2 Android: don't compile powermgmt-sim.c
Instead implement a bit of battery monitoring. Currently it only fetches the battery level (in %) every 30s,
but it could do more like battery status, charger connected, voltage...
Theoretically, we could also exit/quit after some time of inactivity too
(perhaps not a bad idea since Rockbox puts a slight but still non-zero CPU load even if doing nothing).

Ironically, Rockbox is now the only way to get the exact battery level (at least I haven't found anything yet) on my phone :-)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27974 a1c6a512-1295-4272-9138-f99709370657
2010-09-01 23:36:15 +00:00
Thomas Martitz
c00fbc4d06 Android: Don't compile sim_tasks.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27973 a1c6a512-1295-4272-9138-f99709370657
2010-09-01 22:09:43 +00:00
Thomas Martitz
a4264eb89a Redo previous commit to not break android builds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27972 a1c6a512-1295-4272-9138-f99709370657
2010-09-01 22:06:03 +00:00
Thomas Martitz
6eaab4d004 Ged rid of uisimulator/common/io.c for android builds.
Use host's functions for file i/o directly (open(), close() ,etc.), not the sim_* variants.
Some dir functions need to be wrapped still because we need to cache the parents dir's path (host's dirent doesn't let us know).
For the same reason (incompatibility) with host's dirent) detach some members from Rockbox' dirent struct and put it into an extra one,
the values can be retrieved via the new dir_get_info().

Get rid of the sim_ prefix for sleep as well and change the signature to unix sleep().

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27968 a1c6a512-1295-4272-9138-f99709370657
2010-09-01 21:29:34 +00:00
Thomas Martitz
2c2e261648 Use system headers a bit more: use host's fcntl.h for O_RDONLY etc.
Removes the need to fix up those in the simulator.

Also work around some posix-mingw incompatibilities (e.g. getcwd()).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27904 a1c6a512-1295-4272-9138-f99709370657
2010-08-27 12:38:25 +00:00
Thomas Martitz
194174a371 2nd try: Introduce a small api for loading code (codecs,plugins) from disk/memory.
It's a used by codec/plugin loading and vastly reduces code duplication. It's also a step forward in getting rid of libuisimulator in the application ports.

Apparently sh needs linker symbols prefixed with _ even if they're referenced without from C code.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27902 a1c6a512-1295-4272-9138-f99709370657
2010-08-27 00:29:50 +00:00
Thomas Martitz
97d2a6ec5c Revert "Introduce a small api for loading code (codecs,plugins) from disk/memory."
I don't understand the build error at all, plugin_bss_start is clearly defined in plugin.lds

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27901 a1c6a512-1295-4272-9138-f99709370657
2010-08-27 00:16:26 +00:00
Thomas Martitz
73f057be6f Introduce a small api for loading code (codecs,plugins) from disk/memory.
It's a used by codec/plugin loading and vastly reduces code duplication. It's also a step forward in getting rid of libuisimulator in the application ports.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27900 a1c6a512-1295-4272-9138-f99709370657
2010-08-26 23:20:02 +00:00
Jonathan Gordon
aaa1636a8b Move to a proper sdl key config instead of using the d2 pad. make the mouse wheel work, middle click is "select" and right click is "back"
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27891 a1c6a512-1295-4272-9138-f99709370657
2010-08-26 11:43:51 +00:00
Thomas Martitz
240923a801 Rockbox as an application: Commit current Android port progress.
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-08-02 20:34:47 +00:00
Thomas Martitz
9c0b2479f7 Rockbox as an application: add get_user_file_path().
For RaaA it evaluates user paths at runtime. For everything but codecs/plugins it will give the path under $HOME/.config/rockbox.org if write access is needed or if the file/folder in question exists there (otherwise it gives /usr/local/share/rockbox).
This allows for installing themes under $HOME as well as having config.cfg and other important files there while installing the application (and default themes) under /usr/local.

On the DAPs it's a no-op, returing /.rockbox directly.

Not converted to use get_user_file_path() are plugins themselves, because RaaA doesn't build plugins yet.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27656 a1c6a512-1295-4272-9138-f99709370657
2010-08-01 16:15:27 +00:00
Thomas Martitz
57613ea5fa Rename/change SIMVER to APP_TYPE in the Makefiles.
SIMVER was really only used to detect a simulator build. With APP_TYPE you can
now differentiate between simulator, application, checkwps and database builds.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27372 a1c6a512-1295-4272-9138-f99709370657
2010-07-10 13:49:49 +00:00
Thomas Martitz
31b5c471ae Rockbox as an application: Add an 320x240 SDL application target.
It still works mostly like the simulator. There's also some minor left overs from the sim, but it does not define SIMULATOR.
It installs into the current (build) dir, and you need to run it with '--root .' (because it looks for ./.rockbox and not ./simdisk/rockbox) as options. That's one of the few kludges left that should be resolved soon'ish.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27310 a1c6a512-1295-4272-9138-f99709370657
2010-07-06 15:11:56 +00:00
Rafaël Carré
3982f1e932 Simulator: build recording code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27280 a1c6a512-1295-4272-9138-f99709370657
2010-07-04 13:37:52 +00:00
Frank Gevaerts
b8286d45be Move -Wl,-z,defs to GLOBAL_LDOPTS (instead of GCCOPTS), to avoid noise in older gcc output when not linking
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27260 a1c6a512-1295-4272-9138-f99709370657
2010-07-03 20:58:22 +00:00
Marcin Bukat
0fef85e9db HD200 - improve keymap in simulator
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27242 a1c6a512-1295-4272-9138-f99709370657
2010-07-02 11:50:04 +00:00
Thomas Martitz
251b62d73a sim_icons.c is actually only for charcell display simulation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27069 a1c6a512-1295-4272-9138-f99709370657
2010-06-22 23:22:31 +00:00
Jonathan Gordon
8d3dbb8809 make the sim build the skin lib also
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26886 a1c6a512-1295-4272-9138-f99709370657
2010-06-17 12:59:43 +00:00
Thomas Martitz
b2302e4e9b Fix remaining reds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26621 a1c6a512-1295-4272-9138-f99709370657
2010-06-06 10:55:15 +00:00
Thomas Martitz
19ac3453e0 Fix most reds, I have no idea what's wrong with the gigabeats (yet).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26619 a1c6a512-1295-4272-9138-f99709370657
2010-06-06 10:27:14 +00:00
Thomas Martitz
59d2603c41 Move target-simulating specific keymaps out of button-sdl.c into a file per
keypad.

Copyright is restored for each keymap according to git blame.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26615 a1c6a512-1295-4272-9138-f99709370657
2010-06-06 09:11:52 +00:00
Rafaël Carré
5d236b2bfd Generate C file / header for svn version string
It's now easier to force rebuild of files depending on the svn revision

version.c/version.h are generated once with new tools/genversion.sh
Changes in the VCS are still not auto detected, so you'll have to remove
builddir/version.* if you want to change the string in your binaries

APPSVERSION is now called RBVERSION and is defined in the generated
header instead of being defined by the Makefiles
appsversion is now called rbversion (the plugin api number didn't change
since old modules are still binary compatible)

Change some bootloaders to use knwon-at-buildtime RBVERSION instead of
"%s" + rbversion

You'll need to run make clean to regenerate dependencies after the
removal of apps/version.h

To build binaries with a different version string, hand-edit
tools/version.sh or tools/genversion.sh (which calls the former)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26320 a1c6a512-1295-4272-9138-f99709370657
2010-05-27 09:41:46 +00:00
Rafaël Carré
ba46c88c6f rtc_enable_alarm() needs no return value
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26245 a1c6a512-1295-4272-9138-f99709370657
2010-05-22 00:28:26 +00:00
Rafaël Carré
279ce89e47 uisimulator/sdl only contains bitmaps, rename to 'bitmaps'
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26139 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 12:46:09 +00:00